PDA

View Full Version : Crow King's Simple Admin Tutorial


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.

unionjack
12-23-2005, 10:17 AM
hi
i have been using autokick - forsight and serverwatch
but im getting the same problem with them all
i restart the server im running
then start the kick program im using
everything runs sweet untill the server hits 17 players
serverwatch just stops showing the players
but you can still send messages
autokick shows all players but no ip's
which is a pain because the player to ban is always out of reach
is this down to my router ?
if so why does the router let me see the 1st 17 players

rudedog
12-23-2005, 10:51 AM
I doubt it's your router.

I would remove all mods and do not start autokick

then try them one at a time to find out where your problem is. I know autokick should not have any problems with more then 17 clients.

I also assume you have a very fast upload connection to host anything over 4-5 clients. Here in the states our uploads are never higher then 1 meg if your very very lucky

unionjack
12-23-2005, 11:09 AM
no no no i wish i could upload that fast now that would be nice
i run the kicking programs from my pc remote if you like

a friend of mine can run the programs np at all
connecting to the same server
but i cant ask him to run it all the time as he dont play the game

rudedog
12-23-2005, 03:16 PM
sorry for the misunderstanding.

I've never heard of any issues with AK and routers but you never know.

What I would do is, temporarily place your box in the dmz to see if it works. If it does then it's your router.

If it is your router then I would try and update your routers firmware.

good luck

unionjack
12-26-2005, 11:57 AM
already updated firmware
router is in dmz still the same

rudedog
12-26-2005, 12:43 PM
I'm sorry but I don't know what to try next.

Have you asked over at autokick.com?

If you do find out please let us know what the resolution was

unionjack
12-26-2005, 04:47 PM
yeah i will m8 thanks for trying to help

GaSplat
12-27-2005, 03:06 PM
I recall their being a bug with 18+ players. Don't know if CI or foresight suffer from it or not, but I recall the game could lose rcon or at least the ability to dump status with 18+ slots filled. Sorry, its been a while.

Cujo_8931
01-08-2006, 08:14 PM
am i spose to have a file called qconsole.log and when i type through console it always shows mine name instead of saying console

Crow King
01-30-2006, 02:53 AM
Its been a while, but....

This was a bug in MOHAA. The server simply did not send the entire player list in response to a query. It didn't matter if it was Autokick or a player pressing Tab to see the scores - the server did not send all the players in the packets.

If you see your own name instead of 'console' when you speak from the console, it is because you are running a non-dedicated server. I am guessing this is also the reason you have this problem and your friend does not. Try running a dedicated server if you can.

ck

rudedog
02-01-2006, 01:08 AM
CK is that you?

If so HOW the HELL HAVE YOU BEEN? Long time no hear.

GaSplat
02-19-2006, 03:13 PM
Please post general questions in the appropriate forum rather than under a guide. Otherwise these guide threads become rediculously long.

Thanks folks.

Matteo, I moved your post here: http://www.fpsadmin.com/forum/showthread.php?t=10715

noob
03-24-2006, 03:41 PM
is this for mohaa spearhead or is it for just mohaa???? i am all new ive followed ppl and not got now where lol :confused: :confused: ive tryed tmm and here and i still dont get all this c$$$ plz help:confused: :confused: :confused: :confused: :confused:

rudedog
03-24-2006, 09:57 PM
This covers all the MOH series except Pacific Assault and you could get a PA sever running with this guide if you really tried.

If your still having problems, post in the MOH server section, someone will help.

[TPG]MoFo
03-25-2006, 02:38 AM
hi
i have been using autokick - forsight and serverwatch
but im getting the same problem with them all
i restart the server im running
then start the kick program im using
everything runs sweet untill the server hits 17 players
serverwatch just stops showing the players
but you can still send messages
autokick shows all players but no ip's
which is a pain because the player to ban is always out of reach
is this down to my router ?
if so why does the router let me see the 1st 17 players

Look here: http://www.fpsadmin.com/forum/showthread.php?t=8226

It is most certainly your router. Get rid of it and get a better router. It doesn't matter if you update the firmware or not. I had this problem for a while until I found a thread at CODAdmin.com that detailed the issue pretty thouroughly. Your router does not know how to reassemble the server return packets. I replaced my router and haven't had a problem since. To test, disconnect your router completely so there is nothing between you and the server and see if it works. Sorry to reply to a 3 month old post, but since this other fella bumped it, I just spotted it and thought I would give my 2. Hope this helps somebody.:)

racky
05-10-2006, 02:14 PM
i'm a little newbie on thiz thing and i need help...

I have followed the instruction but it really don't workz anyway...
I starts the Shortcut and the console comes up.. and Click!
it stands that it can't exec server.cfg????!!

How do i do that?? need help.. really! thx...:rolleyes:

