rudedog
02-25-2005, 10:31 PM
This document gives a very short overview of the most common tasks a game server admin must perform on a Medal of Honor server. It is intended as a getting started reference to obtain more in depth information, you should read the server guides on the popular web sites.
Simple Admin Tutorial
- Crow King
Getting a Server Up and Running
Setting Up the Server
You have two choices when setting up your server you can run it in dedicated mode or non-dedicated mode. Dedicated just means that no one is playing the game on the server's machine the machine is dedicated just to acting as a server. Non-dedicated means the opposite the server is also being used (probably by the admin) to play on the server. While much of the info in this guide also applies to non-dedicated servers, they will not be covered here.
You also have two choices for starting your server. You can start it up from the command line using a config file or from within the game. Starting from the command line gives you much more control over the server and so only this option will be covered in this guide.
The Server Command Line
The easiest way to start your server from the command line is to create an icon on your Windows desktop, so you just have to double click it to start the server running. To create a Windows icon, right click on your desktop and select New -> Shortcut. A short wizard will walk you through finding the program you want the icon to run (you'll find MOHAA.exe in \Program Files\ EA GAMES\ MOHAA).
Next, you�ll need to add the arguments to your command line. Do this by right clicking on your newly created icon, selecting Properties and making your changes in the Target� text box. A good all purpose command line would be
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +set developer 1 +set dedicated 1 +set ui_console 1 +set sv_maxclients 16 +exec server.cfg
This tells the server to run in developer mode (+set developer 1), which, among other things, allows the server to keep a log. It also runs the server in dedicated mode (+set dedicated 0), activates the console (+set ui_console 1 not really needed, but useful if you need to do testing on your server), sets the maximum number of players to 16 (+set sv_maxclients 16) and configures the server using the settings stored in server.cfg (+exec server.cfg).
You can set just about any game setting from the command line, but usually, there are just a few that youll want to use. You can also include many of these same settings in your server's config file, but they will be overridden by whatever you have set in your command line. So, if you set sv_maxclients both on the command line and in your config file, whatever is on your command line will be used for setting sv_maxclients.
The Server Configuration File
Once the server starts up, it has to know what kind of game you want to run, what the name of the server is, what maps you want, etc. This information is all stored in the server configuration file. The file should be located in your EA GAMES\ MOHAA\ main directory.
Below is a template for a server configuration. The text that comes after double slashes (ie \\�) is a comment and ignored by the server. To use this template, just copy and paste it into a Notepad text document, make your changes and save it in your MOHAA\main directory (note the file must be in plain text format or the server will not load). Items that you should modify are in red .
// Generic MoHAA Server Config File
// This block of settings controls the info players will see about your server in game
// browsers, like GameSpy. If you don�t want your server to appear in GameSpy�s server
// list, change the 1 to a 0 in sv_gamespy.
seta sv_hostname "server name as it will appear in GameSpy "
sets Admin "your nick goes here "
sets URL "www.yourwebpage.com "
sets Connection "T1 "
seta sv_gamespy "1"
//This block of text controls the network settings for your server. Unless you have a
// specific reason for changing them, you should leave these as they are.
net_noipx 1 // disables the IPX protocol
net_port 12203 // specifies port 12203 for client connections
// This block of text controls your server�s security. If you don�t want to enable rcon
// commands, comment out the rconpassword line.
set rconpassword "your password here "
seta sv_floodProtect "1" // won�t allow players to flood server
seta flood_waitdelay "10"
seta flood_persecond "4"
seta flood_msgs "4"
set sv_pure "0" // requires players to have pure game files
// This block of text controls your server�s performance variables.
seta sv_allowDownload "0" // if players don�t have maps, don�t send them
seta sv_maxRate "9000" // allow players to pull up to 9,000 bps
seta sv_fps "20" // process 20 frames per second
seta sv_maxping "200 " // players must ping below 200 to connect
// This block of text controls the number of players on the server
set sv_maxclients "16 � // Maximum of 16 players on server
set sv_privateClients "3 " // 3 of 16 slots require a password
set sv_privatepassword "your private password here "
// the password for the private slots
// This block of text controls the game play variables on the server.
seta timelimit "15 " // maps will run for 15 minutes
seta fraglimit "0" // maps will not end based on frags
set g_gametype 4 // map will be objective (2 = TDM)
set g_teamdamage "0 " // friendly fire is off (1 = on)
set g_inactiveSpectate "30 " // players go to spectate after 30s of inactivity
set g_inactiveKick "120 " // players kicked after 120s of inactivity
// the next line is the list of maps the server will run, in order
// if you change to tdm maps, don't forget to change the gametype
seta sv_maplist "obj/obj_team1 obj/obj_team2 obj/obj_team4 "
map obj/obj_team1 // the first map to run
Once you've made your changes and saved the text file, double clicking the icon you created will start up your server.
Adding Mods and Maps to the Server
Most mods and maps will come with directions for their installation. You should read any documentation the author has included (usually in a readme.txt file) for any special considerations.
In the vast majority of cases, you will download a zip file. This will most likely contain a .pk3 file (a pack file). To install the map or mod on the server, just unzip the file you downloaded and move the pack file it contained into your server�s MOHAA\main directory (you�ll see other pack files in there, too). That's it.
Note that players will also have to have the map installed on their machines to play it (they will be disconnected when the map loads if they don�t have it on their machines). On the other hand, many mods are �server side only� mods, meaning that the pk3 file only has to be present on the server. The documentation included with the mod should tell you whether players need to have it or not.
Running a Server
Console
The console is where you type commands in to tell the game things you want it to do and it is accessed by pressing the tilda key (~) while in the game. However, before you can access the console, you have to make sure it is turned on in your game's settings. Make sure the Console checkbox is checked in the Advanced options screen for the game on the computer you will be playing from.
When you run the console on your own computer while you're playing the game, you have to tell it whether you want the command to run on your machine or on the remote server. For example, if you want to change the setting for sv_hostname (ie the server�s name as it appears in GameSpy), you have to tell console that you want to change it on the server, because both your machine and the server machine have sv_hostname variables (even though your machine isn't hosting anything).
Console commands are executed on the game server from a client game (ie your computer) by using the rcon (remote console) command. The command has the following format:
rcon <password > <command >
The is the rcon password as set in the server's configuration file. The command is any valid console command (map, set, etc.). So, if you typed map dm/mohdm1 into the console, it would load the Southern France map on your own computer. However, if you typed in rcon mypassword map dm/mohdm1 while you were connected to a server, it would load the Southern France map on the server.
Setting Passwords
You have to be very careful when type in rcon commands while you�re playing on the server. If you don�t have the console turned on in your settings, pressing the tilda key will bring up the chat. It is very easy to not notice this, type in your rcon command and so broadcast your server�s password to anyone reading the chat.
To prevent this, you should create a text file called �rcon.cfg� in your MOHAA\main directory and put the following lines in it:
rconAddress "xx.xx.xx.xx"
rconPassword "password"
Replace xx.xx.xx.xx with your game server's IP address (the Forlorn Hope IP is 66.151.108.87) and replace password with your rcon password. Be sure to include the quotes. The first time you connect to the server, bring down the console (tilda key) and type in exec rcon.cfg (don't include the quotes). This will tell your computer that whenever you type in an rcon command, send it to the server at rconAddress using rconPassword.
So, instead of typing in rcon mypassword map dm/mohdm1 to load Southern France , you can just type in �rcon map dm/mohdm1. Now, you never have to type the password in where people can see it, so you'll never give it away. You don't even need to be connect to your server as a player, since rconAddress tells MOHAA what server you are sending commands to.
The remainder of this guide will assume you have run the rcon.cfg and so the password will be omitted from all console commands. Each time you run MoHAA to play on your server, you will need to exec rcon.cfg.
Loading Maps
Sometimes you'll want to load maps on the server while you're playing. You can load any map installed on the server, regardless of whether or not it is in your sv_maplist (set in the server's config file). To load a map, type the following into the console:
rcon map <dir/mapbsp >
This will load the map located in directory dir with the bsp file name mapbsp . But the directory and file name are not found on your server's hard drive they are stored in the pack files. So, how do you know what to type in?
Most map authors include this info in their readme.txt files that came with the map. If they don't (or you forgot), you can always get a list of the maps and their locations on your server by running the maplist command in the console (you don't need to run it with rcon just type in maplist and press enter). This will bring up a little window with the maps the server has just click through them to find what you want. CAREFUL do not double click on the map you want in the maplist window! This will load the map on your local machine, not the server (remember this isn't run using rcon you're just using it to find the map name and directory).
Maps are stored in directories based on what gametype they were designed for DM for deathmatch and obj for objective. So, to load The Hunt, you would type the following into the console:
rcon map obj/obj_team2
including the quotes. When you run maplist, you�ll see these directories. Just double click on them to drill down and see what maps they contain.
Kicking Players
Probably one of the most bothersome chores as an admin is maintaining order on the server. To keep things under control, you will sometimes have to kick players. You have two options for doing this.
The first option is the easiest. Just pull down the console and type
rcon kick <playername >
This will kick the player with name playername. Note that you should use quotes around the name in case it contains spaces. Unfortunately, some players have figured out ways to make this method of kicking difficult for you by using names that can be very difficult to type in or by copying other players names.
For this reason, you can also kick players by their client number. The client number is just a unique identifier that the server assigns to each player. To see players� client numbers, you run a status command from the console by typing in
rcon status
and you'll see a list of players with info about each one. The left most column, next to the player�s name, gives you their client number. If the list of players is too long to be seen on the screen, you can scroll the console up or down to peruse the list. To kick a player using this number, type the following into the console:
rcon clientkick xx
where xx is their client number.
Some players just don't get the message, even after they're kicked. Unfortunately, MoHAA's banning function does not work. If you need to ban players from your server, you'll need a third party tool (like Autokick, which can be downloaded from the popular MoHAA web sites).
Speaking to Players Through Console
Sometimes, folks will be causing trouble and, while you don't want to kick them, you may want to let them know you're the admin. One way to do this is to use the console to chat with players. When you do this, your in game name does not show up in the chat window. Instead, it says, console: . Only someone with the rcon password can do this.
To speak through the console, use the say command. For example, typing the following into the console:
rcon say Please don�t sit on the spawn and rape that is not allowed!
would cause, console: Please don't sit on the spawn and rape that is not allowed!� to come up in the chat where everyone (dead or alive) can see it.
Simple Admin Tutorial
- Crow King
Getting a Server Up and Running
Setting Up the Server
You have two choices when setting up your server you can run it in dedicated mode or non-dedicated mode. Dedicated just means that no one is playing the game on the server's machine the machine is dedicated just to acting as a server. Non-dedicated means the opposite the server is also being used (probably by the admin) to play on the server. While much of the info in this guide also applies to non-dedicated servers, they will not be covered here.
You also have two choices for starting your server. You can start it up from the command line using a config file or from within the game. Starting from the command line gives you much more control over the server and so only this option will be covered in this guide.
The Server Command Line
The easiest way to start your server from the command line is to create an icon on your Windows desktop, so you just have to double click it to start the server running. To create a Windows icon, right click on your desktop and select New -> Shortcut. A short wizard will walk you through finding the program you want the icon to run (you'll find MOHAA.exe in \Program Files\ EA GAMES\ MOHAA).
Next, you�ll need to add the arguments to your command line. Do this by right clicking on your newly created icon, selecting Properties and making your changes in the Target� text box. A good all purpose command line would be
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +set developer 1 +set dedicated 1 +set ui_console 1 +set sv_maxclients 16 +exec server.cfg
This tells the server to run in developer mode (+set developer 1), which, among other things, allows the server to keep a log. It also runs the server in dedicated mode (+set dedicated 0), activates the console (+set ui_console 1 not really needed, but useful if you need to do testing on your server), sets the maximum number of players to 16 (+set sv_maxclients 16) and configures the server using the settings stored in server.cfg (+exec server.cfg).
You can set just about any game setting from the command line, but usually, there are just a few that youll want to use. You can also include many of these same settings in your server's config file, but they will be overridden by whatever you have set in your command line. So, if you set sv_maxclients both on the command line and in your config file, whatever is on your command line will be used for setting sv_maxclients.
The Server Configuration File
Once the server starts up, it has to know what kind of game you want to run, what the name of the server is, what maps you want, etc. This information is all stored in the server configuration file. The file should be located in your EA GAMES\ MOHAA\ main directory.
Below is a template for a server configuration. The text that comes after double slashes (ie \\�) is a comment and ignored by the server. To use this template, just copy and paste it into a Notepad text document, make your changes and save it in your MOHAA\main directory (note the file must be in plain text format or the server will not load). Items that you should modify are in red .
// Generic MoHAA Server Config File
// This block of settings controls the info players will see about your server in game
// browsers, like GameSpy. If you don�t want your server to appear in GameSpy�s server
// list, change the 1 to a 0 in sv_gamespy.
seta sv_hostname "server name as it will appear in GameSpy "
sets Admin "your nick goes here "
sets URL "www.yourwebpage.com "
sets Connection "T1 "
seta sv_gamespy "1"
//This block of text controls the network settings for your server. Unless you have a
// specific reason for changing them, you should leave these as they are.
net_noipx 1 // disables the IPX protocol
net_port 12203 // specifies port 12203 for client connections
// This block of text controls your server�s security. If you don�t want to enable rcon
// commands, comment out the rconpassword line.
set rconpassword "your password here "
seta sv_floodProtect "1" // won�t allow players to flood server
seta flood_waitdelay "10"
seta flood_persecond "4"
seta flood_msgs "4"
set sv_pure "0" // requires players to have pure game files
// This block of text controls your server�s performance variables.
seta sv_allowDownload "0" // if players don�t have maps, don�t send them
seta sv_maxRate "9000" // allow players to pull up to 9,000 bps
seta sv_fps "20" // process 20 frames per second
seta sv_maxping "200 " // players must ping below 200 to connect
// This block of text controls the number of players on the server
set sv_maxclients "16 � // Maximum of 16 players on server
set sv_privateClients "3 " // 3 of 16 slots require a password
set sv_privatepassword "your private password here "
// the password for the private slots
// This block of text controls the game play variables on the server.
seta timelimit "15 " // maps will run for 15 minutes
seta fraglimit "0" // maps will not end based on frags
set g_gametype 4 // map will be objective (2 = TDM)
set g_teamdamage "0 " // friendly fire is off (1 = on)
set g_inactiveSpectate "30 " // players go to spectate after 30s of inactivity
set g_inactiveKick "120 " // players kicked after 120s of inactivity
// the next line is the list of maps the server will run, in order
// if you change to tdm maps, don't forget to change the gametype
seta sv_maplist "obj/obj_team1 obj/obj_team2 obj/obj_team4 "
map obj/obj_team1 // the first map to run
Once you've made your changes and saved the text file, double clicking the icon you created will start up your server.
Adding Mods and Maps to the Server
Most mods and maps will come with directions for their installation. You should read any documentation the author has included (usually in a readme.txt file) for any special considerations.
In the vast majority of cases, you will download a zip file. This will most likely contain a .pk3 file (a pack file). To install the map or mod on the server, just unzip the file you downloaded and move the pack file it contained into your server�s MOHAA\main directory (you�ll see other pack files in there, too). That's it.
Note that players will also have to have the map installed on their machines to play it (they will be disconnected when the map loads if they don�t have it on their machines). On the other hand, many mods are �server side only� mods, meaning that the pk3 file only has to be present on the server. The documentation included with the mod should tell you whether players need to have it or not.
Running a Server
Console
The console is where you type commands in to tell the game things you want it to do and it is accessed by pressing the tilda key (~) while in the game. However, before you can access the console, you have to make sure it is turned on in your game's settings. Make sure the Console checkbox is checked in the Advanced options screen for the game on the computer you will be playing from.
When you run the console on your own computer while you're playing the game, you have to tell it whether you want the command to run on your machine or on the remote server. For example, if you want to change the setting for sv_hostname (ie the server�s name as it appears in GameSpy), you have to tell console that you want to change it on the server, because both your machine and the server machine have sv_hostname variables (even though your machine isn't hosting anything).
Console commands are executed on the game server from a client game (ie your computer) by using the rcon (remote console) command. The command has the following format:
rcon <password > <command >
The is the rcon password as set in the server's configuration file. The command is any valid console command (map, set, etc.). So, if you typed map dm/mohdm1 into the console, it would load the Southern France map on your own computer. However, if you typed in rcon mypassword map dm/mohdm1 while you were connected to a server, it would load the Southern France map on the server.
Setting Passwords
You have to be very careful when type in rcon commands while you�re playing on the server. If you don�t have the console turned on in your settings, pressing the tilda key will bring up the chat. It is very easy to not notice this, type in your rcon command and so broadcast your server�s password to anyone reading the chat.
To prevent this, you should create a text file called �rcon.cfg� in your MOHAA\main directory and put the following lines in it:
rconAddress "xx.xx.xx.xx"
rconPassword "password"
Replace xx.xx.xx.xx with your game server's IP address (the Forlorn Hope IP is 66.151.108.87) and replace password with your rcon password. Be sure to include the quotes. The first time you connect to the server, bring down the console (tilda key) and type in exec rcon.cfg (don't include the quotes). This will tell your computer that whenever you type in an rcon command, send it to the server at rconAddress using rconPassword.
So, instead of typing in rcon mypassword map dm/mohdm1 to load Southern France , you can just type in �rcon map dm/mohdm1. Now, you never have to type the password in where people can see it, so you'll never give it away. You don't even need to be connect to your server as a player, since rconAddress tells MOHAA what server you are sending commands to.
The remainder of this guide will assume you have run the rcon.cfg and so the password will be omitted from all console commands. Each time you run MoHAA to play on your server, you will need to exec rcon.cfg.
Loading Maps
Sometimes you'll want to load maps on the server while you're playing. You can load any map installed on the server, regardless of whether or not it is in your sv_maplist (set in the server's config file). To load a map, type the following into the console:
rcon map <dir/mapbsp >
This will load the map located in directory dir with the bsp file name mapbsp . But the directory and file name are not found on your server's hard drive they are stored in the pack files. So, how do you know what to type in?
Most map authors include this info in their readme.txt files that came with the map. If they don't (or you forgot), you can always get a list of the maps and their locations on your server by running the maplist command in the console (you don't need to run it with rcon just type in maplist and press enter). This will bring up a little window with the maps the server has just click through them to find what you want. CAREFUL do not double click on the map you want in the maplist window! This will load the map on your local machine, not the server (remember this isn't run using rcon you're just using it to find the map name and directory).
Maps are stored in directories based on what gametype they were designed for DM for deathmatch and obj for objective. So, to load The Hunt, you would type the following into the console:
rcon map obj/obj_team2
including the quotes. When you run maplist, you�ll see these directories. Just double click on them to drill down and see what maps they contain.
Kicking Players
Probably one of the most bothersome chores as an admin is maintaining order on the server. To keep things under control, you will sometimes have to kick players. You have two options for doing this.
The first option is the easiest. Just pull down the console and type
rcon kick <playername >
This will kick the player with name playername. Note that you should use quotes around the name in case it contains spaces. Unfortunately, some players have figured out ways to make this method of kicking difficult for you by using names that can be very difficult to type in or by copying other players names.
For this reason, you can also kick players by their client number. The client number is just a unique identifier that the server assigns to each player. To see players� client numbers, you run a status command from the console by typing in
rcon status
and you'll see a list of players with info about each one. The left most column, next to the player�s name, gives you their client number. If the list of players is too long to be seen on the screen, you can scroll the console up or down to peruse the list. To kick a player using this number, type the following into the console:
rcon clientkick xx
where xx is their client number.
Some players just don't get the message, even after they're kicked. Unfortunately, MoHAA's banning function does not work. If you need to ban players from your server, you'll need a third party tool (like Autokick, which can be downloaded from the popular MoHAA web sites).
Speaking to Players Through Console
Sometimes, folks will be causing trouble and, while you don't want to kick them, you may want to let them know you're the admin. One way to do this is to use the console to chat with players. When you do this, your in game name does not show up in the chat window. Instead, it says, console: . Only someone with the rcon password can do this.
To speak through the console, use the say command. For example, typing the following into the console:
rcon say Please don�t sit on the spawn and rape that is not allowed!
would cause, console: Please don't sit on the spawn and rape that is not allowed!� to come up in the chat where everyone (dead or alive) can see it.