def make_ixora_spawns(): done_so = set() for entry in raw_ixora_spawn_list: row,factory,idx,pools = entry so = row # 'Options.Options[{}].Factory.Object..AIActorClass'.format(rev(c,idx)) pool = "all" if params["heavy"]: pool = "heavy" elif len(pools) > 0: pool = random.choice(pools) mod.comment(f"From Pool: {pool}") mob = random.choice(difficulty_pools[pool]) bpchar = mob[BPCHAR] mod.comment(f"so:{row} factory:{factory} bpchar:{bpchar}") mod.reg_hotfix(Mod.EARLYLEVEL, IXORA_MAP, row, f'Options.Options[{idx}].Factory.Object..AIActorClass', f"BlueprintGeneratedClass'{bpchar}.{get_bpchar(bpchar)}_C'", ) extend = params["extend"] scale = 1.0 if not so in done_so: mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format(idx), f'(X={scale * float(extend[0])},Y={scale * float(extend[1])},Z={scale * float(extend[2])})') mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format(idx), f'(x={scale * float(extend[0])},y={scale * float(extend[1])},z={scale * float(extend[2])})') mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..UINameOverride'.format(idx), 'None') mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnOrigin'.format(idx), params["SpawnOrigin"]) # We used AlwaysSpawn and it didn't necessarily work mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..CollisionHandling'.format(idx), params["collision"]) mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..bOverrideCollisionHandling'.format(idx), 'True') mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..ItemPoolToDropOnDeathAdditive'.format(idx), 'True') mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..bUseActorProperties'.format(idx), params["UseActorProperties"]) mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnDetails'.format(idx), '(Critical=AlwaysSpawn,bOverrideCritical=True)') # added this # AdjustIfPossibleButAlwaysSpawn mod.reg_hotfix(DFL_LEVEL, IXORA_MAP, '{}:{}'.format(Mod.get_full(so),bpchar), 'TeamOverride', Mod.get_full_cond('/Game/Common/_Design/Teams/Team_Maliwan', 'Team')) done_so.add(so)
mod.comment('Update first-gun pool') mod.reg_hotfix( Mod.LEVEL, 'Recruitment_P', '/Game/GameData/Loot/ItemPools/Guns/Pistols/ItemPool_Pistols_FirstGun', 'BalancedItems.BalancedItems[0].InventoryBalanceData', Mod.get_full_cond(set_gun)) mod.reg_hotfix( Mod.LEVEL, 'Recruitment_P', '/Game/GameData/Loot/ItemPools/Guns/Pistols/ItemPool_Pistols_FirstGun', 'BalancedItems.BalancedItems[0].ResolvedInventoryBalanceData', Mod.get_full_cond(set_gun, 'InventoryBalanceData')) mod.newline() # Now do the changes to the second-gun pool mod.comment('Update second-gun LootDef') for idx in [4, 5]: mod.reg_hotfix( Mod.EARLYLEVEL, 'Recruitment_P', '/Game/Missions/Plot/EP01_ChildrenOfTheVault/LootDef_Industrial_CarTrunk_Prologue', 'DefaultLoot.DefaultLoot[0].ItemAttachments.ItemAttachments[{}].ItemPool' .format(idx), Mod.get_full( '/Game/GameData/Loot/ItemPools/Guns/ItemPool_Pistols_All', 'ItemPoolData')) mod.newline() mod.close()
def make_ixora_spawns(mod, mapcode, raw_ixora_spawn_list, params, ignore_list=ignore_list): done_so = set() outentries = [] for entry in raw_ixora_spawn_list: row, factory, idx, pools = entry[0:4] so = row # 'Options.Options[{}].Factory.Object..AIActorClass'.format(rev(c,idx)) pool = "any" # look this is a dumb override # essentially if our entry is large and then override it if len(entry) > 4: mob_name = entry[4] mod.comment(f"Override with: {mob_name}") mob = mk_mob_tuple(mob_name) else: if len(pools) > 0: pool = random.choice(pools) mod.comment(f"From Pool: {pool}") mob = random.choice(difficulty_pools[pool]) bpchar = mob[BPCHAR] # we want to save out the raw_ixora_spawn_list outentry = [None, None, None, None] outentry[0:4] = entry[0:4] outentry[3] = mob[BPCHAR] print(outentry) outentries.append(outentry) # we ignore after the random choice # to maintain our seeds better if (mapcode, row) in ignore_list: print(mapcode, row) mod.comment(f"Ignoring: so:{row} factory:{factory}") mod.comment(f"Ignoring: bpchar:{bpchar}") continue mod.comment(f"so:{row} factory:{factory}") mod.comment(f"bpchar:{bpchar}") mod.reg_hotfix( DFL_LEVEL, mapcode, row, f'Options.Options[{idx}].Factory.Object..AIActorClass', f"BlueprintGeneratedClass'{bpchar}.{get_bpchar(bpchar)}_C'", ) # nope team didn't help # mod.reg_hotfix(Mod.EARLYLEVEL, # mapcode, # row, # f'Options.Options[{idx}].Factory.Object..CachedTeam', # mod.get_full_cond(f"/Game/Common/_Design/Teams/Team_Maliwan",'Team') # ) extend = params["extend"] scale = 1.0 # return# disable this stuff if not so in done_so: if not extend == 'None': mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format( idx), f'(X={scale * float(extend[0])},Y={scale * float(extend[1])},Z={scale * float(extend[2])})' ) else: mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format( idx), 'None') mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..UINameOverride'.format( idx), 'None') mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnOrigin'.format(idx), params["SpawnOrigin"]) # We used AlwaysSpawn and it didn't necessarily work mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..CollisionHandling'.format( idx), params["collision"]) mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..bOverrideCollisionHandling' .format(idx), 'True') mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..ItemPoolToDropOnDeathAdditive' .format(idx), 'True') mod.reg_hotfix( DFL_LEVEL, mapcode, Mod.get_full(so), 'Options.Options[{}].Factory.Object..bUseActorProperties'. format(idx), params["UseActorProperties"]) # # Disabled This stuff # if params.get("IrrelevantAction",False): # action = params.get("IrrelevantAction") # if action == True: # action = "Nothing" # mod.reg_hotfix(DFL_LEVEL, mapcode, Mod.get_full(so), # 'Options.Options[{}].Factory.Object..SpawnDetails'.format(idx), # f'(Critical={params.get("Critical","AlwaysSpawn")},bOverrideCritical=True,IrrelevantAction={action},bOverrideIrrelevantAction=True)') # else: # mod.reg_hotfix(DFL_LEVEL, mapcode, Mod.get_full(so), # 'Options.Options[{}].Factory.Object..SpawnDetails'.format(idx), # '(Critical=AlwaysSpawn,bOverrideCritical=True)') # added this # perhaps team was the issue? # mod.reg_hotfix(DFL_LEVEL, mapcode, '{}:{}'.format(Mod.get_full(so),bpchar), 'TeamOverride', Mod.get_full_cond('/Game/Common/_Design/Teams/Team_Maliwan', 'Team')) done_so.add(so) return outentries
'Technical_Forest', 'Technical_Leather', 'Technical_Stealth', 'Technical_Thunderbird', 'Revolver_Chopper', 'Revolver_Lollipop', 'Revolver_Dark', 'Revolver_Forest', 'Revolver_Bubblegum', 'Revolver_Golden', 'Revolver_Lifeline', 'Revolver_Maliwan', 'Revolver_Stealth', ]), ]: full_table = Mod.get_full(table) mod.comment(label) for row in rows: for level in sorted(all_levels): if ((level in outrunner_levels and row.startswith('Outrunner_')) or (level in technical_levels and row.startswith('Technical_')) or (level in cyclone_levels and row.startswith('Revolver_'))): mod.table_hotfix(Mod.LEVEL, level, full_table, row, col_name, 0) mod.newline() # Fix any skin errors mod.header('Fixes/Tweaks') mod.comment('Fix Outrunner Red Machine Skin MaxGameStage') for level in sorted(outrunner_levels):
# # The status of this is a bit weird - about 50-75% of the Skag spawns in the map seem # to stop working at all, while the remainder spawn *mostly* skags but occasionally # a Nekrobug. I wonder if something's calling out to that last SkagPup one, and that's # the only definition that's *actually* working? # # Anyway, since I didn't actually have any mod plans for this, and just wanted to see # if I could do it, I'm leaving it there. I suspect that with some more investigation # and trial-and-error, you'd be able to get any enemy to spawn anywhere. for (so, count) in [ ('/Game/Enemies/_Spawning/Skags/_Mixes/Zone0/SpawnOptions_PupsAndAdults', 2), ('/Game/Enemies/_Spawning/Skags/_Mixes/Zone0/SpawnOptions_SkagEarlyMix', 3), ('/Game/Enemies/_Spawning/Skags/Variants/SpawnOptions_SkagPup', 1), ]: for idx in range(count): mod.reg_hotfix(Mod.EARLYLEVEL, 'Prologue_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..AIActorClass'.format(idx), "BlueprintGeneratedClass'/Game/Enemies/Nekrobug/Ground/_Design/Character/BPChar_Nekrobug_Ground.BPChar_Nekrobug_Ground_C'") mod.reg_hotfix(Mod.LEVEL, 'Prologue_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format(idx), '(x=63,y=63,z=65)') mod.reg_hotfix(Mod.LEVEL, 'Prologue_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..CachedTeam'.format(idx), "Team'/Game/Common/_Design/Teams/Team_Nekrobug.Team_Nekrobug'") mod.close()
( "Candy (in Desolation's Edge)", ['Desolate_P'], '/Game/Enemies/_Spawning/Maliwan/Vehicles/Zone4/Desolate_P/SpawnOptions_Vehicle_DarkMaliwan_DesolateMix', # Defaults: 0.6 (outrunners), 1 (cyclones), 0.01 (candy) [0.6, 1, 0.2]), ( 'Festive Flesh-Eater (in Splinterlands and Carnivora)', ['Motorcade_P', 'MotorcadeFestival_P'], '/Game/Enemies/_Spawning/CotV/Vehicles/Zone_3/Motorcade_P/SpawnOptions_Vehicle_CotV_Motorcade_FullMix', # Defaults: 1 (technicals), 0.6 (cyclones), 0.01 (festive flesh-eater) [1, 0.6, 0.2]), ]: # Process the data a bit. spawnoptions_full = Mod.get_full(spawnoptions) total_weight = sum(weights) # Go! mod.comment(label) for idx, weight in enumerate(weights): pct_weight = weight / total_weight * 100 for level in levels: mod.reg_hotfix( Mod.LEVEL, level, spawnoptions_full, 'Options.Options[{}].WeightParam.Range.Value'.format(idx), weight) mod.reg_hotfix(Mod.LEVEL, level, spawnoptions_full, 'Options.Options[{}].Probability'.format(idx), '{:.02f}%'.format(pct_weight)) mod.newline()
def gen_mod(so, scale, my_list): c = len(my_list) global healh_chance healh_chance -= 1 for idx, val in enumerate(my_list): if (isinstance(val[0], tuple) or isinstance(val[0], list)): # this means we're using (name,bpchar,balance,balancerow,extras) print_and_comment(f'Deploying {val[0][0]}') # new tuple of bpchar and prior spawn factory val = (val[0][1], val[1]) else: print_and_comment(f'Deploying {val[0]}') if val == 'empty': continue var = val if len(var) < 2: print("Var < 2") print(var) assert len(var) >= 2 obj = var[1].replace("_C'", "") print(var, obj, val) mod.reg_hotfix( Mod.EARLYLEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..AIActorClass'.format( rev(c, idx)), "BlueprintGeneratedClass'{}.{}_C'".format(var[0], get_bpchar(var[0]))) if obj not in ready_list: ready_list.append(obj) bpchar = var[0].replace("BlueprintGeneratedClass'", "") last_bit = bpchar.split('/')[-1] # extend = eval(val+"(1)").replace('(x=','').replace('y=','').replace('z=','').replace(')','').split(',') # should extent be looked up from a table? extend = (70, 70, 119) scale = 1.0 mod.reg_hotfix( Mod.LEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnExtent'.format( rev(c, idx)), f'(X={scale * float(extend[0])},Y={scale * float(extend[1])},Z={scale * float(extend[2])})' ) mod.reg_hotfix( Mod.LEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnOrigin'.format( rev(c, idx)), f'(X={1500},Y={0},Z={0})') mod.reg_hotfix( Mod.LEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..CollisionHandling'.format( rev(c, idx)), 'AlwaysSpawn') mod.reg_hotfix( Mod.LEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..bOverrideCollisionHandling' .format(rev(c, idx)), 'True') mod.reg_hotfix( Mod.LEVEL, 'TechSlaughter_P', Mod.get_full(so), 'Options.Options[{}].Factory.Object..SpawnDetails'.format( rev(c, idx)), '(Critical=AlwaysSpawn)') mod.reg_hotfix( Mod.EARLYLEVEL, 'TechSlaughter_P', '{}:{}'.format(Mod.get_full(so), val[1]), 'TeamOverride', Mod.get_full_cond('/Game/Common/_Design/Teams/Team_Maliwan', 'Team'))