BotF Startup Codes (Command-line arguments)

Startup Codes (Command-line arguments); support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

BotF Startup Codes (Command-line arguments)

Post by QuasarDonkey » Sat Aug 20, 2011 6:23 am

I was doing some reverse engineering last night on the function that checks cheats in Trek.exe. It seemed a little complex for just checking -Mudd, etc., so I did a bit of investigating. Here's what I found.

Trek.exe can be launched with the following command-line arguments:
-Bones -BorgOff -Gorn -Kirk -Mudd -Picard -L -H -C -D -n -c -i

You all probably know the first few, so here's what the new options do:

-n fiddles with the random number seeding, so you always start off on the same galaxy every time you run BotF with a given StartingSeed.

-L starts BotF with the single player mode disabled, allowing only a network game or load game.

-H starts you in the multiplayer screen (H probably being Host).

-c or -C also takes you to the multiplayer game screen (C probably being client).

-c -i <ipaddress> does the same, but by the looks of the code it should enter the IP address for you (the IP address must be 15 characters, e.g. "-c -i 192.168.001.010"). This option doesn't work properly for me.

-d or -D enables a debugging option, where if you run Trek.exe with a debugger, it will trigger a breakpoint (via int 3) right after BotF has initialized.

I'm particularly interested in the -L option. I've been tracing through the code following this setting, and it seems Trek.exe establishes network connections when using this option. I haven't played multiplayer in a few years, but IIRC you can't resume a saved multiplayer game on the network (correct me if I'm wrong). I *believe* that is what this option is for. If anyone would test this out, it could be quite useful if it works. Just get a multiplayer game working, save it, quit, and then run trek.exe -L, load the game, and see if it lets you resume it as a network game.

The other network options -H, -c, and -c -i, seem kind of pointless to me, but if anyone has any ideas of why they exist, I'd like to hear!

The -n option is interesting. Running with -n will reuse the STARTINGSEED value in stbof.ini for generating new galaxies. So if you like a particular galaxy, you can copy the seed value and start with -n. You can test the option by starting a new game, and then starting another new game with the same options. You will indeed get the same galaxy. Or if you're bored, you can manually set different seeds in stbof.ini, starting at 1 and working up til you find a really nice galaxy (I randomly got a galaxy where I started beside the Zakdorn, but I forgot to copy it, lol). There's only about 4 billion seeds to choose from. 8)

For those of you who don't like command lines (ahem), you can enter the options in a shortcut to Trek.exe.

Regards.
Last edited by QuasarDonkey on Sat Aug 20, 2011 7:21 am, edited 2 times in total.

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2581
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: BotF Startup Codes (Command-line arguments)

Post by Flocke » Sat Aug 20, 2011 7:05 am

the cheat ones were known, yes, -H and -L is used for msn and also warzone multiplayer games, the others I didn't know of yet

regarding multiplayer games, I never had a problem to continue by loading a savegame, neither with LAN games nor Internet games, the only thing that's bugging me is that the transfer is that kinda sloooooooooooooow.
I've also rarely heard problems from others continuing a saved game, only if they tried to use buggy warzone bypass option. :o

User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: BotF Startup Codes (Command-line arguments)

Post by QuasarDonkey » Sat Aug 20, 2011 7:11 am

Flocke wrote:-H is used for msn and also warzone multiplayer games
I did not know this.
Flocke wrote:I never had a problem to continue by loading a savegame
It seems I was wrong about that, it's been a few years... You were saying it's used for online play? Maybe it could also be used for when you load a saved network game turning it into a single player game. Maybe -L could turn it into back into a net game? I'm totally guessing on this. I did see references to comms/conninit.c subroutines being called from the load screen when this option is on.

I'd be interested to see if the -c and -c -i options have any effects on network play. Anything that would improve networking would be awesome.
Last edited by QuasarDonkey on Sat Aug 20, 2011 7:15 am, edited 1 time in total.

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2581
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: BotF Startup Codes (Command-line arguments)

Post by Flocke » Sat Aug 20, 2011 7:15 am

I edited last post, immediatly remembered on -L after posting, -H ist used when you launch a game yourself, -L is used for clients, maybe also some other options were set, I'm not sure about right now.

User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: BotF Startup Codes (Command-line arguments)

Post by QuasarDonkey » Sat Aug 20, 2011 7:17 am

Yeah I kinda looked and looked again, and edited my post at the same time, ha.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: BotF Startup Codes (Command-line arguments)

Post by thunderchero » Sat Aug 20, 2011 8:24 am

-L is part of registry for direct play

Root: HKLM; Subkey: Software\Microsoft\DirectPlay\Applications\Birth of the Federation; ValueType: string; ValueName: CommandLine; ValueData: -L

I wonder if changing this would have any effect on playing in warzone.

thunderchero

User avatar
SunWuKong
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Tue Oct 18, 2011 4:51 pm

Re: BotF Startup Codes (Command-line arguments)

Post by SunWuKong » Sun Dec 09, 2012 12:10 pm

HI QD

I'm familiar with Mudd but what do the other switches do?

-Bones
-BorgOff (might have an idea about this one :)
-Gorn
-Kirk
-Picard

Thnx, RF

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: BotF Startup Codes (Command-line arguments)

Post by thunderchero » Sun Dec 09, 2012 1:02 pm

content page has info on that :wink:


To view intermission scenes, start the game with one

of the following command line parameters:


  • RESULT

    COMMAND LINE PARAMETER


    Alliance formed

    -bones


    Planet destroyed

    -kirk


    Game lost

    -gorn


    Game won

    -picard
thunderchero

User avatar
SunWuKong
Cadet 1st Year
Cadet 1st Year
Posts: 4
Joined: Tue Oct 18, 2011 4:51 pm

Re: BotF Startup Codes (Command-line arguments)

Post by SunWuKong » Tue Dec 11, 2012 5:38 am

Ah, cheers for that - missed the original post.

Post Reply

Return to “Startup Codes (Command-line arguments)”

Who is online

Users browsing this forum: No registered users