Example #1
0
        p = ' ' * 4
        retlist = []
        retlist.append('#<{}><MUT>'.format(vehicle.label))
        retlist.extend(vehicle.get_set(p, hfs, vehicle))
        for v2 in self.vehicle_list:
            if v2 != vehicle:
                retlist.extend(v2.get_set(p, hfs, vehicle, active=False))
        retlist.append('#</{}>'.format(vehicle.label))
        return "\n\n".join(['{}{}'.format(self.prefix, s) for s in retlist])


###
### Vehicles
###

hfs = Hotfixes()

vehicles = Vehicles(hfs, prefix=' ' * (4))
vehicles.add_vehicle(
    Vehicle('runnermg', 'Runner (Machine Gun)', 'Light Runner MG',
            'GD_Globals.VehicleSpawnStation.VSSUI_MGRunner',
            'GD_Runner_Streaming.VSS.VSS_MGLightRunner'))
vehicles.add_vehicle(
    Vehicle('runnerrocket', 'Runner (Rocket)', 'Light Runner Rocket Launcher',
            'GD_Globals.VehicleSpawnStation.VSSUI_RocketRunner',
            'GD_Runner_Streaming.VSS.VSS_RocketRunner'))
vehicles.add_vehicle(
    Vehicle('technicalsaw', 'Technical (Sawblade)', 'Sawblade Technical',
            'GD_Globals.VehicleSpawnStation.VSSUI_SawBladeTechnical',
            'GD_BTech_Streaming.VSS.VSS_SawBladeTechnical'))
vehicles.add_vehicle(
Example #2
0
    sys.exit(1)

###
### Constants
###

mod_name = 'Luneshine on Uniques'
mod_version = '1.0.0'
input_filename = 'mod-input-file.txt'
output_filename = 'Luneshine on Uniques'

###
### Hotfix object to store all our hotfixes
###

hfs = Hotfixes()

# Adds Luneshine to some unique weapons which didn't have them,
# previously.  This too is autogenerated by `gen_guaranteed_luneshine.py`
# from my own TPS Better Loot mod, though I've since edited it slightly
# to handle the one launcher properly.
hfs.add_level_hotfix(
    'luneshine_override_0', 'LuneshineOverride',
    """,GD_Petunia_Weapons.Launchers.RL_Vladof_5_Menace:PartList,Accessory2PartData,,
    (
        bEnabled=True,
        WeightedParts=(
            (
                bDisabled=True,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_None',
                Manufacturers=(
Example #3
0
### Generation
###

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, .05, 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 [
            ('Athena', 'GD_Gladiator_Streaming.Pawn_Gladiator', 'GD_Gladiator.Character.CharClass_Gladiator'),
            ('Aurelia', 'Crocus_Baroness_Streaming.Pawn_Baroness', 'Crocus_Baroness.Character.CharClass_Baroness'),
            ('Fragtrap', 'GD_Prototype_Streaming.Pawn_Prototype', 'GD_Prototype.Character.CharClass_Prototype'),
            ('Jack', 'Quince_Doppel_Streaming.Pawn_Doppelganger', 'Quince_Doppel.Character.charclass_doppelganger'),
    print('')
    sys.exit(1)

###
### Output variables
###

mod_name = 'BL2 No Wasted COMs'
mod_version = '1.0.1'
output_filename = '{}-source.txt'.format(mod_name)

###
### Generate hotfixes!
###

hfs = Hotfixes()
pools = [
        ('01_Common',
            'GD_Itempools.ClassModPools.Pool_ClassMod_01_Common',
            '01_Common'),
        ('02_Uncommon',
            'GD_Itempools.ClassModPools.Pool_ClassMod_02_Uncommon',
            '02_Uncommon'),
        ('04_Rare',
            'GD_Itempools.ClassModPools.Pool_ClassMod_04_Rare',
            '03_Rare'),
        ('05_VeryRare',
            'GD_Itempools.ClassModPools.Pool_ClassMod_05_VeryRare',
            '04_VeryRare'),
        ('06_Legendary',
            'GD_Itempools.ClassModPools.Pool_ClassMod_06_Legendary',
Example #5
0
handling_name = 'GD_MoonBuggy_Streaming.Handling.HandlingDef_MoonBuggy'
afterburner_name = 'GD_MoonBuggy_Streaming.ResourcePools.AfterburnerPool_MoonBuggy'
prefix_label = ' '*(4*1)
prefix = ' '*(4*2)
for (label, vehicle_name, class_name) in [
        ('Laser',
            'GD_MoonBuggy_Streaming.Archetype.Vehicle_MoonBuggy_Laser',
            'GD_MoonBuggy_Streaming.Archetype.Class_MoonBuggy_Laser',
            ),
        ('Missile Pod',
            'GD_MoonBuggy_Streaming.Archetype.Vehicle_MoonBuggy_MissilePod',
            'GD_MoonBuggy_Streaming.Archetype.Class_MoonBuggy_MissilePod',
            ),
        ]:

    hfs = Hotfixes(nameprefix=label)

    # Default: 4500
    hfs.add_demand_hotfix('max_speed', 'MoonBuggy',
        '{},{},MaxSpeed,,8000'.format(demand_name, vehicle_name))

    # Default: 5000
    hfs.add_demand_hotfix('ground_speed', 'MoonBuggy',
        '{},{},GroundSpeed,,6000'.format(demand_name, vehicle_name))

    # Default: 5000
    hfs.add_demand_hotfix('ground_speed_base', 'MoonBuggy',
        '{},{},GroundSpeedBaseValue,,6000'.format(demand_name, vehicle_name))

    # Default: 2000
    hfs.add_demand_hotfix('afterburner_speed', 'MoonBuggy',
Example #6
0
    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
Example #7
0
            Probability=(
                BaseValueConstant={},
                BaseValueAttribute=None,
                InitializationDefinition=None,
                BaseValueScaleConstant=1
            ),
            bDropOnDeath=True
        )""".format(level, classname, index, itmpool, invbal, prob),
                         activated=activated)


###
### Code to generate the mod
###

hfs = Hotfixes()
regular = Regular(hfs)
badass = Badass(hfs)

# Configure rarity pools
rarity_sections = {}
line_prefix = ''
line_suffix = ''
hotfix_activated = True
for (rarity_key, rarity_label) in DropConfig.rarity_presets:

    for config in [regular, badass]:

        config.set_rarity_weights(rarity_key)

        # Regular shield pool
Example #8
0
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)

