News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
May 20, 2019, 08:36:53 PM
collapse

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

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
[SCRIPT] Automatic Modding Cleanup
« on: June 02, 2018, 10:52:26 PM »
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 23, 2018, 12:48:08 AM by Lord Nyriox »

Offline Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2651
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #1 on: June 03, 2018, 05:31:41 AM »
Another very useful tool @Lord Nyriox thanks very much for this!



Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #2 on: June 03, 2018, 08:55:58 AM »
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.  :} 


Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [SCRIPT] Automatic Mod-Directory Cleanup
« Reply #3 on: June 12, 2018, 06:26:12 PM »
Updated the cleanup script.  See the OP above for what I have added. 

;}

Tags:
 

* Quick Search


* Member Information

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Mod Boards Activity

* Who's Online

  • Dot Guests: 4
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Calendar

May 2019
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 [20] 21 22 23 24 25
26 27 28 29 30 31

No calendar events were found.

* Recent Topics

Darkened TL2 UI (Re-texture Mod) by Sch123
[Today at 03:15:13 AM]


FEP+ April 2019 Update by Phanjam
[May 19, 2019, 10:34:51 PM]


Skills Expansion: Bugs Report & Ideas by Sch123
[May 16, 2019, 10:54:27 AM]


Charge Domination % by TwinkleToes
[May 11, 2019, 04:33:57 AM]


[Help Request] Putting Custom Dungeons Into Vanilla Zones by Phanjam
[May 09, 2019, 02:19:19 AM]


Triggerable Weapons by Phanjam
[April 29, 2019, 11:15:57 AM]


Need Help: Getting Translation into game by steffire3
[April 25, 2019, 10:23:02 PM]


Destroyer Rebalance by Phanjam
[April 15, 2019, 06:10:08 AM]


FEP+ by LeavingUndad
[April 14, 2019, 06:47:25 PM]


Knowledge-basing For Level & Quest Making by Phanjam
[April 13, 2019, 01:51:42 PM]


Pet Variants Mod by Phanjam
[April 11, 2019, 02:53:00 PM]


[IDEA] Maika's Quest (children's mod) by Phanjam
[April 11, 2019, 09:33:41 AM]


Need Help: Template File List by steffire3
[April 10, 2019, 07:21:54 PM]


Deathknight class by Phanjam
[April 10, 2019, 12:47:27 AM]


TL1CP Update 4 - A new baseline (I hope) by Anarch16sync
[April 09, 2019, 03:25:53 PM]

* Popular Topics