# vim: set expandtab tabstop=4 shiftwidth=4: # For Our Lord, &c. from ftexplorer.data import Data from modprocessor import ModProcessor data = Data('BL2') lines = [] 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))
#!/usr/bin/env python # vim: set expandtab tabstop=4 shiftwidth=4: # For generating 'level_pkgs' for the DataDumper pythonsdk mod from ftexplorer.data import Data data = Data('TPS') for (english_name, main_package) in data.get_levels(): print("'{}': [".format(main_package)) for inner_pkg in data.get_level_package_names(main_package): print(" '{}',".format(inner_pkg.split('.')[0])) print(' ],')
# vim: set expandtab tabstop=4 shiftwidth=4: import sys from ftexplorer.data import Data if len(sys.argv) != 2: print('Specify a PopulationDefinition') sys.exit(0) popdef = sys.argv[1] # This would actually probably be quicker to do a getall on the object types # and then glean the level from there... data = Data('TPS') for name, package in data.get_levels(): found = False for node_name, node in data.get_level_package_nodes(package): points = [] points.extend( node.get_children_with_name('populationopportunitypoint_')) points.extend( node.get_children_with_name('willowpopulationopportunitypoint_')) for child in points: child_struct = child.get_structure() if popdef in child_struct['PopulationDef']: print('Found in {} ({})'.format(name, package)) found = True break if found: break
), ('Spawn Zone 3', 'GD_Orchid_RakkHive.Animation.Anim_RakkHive_Shake:BehaviorProviderDefinition_0.Behavior_AISpawn_45' ), ('Spawn Zone 4', 'GD_Orchid_RakkHive.Animation.Anim_RakkHive_Shake:BehaviorProviderDefinition_0.Behavior_AISpawn_46' ), ] popdefs_per_level = {} popdef_short_names = {} data = Data('BL2') # First figure out which popdefs are in which levels for (label, level) in data.get_levels(): popdefs_per_level[level] = set() for package in data.get_level_package_names(level): main_node = data.get_node_by_full_object(package) for worldinfo in main_node.get_children_with_name('worldinfo'): worldstruct = worldinfo.get_structure() if 'ClientDestroyedActorContent' in worldstruct: for content in worldstruct['ClientDestroyedActorContent']: if content.startswith('WillowPopulationDefinition'): popdefs_per_level[level].add(content) popdef_short_names[content] = None # Pre-process the "short" popdef names that we'll use in the categories for popdef_name in popdef_short_names.keys(): (_, obj_name, _) = popdef_name.split("'") last_component = obj_name.split('.')[-1]