###
### Constants
###

mod_name = 'Luneshine on Uniques'
mod_version = '1.0.1'
input_filename = 'mod-input-file.txt'
output_filename = 'Luneshine on Uniques.txt'

###
### Hotfix object to store all our hotfixes
###

hfs = Hotfixes()

# Adds Luneshine to some unique weapons which didn't have them,
# previously.  This too is autogenerated by `gen_guaranteed_luneshine.py`
# from my own TPS Better Loot mod, though I've since edited it slightly
# to handle the one launcher properly.
hfs.add_level_hotfix('luneshine_override_0',
    'LuneshineOverride',
    """,GD_Petunia_Weapons.Launchers.RL_Vladof_5_Menace:PartList,Accessory2PartData,,
    (
        bEnabled=True,
        WeightedParts=(
            (
                bDisabled=True,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_None',
                Manufacturers=(
Example #10
0
    ),
    (
        'Rocket',
        'GD_Orchid_RocketHovercraft',
        'GD_Orchid_RocketHovercraft.Archetype.Vehicle_RocketHovercraft',
        'GD_Orchid_RocketHovercraft.ClassDefinition.Class_RocketHovercraft',
    ),
    (
        'Sawblade',
        'GD_Orchid_SawHovercraft',
        'GD_Orchid_SawHovercraft.Archetype.Vehicle_SawBladeHovercraft',
        'GD_Orchid_SawHovercraft.ClassDefinition.Class_SawBladeHovercraft',
    ),
]:

    hfs = Hotfixes(nameprefix=label)

    hfs.add_demand_hotfix(
        'max_speed', 'Skiff',
        '{},{},MaxSpeed,,7000'.format(demand_name, vehicle_name))

    hfs.add_demand_hotfix(
        'flying_speed', 'Skiff',
        '{},{},FlyingSpeed,,4000'.format(demand_name, vehicle_name))

    hfs.add_demand_hotfix(
        'afterburner_speed', 'Skiff',
        '{},{},AfterburnerSpeed,,7000'.format(demand_name, class_name))

    hfs.add_demand_hotfix(
        'afterburner_activation_speed', 'Skiff',
Example #11
0
    print('****************************************************************')
    print('')
    sys.exit(1)

###
### Output variables
###

mod_name = 'Guaranteed Varkid Evolution'
output_filename = '{}'.format(mod_name)

###
### Generate hotfixes!
###

hfs = Hotfixes()

for morph in range(1,6):
    hfs.add_level_hotfix('varkid_clear_{}'.format(morph),
        'VarkidMorphClear',
        ',GD_Balance.WeightingPlayerCount.BugmorphCocoon_PerPlayers_Phase{},ConditionalInitialization.ConditionalExpressionList,,()'.format(morph))
    hfs.add_level_hotfix('varkid_default_{}'.format(morph),
        'VarkidMorphDefault',
        ',GD_Balance.WeightingPlayerCount.BugmorphCocoon_PerPlayers_Phase{},ConditionalInitialization.DefaultBaseValue.BaseValueConstant,,1.0'.format(morph))

###
### Generate the mod string
###

mod_str = """#<{mod_name}>
Example #12
0
    print('')
    sys.exit(1)

###
### Output variables
###

mod_name = 'Guaranteed Varkid Evolution'
mod_version = '1.0.2'
output_filename = '{}.txt'.format(mod_name)

###
### Generate hotfixes!
###

hfs = Hotfixes()

for morph in range(1,6):
    hfs.add_level_hotfix('varkid_clear_{}'.format(morph),
        'VarkidMorphClear',
        ',GD_Balance.WeightingPlayerCount.BugmorphCocoon_PerPlayers_Phase{},ConditionalInitialization.ConditionalExpressionList,,()'.format(morph))
    hfs.add_level_hotfix('varkid_default_{}'.format(morph),
        'VarkidMorphDefault',
        ',GD_Balance.WeightingPlayerCount.BugmorphCocoon_PerPlayers_Phase{},ConditionalInitialization.DefaultBaseValue.BaseValueConstant,,1.0'.format(morph))

###
### Generate the mod string
###

mod_str = """#<{mod_name}>
            InvBalanceDefinition={},
            Probability=(
                BaseValueConstant={},
                BaseValueAttribute=None,
                InitializationDefinition=None,
                BaseValueScaleConstant=1
            ),
            bDropOnDeath=True
        )""".format(level, classname, index, itmpool, invbal, prob),
        activated=activated)

