Server/Running

From Unvanquished
Jump to: navigation, search

Servers can be quickly setup over LAN by starting a match in-game, however this is not as powerful or efficient as running a dedicated server separately.

Starting the Server

The executable 'daemonded' (daemon dedicated) should be included with your installation. Check your install directories:

Platform Variant Default Binary Directory (fs_libpath) Default Data Directory (fs_basepath) Default User Directory (fs_homepath) Notes
Windows 32 bit C:\Program Files\Unvanquished My Documents\My Games\Unvanquished The actual directories depends on where the game was installed.
64 bit C:\Program Files (x86)\Unvanquished
Mac Unvanquished/Unvanquished.app/Contents/MacOS Unvanquished/ ~/Library/Application Support/Unvanquished The data directory is the directory containing Unvanquished.app.
Linux Compiled from source Path containing binaries ~/.unvanquished The default user directory is a hidden dotfile.
Installed from repo /usr/lib/unvanquished /usr/share/unvanquished


For example:

./daemonded +set fs_libpath /usr/lib/unvanquished +set fs_basepath /var/lib/unvanquished

Quick list of useful options:

  • +nocurses — disabled ncurses console interface, so messages remain on-screen after crashes.
  • +map mapname — without a map the server will kill itself

Netiquette

Unvanquished is currently a small community. Please don't aim to create a server in order to only compete for players — division of players will disallow larger matches.

Specs

Port 27960 (default quake 3 server port)

Configuration and Operation

To discover more commands than are listed here: type a first letter (eg 'g') and press Tab to list available options starting with that letter. If you are in a terminal: Shift+Page Up allows you to scroll and the opposite for down.

Server Config File

Platform Location
*nix /etc/conf.d/unvanquished.conf
/etc/unvanquished/
Windows C:\Users\*username*\Documents\My games\Unvanquished\config <--may be depreciated
Mac  ???

Ensure your server mode is not set to '2' unless you want your server to be listed for other players.

# Server mode
# 0 - local server
# 1 - LAN server
# 2 - public server

Public servers will want to set sv_hostname to a non-default value

Commands

Please add common and useful commands, not every one

Command Description
devmap Loads a map with sv_cheats enabled. sv_cheats cannot otherwise be changed during play
listadmins List current admins in-game
listlayouts List available layouts (for this map?)
listplayers List current players in-game
listmaps List maps available to the server

Cvars

Please add common and useful cvars, not every one

Cvar Description
g_dretchPunt Allow dretches to be pushes out of the way by bigger aliens?Please verify!
g_friendlyfire Allows players to hurt their team
g_gravity Gravity.
sv_maxclients Maximum number of joined playersPlease verify!
g_maxGameClients Maximum number of players in teams (ignoring spectators)Please verify!
g_motd Message displayed to joining players (Message Of The Day)
g_needpass Whether passwords are enforced on game entry or not
g_password Password to enter game

(wip) A short tutorial on how to make a dedicated server.(14/10/2017)

Linux:

Tip: Please see linux commands tutorial and vim tutorial (really recomended) Install vim: sudo apt install vim -y

  1. Download the latest update by running this command in the folder that you want to be your game directory: wget https://github.com/Unvanquished/Unvanquished/releases/download/v0.50.0/unvanquished_0.50.0.zip.
  2. Unzip the file by running: unzip unvanquished_0.50.0.zip (if you don't already have unzip you can get it by running apt-get install unzip)
  3. Create a folder called config in the unvanquished folder using the mkdir config command.
  4. create 2 cfg files inside the config folder using touch server.cfg and touch maprotation.cfg
  5. Create a script to ease starting a server:
Run: touch startsv.sh
Then give it proper perms: chmod +x startsv.sh


Edit it: vim startsv.sh

Press i to enter in insert mode, copy & paste this:

./daemonded -homepath ./ +exec server.cfg

Press esc and type :wq to save the file.

Go to config/server.cfg and edit it (vim server.cfg) Copy & paste this, and edit to match your preferences:

// Unvanquished dedicated server configuration file.

// -----------
// basic setup
// -----------

// Whether the server is advertised on the internet or in the LAN only.
set server.lanOnly                "0"
set sv_dedicated "2"
// Server name and motto of the day.
set sv_hostname                   "Yet another unvanquished server"
set g_motd                        "Welcome & have fun!"

// Number of client slots.
set sv_maxclients                 "20"

// Private slots are reserved for players who know the password.
set sv_privateClients             "2"
set sv_privatePassword            "unique"

// ------------
// team balance
// ------------

set g_teamForceBalance            "1"
set g_doWarmup                    "0"

// ----------------
// client downloads
// ----------------

// Whether clients are allowed to download missing files from the game server.
set sv_allowDownload              "1"

// Whether clients are redirected to a webserver for faster downloads.
set sv_wwwDownload                "0"
set sv_wwwBaseURL                 "dl.unvanquished.net/pkg"

// ------------
// map rotation
// ------------

// Name of the first map rotation to use.
set g_initialMapRotation          "rotation1"

// The first map must be loaded explicitly. This must be the last command.
map plat23

Run the server with ./startsv.sh

Want to keep the server after closing a ssh session? See this tutorial

windows:

  1. Download the latest version of unvanquished from the GitHub releases page here.
  2. Unzip the file into the directory you want your server to run from.
  3. Create a folder inside that directory called config