Server Administration Guide

From Armagetron
Revision as of 03:29, 23 October 2005 by Lucifer (talk | contribs) (→‎Make your Settings: Added link to Console Commands page)

Setting up a server for Armagetron Advanced isn't terribly difficult, but there are a few things you need to consider when you do it. Taking a few minutes to figure out what you're trying to do will save you a whole lot of headache/heartache later on when people start playing your server.

Starting out

Before you consider what OS you're going to use, what version of the game to run, and so forth, you should figure out a few basic parameters of the server. Here are some you should consider.

Private or Public?

The setting TALK_TO_MASTER is off by default. To make your server public (available on the master server list), you must turn on this setting. If it is off, players will only be able to connect to your server through the Server Bookmarks using your IP address.

Moderated?

Armagetron Advanced supports a limited but expanding set of in game administration commands(in 0.2.8, it will be a fairly comprehensive set). The catch is that you can only have one administration password. So in order to make moderators on your server, all you have to do is give out the administration password.

The alternative is to use the voting features that are intended to allow players to moderate the server as they see fit.

You can go either way, of course. It's entirely up to you.

Round or Match

There are plenty of ways to setup scoring on a server. A common setting is one point for each kill. While this scoring method encourages competitive play, it's not always desirable. On some servers, just surviving to the end of the round is quite an accomplishment, and you may wish to reward players for doing so. Too much of a reward will encourage players to just screw around instead of fighting.

You should also consider if you even want the standard gladiator-style fighting. It's certainly possible to set up scoring to allow for different games, such as Roulette, and to encourage different playing styles. So just take a few minutes to think about it. It'll pay off in the end, because the default game server settings aren't necessarily the most popular scoring rules, and unless you really want the default scoring, you could lose most of your audience in the first two hours of operation if you didn't think about scoring.

Setting Up

So now you've figured out what kind of server you want and how you want people to play on it, and you want to know how to set it up and optionally make it available on the master server browser. Setting up is fairly straightforward.

Install the Server

First you need to install the server. It's common to think of any given "server" as a special machine built by old women in third-world countries, but actually, a "server" is just any machine that makes a "service" available to other users. In this case, you're going to install software on a computer, possibly your desktop computer, that will make a game service available for other users to use.

So first you need to acquire the package called "armagetronad-dedicated". If you're using Linux, get one that says "linux" on it. For Windows, get the one that has ".exe" on the end of it. For Mac OS X, there's one with a ".dmg" extension for you. Usually the CPU architecture and OS are embedded in the filename, so pick the right one and install it.

We won't go into too many details here about installation, consult the regular documentation for how to install the server for your architecture.

Test the Server

After installing the server, the first thing you should do is test it. So start it up. If you're in Linux, you will want to become the superuser and type, in a terminal, "/etc/init.d/armagetronad-dedicated start". If you're in Windows, find the icon in your Start menu and click it. Then fire up a client and see if you can connect to it as a LAN game (under Network Game). If you can do this, then you have successfully tested the server. Now you need to shut it down. In Windows, go to the console window for the server (it opens when you start the game) and type "QUIT". In Linux, just do "/etc/init.d/armagetronad-dedicated stop".

Secure the Server

There isn't really a lot to do here, but you should consider how you want to secure the machine. If you think it will be necessary to ban certain players, then a firewall is your only option. You will need a firewall that allows you to deny connections from users by IP address. It's not foolproof, but it's the only thing that is possible right now to ban players.

If you want your server to be known on the internet, you will probably need to open a port in your router. The default port is 4534, and you need to open it for "udp". Instructions on how to configure this on your router are beyond the scope of this document, you should consult your owner's manual for further information.

Contrarily, if you do not want internet players to be able to use your server, you will need to make sure your router prevents such players but making the port mentioned above inaccessible through the router.

Make your Settings

At this point you should have a good idea of what kind of server you're going to run and you should also have a working server running, but you don't yet have the server you set out to build. Now you need to configure the server itself.

The server is very flexible. As of the 0.2.8 release, you have pretty complete control over the simulation, and you also have some settings that you can configure the game rules a bit. So now all you need to do is make the settings, right? Wrong. :) First you need to understand how the settings are loaded and in what order.

Finding the Settings

  • Linux -> /etc/games/armagetronad-dedicated
  • Mac OS X -> ~/Library/Application Support/Armagetron Advanced
  • Windows -> C:\program files\armagetronad

Here are the files you will find (Note: this is for the 0.2.8 server, older servers vary):

aiplayers.cfg
This file contains the information used to determine the AI player names and skills. You can edit this file to make a more customized set of AI players, but make sure to take backups. When you upgrade or reinstall the server this file will be overwritten.
default.cfg
This file contains a reasonable set of defaults and shouldn't be edited.
master.srv
This file contains the location of the master server and connection parameters. You can edit it, but then your server won't be able to communicate with the master server that everyone uses, so only do so if you really know what you're doing and have a good reason to do it.
rc.config
This file is used to configure the UNIX daemon. It may not be present in Windows/Mac OS X.
settings.cfg
This file contains the basic set of settings used by both the client and the server. You should not edit this file.
settings_dedicated.cfg
This file contains an extended set of settings used by the dedicated server. You should not edit this file either.

