else:
        initial_sets[weight] = "set GD_Itempools.ClassModPools.Pool_ClassMod_{} BalancedItems\n{}".format(
            weight,
            generate_balanced_items(['{}_{}'.format(char[1], individual_weight) for char in characters]))

# Now, a general level hotfix to clear out the InitializationDefinition
# values in the main loot pools.  This is necessary because something that's
# not a hotfix but acts like a hotfix will reset InitializationDefinition on
# each level load, regardless of what we've done to it beforehand, so we have
# to override that.
for (weight, pool, individual_weight) in pools:
    for idx in range(6):
        hfs.add_level_hotfix('com_id_clear_{}_{}'.format(weight, idx),
            'COMIDClear',
            """,{pool},
            BalancedItems[{idx}].Probability.InitializationDefinition,,
            None
            """.format(
                pool=pool,
                idx=idx))

# OnDemand hotfixes for each player class
for idx, (streaming, pool_reg, pool_aster, pool_lobelia) in enumerate(characters):

    short = streaming.split('_')[-2]

    for (weight, pool, individual_weight) in pools:
        hfs.add_demand_hotfix('com_{}_set_{}'.format(short, weight),
            'COM{}Set'.format(short),
            """
            {streaming},
            {pool},
示例#2
0
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=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_FastLearner',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_HardenUp',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Boominator',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Safeguard',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Oxygenator',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_PiercingRounds',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Serenity',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            )
        )
    )""")
示例#3
0
    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("'")

        # Hotfix to unlink the intermediate pool
        hf_id = 'unlink_{}'.format(free_count)
        hfs.add_level_hotfix(
            hf_id, 'TPSSkinpool',
            ',{},BalancedItems[{}].ItmPoolDefinition,,None'.format(
                keyed,
                bi_idx,
            ))
        hotfix_output.append('{}{}'.format(prefix, hfs.get_hotfix_xml(hf_id)))

        # And a hotfix to link to the actual skin/head
        hf_id = 'link_{}'.format(free_count)
        hfs.add_level_hotfix(
            hf_id, 'TPSSkinpool',
            """,{},BalancedItems[{}].InvBalanceDefinition,,
            InventoryBalanceDefinition'{}'""".format(
                keyed,
                bi_idx,
                actualcustom,
            ))
        hotfix_output.append('{}{}'.format(prefix, hfs.get_hotfix_xml(hf_id)))
