PDA

View Full Version : Easiest way to mod a mod



dr_venture
October 21st, 2012, 18:11
Quick question: I'm working on editing a mod file, but I'm finding that the only way I can do so is to repack the files into the .mod file every time I make a change, which is a colossal PITA. Am I doing something wrong: is there an easier way to make changes to the XML files and reload them into FG without repacking the zip and changing it to a .mod *every* time I make an edit?

Doswelk
October 21st, 2012, 20:21
I use WinZip that allows me to edit the XML code (using Notepad++) and when I save it, it automatically adds the updated version back into the mod file and then I reload FGII to test.

I do not know if any other file compression apps works the same way, but it was the reason I bought Winzip as I got fed up doing it the slow way.

phantomwhale
October 22nd, 2012, 00:35
For my rulesets / extensions, I wrote a small batch file to invoke 7-zip from the command line, zip up the xml files and put them into the modules directory.

So when I am working on a module, I just edit the common.xml file (for player module) or db.xml (for GM module) and then run the batch file. Takes 1-2 seconds.

I usually have the module XML files stored under the ruleset directory in /support/modules/module_name and keep the batch file (publishModules.bat) in the support/modules directory. I've enclosed the code below, although it is quite hard-coded to my purpose, but you might be able to subvert it to your cause with some minor editing.



copy /Y .\swexpg\common.xml .\swexpg\client.xml
del ..\..\..\..\modules\swex_pg_final.mod
"C:\Program Files\7-Zip\7z" a -tzip ../../../../modules/swex_pg_final.mod -x!.git .\swexpg\*
del ..\..\..\..\modules\swex_gm_final.mod
"C:\Program Files\7-Zip\7z" a -tzip ../../../../modules/swex_gm_final.mod -x!.git .\swexgm\*

Trenloe
October 22nd, 2012, 00:36
I think what Doswelk/phantomwhale suggest is the fastest method. Unfortunately, you can't have module files uncompressed in their own directory like you can when working with extensions. :(

dr_venture
October 22nd, 2012, 07:04
Thanks very much for the tips, guys - much appreciated! I feel like the FG development model is kicking me in the shins no matter which direction I turn... *sigh*