Ejemplo n.º 1
0
    ('Stock Weight', 40),
    ('Doubled No-Reward Freqency', 80),
    ('Halved No-Reward Frequency', 20),
    ('Always Get Reward', 0),
]:
    mod_list.append("""
        #<{label}>

            level None set GD_SlotMachine.SlotMachine:BehaviorProviderDefinition_0.Behavior_RandomBranch_155 Conditions[11] {weight}

        #</{label}>
        """.format(
        label=label,
        weight=weight,
    ))

mod_list.append('#</No Reward Frequency>')

###
### Finish off the mod
###

mod_list.append('#</{}>'.format(mod_name))

###
### Output to a file.
###

mp.human_str_to_blcm_filename("\n\n".join(mod_list), output_filename)
print('Wrote mod file to: {}'.format(output_filename))
Ejemplo n.º 2
0
{hotfix_str}

    #</Skinpool Hotfixes>

#</{mod_name}>""".format(
    mod_name=mod_name,
    mod_version=mod_version,
    free_count=free_count,
    hotfix_str=hotfix_str,
)

###
### Output to a file.
###

mp.human_str_to_blcm_filename(mod_str, output_filename)
print('Wrote mod file to: {}'.format(output_filename))

###
### Also output to a source file, for other mods of mine to easily include
###
with open(output_source_filename, 'w') as df:
    df.write(mod_str)
print('Wrote source file to: {}'.format(output_source_filename))

###
### Also write out our list of saved pools to stderr, in a
### format we can just copy right to the BLCMods wiki.
###

if False:
Ejemplo n.º 3
0
lines.append(
    '    # the prefix "The" from all fast travel names, so they also sort')
lines.append('    # *correctly.*')
lines.append('')
lines.append('    #<Alphabetical By Default>')
lines.append('')
lines.append(
    '        # Many thanks to Our Lord and Savior Gabe Newell for this!')
lines.append('')
lines.append('        set FastTravelStationGFxMovie SortMode 1')
lines.append('')
lines.append('    #</Alphabetical By Default>')
lines.append('')
lines.append('    #<Remove Level Prefixes>')
lines.append('')
for ftdef in ftdefs:
    ft = data.get_struct_by_full_object(ftdef)
    if ft['StationDisplayName'].startswith('The '):
        lines.append('        set {} StationDisplayName {}'.format(
            ftdef,
            ft['StationDisplayName'][4:],
        ))
        lines.append('')
lines.append('    #</Remove Level Prefixes>')
lines.append('')
lines.append('#</{}>'.format(mod_name))

# Write out to the file
mp.human_str_to_blcm_filename("\n".join(lines), output_filename)
print('Wrote mod to {}'.format(output_filename))
Ejemplo n.º 4
0
lines.append('BL2')
lines.append('#<omg>')
lines.append('')

# Loop through levels
for (label, level) in data.get_levels():
    lines.append('#<{}>'.format(label))
    lines.append('')
    for package in data.get_level_package_names(level):
        main_node = data.get_node_by_full_object(package)
        for soundvol in main_node.get_children_with_name('wwisesoundvolume'):
            soundvolstruct = soundvol.get_structure()
            if 'EnvironmentalEffects' in soundvolstruct and soundvolstruct[
                    'EnvironmentalEffects'] != '':
                for (idx, effect) in enumerate(
                        soundvolstruct['EnvironmentalEffects']):
                    lines.append(
                        'level {} set {}.{} EnvironmentalEffects[{}].Effect None'
                        .format(level, package, soundvol.name, idx))
                    lines.append('')
    lines.append('#</{}>'.format(label))
    lines.append('')

lines.append('')
lines.append('#</omg>')

print('writing to remove_wwise_audio_effects.blcm')
mp = ModProcessor()
mp.human_str_to_blcm_filename("\n".join(lines),
                              'remove_wwise_audio_effects.blcm')
Ejemplo n.º 5
0
                ItmPoolDefinition=ItemPoolDefinition'{force_gunsandgear_drop_type}',
                InvBalanceDefinition=None,
                Probability=(
                    BaseValueConstant=1.000000,
                    BaseValueAttribute=None,
                    InitializationDefinition=None,
                    BaseValueScaleConstant=1.000000
                ),
                bDropOnDeath=True
            )
        )

    #</Force GunsAndGearDrop to {force_gunsandgear_drop_type}>
    """.format(force_gunsandgear_drop_type=force_gunsandgear_drop_type)

# Read in our main input file
with open(input_filename, 'r') as df:
    if loot_drop_quantity == 1:
        plural = ''
    else:
        plural = 's'
    loot_str = df.read().format(
        mod_name=mod_name,
        loot_drop_quantity=loot_drop_quantity,
        plural=plural,
        gunsandgear_drop_str=gunsandgear_drop_str,
    )

mp.human_str_to_blcm_filename(loot_str, output_filename)
print('Wrote mod file to: {}'.format(output_filename))
from modprocessor import ModProcessor

lines = []
lines.append('BL2')
lines.append('#<omg>')
lines.append('')

data = Data('BL2')
for (label, level) in data.get_levels():
    print('Processing {}'.format(label))
    lines.append('#<{}>'.format(label))
    lines.append('')
    for package in data.get_level_package_names(level):
        main_node = data.get_node_by_full_object(package)
        children = list(main_node.get_children_with_name('populationopportunitypoint'))
        children.extend(list(main_node.get_children_with_name('willowpopulationopportunitypoint')))
        for child in children:
            childstruct = child.get_structure()
            lines.append('  level {} set {}.{} SpawnAndCullRadius 999999999'.format(level, package, child))
            lines.append('')
    lines.append('')
    lines.append('#</{}>'.format(label))
    lines.append('')

lines.append('')
lines.append('#</omg>')

print('writing to ourlord.blcm')
mp = ModProcessor()
mp.human_str_to_blcm_filename("\n".join(lines), 'ourlord.blcm')