So where should you make your changes? There are 4 files that were not listed, but they are the files you should edit! Why aren't they listed? You are supposed to make them, using a regular text editor. So, open settings_dedicated.cfg and copy the appropriate lines into the following files:

autoexec.cfg
I don't know what this is for, I don't use it. (Lucifer)
server_info.cfg
You should put server policy settings here, as well as the SERVER_NAME and connection information.
settings_custom.cfg
This is the file that should contain game rule and simulation settings. If you obey the convention for server_info.cfg and settings_custom.cfg, your server will not only be easier to maintain, but also easier to exchange settings with other administrators.
everytime.cfg
This file is loaded and processed every round. In a running server, that means you can use this file to change settings on the fly. It also means you can put special information using console commands here. For example:

SAY Server stats at http://www.armagetronadstats.com/

...will display "Admin: Server stats at http://www.armagetronadstats.com/" between every round. Very useful! You can also put:

INCLUDE settings_custom.cfg

...and your settings_custom.cfg file will be reloaded every round. Not particularly useful, but it can be helpful when you need to tweak simulation settings.

Making your own Settings

The most common settings to change affect game logic, scoring, and some basic simulation such as cycle speed, acceleration, and so forth.

Simulation Settings

EXPLOSION_RADIUS
Blast radius of cycle explosions. Set to 0 to have no explosion radius (obviously).
WALLS_LENGTH
Cycle trail length. Set to -1 to have infinite trails.
WALLS_STAY_UP_DELAY
Cycle trail stay up this long after the cycle's destruction, measured in seconds.
SPEED_FACTOR
Cycle speed factor. Increase this by two to double the speed
CYCLE_RUBBER
This affects grinding. Higher numbers allow players to get closer to walls before crashing. It's intended to be used solely to correct for lag, but it's usually not used that way.

Map Settings

ARENA_AXES
Sets the number of possible driving directions (used only when map is axes-independent)
MAP_URI
Sets the URI to download map from, if unavailable. This should be a fully-qualified URL. By default, the client will search a central resource repository hosted by the Armagetron Advanced Team and maintained by Luke-Jr if it does not have the map available locally. You can use your own web server to serve maps by settings MAP_URI to the appropriate location.
MAP_FILE
Sets the file path for the map. This is what the server uses to load the map, you must set this if you do not use the default square grid.

Game Rules

SCORE_WIN
Points you gain for being last one alive. Also known as "camping points"
SCORE_SUICIDE
Points you gain for every stupid death (race into the rim/your own wall). It is added, so negative numbers are appropriate here unless you want to reward people for being stupid.
SCORE_KILL
Points you gain for everyone racing into your wall.
SCORE_DIE
Points you gain for every time you race into someone else's wall. Like SCORE_SUICIDE, you should make this a negative number unless you want to reward people for sucking.
LIMIT_SCORE
Score limit. When a player reaches this score, the match ends and that player wins. Ties are resolved by playing another round until one player has more points than the rest.
LIMIT_ROUNDS
Max number of rounds to play. When this is reached, the highest-scoring player is named the winner.
LIMIT_TIME
Max time (in minutes). When this is reached, the highest-scoring player is named the winner of the match.

Here is a pretty common setup:

SCORE_WIN 0
SCORE_SUICIDE 0
SCORE_KILL 1
SCORE_DIE  0

LIMIT_SCORE 10
LIMIT_ROUNDS 40
LIMIT_TIME  30

This is the scoring system used on servers like Swampland, the old Tigers Network servers, and the goshdarn clones that are floating around. It basically means you have to get 10 points by killing other players to win the match. Breakfast in Hell used a variation:

SCORE_WIN 0
SCORE_SUICIDE 0
SCORE_KILL 1
SCORE_DIE  0

LIMIT_SCORE 1000
LIMIT_ROUNDS 40
LIMIT_TIME  7

You still had to kill people to win, but the match was limited to 7 minutes. After 7 minutes, a winner was declared. The Crack Pipe still uses these settings at the time of writing but may change in the future.

This isn't a complete list!

There are a whole slew of configuration items available. Since the config items are the same as console commands, you can see a pretty complete list on the Console Commands page.

Finishing Up

The last thing you need to figure out is usually the first thing you know. Do you want this server to be known by the master server? If so, you need to add this line to your settings_custom.cfg:

TALK_TO_MASTER 1

Note: in previous versions, this was the default, but as of 0.2.8, the default will be to not talk to master. You will have to manually set that, so make it the last thing you do before starting the server up for play.

Of course, when that's all done, you need to start the server. Use the same procedure already referenced.

Conclusion

This article is the basic "How to setup a game server" article. After reading through this article and getting your server running, the best thing you can do is to play your server for awhile, talk to other administrators, and so forth. Find out what people want, or figure out what you want. Tweak your settings however you'd like, it's your server. When you feel like you've got the hang of running a server, check out the Advanced Server Administration Guide for more cool things you can do with your server.

In the meantime, have fun!