This wiki is static and therefore read-only as of August 2011. More information here.
Hosted by NexuizNinjaz.com

Server

This is a post from http://alientrap.org/forum/viewtopic.php?t=18

Made by Esteel:

Please note that the information here is currently outdated! Please carefully read Nexuiz/Docs/server/readme.txt and Nexuiz/Docs/server/server.cfg till i have had time to edit this posts

Some people asked for an easy setup guide for the dedicated server. This guide will have several posts, one for each server. Windows, linux, mac (if someone helps with that..), the servers will use a common config file that will also be explained nicely. Then i will post some more and detailed infos and tips. Please notice that i will try to keep this up to date so i can not promise that everything in here will work with older versions.

I'm once more in the process of updating this guide. The current version of Nexuiz is 2.1. Actually there is not much that has changed. All the files are now included in the Nexuiz/Docs/server directory and the config file does also include useful comments so people should no longer have much of a need to take a look at this post.

Setting up

Windows server


Now this one is almost the easiest server. First of all you'll have to download nexuiz-21.zip from http://www.nexuiz.com/index.php?module=downloads (thats the current version as of writing/updating this guide) and extract it somewhere. C:\Program Files seems like the best place for that but in fact it does not matter where. This should give you a directory Nexuiz with serveral exectuables, dlls, and some directories in it. Among them are Nexuiz/Docs which contains documentation, Nexuiz/sources which contains the engine and game sourcecode, Nexuiz/Nexuiz-SDL.app and Nexuiz/Nexuiz.app contain mac specific files and Nexuiz/data with a very big data*.pk3 file that contains the game content.

Copy Nexuiz/Docs/server/server_windows.bat into Nexuiz and Nexuiz/Docs/server/server.cfg into Nexuiz/data. The first file is a script that will start the server and make it load the second file which does contain some config options. See this post for an explaination of server.cfg. Or scroll down a few posts. You will have to make some adjustments to that file. Make sure you do not forget this step your server will not work right without it!

Thats all for the setup. Now you simply start the script file and the server should run. On windows you can double click the batch file in the explorer or call it from the command line.

Voila your server should be running just fine! To stop the server just type quit in the server console.

Linux server


This one is not much more work then the windows server. First of all you'll have to download nexuiz-21.zip from http://www.nexuiz.com/index.php?module=downloads (thats the current version as of writing/updating this guide) and extract it somewhere. /usr/local/games seems like the best place for that but in fact it does not matter where. This should give you a directory Nexuiz with serveral exectuables, dlls, and some directories in it. Among them are Nexuiz/Docs which contains documentation, Nexuiz/sources which contains the engine and game sourcecode, Nexuiz/Nexuiz-SDL.app and Nexuiz/Nexuiz.app contain mac specific files and Nexuiz/data with a very big data*.pk3 file that contains the game content.

Copy Nexuiz/Docs/server/server_linux.sh into Nexuiz and Nexuiz/Docs/server/server.cfg into Nexuiz/data (or into ~/.nexuiz/data). The first file is a script that will start the server and make it load the second file which does contain some config options. See this post for an explaination of server.cfg. Or scroll down a few posts. You will have to make some adjustments to that file. Make sure you do not forget this step your server will not work right without it!

There are 32 and 64bit binaries. The script included with Nexuiz 2.1 will just do the right thing and choose the fitting binaries.

Thats all for the setup. Now you simply start the script file and the server should run. Just open a shell, go to the Nexuiz directory and enter ./server_linux.sh into the console. For those that know the program screen it is very very useful to start the server within a screen.

Voila your server should be running just fine! To stop the server just type quit in the server console.

Mac server

I never used a mac. I have seen a few but i'm sure that does not help very much. If someone from the mac people has tips or corrections please contact me via PM or mail! First of all you'll have to download nexuiz-21.zip from http://www.nexuiz.com/index.php?module=downloads (thats the current version as of writing/updating this guide) and extract it somewhere. ??? seems like the best place for that but in fact it does not matter where. This should give you a directory Nexuiz with serveral exectuables, dlls, and some directories in it. Among them are Nexuiz/Docs which contains documentation, Nexuiz/sources which contains the engine and game sourcecode, Nexuiz/Nexuiz-SDL.app and Nexuiz/Nexuiz.app contain mac specific files and Nexuiz/data with a very big data*.pk3 file that contains the game content.

