Windows Scripts: Automatic Modding CleanupAs I mentioned on the Torchmodders Discord server, one of the first things I ended up doing when I set up my TL1 (and later, TL2) modding environment, was create a script to fully automate the cleanup process for compiled Mod-data (BINDAT, BINLAYOUT, etc.), and therefore force TL1 (or GUTS) to regenerate
all binaries on launch.
Like my Mesh-scripts, this does require some initial set-up, but once that is finished, it should be more or less easy to run automatically.
Steps to Use: - Copy the "Torchclean2.cmd" script to the main GUTS working directory. In my case, that would be "GOG Games/Torchlight 2/Mods/".
- Replace "<username>" in the last lines of the script with the name of your own User directory.
- Run the script from within the Mods directory, immediately before and after every time you launch GUTS.
Script Removes: - GUTS-compiled DAT files (*.BINDAT).
- GUTS-compiled LAYOUT files (*.BINLAYOUT).
- GUTS-generated RAW files (*.RAW).
- TL1-compiled DAT files (*.ADM).
- TL1-compiled LAYOUT files (*.CMP).
- Generic backup files (*.BAK). These are generated by WinMerge when I use it for editing.
- TL2 MOD files (*.MOD). GUTS leaves two copies of every MOD file it builds—one in the user Documents folder and one in the GUTS working directory. This only removes the packaged MOD files from the working directory.
- Torchlight 2 log files (LOGS/*.TXT) (OGRE.LOG). TL2 does not seem to have any sort of existing cleanup system for these, so removing them here is advisable.
- TL2 backup save data (SAVE/*.TMP) (SAVE/*.RESTORE) (MODSAVE/*.TMP) (MODSAVE/*.RESTORE).
- "EDITORMOD.MOD". GUTS generates two copies of this file every launch—one in the user Documents folder and one in the GUTS working directory. This script ensures this redundant file is removed from both locations, rather than being left in the way.
- "EDITORSETTINGS.DAT". Stores last-opened and window-positioning data for GUTS. Safe to remove.
Enjoy!
~Lord Nyriox
Another very useful tool
@Lord Nyriox thanks very much for this!
Another very useful tool @Lord Nyriox thanks very much for this!
You are welcome, I guess. *shrugs*
Given how much tools like this, ease my frustration when modding, I figure many other modders might find it useful.
To be frank, I would not have gotten to my current level of modding experience if I had to manually clean up
any of the generated files I mentioned in the OP. All this automation I use, helps keep my modding attention where it needs to be—on the mod content itself. :}
Updated the cleanup script. See the OP above for what I have added.
;}