JediServers.com Click Here


Help & Tips

Overview of Server Administration

by Astyanax

(This was written for JK2, but concepts and most of the commands are the same for JKA.)

The purpose of this article is to explain the important and commonly-used Configuration VARiables ("CVARs") used by your Jedi Outcast server.cfg file and Remote CONtrol ("RCON"). Obviously these aspects can only be controlled by the administrator of your JK2 server.

This article assumes you know a little bit about the JK2 console, and about how your own jk2mpconfig.cfg file works.

So, let's start with what you need to know first:



PART I: The Command Line

If you are renting a server, 9 times out of 10 you will not need to know anything about the command line, because your hosting company configures this for you. If you are renting from JediServers.com, skip PART I, because your host executes the server.cfg or a similar file for you, and you can go straight to that.

Still here? Well, every JK2 server starts up by being executed as a command line. This can be done from Linux or Windows alike, so you will need to know something about Windows shortcuts or Linux command lines before you can proceed further. I won't go into Linux command lines or Windows shortcuts at this point, but know that both can be made to look something like this:
\#path to your file#\jk2mp.exe +set dedicated 2 +net_port 28070 +fs_game base +exec server.cfg
Let's look at each of these parts:
\#path to your file#\
This is where your JK2 program files are stored. In Windows, this might be "C:\Program Files\LucasArts\Star Wars Jedi Knight II: Jedi Outcast\GameData", or somesuch.

jk2mp.exe
This is the file which executes your game. In some installations, it may be "jk2ded.exe".

+set dedicated
This tells your game to run as a dedicated server. It can be followed by a 1 for LAN play only, or a 2 for the online multiplayer experience.

+net_port
This tells the server which port number you want to play on. The default is 28070, but you can pretty much set it to any port number you want, so long as it does not conflict with another program or device on your system. If you are running a router or firewall, be sure to open or forward that port in your firewall, otherwise no one will see your server on any lists.

+fs_game
This tells your game which GameData folder to run in. Default is base, but if you intend to run a mod, youwill need to specify that mod's folder name here.

+exec
Finally, this command tells your server to execute any config file it needs to. In our example, and in the case of most hosts, that file will be "server.cfg". You're safest going with that.
Once you have your shortcut or command line created, you can now look at the contents of the server.cfg file, which contains all your important CVARs.



PART II: server.cfg

This file is commonly used to control the initial CVARs used by your server when it starts up. Most of the CVARs mentioned below can be pre-set in this file, so that your server will follow the appropriate behavior when it starts. Sometimes you will find these CVARs in your jk2mpserver.cfg instead, but it is always best to use a separate file for this purpose, and executed by your command line.

If this file does not already exist in your base folder, you should create it.

It is important to note that above all, your server.cfg will need to store your RCON password, like so:
rconpassword "mypass"
Any time you make changes to server.cfg, you will need to restart your game server.



PART III: RCON

RCON allows you to change how your game works from within the game. Just like any administrative function, you will need to log in to RCON in order to execute its commands. To do so, bring down your console window and type:
/rconpassword mypass
...where mypass is whatever password was previously assigned in server.cfg. It is CRITICAL that you type this out carefully, because if you do not, you risk broadcasting your password to everyone in your server, and a savvy rconner could take over your server that way.

That said, it is possible to configure your own machine to log you in automatically when you join, so that you don't have to log in yourself every time. In your GameData/base folder, you should find your jk2mpconfig.cfg. Inside, add the following line:
rconpassword "mypass"
The server will recognize you next time you enter, and you will no longer have to manually log in.



PART IV: Basic Player Administration

The commands in this section ONLY apply to RCON...meaning you can only do these things by Remote CONtrol, and not by editing server.cfg. So let's dive in, shall we?
/rcon status
This will bring up a list of all the players in the server (see below). The most important things to note are their client ID (first column) and their IP address (sixth column) This information will be useful to you for other commands.

Status Screen


/rcon clientkick 3 (or other Client ID)
This will kick the player who has the Client ID given to them by the status command above.

/rcon addip "123.456.789.012"
This will permanently ban the player who's IP address is placed between the quotes. Note that you can only store 256 characters' worth of banend IPs. Attempt to ban too many and your server may crash. Also note that it will NOT kick the lpayer, so be sure to ban and THEN kick.