Copy Nexuiz/Docs/server/server_mac.sh into Nexuiz and Nexuiz/Docs/server/server.cfg into Nexuiz/data (or into ~/.nexuiz/data). The first file is a script that will start the server and make it load the second file which does contain some config options. See this post for an explaination of server.cfg. Or scroll down a few posts. You will have to make some adjustments to that file. Make sure you do not forget this step your server will not work right without it!

Thats all for the setup. Now you simply start the script file and the server should run. Just open a shell, go to the Nexuiz directory and enter ./server_mac.sh into the console. For those that know the program screen it is very very useful to start the server within a screen.

Voila your server should be running just fine! To stop the server just type quit in the server console.

Configuring


The file server.cfg should have been copied from Nexuiz/Docs/server to Nexuiz/data (or on linux / mac to ~/.nexuiz/data) as descriped above. The comments in the file itself should be enough to help you understand things but i try to explain them a bit more here Smile

The only things you REALLY SHOULD CHANGE are:

hostname is the text that does appear in the server browser. CHANGE it to something you like. I think its useful to include the version and if you do so, the changes you did to the server. Be aware that this should not be to long, the server browser can only display a fixed amount of letters. And you can NOT use colors in hostname.


sv_motd this Message of the day will will be displayed to the players when connecting. Feel free to share some wise things with others. ”” will NOT display anything.
sys_ticrate controls the length of a gameframe on the server. 0.05 means 20 frames per second (1/0.05 = 20). Smaller values might make things smoother and lower ping but will also raise the data volume that is sent to clients. Values smaller then 0.02 are not recommended. It seems a value of 0.03125 REALLY helps to improve to make nexuiz feel smooth so please try/use that value. It might also become the default in a future release.

All the others (and more) options can be changed if you do not like them or if you want to enable rcon for example. Server admins should however THINK before changing anything Wink.

maxplayers is the allowed number of players on that server. 8 is the default. CHANGE it to values you like and that your server can handle. You might have to try that out..
port is the port number the server uses. 26000 is the default and NORMALY there is no need to change that unless an other server is using that port. Or if you want to use several servers on one computer. Then you will need several server.* files. Two (script and config) for each server.
sv_public determines if the server will show up in the server browser or not. 1 will make it do so. 0 will disable that. Its useful if you just want to test some thing or if you want a server for just you anf your friends. So CHANGE it if you want to play alone.
sv_maxrate limit the data transferrate per client to this value (bytes/second i think)
g_antilag controls an experimental feature that is quite popular by now. When shooting with instant hit weapons (shotgun, machinegun, nexgun) you will hit the player under your crosshair no matter what your ping is. 1 will enable that, 0 will disable it. But remember its experimental and it can also make cheating easier.
sv_cheats enables simple cheats like flymode, godmode. Only useful for testing stuff. 1 will enable that, 0 will disable it
log_file creates a file where you can see what happend on your server. On windows it will be created in Nexuiz/data. On linux in ~/.nexuiz/data. You can of course CHANGE the file name.

sv_clientcommands controls the remote admin feature. Its explain below in the Tips, Tricks and useful stuff section. If you want to use it CHANGE it to 1 (enable). 0 is disable.
sv_clientcommands_password is the password you will need to use the remote admin feature. CHANGE CHANGE CHANGE it if you have the thing enabled!! Did i say CHANGE? And keep it PRIVATE. People that know this password can change things on your server!

sv_vote_commands Players can vote for this commands. Some admins might want to add kick or other commands. The voting is explained later in the infos and tips section
sv_vote_call Controlls if a vote can be called. 1 will enable that, 0 will disable it
sv_vote_master Controls if a player can become vote master. 1 will enable that, 0 will disable it
sv_vote_timeout How long does a vote run at most.
sv_vote_wait How long does a player has to wait before he can call a vote again.
sv_ready_restart The map will be restarted if every player signals he is ready. Bound to f4 by default. 1 will enable that, 0 will disable it

sv_defaultcharacter Should all players be forced to a single model.1 will enable that, 0 will disable it
sv_defaultplayermodel The model to use for this
sv_defaultplayerskin The skin to use for this
g_fullbrightplayers Players no longer get affected by shadow so you can see them better. Its currently required to enable it for a ladder match. 1 will enable that, 0 will disable it
g_fullbrightitems Items no longer get affected by shadow so you can see them better. Its currently required to enable it for a ladder match. 1 will enable that, 0 will disable it

g_grappling_hook controls the off-hand-hook. 1 will enable it. 0 will disable it. CHANGE it if you want players to use it.

g_balance_teams enable or disable joining the weakest team when joining the server. 1 will enable that, 0 will disable it
g_balance_teams_force if enabled the server will rebalance the team s now and then. I think if someone leaves. 1 will enable that, 0 will disable it

bot_number makes the server to use this many bots. 0 will disable it. CHANGE it to a value you like.
skill is the level of the bots. 1 is the weakest, 10 is the hardest. 6 is a good start to give even beginners a chance. CHANGE it if they are to weak or to hard.

g_maplist contains a list of the maps you want to play. Its explained more detailed in the Tips, Tricks and useful stuff section. In the example config it has in front of it that will make the server ignore that line so it will use the default. That should be all available maps/modes. Some admins might want to change that. Remove the from one of those lines then and maybe even CHANGE it to something you like more!

Tips, Tricks and useful stuff


Computers running a server should be behind a firewall! You need to make sure the port (for the UDP protocol) you have configured in the server.cfg (default 26000) on the server is accessible from the outside. Depending on your actual network setup this means you have to open the port on your servers/routers firewall and/or forward the ports on your router to the computer running the server. Its WAY beyond the scope of this guide to explain howto do this but its a very important thing to do!

The variable g_maplist determines which maps (and modes) are played. All you have to do is to add the right mapcfg filenames (surrounded by ' ) for the maps and modes you want to play. You can find some examples in the server.cfg file. The format is rather easy. When you download a custom map put it into the Nexuiz/data directory so that Nexuiz can use it and add the mapcfg filename to g_maplist. The whole mapcfg stuff is more closely detailed in the section mapcfg explained
You can get a list off all the (currently) available mapcfg files when you start Nexuiz and type
dir maps/*.mapcfg
OR
log_file mapcfg.txt
dir maps/*.mapcfg
log_file ””
The first will list all mapcfg files and the second will ALSO copy this list to the file Nexuiz/data/mapcfg.txt so its easier to copy/paste into your server.cfg file. You just need the add the name of the mapcfg file without the maps/ in front and the .mapcfg after it.

If you want players to be able to download those custom maps the pk3 files have be accessible for direct download either via http or ftp (this means download services like rapidshare.de do NOT work as you can't download the files without clicking on links and entering captchas). Then you need to make the server tell the players from were to download those files. There is a default url in the settings but its not yet of any use. We want to build a mirror network at some point in the future which can be used to up- and download maps.. As long as this does not work yet (or even if it did work and you want to use maps not in this mirror network) you have to create a file called curl_urls.txt inside the Nexuiz/data directory. For each map add a line with the name of the pk3 file and the url were to download it (without the filename however as the filename is appended (just as its appended to the default download url). Here is an example However PLEASE use other servers or else the one in the example get too much traffic and will be shutdown!!!
A nice repository of custom maps

To use the remote admin feature just connect to the server as normal. Then open the console (press ` the key left of 1) and enter ccl PASSWORD The server should respond with You are now remote admin or Wrong password if you made a typo in the password. You will loose the admin status on every mapchange or disconnect or if you send again a wrong password.

If you have admin status you can issue commands to the server by entering cc COMMAND into the console. For example cc g_grappling_hook 1 to enable the hook. Or cc restart to restart the current map. That is very useful when playing 1on1 or teamdeathmatch to give everyone a clean start. You can send any command the server does understand.

Another way to remotely control and configure your server is rcon. It works similar to the admin status. First you have to set rcon_password on your client to the one set on the server. Then you EITHER have to to set rcon_address to your servers ip and port OR connect to the server. Now you can issue commands to the server by entering rcon COMMAND into the console. You can look at the paragraphes above for examples.

You can change all the variables Nexuiz does have but in general its a bad idea to really do that. People will get mad at you if you change the weapon settings or the walkspeed. Its not good if every server has different settings. So again: THINK before changing anything!!!

It is recommented, no i beg you to write PURE into your hostname if you DID NOT CHANGE ANY GAME RELEVANT SETTINGS and UNPURE if you did. Now with the start of the Nexuiz ladder many people are looking for normal servers to improve their skill. Its highly irritating to get on a server and find out the admin changed some weapons settings or other game relevant things. You can use the sv_motd to tell what you have changed. Its nice to let people know. But please notice that people will get even more mad at you if you write PURE in the hostname when the server is not Smile. Maybe its and good idea to remove the grappling hook and the time/framelimit from the voting just to make sure the server stays pure.

Mapcfg


This post needs to be updated to Nexuiz 2.x!!! The mapnames changed.. but the general idea is still the same.

Starting with Nexuiz 1.2 maps are no longer loaded directly. Instead now nexuiz exec's .mapcfg files. The old approach was just not flexible enough. The mapcfg files are normal config files like that server.cfg you edited. It is used to make several settings and then as the last step the map is loaded. That way its possible to have one map (an existing example is: nexdm01) and have several mapcfg files (e.g. dm_nexdm01.mapcfg, tdm_nexdm01.mapcfg, dom_nexdm01.mapcfg, rune_nexdm01.mapcfg, ctf_nexdm01.mapcfg). The different mapcfg files activate the gamemode. By design the dm_ mapcfgs will use normal deathmatch mode, tdm_ uses team deathmatch, dom_ uses domination, rune_ uses runematch, ctf_ uses capture the flag, lms_ uses last man standing. That way you know what gamemode is played. And then they load the map. Its a good idea to have the same name for the mapcfg file and the map Smile. The mapcfg files that come with nexuiz do all set a timelimit and a fraglimit. Thats why you can not change it by hand. Every mapchange it will change it again. So if you do not like the limits you can override them for ALL MAPS by set timelimit_override XX in you server.cfg. The different modes have a override variable for the fraglimit. Use set fraglimit_override YY for normal and team deathmatch. Use set g_ctf_capture_limit YY for capture the flag. Use set g_domination_point_limit YY for domination. Use set g_runematch_point_limit YY for runematch. Use set g_lms_lives_override YY for last man standing..
You can however change the limits for single maps too. This is where the flexibility of mapcfg files come into play. We can just create new ones. You need to create a directory Nexuiz/data/maps and CREATE a nice XXX.mapcfg file in there. To test it CREATE a file dm_nexdm01_mine.mapcfg inside Nexuiz/data/maps with this content:
Code:
set fraglimit 0
set timelimit 10
changelevel nexdm01


This will disable the fraglimit but the map will end after 10 minutes. We also create a new version for team deathmatch on nexdm17. CREATE a file tdm_nexdm17_mine.mapcfg inside Nexuiz/data/maps with this content:
Code:
g_tdm 1
set fraglimit 0
set timelimit 20
changelevel nexdm17


This will enable team deathmatch, disable the fraglimit and the map will end after 20 minutes. Now you need to tell nexuiz you want to use your fine new configs. So just add them to your g_maplist. For example change the line in the server.cfg to this:

set “g_maplist” “dm_nexdm01_mine tdm_nexdm17_mine dm_nexdm01 dm_nexdm02 dm_nexdm03 dm_nexdm04 dm_nexdm05 dm_nexdm06 dm_nexdm07 dm_nexdm08 dm_nexdm09 dm_nexdm10 dm_nexdm11 dm_nexdm12 dm_nexdm13 dm_nexdm14 dm_nexdm15 dm_nexdm16 dm_nexdm17 dm_nexdmextra1”

That will start your server with your nexdm01, then your nexdm17 and then the other maps from g_maplist. If you want to learn more about mapcfg take a look into Nexuiz/data/mapping.txt as it is explained there a bit more. You can see all available .mapcfg file by typing mapcfg into the server console. So take this chance to create a nice g_maplist..

The default g_maplist does have all the maps with all the modes in it. Maybe you want just one gamemode on your server. There are g_maplist examples in the server.cfg file coming with Nexuiz.

 
tech/server.txt · Last modified: 2008/10/25 19:18 by mrbougo
Nexuiz Ninjaz Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
GFDL logoGFDLcontent Unless mentioned on the licensing page, the work on this page is licensed under the GNU Free Documentation License. The author states that the text and images can be used within the restrictions of this license (for example, they can be incorporated into certain free encyclopedias such as Wikipedia).
Kindly hosted by NexuizNinjaz.com