示例#4
0
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
            ),
            (
                Part=WeaponPartDefinition'GD_Weap_SniperRifles.elemental.SR_Elemental_Shock',
                Manufacturers=,
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=2
            ),
            (
                Part=WeaponPartDefinition'GD_Weap_SniperRifles.elemental.SR_Elemental_Corrosive',
                Manufacturers=,
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=2
            ),
            (
                Part=WeaponPartDefinition'GD_Weap_SniperRifles.elemental.SR_Elemental_Slag',
                Manufacturers=,
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=2
            )
        )""")
示例#5
0
                         pool,
                         index,
                         shieldname,
                         invbalance='InventoryBalanceDefinition')

# Regular Stalker shield hotfixes
stalker_shields_real_list = []
prefix = ' ' * (4 * 3)
for config in [regular, badass]:
    for (idx, (dipl_idx, popdef)) in enumerate(config.stalker_dipl):
        stalker_id = 'real_stalker_{}_{}'.format(config.hotfix_prefix, idx)
        hfs.add_level_hotfix(
            stalker_id,
            'StalkerShields',
            ",{},DefaultItemPoolList[{}].ItemPool,,ItemPoolDefinition'{}'".
            format(
                popdef,
                dipl_idx,
                config.regular_shields,
            ),
            activated=True)
        stalker_shields_real_list.append('{}{}'.format(
            prefix, hfs.get_hotfix_xml(stalker_id)))

# Only-Maylay Stalker shield hotfixes
stalker_shields_maylay_list = []
prefix = ' ' * (4 * 3)
for config in [regular, badass]:
    for (idx, (dipl_idx, popdef)) in enumerate(config.stalker_dipl):
        stalker_id = 'maylay_stalker_{}_{}'.format(config.hotfix_prefix, idx)
        hfs.add_level_hotfix(
            stalker_id,
示例#6
0
    else:
        initial_sets[weight] = "set {} BalancedItems\n{}".format(
            pool,
            generate_balanced_items(['{}_{}'.format(char[1], individual_weight) for char in characters]))

# Now, a general level hotfix to clear out the InitializationDefinition
# values in the main loot pools.  This is necessary because something that's
# not a hotfix but acts like a hotfix will reset InitializationDefinition on
# each level load, regardless of what we've done to it beforehand, so we have
# to override that.
for (weight, pool, individual_weight) in pools:
    for idx in range(6):
        hfs.add_level_hotfix('com_id_clear_{}_{}'.format(weight, idx),
            'COMIDClear',
            """,{pool},
            BalancedItems[{idx}].Probability.InitializationDefinition,,
            None
            """.format(
                pool=pool,
                idx=idx))

# OnDemand hotfixes for each player class
for idx, (streaming, pool_reg, pool_chronicler, pool_petunia) in enumerate(characters):

    short = streaming.split('_')[-2]

    for (weight, pool, individual_weight) in pools:
        hfs.add_demand_hotfix('com_{}_set_{}'.format(short, weight),
            'COM{}Set'.format(short),
            """
            {streaming},
            {pool},
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=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_FastLearner',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_HardenUp',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Boominator',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Safeguard',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Oxygenator',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_PiercingRounds',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            ),
            (
                bDisabled=False,
                Part=WeaponPartDefinition'GD_Weap_Accessories.Moonstone.Moonstone_Attachment_Serenity',
                Manufacturers=(
                    (
                        Manufacturer=None,
                        DefaultWeightIndex=1
                    )
                ),
                MinGameStageIndex=0,
                MaxGameStageIndex=1,
                DefaultWeightIndex=1
            )
        )
    )""")
示例#8
0
###
### 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}>

    # Guarantees evolution of all varkids, regardless of playthrough or
    # player count.  Leave one alive and you'll get Vermivorous eventually.

    {hotfixes:varkid_clear_1}
示例#9
0
### 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}>

    # {mod_name} v{mod_version}
    # Licensed under Public Domain / CC0 1.0 Universal
    #
    # Guarantees evolution of all varkids, regardless of playthrough or
示例#10
0
    for (label, index, shieldname) in shieldlist:
        set_bi_item_pool('shield_{}'.format(label),
            pool,
            index,
            shieldname,
            invbalance='InventoryBalanceDefinition')

# Regular Stalker shield hotfixes
stalker_shields_real_list = []
prefix = ' '*(4*3)
for config in [regular, badass]:
    for (idx, (dipl_idx, popdef)) in enumerate(config.stalker_dipl):
        stalker_id = 'real_stalker_{}_{}'.format(config.hotfix_prefix, idx)
        hfs.add_level_hotfix(stalker_id, 'StalkerShields',
            ",{},DefaultItemPoolList[{}].ItemPool,,ItemPoolDefinition'{}'".format(
                popdef, dipl_idx, config.regular_shields,
                ),
            activated=True)
        stalker_shields_real_list.append('{}{}'.format(prefix, hfs.get_hotfix_xml(stalker_id)))

# Only-Maylay Stalker shield hotfixes
stalker_shields_maylay_list = []
prefix = ' '*(4*3)
for config in [regular, badass]:
    for (idx, (dipl_idx, popdef)) in enumerate(config.stalker_dipl):
        stalker_id = 'maylay_stalker_{}_{}'.format(config.hotfix_prefix, idx)
        hfs.add_level_hotfix(stalker_id, 'StalkerShields',
            ",{},DefaultItemPoolList[{}].ItemPool,,ItemPoolDefinition'{}'".format(
                popdef, dipl_idx, config.maylay_shields,
                ),
            activated=False)
示例#11
0
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("'")

        # Hotfix to unlink the intermediate pool
        hf_id = 'unlink_{}'.format(free_count)
        hfs.add_level_hotfix(hf_id, 'TPSSkinpool',
            ',{},BalancedItems[{}].ItmPoolDefinition,,None'.format(
                keyed,
                bi_idx,
                ))
        hotfix_output.append('{}{}'.format(prefix, hfs.get_hotfix_xml(hf_id)))

        # And a hotfix to link to the actual skin/head
        hf_id = 'link_{}'.format(free_count)
        hfs.add_level_hotfix(hf_id, 'TPSSkinpool',
            """,{},BalancedItems[{}].InvBalanceDefinition,,
            InventoryBalanceDefinition'{}'""".format(
                keyed,
                bi_idx,
                actualcustom,
                ))
        hotfix_output.append('{}{}'.format(prefix, hfs.get_hotfix_xml(hf_id)))