コード例 #1
0
ファイル: generate-mod.py プロジェクト: zmk6697/BLCMods
    ),
]:

    # First set up a hotfix for the base pool initialization
    initial_pool = []
    for legendary in legendaries:
        initial_pool.append((legendary, 1, 'WeaponBalanceDefinition'))
    for i in range(
            len(uniques) + len(pearls) + len(seraphs) + num_undesirables):
        initial_pool.append((None, 0))
    mp.register_str(
        'weapon_pool_clear_{}'.format(guntype.lower()),
        'level None set GD_Itempools.WeaponPools.Pool_Weapons_{}_06_Legendary BalancedItems {}'
        .format(
            guntype,
            mp.get_balanced_items(initial_pool),
        ))

    # Hotfixes to add uniques
    for (idx, unique) in enumerate(uniques):
        unique_hotfixes.append(
            """level None set GD_Itempools.WeaponPools.Pool_Weapons_{}_06_Legendary BalancedItems[{}]
            (
                ItmPoolDefinition=None,
                InvBalanceDefinition=WeaponBalanceDefinition'{}',
                Probability=(
                    BaseValueConstant=1,
                    BaseValueAttribute=None,
                    InitializationDefinition=None,
                    BaseValueScaleConstant=1
                ),
コード例 #2
0
ファイル: generate-mod.py プロジェクト: zwhFrancis/BLCMods
if force_gunsandgear_specific:
    drop_specific = force_gunsandgear_specific_items[0][0]
    if len(force_gunsandgear_specific_items) > 1:
        drop_specific = '{} (and others)'.format(drop_specific)
    gunsandgear_drop_str = """
    #<Force GunsAndGearDrop to {drop_specific}>

        # Forces the GunsAndGear drop pool to always drop {drop_specific}

        level None set GD_Itempools.GeneralItemPools.Pool_GunsAndGear BalancedItems
        {balanced}

    #</Force GunsAndGearDrop to {drop_specific}>
    """.format(
        drop_specific=drop_specific,
        balanced=mp.get_balanced_items(force_gunsandgear_specific_items),
    )
elif force_gunsandgear_drop:
    gunsandgear_drop_str = """
    #<Force GunsAndGearDrop to {force_gunsandgear_drop_type}>

        # Forces the GunsAndGear drop pool to always drop {force_gunsandgear_drop_type}

        level None set GD_Itempools.GeneralItemPools.Pool_GunsAndGear BalancedItems
        (
            (
                ItmPoolDefinition=ItemPoolDefinition'{force_gunsandgear_drop_type}',
                InvBalanceDefinition=None,
                Probability=(
                    BaseValueConstant=1.000000,
                    BaseValueAttribute=None,