payableondeath
05-10-2006, 02:55 PM
Have you made a server.cfg and put it in your main folder?

also check that its server.cfg and not server.cfg.txt easy why to check this is to open up my computer click on tools > Folder Options then go to view and untick the hide extensions for know file types

then go back to the main folder and look at the server.cfg file to make sure it doesnt have .txt at the end

GaSplat
05-10-2006, 03:18 PM
If its Spearhead or Breakthrough then you can copy one of the existing config files (ffa.cfg, obj.cfg, round.cfg, etc. )and rename it as server.cfg. The server config file is what has all the settings and the map list and loads the first map to launch your server. It can be called anything, as long as the start up command includes +exec yourconfigfile.cfg where yourconfigfile.cfg is the name of your configuration file. server.cfg is just a handy name to use.

Once the server starts, the console will display setting the various values, and will load the first map called in the config file. After that you will see one or two "hitch" messages and then nothing. At that point your server is up and running. The hitch messages are normal on map change/load.

racky
05-10-2006, 06:36 PM
thx... but how do i saves my change on my dedidcated server???
everytime i most start to write everything again!! (rcon)...

is it much easier to made servers on Mohass and Mohaab?

thx for the help!;)

GaSplat
05-10-2006, 07:27 PM
That is the purpose of the config file.


Go here http://www.fpsadmin.com/forum/showthread.php?t=9008 (http://www.fpsadmin.com/forum/showthread.php?t=9008)for an example of what to put in your config file (called a CFG in this article). Just cut and paste what he has at the bottom into a text file and call it server.cfg.


I don't think AA is any easier than SH or BT. They just came with some default config files to get people started.

Please post further questions in the Medal of Honor forums rather than here in the guides. You may find other useful information in the forums as well.

racky
05-11-2006, 04:55 PM
Thank you so much!! :D

It's workz!
But it stands that it can't exec serverXX.cfg... but it's works... strange! :confused:

Thanks for the help Lad!

Xyron
05-25-2006, 12:36 PM
Eya guys .. I did evry step , well and when i open'd the server it open'd the map.. but my server isnt on gamespy , well and i dont know why:confused:

Well can someone plz help me ,

GreetZ

Xyron

__________________________________________________ ____________

GaSplat
05-25-2006, 10:31 PM
The basics and suggestions on what to check are listed in several of the MOH threads. Use the forum search (on the right side of the screen just over the last posted info column) in the Medal of Honor Section (http://www.fpsadmin.com/forum/forumdisplay.php?f=55)and you will find several threads that offer ideas and hints (ports, variables, etc.).

Please post questions in the forums, not the guide lists.

DarkSullivan
11-24-2007, 09:53 AM
I did what everyone was saying, but i just started my mohaa demo and it said "execing server.cfg" , and its been like that for 5 minutes so far. Is that good or bad? -DS.

PS. it also said execing rcon.cfg file when i entered it in.

payableondeath
11-25-2007, 04:47 AM
I did what everyone was saying, but i just started my mohaa demo and it said "execing server.cfg" , and its been like that for 5 minutes so far. Is that good or bad? -DS.

PS. it also said execing rcon.cfg file when i entered it in.

thats good as its loaded the config, although it should load up a map, but only if you have put the map command in the server.cfg

put in at the bottom of the config file

map dm/mohdm1

(if dm/mohdm1 is part of the demo, i cant remember what maps are in the demo)

then you should see it load a map once its read the server.cfg

DarkSullivan
12-12-2007, 09:07 PM
Ok i got everything done but when i tried to enter battle it said " server connection timed out" 24 times in a row!!!! i went on gamespy and checked the gametype and its single-player???? I tried to chancge it but its said will change gametype when the server is restarted. i did and its still the same thing, server connection times out and it still says single-player, does anyone know how to fix this, and thanks payobleondeath for helping me with the map problem.

barney[uk]
07-05-2008, 10:31 PM
im running a sh server with the mini mod installed using forsight :mad::mad::mad:
whilst i was testing it all of a sudden a command line came up kicking barneyuk for cg_3rd_person ans i was gone the flaming cheek lol. i dont knowhow 2 get forsight to ignore it

conner
12-27-2008, 01:44 AM
ive been looking for this program id rather have c.i but crowe kings will work but where can i find them

rudedog
12-27-2008, 10:17 AM
luckily crowking still has his download dir up. It's not in public view but you can find all of crowkings stuff on his site.

http://www.crowking.com/downloads/

I'll be mirroring the files her on FPSadmin later today. We lost them (AGAIN) when I moved download applications....

rudedog
12-27-2008, 10:54 AM
We also have the in our download section again under MOH:AA

http://www.fpsadmin.com/forum/downloads.php?do=cat&id=15