Launching a mod via the command line argument

karadoc

AI programmer
Joined
Oct 3, 2005
Messages
1,568
Location
Australia
I'm having trouble getting Civ4BeyondSword_PitBoss.exe to automatically load a mod using the command line.

In non-pitboss games I can do the following, and it works:
Civ4BeyondSword.exe" mod="K-Mod"
and this also works:
"Civ4BeyondSword.exe" mod=\K-Mod

But the pitboss version seems to be a buggy, and I haven't managed to get it to work out.

If I try
"Civ4BeyondSword_PitBoss.exe" mod="K-Mod"
I get the following error message:
Mods\-Mod \ is an invalid mod directory, ignoring
Apparently it misread "K-Mod" as "-Mod ".

If I try
"Civ4BeyondSword_PitBoss.exe" mod= "K-Mod"
or
"Civ4BeyondSword_PitBoss.exe" mod\K-Mod
It still doesn't work, but it's a bit closer...
Mods\K-Mod \ is an invalid mod directory, ignoring

If only I could just tell it to ignore the damn space at the end!

So, does anyone here know how to make the command line mod option work correctly?
 
Ok. I've worked out how to get around the bug.

The following command works correctly:

Civ4BeyondSword_PitBoss.exe" mod= K-Mod\""

(note: the space after '=', and the \" at the end are important. The final " is not required unless you want to redirect stdin or stderr; but it doesn't hurt to have it in there regardless.)
 
Top Bottom