###
### Code to generate the mod
###

hfs = Hotfixes()
regular = Regular(hfs)
badass = Badass(hfs)

# Configure rarity pools
rarity_sections = {}
line_prefix = ''
line_suffix = ''
hotfix_activated = True
for (rarity_key, rarity_label) in DropConfig.rarity_presets:

    for config in [regular, badass]:

        config.set_rarity_weights(rarity_key)

        # Regular shield pool
Example #14
0
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'),
Example #15
0
    print('')
    sys.exit(1)

###
### Output variables
###

mod_name = 'TPS No Wasted COMs'
mod_version = '1.0.1'
output_filename = '{}-source.txt'.format(mod_name)

###
### Generate hotfixes!
###

hfs = Hotfixes()
pools = [
        ('01_Common',
            'GD_Itempools.ClassModPools.Pool_ClassMod_01_Common',
            '01_Common'),
        ('02_Uncommon',
            'GD_Itempools.ClassModPools.Pool_ClassMod_02_Uncommon',
            '02_Uncommon'),
        ('04_Rare',
            'GD_Itempools.ClassModPools.Pool_ClassMod_04_Rare',
            '03_Rare'),
        ('05_VeryRare',
            'GD_Itempools.ClassModPools.Pool_ClassMod_05_VeryRare',
            '04_VeryRare'),
        ('06_Legendary',
            'GD_Itempools.ClassModPools.Pool_ClassMod_06_Legendary',
Example #16
0
handling_name = 'GD_Co_StingRay_Streaming.Handling.Handling_StingRay'
afterburner_name = 'GD_Co_StingRay_Streaming.ResourcePools.AfterburnerPool_StingRay'
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))

    # Default: 150
    hfs.add_demand_hotfix('afterburner_force', 'Stingray',
Example #17
0
    sys.exit(1)

###
### Output variables
###

mod_name = 'TPS Skinpool Reassignments'
mod_version = '1.0.0'
output_filename = '{}.txt'.format(mod_name)

###
### Processing the mod
###

data = Data('TPS')
hfs = Hotfixes()
free_count = 0
prefix = ' ' * (2 * 4)
hotfix_output = []
saved_pools = []

for keyed in sorted(data.get_all_by_type('KeyedItemPoolDefinition')):
    structure = data.get_node_by_full_object(keyed).get_structure()
    for (bi_idx, item) in enumerate(structure['BalancedItems']):
        (junk, pool, junk2) = item['ItmPoolDefinition'].split("'")
        saved_pools.append(pool)
        innerpool = data.get_node_by_full_object(pool).get_structure()
        if len(innerpool['BalancedItems']) != 1:
            raise Exception('Inner pool {} has {} items'.format(
                pool, len(innerpool['BalancedItems'])))
        (junk, actualcustom, junk2
Example #18
0
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'),
Example #19
0
    sys.exit(1)

###
### Output variables
###

mod_name = 'TPS Skinpool Reassignments'
mod_version = '1.0.0'
output_filename = '{}.txt'.format(mod_name)

###
### Processing the mod
###

data = Data('TPS')
hfs = Hotfixes()
free_count = 0
prefix = ' '*(2*4)
hotfix_output = []
saved_pools = []

for keyed in sorted(data.get_all_by_type('KeyedItemPoolDefinition')):
    structure = data.get_node_by_full_object(keyed).get_structure()
    for (bi_idx, item) in enumerate(structure['BalancedItems']):
        (junk, pool, junk2) = item['ItmPoolDefinition'].split("'")
        saved_pools.append(pool)
        innerpool = data.get_node_by_full_object(pool).get_structure()
        if len(innerpool['BalancedItems']) != 1:
            raise Exception('Inner pool {} has {} items'.format(pool, len(innerpool['BalancedItems'])))
        (junk, actualcustom, junk2) = innerpool['BalancedItems'][0]['InvBalanceDefinition'].split("'")