segments = {} # Loop through a number of control vars first_profile = True for (profile_name, profile_desc, (ground_speed, air_speed, injured_speed, crouched_pct, jump_z, air_control_pct, ladder_speed)) in [ ('reasonable', 'Reasonable Improvements', (650, 700, 300, 1, 750, .8, 400)), ('extreme', 'Extreme Improvements', (1000, 1100, 500, 1, 900, .9, 600)), ('stock', 'Stock Values', (440, 500, 150, 0.5, 630, .11, 200)) ]: # Set up a new hotfix object hfs = Hotfixes(nameprefix=profile_name.capitalize()) # Disable everything but the first option, by default if first_profile: line_prefix = '' line_suffix = '' else: line_prefix = '#' line_suffix = '<off>' char_segments = {} for (name, streaming_obj, player_obj) in [ ('Axton', 'GD_Soldier_Streaming.Pawn_Soldier', 'GD_Soldier.Character.CharClass_Soldier'), ('Gaige', 'GD_Tulip_Mechro_Streaming.Pawn_Mechromancer', 'GD_Tulip_Mechromancer.Character.CharClass_Mechromancer'),
mod_version = '1.0.1' output_filename = '{}.txt'.format(mod_name) # Control vars ground_speed = 1000 # (stock: 440) air_speed = 1100 # (stock: 500) injured_speed = 500 # (stock: 150) crouched_pct = 1 # (stock: 0.5) jump_z = 900 # (stock: 630) air_control_pct = .9 # (stock: 0.11) ### ### Hotfix object to store all our hotfixes ### hfs = Hotfixes() char_segments = {} for (name, streaming_obj, player_obj) in [ ('Axton', 'GD_Soldier_Streaming.Pawn_Soldier', 'GD_Soldier.Character.CharClass_Soldier'), ('Gaige', 'GD_Tulip_Mechro_Streaming.Pawn_Mechromancer', 'GD_Tulip_Mechromancer.Character.CharClass_Mechromancer'), ('Krieg', 'GD_Lilac_Psycho_Streaming.Pawn_LilacPlayerClass', 'GD_Lilac_PlayerClass.Character.CharClass_LilacPlayerClass'), ('Maya', 'GD_Siren_Streaming.Pawn_Siren', 'GD_Siren.Character.CharClass_Siren'), ('Salvador', 'GD_Mercenary_Streaming.Pawn_Mercenary', 'GD_Mercenary.Character.CharClass_Mercenary'), ('Zero', 'GD_Assassin_Streaming.Pawn_Assassin', 'GD_Assassin.Character.CharClass_Assassin'),
prefix_label = ' ' * (4 * 1) prefix = ' ' * (4 * 2) for (label, vehicle_name, class_name) in [ ( 'Flak Cannon', 'GD_Co_StingRay_Streaming.Archetype.Vehicle_StingRay_FlakBurst', 'GD_Co_StingRay_Streaming.Archetype.Class_StingRay_FlakBurst', ), ( 'Cryo Rocket', 'GD_Co_StingRay_Streaming.Archetype.Vehicle_StingRay_CryoRocket', 'GD_Co_StingRay_Streaming.Archetype.Class_StingRay_CryoRocket', ), ]: hfs = Hotfixes(nameprefix=label) # Default: 2400 hfs.add_demand_hotfix( 'max_speed', 'Stingray', '{},{},MaxSpeed,,3400'.format(demand_name, vehicle_name)) # Default: 3000 hfs.add_demand_hotfix( 'full_air_speed', 'Stingray', '{},{},FullAirSpeed,,4000'.format(demand_name, vehicle_name)) # Default: 10000 hfs.add_demand_hotfix( 'afterburner_speed', 'Stingray', '{},{},AfterburnerSpeed,,14000'.format(demand_name, class_name))
sys.exit(1) ### ### Output variables ### mod_name = 'BL2 Early Bloomer' mod_version = '1.0.0' input_filename = 'mod-input-file.txt' output_filename = '{}.txt'.format(mod_name) ### ### Hotfix object to store all our hotfixes ### hfs = Hotfixes(include_gearbox_patches=True) # Early-game loot unlocks. Except for this one specific case (Aquamarine Snipers), # this can be done with `set` statements, so you'll see all those in mod-input-file.txt. # This one has to be hotfixed to be fully cross-platform compatible, and predictable. hfs.add_level_hotfix('part_early_game_fix_0', 'PartEarlyGameFix', """,GD_Aster_Weapons.Snipers.SR_Maliwan_4_Aquamarine:WeaponPartListCollectionDefinition_306, ElementalPartData.WeightedParts,, ( ( Part=WeaponPartDefinition'GD_Weap_SniperRifles.elemental.SR_Elemental_Fire', Manufacturers=, MinGameStageIndex=0, MaxGameStageIndex=1, DefaultWeightIndex=2