/rcon removeip "123.456.789.012"
This will un-ban any player you have previously banned, matching that IP address.

/rcon map_restart
This will restart your map. It is often necessary after using advanced server commands, such as changing available Force powers or weapons.

/rcon map ffa_bespin
This will imediately take you to any map you specify. You will need to know the real map's BSP name in order for it to be successful. Usually the PK3 name is the same as the BSP name.

/rcon exec file.cfg
This will immediately execute any cfg file.

/rcon quit
This will kill your server. Often, hosting companies auto-restart servers that are killed this way, so it's a nice, effective restart tool.


PART V: Advanced Administration

Although the commands in this section can be entered through RCON, it is always best to use server.cfg to do it. Using RCON for these commands will usually not have a permanent effect. Also, most of the commands listed here require a map_restart (see Part IV above) in order to become effective.
First, let's take a look at a properly formatted server.cfg.
Now, let's look at what it does line-by-line. A couple important notes:
  • If you use any of these CVARs in your server.cfg, it will probably (but not always) require the seta command before them. Refer to the example to see which do and which do not.

  • If you use any of these CVARs with RCON, be sure you put the /rcon command before it.

  • If you use any of these CVARs with RCON, you will need to perform a map_restart for the changes to take effect.
And here are the most commonly-used commands.
rconpassword "mypass"
This allows you to set your RCON password. You can put anything between the quotes.

sv_hostname "My Server"
This sets the name that your server appears as, on all the lists.

g_motd "^3Welcome"
This changes the text that appears under your server name while a map is loading.

sets commands
These commands allow you to make up whatever labels you wish for your server. They will be visible while people are browsing servers and click on your server for more information.

        seta sv_master1 "204.97.248.90"
        seta sv_master2 "216.177.89.34"
        seta sv_master3 "65.113.118.130"

These tell your game server to contact the Raven, GameSpy and Zone master lists, so that your server will appear there. I recommend the use of THESE IP addresses and not host names, because they tend to be more reliable and consistent. Raven, GameSpy, and the Zone almost never change these IP addresses.

sv_maxclients 16
This tells your server how many player slots are available for players to connect.

sv_maxRate 5000
This tells your server at what speed (bytes per second) information will be sent to each player. This is especially important if you have limited bandwidth (so that bandwidth can be divided equally among players) or if you allow 56K modem players to connect (so that the high-speed players do not gobble up all available bandwidth). In my experience, 5000 is a decent number for JK2, and results in consistent, smooth play for all players.

sv_privateclients 0
This setting allows you to set aside any number of player slots, that may only be conncted to via password. So if you run a 16-player server, and want to make sure that 2 admins can always get in, set this to 2. That way, no more than 14 people will ever be able to connect.

sv_privatepassword "priv_pass"
This determines the private connection password. Only people who connect using this password will be able to join the server through one of the private player slots. You can put anything between the quotes.

sv_maxping 400
This sets the highest ping value that you will allow players to connect as. This keeps high-ping people out of your server. Inmy experience, 400 seems to be a good number.

sv_pure 0
0 = no, 1 = yes. This tells your server whether or not you would like to run as a pure server. A pure server will not allow any special player client files to be used unless such files are also found on the server. It's as good at preventing hacking as JK2 gets, but can be rather limiting, because you will not see skins on the server that the server does not already have.

sv_allowdownload 1
0 = no, 1 = yes. This tells your server whether or not to allow players to download your server map, skin, or mod files while trying to connect.

g_password ""
This puts a password on your server, thus rendering it private. You can put anything between the quotes. Setting to "none" will clear your password.

g_inactivity 0
This tells your server to kick people who do nothing after a specified number of seconds.

g_timeouttospec 0
This tells your server to force people to spectator mode who do nothing after a specified number of seconds.

g_allowvote 1
0 = no, 1 = yes. This tells your server whether or not to allow voting.

g_autoMapCycle 1
0 = no, 1 = yes. This tells your server whether or not to cycle to the next map after each map hits its timelimit, fraglimit or capturelimit.

bot_minplayers 0
This tells your server to keep a minimum number of players on your server at all times, and to fill such gaps with bots. Therefore, if you set this to 2, and there's only one person on your server, a bt will appear to fulfill the minimum, and will disappear when another player connects.

g_dismember 1000
This tells your server to enable dismemberment. I use 1000 as a nice solid number, making dismemberment happen quite often. Setting to zero will turn off dismemberment. Note that you will also need to set "cg_dismember 1000" in your own "jk2mpconfig.cfg" file.

g_privateDuel 1
0 = no, 1 = yes. This tells your server whether or not to allow the saber challenge in non-duel game types.

g_saberlocking 1
0 = no, 1 = yes. This tells your server whether or not to allow saber locks.

g_weapondisable 0
This very strange CVAR tells your server which weapons to enable or disable. It requires a special, unique number, which tells it everything it needs to know. To figure out that number, just use the calculator below.

g_duelweapondisable 0
This works just like the g_weapondisable CVAR, but applies to the Duel game type only.

Saber-Only Configuration
Weapons-Only or Weapons/Saber Configuration
   Saber/Stun Baton*
Bryar Pistol
Blaster
Disruptor
Bowcaster
Heavy Repeater
   D.E.M.P. 2
Flechette
Rocket Launcher
   Thermal Detonator
Trip Mine
Detonation Pack
* Stun Baton is active ONLY if the Saber Defend and Saber Attack Force powers are disabled.

g_forcepowerdisable 0
Also, a very strange CVAR, this tells your server which Force powers to enable or disable. It requires a special, unique number, which tells it everything it needs to know. To figure out that number, just use the calculator below.

Neutral

Saber Attack**
Saber Defend**
Saber Throw
Jump
Push
Pull
Speed
Seeing
   Light Side

Mind Trick
Heal
Protect
Absorb
Team Heal
   Dark Side

Grip
Lightning
Drain
Dark Rage
Team Energize
** Saber Attack and Saber Defend do not disable when all other Force powers are disabled.

g_maxforcerank 6
This tells your server what level of Force points are allowed in the server to be allocated to Force powers. The available numbers are as follows:

        1 = Initiate (5 points)
        2 = Padawan (10 points)
        3 = Jedi (20 points)
        4 = Jedi Adept (30 points)
        5 = Jedi Guardian (50 points)
        6 = Jedi Knight (75 points)
        7 = Jedi Master (100 points)

g_gametype 0
This tells your server what type of game you would like to play:

        0 = Free for All
        1 = Holocron Free for All
        2 = Jedi Master
        3 = Duel
        5 = Team Free for All
        7 = Capture the Flag
        8 = Capture the Ysalamiri

g_friendlyfire 0
0 = no, 1 = yes. When turned on, it enables you to hurt people who are on your own team. Turn this on for more realistic play.

g_warmup 5
When you start a new game, this adjusts the countdown in seconds you have before your game will start. Default is 5 seconds.

timelimit 30
This tells the server the game is over after the specified number of minutes. Set to zero for no time limit.

fraglimit 30
This tells the server the game is over after the specified number of kills. Set to zero for no kill limit.

duelfraglimit 30
This tells the server the Duel game is over after the specified number of kills. Set to zero for no kill limit. Standard fraglimit (above) for Duels simply chooses how many kills are allowed per round. duelfraglimit chooses how many rounds per game.

capturelimit 10
This tells the server the Capture the Flag game is over after the specified number of captures. Set to zero for no limit.

g_forcebasedteams 0
0 = no, 1 = yes. When turned on, blue team only gets Light Side Force powers and red team only gets Dark.

g_teamForceBalance 0
0 = no, 1 = yes. When turned on, the server will force connecting players to join teams in such a way that balances teams evenly.


And finally, please look at these last two lines of the server.cfg file:

exec academy.cfg
As you may know, mods come with their own comprehensive lists of CVARs. Rather than getthem mixed up with the standard JK2 CVARs, it is a common practice to put them in their own file (usually in the mod's folder), and execute them from here.

map ffa_bespin
If you read PART IV above, you'll know what this does...after having set all the CVARs that need setting to run a server, this final command tells the server to fire up the specified map.


So there you have it. There are other commands, but none so important or used as much as those mentioned here. So stick with the basics, learn these commands, and you'll soon have a server up-and-running that does everything you need!

If you still have questions, please Contact Us!

© 2003-2010 BS Gaming. All rights reserved. All Star Wars materials © LucasFilm Ltd.