[TOOL] Level file path changer (python script)

BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
edited July 2015 in Mapping
Say you've got a level file with hundreds of the same model or material in it, but then you have to change the name of the model/material for whatever reason. That'd be awful to have to go through and individually fix every path, wouldn't it?

Introducing the level file path changer utility. Requires python 3. Simply give it the path names you want changed, and it'll scour the level file looking for those paths, changing every instance of them to the new path you provide.

https://www.dropbox.com/s/mhgb1r864inuzee/spark_level_path_renamer.py?dl=1

Directions:
1 - Drag+drop the level file onto the python script (.py) file.
2 - Enter the path you wish to replace.
3 - Enter the path you want to change all of those old paths to.
Repeat steps 1 and 2 until you're renamed all the items you desire.
4 - Type "save" instead of typing in a path. A copy of the level with the changes will be saved with "_modified" added to the end of the file name.

Cheers!
Beige
Sign In or Register to comment.