rudedog
02-25-2005, 10:13 PM
Here's how to get your MOHAA dedicated server up and running.
For this document, I'll be using an example of my ROUND BASED DM server setup. Most of what you read here can be applied to any of the various gametypes supported by MOHAA.
Shortcut / Command Line
Start by making a copy of your MOHAA game shortcut.
Right-click the shortcut and go into it's PROPERTIES.
Then add the proper variables into the TARGET: box ( or command line) AFTER and OUTSIDE of the quotes that surround your PATH (this is important !). Also be sure to have a space BEFORE the first variable after the quotes, and at the end of each following variable.
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +set dedicated 1 +set ui_console 1 +set g_gametype 3 +set sv_maxclients 12 +map dm/mohdm1 +exec serverXX.cfg
Breakdown:
+set dedicated 1
//Launches the game in dedicated console mode
+set ui_console 1
//Enables the in game console via the ~ key (not sure if needed, but
//keep it)
+set g_gametype 3
//Sets the game type
//1= FFA 2= TeamMatch 3= RoundBased 4= Objective
+set sv_maxclients 12
//Sets a 12 player limit (up to 32)
+map dm/mohdm1
//Sets the starting map for the server
+exec serverXX.cfg
//Calls a user-defined config containing custom variables for the
//server.
//It is BEST to have your .CFG calls at the END of the command line.
.CFG Files
The .CFG files are the heart and soul of customizing your server to your liking.
A Config File (.cfg) is nothing more than a text document with a .CFG extension which the game reads and changes the defaults to the variables that you have set.
To create one, open wordpad (or any basic text editor).
At this point, you simply list the custom variable settings that you want for your server and particular gametype. (unlike the command line, you DO NOT need a + in front of the variables)
Anything that you want the server to ignore for whatever reason should be PRECEEDED by // (double forward slash). I will add comments below using the //, but this is only to describe the variables.
*******
sv_hostname "your hostname here"
//Sets the NAME of your server, what people will see in the browser
fraglimit 0
//Sets the limit of Frags that will end the match
//( 0 = no fraglimit)
timelimit 25
//Sets the amount of time (in minutes) for map changes
//(0 = no timelimit)
sv_maplist "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm5 dm/mohdm7"
//This is the list of maps that will be cycled for the server
sv_allowDownload 0
//Toggles allowing client downloads from server, like custom maps
//(0-off 1-on)
sv_maxRate 9000
//Max data transmit rate by clients on the server.
//(setting depends on network)
sv_maxPing xxx
//Keeps anyone with a higher ping than this value from connecting
//to the server
sv_fps 20
//Server FPS, this should increase performance (20 is the default) sv_floodProtect 1
//Flood protection from server crashing text messages
set flood_waitdelay 10
//not too sure on this, possibly time before flooder is allowed
//to type again (default)
set flood_persecond 4
//messages per second to be considered a flood ?? (default)
set flood_msgs 4
// ?? (default)
sv_pure 0
//Pak checker, does not allow clients to use PAK files the server //doesn�t have (0=off 1=on)
sv_gamespy 1
//Allows your server to show up in the Gamespy browser, and the
//In-game browser (v1.1)
set g_inactiveKick 300
//Time (in seconds) that a client will be kicked for inactivity
set g_inactiveSpectate 60
//Time (in seconds) that a client will be moved to spectator for
//inactivity
set g_teamdamage 0
//Sets friendly fire 0=off 1=on
net_noipx 1
//Disallows IPX connections, TCP only (network protocol)
net_port 12203
//Sets the port # for the game to run off of (12203 is the default)
rconPassword yourpasswordhere
//Sets your RCON (http://www.mohadmin.com/kb/index.php?page=index_v2&id=18&c=3) password to allow you Remote Administration
//Finally, put a blank line at end of the config
//***********************************
//Popular stuff that DOES NOT seem to work, but is available.
//set g_motd �your message� //message of the day ?
//set g_motdString �message� //message of the day?
//set g_teamForceBalance 1 //team balancing
//set sv_privateClients xx //private slots on the server
//set privatePassword xxx //password for private slots
//************************************
Then SAVE the file as serverXX.cfg (click yes to confirm the extension warning).
If you forget and save it as �new text document�, simply rename it to serverXX.cfg
**Important**THE FILE MUST BE SAVED INTO THE �MAIN� DIRECTORY WHERE YOU HAVE MOHAA INSTALLED, if it is NOT saved in this directory, your command line will FAIL to call it and you will get an error at the console saying �COULD NOT EXEC SERVERXX.CFG�.
**NOTES**For a full list of cvar�s (variables) type CVARLIST at the console. There are MANY MANY more variables than what I have listed here, a lot of which you may find useful. I simply used some of the common ones just to get things started. **Also, regarding the NAME of the .CFG file. This can be WHATEVER you want. I put serverXX.cfg because I use the �XX� part to distinguish between gametype (since I have multiple configs), the XX could be an 01 or 02 or FFA etc�, depending on the gametype I want to call. But you can name your config files WHATEVER YOU WANT !!
For this document, I'll be using an example of my ROUND BASED DM server setup. Most of what you read here can be applied to any of the various gametypes supported by MOHAA.
Shortcut / Command Line
Start by making a copy of your MOHAA game shortcut.
Right-click the shortcut and go into it's PROPERTIES.
Then add the proper variables into the TARGET: box ( or command line) AFTER and OUTSIDE of the quotes that surround your PATH (this is important !). Also be sure to have a space BEFORE the first variable after the quotes, and at the end of each following variable.
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +set dedicated 1 +set ui_console 1 +set g_gametype 3 +set sv_maxclients 12 +map dm/mohdm1 +exec serverXX.cfg
Breakdown:
+set dedicated 1
//Launches the game in dedicated console mode
+set ui_console 1
//Enables the in game console via the ~ key (not sure if needed, but
//keep it)
+set g_gametype 3
//Sets the game type
//1= FFA 2= TeamMatch 3= RoundBased 4= Objective
+set sv_maxclients 12
//Sets a 12 player limit (up to 32)
+map dm/mohdm1
//Sets the starting map for the server
+exec serverXX.cfg
//Calls a user-defined config containing custom variables for the
//server.
//It is BEST to have your .CFG calls at the END of the command line.
.CFG Files
The .CFG files are the heart and soul of customizing your server to your liking.
A Config File (.cfg) is nothing more than a text document with a .CFG extension which the game reads and changes the defaults to the variables that you have set.
To create one, open wordpad (or any basic text editor).
At this point, you simply list the custom variable settings that you want for your server and particular gametype. (unlike the command line, you DO NOT need a + in front of the variables)
Anything that you want the server to ignore for whatever reason should be PRECEEDED by // (double forward slash). I will add comments below using the //, but this is only to describe the variables.
*******
sv_hostname "your hostname here"
//Sets the NAME of your server, what people will see in the browser
fraglimit 0
//Sets the limit of Frags that will end the match
//( 0 = no fraglimit)
timelimit 25
//Sets the amount of time (in minutes) for map changes
//(0 = no timelimit)
sv_maplist "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm5 dm/mohdm7"
//This is the list of maps that will be cycled for the server
sv_allowDownload 0
//Toggles allowing client downloads from server, like custom maps
//(0-off 1-on)
sv_maxRate 9000
//Max data transmit rate by clients on the server.
//(setting depends on network)
sv_maxPing xxx
//Keeps anyone with a higher ping than this value from connecting
//to the server
sv_fps 20
//Server FPS, this should increase performance (20 is the default) sv_floodProtect 1
//Flood protection from server crashing text messages
set flood_waitdelay 10
//not too sure on this, possibly time before flooder is allowed
//to type again (default)
set flood_persecond 4
//messages per second to be considered a flood ?? (default)
set flood_msgs 4
// ?? (default)
sv_pure 0
//Pak checker, does not allow clients to use PAK files the server //doesn�t have (0=off 1=on)
sv_gamespy 1
//Allows your server to show up in the Gamespy browser, and the
//In-game browser (v1.1)
set g_inactiveKick 300
//Time (in seconds) that a client will be kicked for inactivity
set g_inactiveSpectate 60
//Time (in seconds) that a client will be moved to spectator for
//inactivity
set g_teamdamage 0
//Sets friendly fire 0=off 1=on
net_noipx 1
//Disallows IPX connections, TCP only (network protocol)
net_port 12203
//Sets the port # for the game to run off of (12203 is the default)
rconPassword yourpasswordhere
//Sets your RCON (http://www.mohadmin.com/kb/index.php?page=index_v2&id=18&c=3) password to allow you Remote Administration
//Finally, put a blank line at end of the config
//***********************************
//Popular stuff that DOES NOT seem to work, but is available.
//set g_motd �your message� //message of the day ?
//set g_motdString �message� //message of the day?
//set g_teamForceBalance 1 //team balancing
//set sv_privateClients xx //private slots on the server
//set privatePassword xxx //password for private slots
//************************************
Then SAVE the file as serverXX.cfg (click yes to confirm the extension warning).
If you forget and save it as �new text document�, simply rename it to serverXX.cfg
**Important**THE FILE MUST BE SAVED INTO THE �MAIN� DIRECTORY WHERE YOU HAVE MOHAA INSTALLED, if it is NOT saved in this directory, your command line will FAIL to call it and you will get an error at the console saying �COULD NOT EXEC SERVERXX.CFG�.
**NOTES**For a full list of cvar�s (variables) type CVARLIST at the console. There are MANY MANY more variables than what I have listed here, a lot of which you may find useful. I simply used some of the common ones just to get things started. **Also, regarding the NAME of the .CFG file. This can be WHATEVER you want. I put serverXX.cfg because I use the �XX� part to distinguish between gametype (since I have multiple configs), the XX could be an 01 or 02 or FFA etc�, depending on the gametype I want to call. But you can name your config files WHATEVER YOU WANT !!