Noel Hibbard
Registered
As usual, many of the changes from one build to the next are left out of the change log. Build 590 introduced a new Mod Manager (v0.92x) which added a ton of extremely useful command line options. Here they are:
That is the help screen. Here is an example of the kind of stuff you can do with simple batch files:
This script will take the latest version of the car from DevMode and package it all up. I have two environment variables that I have set. One is the version number and one is the car name. I do this because I use this same batch for each car in our mod and all I have to change is the car name at the start of the batch file. There is one bug in the ModMgr and that that it crashes if you try to add a bunch of files to a MAS file using the *.* wildcard if the source folder has subfolders. My work around is to copy the files into a temp folder by them self and then add them to the mas. You will notice I delete the mas files before adding my files to them because if you don't it will append any new files to the Mas file leaving behind files that were already in the Mas file. So the teams mas for example may end up with a bunch of teams that have retired from the championship. The final line in this batch uses my new component builder tool to build the actual rfcmp file. You can find this tool here:
http://isiforums.net/f/showthread.php/19023-Component-Builder?p=259911#post259911
With all these tools there is really no excuses for not modding on rF2. All those complaint about the packaging system holding back modding is nonesence. DevMode is 100% identical to how rF1 worked. You do all your work there and then have a batch file similar to mine above that fully automates the packaging task. Now you can make some changes to your mod in DevMode... once your done and your ready to release an update, you open your batch file, increment the version number and then execute it.
Code:
ModMgr -[options] fileName [fileName ...], where options are:
-h[elp] = this help message
-q[uiet] = quiet mode (no text output)
-v[off/on] = verify during install (default=on)
-a[utoinstall] = autoinstall all -iModFiles
-i[ModFile] = install ModFile
-u[ModName vModVersion] = uninstall ModName version ModVersion
-c[WorkingDir] = set cur dir to WorkingDir
-o[OutputDir] = set output dir to OutputDir
-d[InstallDir] = set install dir to InstallDir
-p[PackagesDir] = search in PackagesDir for file
-m[MasFile] [fileName ...] = add specified files to MasFile
-x[MasFile] [fileName ...] = extract specified files from MasFile
-z[1-9] = use zlib compress level 1-9 (-m only)
fileName is a single filename, series of filenames, or a wildcard spec
output dir defaults to working dir if not set (-m -x only)
Ex: ModMgr -mCarSkins.mas t0.dds t1.dds
Add t0.dds and t1.dds from current dir to CarSkins.mas (current dir)
Ex: ModMgr -q -iLatestMod.rfmod -pC:\MyPackages -dC:\rFactor2
Install LatestMod.rfmod from C:\MyPackages to C:\rFactor2 in quiet mode
Ex: ModMgr t0.dds t1.dds -xCarSkins.mas -cC:\ModDev\Skins
Set current dir to C:\ModDev\Skins, then
Extract t0.dds and t1.dds to current dir from C:\ModDev\Skins\CarSkins.mas
That is the help screen. Here is an example of the kind of stuff you can do with simple batch files:
Code:
@echo off
set VECVersion=1.04
set Name=VEC_Pesca
cd C:\Program Files (x86)\rFactor2\VECDev\Core
del "C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\*.mas" /q
del "C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\Temp\*.*" /q
Copy C:\Users\noelh\Documents\rFactor2\VECDev\ModDev\Vehicles\VEC\%Name%\*.* "C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\Temp\"
modmgr -m"C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\%Name%_Main.mas" "C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\Temp\*.*"
modmgr -m"C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\%Name%.mas" "C:\Users\noelh\Documents\rFactor2\VECDev\ModDev\Vehicles\VEC\%Name%\MAPS\*.*"
modmgr -m"C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\%Name%_Teams.mas" "C:\Users\noelh\Documents\rFactor2\VECDev\ModDev\Vehicles\VEC\%Name%\Teams\*.*"
cmppack --file="C:\Users\noelh\Documents\rFactor2\VECPackaging\Cars\%Name%\%Name%.cmpinfo" --version=%VECVersion% --package
This script will take the latest version of the car from DevMode and package it all up. I have two environment variables that I have set. One is the version number and one is the car name. I do this because I use this same batch for each car in our mod and all I have to change is the car name at the start of the batch file. There is one bug in the ModMgr and that that it crashes if you try to add a bunch of files to a MAS file using the *.* wildcard if the source folder has subfolders. My work around is to copy the files into a temp folder by them self and then add them to the mas. You will notice I delete the mas files before adding my files to them because if you don't it will append any new files to the Mas file leaving behind files that were already in the Mas file. So the teams mas for example may end up with a bunch of teams that have retired from the championship. The final line in this batch uses my new component builder tool to build the actual rfcmp file. You can find this tool here:
http://isiforums.net/f/showthread.php/19023-Component-Builder?p=259911#post259911
With all these tools there is really no excuses for not modding on rF2. All those complaint about the packaging system holding back modding is nonesence. DevMode is 100% identical to how rF1 worked. You do all your work there and then have a batch file similar to mine above that fully automates the packaging task. Now you can make some changes to your mod in DevMode... once your done and your ready to release an update, you open your batch file, increment the version number and then execute it.
Last edited by a moderator: