PDA

View Full Version : Config Fixer Trick for Mod Installers



Spur
12-06-2006, 00:06
Modders that make a mod using the modswitch and are stumped as how to make their installer create a valid .cfg file, since that is machine-dependent, here's how to do it via a simple batchfile you run on exit via the installer or SFX:

you create a headercfg.txt file with the feature part:

[features]
editor = true
mod = mymodname

and save that, *with* the extra blank line at the end.

now create a batch file called cfgfixer.bat that contains the following lines:

@echo off
cls
copy headercfg.txt+medieval2.preference.cfg mymodname.cfg

and save that, blank line is not important here.

This will concatenate via a simple dos file copy function the two files into a 3d file, namely exactly what you want, a valid local cfg WITH your info.

Just add a batchfile that runs medieval2.exe with that config, and you are done.

That just needs to contains the line

medieval2.exe @mymodname.cfg

and save as Launch_mymodname.bat and you're all set.
Enjoy. :2thumbsup: