News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 298
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 310
Total: 310

Author Topic: [SCRIPT] Automatic Modding Cleanup  (Read 1144 times)

0 Members and 76 Guests are viewing this topic.

[SCRIPT] Automatic Modding Cleanup
« on: »
Windows Scripts:
Automatic Modding Cleanup

As 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
« Last Edit: July 22, 2018, 05:48:08 pm by Lord Nyriox »
I am off to Tamriel, seeking new adventures, great and small.  One day, I might return to Novastraia and show what I have learned.

Share on Bluesky Share on Facebook


Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #1 on: »
Another very useful tool @Lord Nyriox thanks very much for this!


Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #2 on: »
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.  :} 

I am off to Tamriel, seeking new adventures, great and small.  One day, I might return to Novastraia and show what I have learned.

Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #3 on: »
Updated the cleanup script.  See the OP above for what I have added. 

;}
I am off to Tamriel, seeking new adventures, great and small.  One day, I might return to Novastraia and show what I have learned.

 

Recent Topics+-