Mod Manager Command Line options

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:
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:
FYI, the -m option doesn't work anymore as of build 660. I had to snag a copy of ModMgr from an older build to use with my batch files.
 
Isn't it really disappointing when you are learning to use something and then it suddenly disappears? :(

When you say "an older build" I guess you mean Mod Manager from 590, don't you? ;)

As always, great work, thanks

byyyyyyyyye
 
Yes, 590 still works. I just made a standalone "Tools" folder with the 590 ModMgr and Mas2 tool, along with all of my own tools. Luckily none of the stuff I have released publicly rely on on the -m option.
 
No problem, I found and installed since in a temporary folder the lite build to get the file.
And it's great to make rfcmp packages with command line scripts !!!
A question, is it possible to make Multirfcmp in the same way?

Nope... I've had no luck building MultiCmps.
 
Nope... I've had no luck building MultiCmps.
The current ModMgr cmdline options do not allow for building cmps, multi-cmps or mods manually (by adding individual mas and mft files) because it simply cannot be done this way. At some point there may be a way to do this via the .dat files, but until then the cmdline options just cannot do this.
 
The current ModMgr cmdline options do not allow for building cmps, multi-cmps or mods manually (by adding individual mas and mft files) because it simply cannot be done this way. At some point there may be a way to do this via the .dat files, but until then the cmdline options just cannot do this.

Right now I am building rfcmp's by building a temp dat file and then doing UI automation of the mas2 tool. But the dat files aren't used for MultiCmps so I have been unable to build MultiCmps with this method. I believe Mad_King was referring to my component builder tool when asking if it's possible to build a multi. My batch sample above uses ModMgr to build the MAS files and my cmppack tool to build the cmp.
 
I believe Mad_King was referring to my component builder tool when asking if it's possible to build a multi. My batch sample above uses ModMgr to build the MAS files and my cmppack tool to build the cmp.
Yes, right sorry I talked about automation with scripting and not notice I used two tools to make the whole job.
 
Back
Top