Hardware Requirements
There are no official hardware requirements for running an NS2 server. However, you can read this thread to see how popular decent servers perform under their hardware: NS2 Server Specs and Performance
The community recommends the following hardware (per server instance):
Maxplayers | Min. Clock Speed | Min. RAM | Bandwidth (down/up) |
---|---|---|---|
12 | 3.0GHz | 2GB | [to be updated] |
16 | 3.6GHz | 2GB | [to be updated] |
20 | 4.0GHz | 2GB | [to be updated] |
24 | 4.4GHz | 2GB | [to be updated] |
The NS2 Server software is constantly being improved. However, it is currently not fully optimized to make use of multiple cores on your system. At best, it uses 2 threads, of which 1 will handle the main processing. As such, most decent NS2 Server providers commonly run their servers on overclocked consumer-grade systems as opposed to multi-core server-grade systems. e.g. NS2 Servers which handle 24 players are typically clocked at least 4.4GHz on an Intel i7/i5 core.
Vanilla NS2 servers take between 500-700MB of RAM upon starting the Server, as it caches the animations and models. 2GB of RAM per server instance is a good amount to have.
You can monitor the performance of your server through the Web Administration system, under the Performance graph.
(Note that the tickrate currently doesn't go above 30. Its a calculation error if it does go above 30)
SteamCMD
To install a Natural Selection 2 server you must use Valve's Steam Console Client (SteamCMD). This wiki guide will help you through the process of using SteamCMD but if you would like more info about SteamCMD visit https://developer.valvesoftware.com/wiki/SteamCMD.
Windows Setup
Prerequisites
In order to run a Natural Selection 2 dedicated server, you need to install the following:
* PhysX Redist * DirectX Redist * Microsoft Visual C++ 2013 Redistributable Package (x86)
Installing SteamCMD on Windows
- Download - SteamCMD for Windows
- Extract the contents to the folder that you want to run SteamCMD from.
- A folder called C://steamcmd is recommended.
- Your SteamCMD folder should only contain SteamCMD and not the Natural Selection 2 server files.
- A folder called C://steamcmd is recommended.
- Create a new Steam account just for your dedicated server.
- You do not have to purchase the Natural Selection 2 Client on this account.
- You can use this account for multiple servers.
- DO NOT use use your personal steam account as passwords are kept in plain text on the server.
- Open a Command Prompt, cd to the folder where steamcmd.exe is located.
- Run >steamcmd.exe
- On the first run, it will download the latest version of itself
- If you are unable to download the files, try lowering your Internet Options Security Settings to Medium, and checking the "Automatically detect settings" in the proxy options.
- If that fails as well, then you will have to download the pre-downloaded packaged steamcmd.
- Type the following replacing username and password with your steam server account
login anonymous
If you want, you can also use login username password but the NS2 Dedicated server does not require an account.
If Steam Guard is enabled on this account, you will be prompted to enter your Steam Guard code. Which you will receive via email.
Installing NS2 Dedicated Server with SteamCMD
NS2 Dedicated Server App ID: 4940
- Set the folder you want Natural Selection 2 to be installed.
- Login with either your account or anonymously.
- Install the Server.
force_install_dir C:\NS2Server\ login anonymous app_update 4940 validate
Running NS2 Server
- Browse to the Natural Selection 2 server folder.
- Create a shortcut for Server.exe (make sure to use the one in the x64 folder)
- Edit the shortcut like so.
Server.exe -name "Server Name" -limit 16
For advanced configuration see #Server Configuration.
Simplifying the Update Process
- After having logged in to SteamCmd at least once,
- In your SteamCmd directory, create a file with the following contents:
# Replace username, password, and C:\NS2Server\ as appropriate SteamCmd.exe +force_install_dir C:\NS2Server\ +login username password +app_update 4940 validate +quit pause
- Save this file as "updateserver.cmd". If you're using notepad, make sure you change the file type to 'All Files', and include the quotes around the file name.
- Run this file whenever you need to update your server.
Running multiple servers per machine
- As of build 220, each dedicated server can make use of its own config directory. This is defined by the -config_path option during launch.
- For example
- First Server:
Server.exe -name "NS2 Server 1" -config_path "C:\NS2Server-1\config" -file "C:\NS2Server-1\config\server1.txt"
- Second Server:
Server.exe -name "NS2 Server 2" -config_path "C:\NS2Server-2\config" -file "C:\NS2Server-2\config\server2.txt"
- By default, if config_path is not set, the Server.exe will look in "%APPDATA%\Natural Selection 2\" for your config files
- (NOT "%APPDATA%\Natural Selection 2\config\" as it was prior to build 220)
- It may be possible that the servers can share a common mod directory (-modstorage) and load mods from this same directory, but it no longer seems to work. (build 274, 2015-03-06)
Linux Setup
Since patch 253 Linux dedicated server has been available.
Prerequisites
- Ensure the correct dependencies are installed before installing the server.
Ubuntu
Ubuntu 32-bit
apt-get install speex:i386 libgtk2.0-0:i386
Ubuntu 64-bit
apt-get install speex:i386 libgtk2.0-0:i386 lib32gcc1 until Ubuntu 20.04 apt-get install speex:i386 libgtk2.0-0:i386 lib32gcc-s1
Debian
Debian 32-bit
apt-get install speex:i386 libgtk2.0-0:i386
Debian 64-bit
dpkg --add-architecture i386
apt-get update
apt-get install speex:i386 libgtk2.0-0:i386 lib32gcc1
CentOS
CentOS 32-bit
yum install speex.i686
CentOS 64-bit
yum install speex.i686 glibc.i686 libstdc++.i686
GLIBC_2.15 error
You might get the following error if you try to start your server.
./server_linux32: /lib/i386-linux-gnu/i686/cmov/libm.so.6: version `GLIBC_2.15' not found (required by /root/Steam/NS2/ns2/libSpark_Physics.so)
To fix this download the following files to the main server directory.
wget https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
wget https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libstdc++.so.6
Installation
Create a username for your server.
Warning: For security best practice do not run your server as root. |
adduser ns2server
Chose a directory to install the server.
cd /home/ns2server
Create a directory for steamCMD.
mkdir steamcmd cd steamcmd
Download SteamCMD.
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
Extract steamCMD.
tar -xvzf steamcmd_linux.tar.gz
Create a directory for the server files,
mkdir /home/ns2server/serverfiles
Run the following command to download the server.
You will need a Steam username and password to authenticate with steamCMD.
Warning: For security reasons it is recommended that you create a new Steam username just for the server. |
./steamcmd.sh +force_install_dir "/home/ns2server/serverfiles" +login username password +app_update 4940 validate +quit
NS2 Dedicated Server App ID: 4940
Login to SteamCMD as stated above
Set the folder you want Natural Selection 2 to be installed.
force_install_dir /home/ns2server/serverfiles
Download the server files to the folder
app_update 4940 validate
Running the server
Linux executable is ./server_linux32 in the main installation directory. Otherwise process should be same as under windows.
Some parameters for the server start have to be put in quotes like -name "NS2 server".
For Linux it is important to escape those quotation marks with a backslash, otherwise it will be ignored.
Here's an example of a basic working Linux server startup line:
./server_linux32 -name \"NS2 Server\" -port 27015 -webadmin -webdomain "192.168.1.1" -webuser admin -webpassword password -webport 8080 -map ns2_summit -limit 24
Note: The -file option currently does not work with a Linux server.
Linux Game Server Manager
by Daniel Gibbs
LinuxGSM is the command-line tool for quick, simple deployment and management of Linux dedicated game servers.
Main features
- Server installer (SteamCMD)
- Start/Stop/Restart server
- Server update (SteamCMD)
- Server monitor (including email notification)
- Server backup
- Server console
Full instructions available there: Natural Selection 2 | LinuxGSM_
GitHub Repo: https://github.com/GameServerManagers/LinuxGSM
Server Console
You can access the server console by selecting the active server window, hitting tab (to bring up the console window) and then ~ (tilde) (to bring up the console command line).
Server Configuration
Basic Configuration
Note: From Build 222 onward, server.xml is no longer used and a text file containing command-line options is used instead.
When loading command line options from a file using the -file option, the format of the file is the same as you would normally specify on the command line. Newlines can be used to separate command line parameters and C++ style comments are also supported.
Most server options can be specified on either the command line, or in the configuration file. If they exist in both places, the values on the command line will take precedence, although the values in the configuration file must be valid as it will still be parsed.
Note that for relative paths, they will be taken relative to the current working directory.
Command Line Setting | Configuration File Setting | Values | Description |
---|---|---|---|
-file | N/A | path | Specifies a file to load command line options from |
-ip | IP Address | Sets the IP that the server will listen on (omit if you do not know what this means) | |
-port | integer | Sets the port the server will run on. (Default: 27015) NS2 also requires the next available port in order for master server communication to work | |
-limit | integer | Maximum number of players the server will allow (max is 24) | |
-speclimit | integer | Specify spectator slots on server. Default is 0. | |
-password | string | Specifies a password for clients connecting to the server (omit to remove password protection) | |
-name | string | Specifies the server name to be shown in the server browser. Many server operators also include the core and clock speed in the name as it affects players' performance in-game. (e.g.'i7 4.4GHz') | |
-modstorage | path | Specifies the directory where mods from the Steam Workshop will be downloaded and loaded from. If not set, defaults to "%APPDATA%\Natural Selection 2\Workshop". (See Setting Up Mods) | |
-config_path | path | Specifies the directory that will be mapped to config://, i.e. where your JSON configuration files are found. If not set, defaults to "%APPDATA%\Natural Selection 2\". | |
-logdir | path | Specifies the directory for the server's log.txt file. If not set, defaults to "%APPDATA%\Natural Selection 2\". | |
-map | map name (e.g: ns2_tram) | Inital map that the server starts on. Will default to ns2_summit if not set. | |
-mods | List of mod ids (hex) | This should be a list of space separated mod ids that are active on this server. There is a command-line interface for this option. Please see Dedicated_Server_Usage.txt in your server directory. As of B222, the Steam Account used no longer requires access to the NS2 Steam Workshop | |
-mods2 | List of UGC mod ids (decimal) | This should be a list of comma separated decimal mod ids that are active on this server. Both -mods and -mods2 are no longer required, as all mods specified in the map cycle will now load on server startup. | |
-webadmin | N/A | See Web Administration. If specified, runs the built-in web interface. Omit this option to disable | |
-webdomain | "string" | This string must be covered in double-quotes. Defines a web address to allow remote connections to the web interface from. If you want to use an IP address you have to set this to you internal IP (e.g. 192.168.1.2). If not set, the web server will only accept connections from localhost. | |
-webport | integer | Set the port the web administration system should listen on. (Default: 80) | |
-webuser | string | Specifies the user name for logging into the web server (Single-user mode) | |
-webpassword | string | Specifies the password for logging into the web server (Single-user mode) | |
-webusers | path | Loads username/password data from the specified .htpasswd file (Multi-user mode) | |
-record | N/A | Unknown | |
-play | N/A | Unknown | |
-console | N/A | Displays the interactive console on startup. Press tilde key (~) to display console after grey window appears. This is the only way to reach the console if you are using Wine on Linux to run the server. |
Command Line examples:
- Server.exe -map ns2_tram -limit 16
- Server.exe -file "c:\my servers\config.txt" -map ns2_tram -name "NS2 Server"
- Server.exe -file "C:\NS2Server\server.txt"
See Console Commands for a list of available commands.
Ports/Firewall
- You need to ensure that the UDP ports 27015 (game port) and 27016 (query port) are open on your firewall.
- Sometimes you will also have to open UDP port 8766 for the steam master list server.
- If your server is on a LAN you may need to setup port forwarding to the server. Portforward.com is a useful resource for this.
Map Rotation
As of Build 220, the mapcycle system has changed to make use of MapCycle.json. The old mapcycle.txt file is no longer used.
You can find more information in your Dedicated_Server_Usage.txt file:
- The server can be configured to cycle through a list of maps by creating a file called MapCycle.json in your server config directory.
- This file defines the amount of time (in minutes) to wait before switching maps.
- It will only switch maps after a round completes.
- It also defines a mode which can be either "order" or "random".
- It then defines a list of maps to cycle.
- This also allows for custom maps from the Steam Workshop to be loaded by the server.
- In order for this to work, you need to include the mod ID in the map item.
- An example of this is shown in the example map cycle file below.
- UGC Mods (Build 340+ are decimal ModIDs and older Mods are Hexadecimal IDs.
- Hex IDs need to be put in quotation marks in the MapCycle.json
- Avoid listing the same map twice in "order" mode.
- On the server, the cyclemap console command can be used to force the server to switch to the next map in the map cycle.
- Here is an example map cycle file:
{ "time": 30, "mode": "order", "maps": [ "ns2_summit", "ns2_mineshaft", "ns2_tram", "ns2_veil", "ns2_docking", {"map": "ns2_tanith", "mods": ["4B430CC"]}, {"map": "ns2_jambi", "mods": [129599221]} ] "mods":[117887554,"812F004"] }
- In order for custom maps to work when loaded this way they must have been loaded at least once before through the start-up command line options. E.g. -mods "7B986F5".
Web Administration
The dedicated server includes a web server which can be used to configure the server.
To use the web admin interface, start the dedicated server with the -webadmin command line option and open http://localhost/index.html in your browser. This web administration is based on devicenull's ns2web.
If you're trying to reach the interface from a distant machine, open http://[webdomain]/index.html instead, [webdomain] being the name you set with the -webdomain option. If you are using a different webport than 80, don't forget to add it after the domain name : http://[webdomain]:[webport]/index.html.
Command line settings relevant for enabling web administration:
-webadmin (specifies whether web administration is active - omit to disable) -webdomain "[name/IP]" (quotes required! - specifies the web server's domain name to allow remote connections. Most of the time, this is the server's IP adress) -webport [number] (default is 80)
If you are going to access the web server from an internet address, you will need to specify the address of the server using the -webdomain command line option.
If you have multiple IP addresses, this can also be used to select which one the web server will be bound to. You can also run multiple web servers on the same machine on different ports using -webport.
If you would like to access the web admin interface from a remote computer, you will need to set up web authentication using one of the two following methods.
Single-user Authentication
By using the -webuser and -webpassword options login information for a single user is set up.
This info needs to be entered when your web browser prompts you for log in information.
Multi-user Authentication
If you would like to set up multiple users or do not want the password to be stored in plaintext, you can specify a .htpasswd file using the -webusers command line option. A .htpasswd file can be generated using the same tools you would use for configuring an Apache web server. An online tool is available here:
www.askapache.com/online-tools/htpasswd-generator
When using this tool, you will want to set the encryption mode to digest and the realm or popup name to whatever you specify for the -webdomain parameter (or localhost if you don't specify webdomain).
(Note that there is an error in the documentation in B228 that instructs you to use the MD5 encryption mode. This is erroneous, as stated by the developers.)
Web API
The web server returns JSON-formatted content about the server when you are not requesting a static file. i.e. http://localhost/
You can also run RCON commands via standard GET requests. Example:
http://localhost/?command=Send&rcon=sv_status
The response is only shown on the server console.
Server Admin System
Basic Overview
As of B211 an integrated server administration system allows server owners to grant users or groups the ability to execute commands in game (such as kicking players and changing maps)
Configuration File Locations
By default, Server.exe will use the following file structure:
%APPDATA%/Natural Selection 2/ \ ServerAdmin.json \ ServerConfig.json \ BannedPlayers.json \ MapCycle.json \ ConsistencyConfig.json
You can change the location of your Configuration Files by using the -config_path command line option
- You can supply an absolute path to your config folder (WITHOUT trailing slash)
- For example,
-config_path "C:\NS2Server\config"
The *.json files will be created for you if they do not exist on first launch.
ServerAdmin.json
This file lets you define users and groups. Each group can either have a whitelist (only commands on this list can be executed) or blacklist (any commands except the ones on this list can be executed).
Example:
{ "groups": { "admin_group": { "type": "allowed", "commands": [ "sv_changemap", "sv_reset", "sv_say" ] }, "mod_group": { "type": "disallowed", "commands": [ "sv_ban", "sv_reset" ] }, "clan_group": { "type": "allowed", "commands": [ "sv_kick", "sv_say" ] } }, "users": { "Sr. Lance": { "id": 1838634, "groups": [ "admin_group" ] }, "Murphy": { "id": 11641641, "groups": [ "mod_group" ] }, "SabaHell": { "id": 3403402, "groups": [ "clan_group" ] } } }
This example would create the following groups:
- admin_group: Able to execute sv_changemap, sv_reset, sv_say
- mod_group: Able to execute any commands except for sv_ban and sv_reset
- clan_group: Able to execute sv_kick and sv_say
It also defines the following users:
- Sr. Lance, STEAM_0:0:919317, member of 'admin_group'
- Murphy, STEAM_0:1:5820820, member of 'mod_group'
- SabaHell, STEAM_0:0:1701701, member of 'clan_group'
SteamID Format
NS2 does not use the usual SteamID format. If you have your old SteamID (from the 'status' command in a game like TF2), you can convert it to a NS2 style SteamID using the following formulas:
STEAM_0:0:XXXXX :(SteamID * 2) STEAM_0:1:XXXXX :(SteamID * 2 + 1)
Example:
STEAM_0:0:919317: 919317 * 2 = 1838634 STEAM_0:1:919317: 919317 * 2 + 1 = 1838635
If you have difficulties,
- here is a working converter: https://steamdb.info/calculator/
- just enter your SteamID, the 32-bit Steam Community ID of the output is your NS2 SteamID.
- there is a simple php converter script available here: http://ideone.com/k0OLF
- Click "upload with new input" and enter your old-style SteamIDs, one per line.
- and another converter
ServerConfig.json
As of Build 220, this file is used to configure certain gameplay aspects of the server.
- By default, the contents created by the NS2 Server is as follows:
{ "settings": { "rookie_friendly": true, "end_round_on_team_unbalance": 0.4, "auto_team_balance": { "enabled_after_seconds": 10, "enabled_on_unbalance_amount": 2 } }, "tags": [ "rookie" ] }
- The explanation of each value is as follows:
- "rookie_friendly"
- Rookie Mode as announced on the Forums
- There is the new “rookie mode” system in Build 220.
- Servers indicate if they are “rookie friendly” or not by setting the value to true and adding the "rookie" tag
- In order to remove your server from being tagged as Rookie-friendly, you have to remove the tag "rookie" in addition to changing "rookie_friendly" to false.
- "auto_team_balance"
- Auto Team Balance System
- enabled_on_unbalance_amount is how many player(s) over perfect team balance there needs to be on one team for the system to kick in.
- For example, with 2, there would have to be 10 players on one team and 8 on the other for the system to turn on.
- enabled_after_seconds is how long to wait after the enabled_on_unbalance_amount condition is met before the system is turned on.
- This allows there to be a little buffer in case another player joins the server soon or people are switching teams before the system is turned on.
- You can set this to 0 if you don't want any delay.
- Players will NOT automatically be switched teams with this system. Instead, the game will try to maintain the same number of players on the field when teams are unbalanced.
- So if the Marines have 10 players and the Aliens have 8, when a Marine player dies, they will be in a special spectator mode until there are only 7 players alive.
- At which point, the player who has waited the longest in this mode will be spawned like normal.
- A player in this mode can also choose to switch teams without penalty.
- There is also a server admin command that can be used to control this system: sv_autobalance <true/false> <num players> <seconds>
- "end_round_on_team_unbalance"
- Round End on Unbalance as announced on the Forums
- By default, the server will end the round if the teams are too unbalanced.
- The number defines how unbalanced the teams are before the round is ended.
- With 0.4 (default), the round will end when the teams are 40% unbalanced.
- For example, if the Marines have 16 players and the Aliens have 9, the round will end.
- To disable this, either set the value to 0 or remove the line completely.
- "tags"
- This is to help your server be more easily searched for in the server browser.
- Defaults to "ns2"
- "rookie_friendly"
BannedPlayers.json
Important: Do not edit this file while the server is running. Your changes will be overwritten.
Example:
{ { "name": "Murphy", "id": 11641641, "reason": "Recycled Base", "time": 1903827289 } }
The format of each ban list entry should be pretty self-explanatory. The "time" field is a unix style timestamp at which the ban will expire. This will be 0 for permanent bans.
You can add and remove bans using sv_ban and sv_unban.
MapCycle.json
See Map Rotation
ConsistencyConfig.json
- This file should automatically be created by the Server if it does not already exist.
- By default, the checks in general are for a Vanilla NS2 installation:
{ "restrict": [ "lua/entry/*.entry" ], "check": [ "game_setup.xml", "*.lua", "*.hlsl", "*.shader", "*.screenfx", "*.surface_shader", "*.fxh", "*.render_setup", "*.shader_template", "*.level", "*.dds", "*.cinematic", "*.material", "*.model", "*.animation_graph", "*.polygons", "*.fev", "*.fsb", "*.hmp", "ui/*.dds" ], "ignore": [ "*_view*.dds", "*_view*.material", "*_view*.model", "models/marine/hands/*", "*/hitsounds_client.fev", "*/hitsounds_client.fsb", "shaders/DarkVision.hlsl", "shaders/DarkVision.screenfx", "shaders/DarkVision.shader", "models/marine/male/flashlight.dds", "ui/crosshairs.dds", "ui/crosshairs-hit.dds", "ui/alien_hud_health.dds", "ui/alien_hud_health_noise.dds", "ui/alien_hud_health.dds", "ui/alien_hud_health_old.dds", "ui/alien_hud_health_smoke.dds", "ui/bottomhudbar1bg.dds", "ui/bottomhudbar1main.dds", "ui/bottomhudbar1sec.dds", "ui/bottomhudbar2ap.dds", "ui/bottomhudbar2bg-l.dds", "ui/bottomhudbar2bg-r.dds", "ui/bottomhudbar2hp.dds", "ui/bottomhudbar2right.dds", "ui/centerhudbar.dds", "ui/exo_crosshair.dds", "ui/exosuit_HUD1.dds", "ui/exosuit_HUD2.dds", "ui/exosuit_HUD3.dds", "ui/exosuit_HUD4.dds", "ui/blip.dds", "ui/alien_outline_lookup.dds", "ui/marine_outline_lookup.dds", "ui/drop_icons.dds", "ui/hud_damage_arrow.dds" ] }
- However, if you would like to allow for a modification such as the Minimal Alien Vision, which modifies the file "shaders/DarkVision.fx", you can add that particular file to the ignore list, like so:
{ "restrict": [ "lua/entry/*.entry" ], "check": [ "game_setup.xml", "*.lua", "*.hlsl", "*.shader", "*.screenfx", "*.surface_shader", "*.fxh", "*.render_setup", "*.shader_template", "*.level", "*.dds", "*.jpg", "*.png", "*.cinematic", "*.material", "*.model", "*.animation_graph", "*.polygons", "*.fev", "*.fsb" ], "ignore": [ "ui/*.dds", "*_view*.dds", "*_view*.material", "*_view*.model", "models/marine/hands/*", "shaders/DarkVision.fx" ] }
- This will then allow all clients who installed that mod to connect to your server.
- If you did not include that file in the ignore list, then the client who has that mod installed will get kicked, with the following message: "Client and server differ"
Server Admin Commands
Unless otherwise indicated, 'PLAYER' refers to a players in game id, SteamID, or name.
Command | Parameters | Description |
---|---|---|
sv_ban | <PLAYER> <minutes> <reason> | Bans a player from the server. Use 0 for minutes for a permanent ban |
sv_kick OR kick | <PLAYER> | Kick a player from the server. |
sv_switchteam | <PLAYER> <1|2> | Force a player onto the specified team (1=Marines, 2=Aliens) |
sv_rrall | Force all players to readyroom | |
sv_randomall | Randomly pick teams for all players in the readyroom | |
sv_eject | <PLAYER> | Eject a player from the hive/command chair |
sv_help | Show all commands a user has access to | |
sv_status OR status | Show in game name, in game id, SteamID, for all connected players | |
sv_statusip | Show in game name, in game id, SteamID, IP address for all connected players | |
sv_say OR say | <message> | Broadcast a message to all connected players as an admin |
sv_tsay | <1|2> <message> | Broadcast a message to all members of the specified team (1=Marines, 2=Aliens) |
sv_psay | <PLAYER> <message> | Send a private message to the specified player |
sv_slay | <PLAYER> | Kill a player |
sv_password | <password> | Add a password to the server. Use sv_password on its own to remove the current password |
sv_unban | <STEAMID> | Unban a player from the server |
sv_reset OR reset | Reset the current round | |
sv_listbans | Lists banned players | |
cyclemap | Forces server to switch to the next map in the map cycle. | |
sv_autobalance | <true/false> <num players> <seconds> | Controls the #Auto-Team Balance System implemented in Build 221. |
sv_changemap or changemap | <map name> | Changes the map and reloads mods |
sv_cheats | 0/1 | Enables or disables cheats |
Setting Up Mods
As of Build 221, NS2 now utilizes the Steam Workshop to install and use mods. This brings about an advantage with the Consistency Checking also implemented in B221, as if a file that does not pass the Consistency Check belongs to a particular mod, the mod will automatically be disabled and the original files loaded instead, allowing the client to continue connecting to the server with only server-approved mods.
Do note that for client-side mods, you do NOT necessarily need to have a mod installed in order to allow players to use the mod. For example, if you are allowing players to use the Minimal Alien Vision mod, then you should be looking whitelisting the file(s) that that mod modifies on #ConsistencyConfig.json instead.
Using Mods
- To use a mod you must know its mod ID. This is the hexadecimal representation of the mod's Steam Workshop ID for mods last updated prior to Build 340.
- You can use one of the many, many decimal-to-hex conversion websites (or Windows Calculator's programmer mode) to get a mod ID.
- https://steamcommunity.com/sharedfiles/filedetails/?id=117887554 gives mod ID 706d242.
- If you have already used the mod you want in the NS2 client, you can also find its ID as part of the folder names within %APPDATA%\Natural Selection 2\Workshop. Copy the characters between the 'm' and the underscore.
- Mods created or uploaded after the release of Build 340 use the decimal Workshop ID stated in the mod's URL.
- To load mods onto your server, use the -mods parameter. This takes a quoted list of mod IDs, separated from each other by a space. For example:
Server.exe -mods "117887554 812F004"
- For the server to keep using the selected mods you will also have to add them to the MapCycle.json file. Like this:
"mods":[117887554,"812F004"]
- After Build 340 you can use either the Launch parameter or the MapCycle.json, both work the same.
- When the server starts it will download and install each mod. It will update mods when changing maps.
Info: Custom maps added in this way will be downloaded by the client no matter which map the server is changing to. See the Map Rotation section for an example on how to do it properly. |
Running mods on ranked server
If you are running or want to get your server tagged as ranked play (players can gain or loose ELO), then you need to make sure any mod the server is running is also on allowed for ranked play.
All mods that are allowed for ranked play will be listed on this page.
Known Issues
For a list of known issues and possible work arounds, please see Dedicated_Server_Issues
Additional Questions
If you have any further questions, please check the Server Discussion Forum.
See Also
- Server
- Dedicated_Server_Issues
- List of Known Servers
- Server Maintenance Manual