FANDOM


Game server configuration allows a server adminstrator to provide varying and customized experiences. There are numerous settings and cvars for Xonotic, however they can be searched in-game using apropos, or out of game using cacs.

Basic Set-Up Edit

The files needed to set up a Xonotic server come with the game, from the main game directory inside /server/. This section assumes network configuration such as port forwarding have already been done.

  1. Copy the shell script or batch file corresponding to the operating system the server will be running on, from /server/ into the main game directory.
    • This is so the shell script can launch the game executable in the server mode.
  2. Copy server.cfg to the user profile for Xonotic.
    • Linux: ~/.xonotic/data
    • Mac: ~/Library/Application Support/xonotic/data
    • Windows: C:\Users\Username\Saved Games\xonotic\data
    • Note: do not copy to the additional folder named data, within data.
  3. Deploy the server by executing the shell script.

Much like config.cfg stores player preferences as a list of commands to execute on launch, server.cfg stores server settings.

Configuring an Already Online Server Edit

Xonotic servers do not need to be restarted for changes to take effect. Instead, they may be configured on-the spot by the server administrator by the console command rcon. In order to set up rcon, within server.cfg, rcon_password must be set. From a game client, the server administrator may log in typing the following into the developer console (~).

rcon_password <password>

Update Server Configuration Edit

rcon exec server.cfg // updates the server's configuration by re-executing the .cfg

Update Server Packages Edit

rcon fs_rescan // updates the server's files e.g adding a new map or server package

In general, rcon is used to execute commands or change settings remotely, which allows server administrator to make small changes without editing a file.

Enabling Custom Maps Edit

In order to host unofficial maps, the server needs the custom map itself and a file host to provide the download service to clients that do not already have the map file. Xonotic identifies maps by file name; additionally it only concatenates a base url and the file name as the download url to send to clients. Thus the file host must not change the file names.

Relevant Cvars Edit

The following sets the default url to serve to clients to the one specified in url. Be careful not to include a space at the end of the url.

sv_curl_defaulturl "{url}"

The following is relevant to updating the map list. Note, fs_rescan must have been executed beforehand so the server has the file to begin with. One may manually add the map name to the list (exclude the file extension), or submit an empty string to include all possible maps.

g_maplist "" // include all possible maps in the maplist

The following sets the number of vote options on the map voting menu that appears at the conclusion of a match.

g_maplist_votable {number}

The following enables map shuffling on the map voting menu, and is required in order for the map list to be different per vote menu (as opposed to the first few maps in alphabetical order).

g_maplist_shuffle {0/1}

Multiple Download Sources Edit

If there are multiple download sources for the catalog of the server's maps, a plain text file curl_urls.txt may be used to specify which links per map are sent to clients. This text file belongs in the user profile for xonotic. The following describes the format per line.

cts_mappername-mapname* http://dl.xonotic.co/
mapname_revision*       http://dl.hypotheticalmaphost.org/

In above example, any map with a name matching the wildcard pattern i.e cts_mappername_mapname1, cts_mappername_mapname2, and so forth, will direct to http://dl.xonotic.co/ for download. Other pattern matches will direct to the respective url.

Note: the server will only send one download link to the clients. It will not, for example, send the url associated with sv_curl_defaulturl, then resend another link within curl_urls.txt if the file is unavailable at the former.

Advanced Options Edit

The following are cvars that may be added to server.cfg or executed through rcon.

Custom Vote Options Edit

These grant players the ability to change server settings depending on consensus.

  1. Alias a mnemonic for the cvar(s) that will be executed on the event a vote passes.
  2. Add the vote to the list of vote commands.

For example, a vote to set the match to 1v1.

alias duel "settemp g_maxplayers 2" // restrict to 2 players for current match only
alias noduel "g_maxplayers 0"       // lift player restriction
addvote duel noduel                 // multiple options can be added within one line

Per-Game Type Settings Edit

These allow a server to vary in settings per game type by executing when the game mode is selected on the game type options menu.

The following is executed first unconditionally before all else. It is useful for resetting the server to a default state from which all other modes modify from. Note: executing default*.cfg's will also execute defaultXonotic.cfg and may reset options set in server.cfg.

alias sv_vote_gametype_hook_all "<cvars>"

From then on, sv_vote_gametype_hook_*, where * is replaced by the abbreviations of game modes may be used to specify settings per game mode.

For example, enable Xonotic DeFrag for game type Race CTS.

alias sv_vote_gametype_hook_cts "exec defaultXDF.cfg"

The template server.cfg provides a list of possible values for game types by default. Excerpt provided below.

// GAME MODE: what type of server do you want to host?
// possible values: dm (deathmatch), tdm (team deathmatch), dom (domination), 
ctf (ctf), ft (freeze tag), lms (last man standing), ka (keepaway), 
inv (invasion), kh (keyhunt), as (assault), ons (onslaught), rc (race), nb (nexball)

See Also Edit

External Links Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.