Rothgar's Server Setup Guide(s)

RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
edited January 2013 in Server Discussion
<div class="IPBDescription">How I have setup my various servers...</div>Hi All,

I thought I would put my 2 Cents towards Server Setup Guide's as I have successfully run now Vanilla/Combat/NS2:C Servers but have run into problems along the way.

These problems ranged from:
<ul><li>Not being able to download "mods" properly (Spent a LOT of time on this)</li><li>Lack of installation documentation on mod installations</li><li>Lack of information on "Mod ID's"</li></ul>
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>Please note, I believe in people putting effort in rather than being hand held, so I would suggest reading the various official documentation and guides which are previously available. More knowledge on the NS2 Servers is a good thing.</b><!--colorc--></span><!--/colorc-->

<b>As a general recommendation as well I would highly suggest formatting your configuration files in a way that is easily readable and distinguishes the various options, this will help you moving forward if errors arise. You can see some of my examples through the guide.</b>

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 1) Getting the NS2 Server Files Downloaded</b><!--sizec--></span><!--/sizec-->

Official Guide: <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde...edicated_Server</a>

Make sure you follow the guide it's fairly comprehensive.

For record my SteamCmd batch file contains:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SteamCmd.exe +login <USERNAME> <PASSWORD> +force_install_dir <SERVER_INSTALL_DIR> +app_update 4940 validate +quit<!--c2--></div><!--ec2-->

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 2) Creating Additional Folder Structures</b><!--sizec--></span><!--/sizec-->

Inside the NS2 Server directory I created a "_config" folder and a "_mods" folder, I used "_" at the beginning because there was already a "config" folder and this also makes them list at the top of directory listings.

Inside the "_config" folder I create sub-folders with the various servers I want to run.

Examples for me:
<ul><li>ns2c</li><li>combat</li><li>stock</li></ul>
Name them whatever you want.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 3) Creating your Start-up Files & Shortcuts (With Examples for a Combat Modded Server)</b><!--sizec--></span><!--/sizec-->

Affinity Documentation: <a href="http://msdn.microsoft.com/en-us/library/ms187104.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms187104.aspx</a>
Binary to Hex Calculator: <a href="http://www.binaryhexconverter.com/decimal-to-hex-converter" target="_blank">http://www.binaryhexconverter.com/decimal-to-hex-converter</a>

Affinity Quick Reference (Decimal/Binary):
CPU 0: 1
CPU 1: 2
CPU 2: 4
CPU 3: 8
CPU 4: 16
CPU 5: 32
CPU 6: 64
CPU 7: 128

Under the "_config" folder to create things separate create a new folder for each server you want to run i.e. "combat".

Now inside the designated config folder in my example "E:\NS2\_config\combat" you will create a "server.txt"

The "server.txt" will contain your start-up options for each of your servers. I will create examples for this in the next step 4.

After you have created a blank "server.txt" file, inside your NS2 Server directory create a new batch file for each server. i.e. "NS2 Server - (Combat).bat"

Your batch file should look similar to:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
start /HIGH /AFFINITY <AFFINITY_ID> "Server Window Title" "<PATH_TO_NS2_FOLDER>\Server.exe" -file "<PATH_TO_CONFIG_FOLDER>\server.txt"
cls
exit<!--c2--></div><!--ec2-->

Example of my Combat Server:

NS2 Server - (Combat).bat:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
start /HIGH /AFFINITY 30 "NS2 Combat Server" "E:\NS2\Server.exe" -file "e:\NS2\_config\combat\server.txt"
cls
exit<!--c2--></div><!--ec2-->

<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>NOTE: The Affinity option can be left out, it is a little complicated. It is a hex value for the CPU ID's (Cores/Processors) you want to use. I am using CPU 4 and CPU 5 which from the above adding CPU 4 and CPU 5 (equates to decimal "48" or in hex "30")</b><!--colorc--></span><!--/colorc-->

Once you have your batch file created right click on your batch file and then navigate "Send To" > "Desktop (Create shortcut)" if you want a desktop shortcut.

Do this for as many servers as you want to run, this will make a shortcut on your desktop.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 4) Creating Server Start-up Files "server.txt" (Examples of Stock, Combat & NS2:C Mods)</b><!--sizec--></span><!--/sizec-->

Important variables you will want to use are:

"-config_path" (This should point to your config folder created earlier)

"-modstorage" (This should point to your mods folder created earlier)

"-mods" (This will be a list of mod values if you are going to run custom modifications)

Examples of my server.txt files you will need to replace the various variable values (I hope I shouldn't have to point out obvious ones):

Stock:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->-map ns2_veil -limit 16 -name "Rothgars Test Server" -config_path "e:\NS2\_config\stock" -modstorage "e:\NS2\_mods" -webadmin -webport 8080<!--c2--></div><!--ec2-->

Combat:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->-port 27015 -map ns2_chuteout -limit 10 -name "Rothgars Test Combat Mode Server" -config_path "e:\NS2\_config\combat" -modstorage "e:\NS2\_mods" -mods "5f35045 55e90a3 4d41f11 4fd7fd4 57c685f 57f5f9a 6523544 5faeac4 662442f 672f332 62b22b1 6991825 54da949" -webadmin -webport 8080<!--c2--></div><!--ec2-->

NS2:C:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->-port 27015 -map ns2_eclipse_beta -limit 10 -name "Rothgars Test NS2C Classic Mod Server" -config_path "e:\NS2\_config\ns2c" -modstorage "e:\NS2\_mods" -mods "5f7771c" -webadmin -webport 8080<!--c2--></div><!--ec2-->

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 5) Detailed Information on running "modded" servers (Examples Combat & NS2:C)</b><!--sizec--></span><!--/sizec-->

In the Step 4 examples I showed my various command lines and I am going to go into more details about the "-mods" variables.

If everything is working 100% smoothly you can run a modded server by simply adding the correct "mod" ID's in the "-mods" section of your server.txt this should be a string of space separated mod ID's.

Since the combat server.txt "-mods" variable in my above examples was the most complex I will use that as our example.

Combat Mod (Mod ID 5f35045):

Official Guide(s): <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=119151" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=119151</a> & <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=124206" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=124206</a>

<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>NOTE: The Combat Mod official guides are very comprehensive and you should have no trouble following their instructions. I had no real problems following them for the correct configuration guides.</b><!--colorc--></span><!--/colorc-->

In my combat server "server.txt" example I used the "-mods" variable and it was a string full of server mods with the first being "5f35045" (Combat Mod) and the rest are all maps.

Using the "-mods" variable is important, if you don't use the "-mods" variable AFAIK the server will not mount any mods? and clients will not know what mods they need to download in order to enter your server. This is why it needs to have all mod ID's you want to run.

This variable also makes the server automatically download all the mods on Server.exe start-up but AFAIK will not force any clients to download the mods straight away, it will depend on your "MapCycle.json" config file (Please correct me if any of these details are wrong).

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 6) Creating your "MapCycle.json" server map cycle file (Including example of Combat Mod Server)</b><!--sizec--></span><!--/sizec-->

Official Guide: <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server#Map_Rotation" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde...er#Map_Rotation</a>

The easiest way to create this file initially is to just run the server.

Once it's created you can edit this for your server needs. I got my file built originally from the Combat Mod Official Guides and it works very well. Since I have added a few additional maps:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
  "mods": [ "5f35045" ],
  "mode": "random",
  "time": 30,
  "maps": [ { "map": "ns2_co_core", "mods": [ "57f5f9a" ] },
            { "map": "ns2_co_stargate", "mods": [ "6523544" ] },
            { "map": "ns2_pulsecombat", "mods": [ "57c685f" ] },
            { "map": "ns2_summitcombat", "mods": [ "4fd7fd4" ] },
            { "map": "ns2_co_down", "mods": [ "5faeac4" ] },
            { "map": "ns2_co_veilcombat", "mods": [ "662442f" ] },
            { "map": "ns2_chuteout", "mods": [ "55e90a3" ] },
            { "map": "ns2_co_faceoff", "mods": [ "4d41f11" ] },
            { "map": "ns2_co_ulysses", "mods": [ "672f332" ] },
            { "map": "co_rockdown", "mods": [ "62b22b1" ] },
            { "map": "ns2_co_docking_station", "mods": [ "6991825" ] },
            { "map": "ns2_assault", "mods": [ "54da949" ] } ]
}<!--c2--></div><!--ec2-->

You'll notice in this example there are various places for "mods" strings. In the main block we have <b>"mods": [ "5f35045" ]</b> which tells the server that it needs to run this mod globally for any map and that clients should also have this mod to play on all maps.

Then you will see the same option but grouped under a particular map. In the above examples the mod ID's in each map are the actual map mod ID's. Again this tells the server on a particular map it needs the additional mods loaded and similarly clients will also need the defined mods.

These "mods" options are space separated but need to be in the format "[ "MODID1", "MODID2", "MODID3" ]" you'll notice each mod needs to be in quotes and comma separated (Except the last mod). Since we are using multiple mods it should be in the brackets "[]" if you are running a single mod the brackets are not required.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 7) Adding Server Admins</b><!--sizec--></span><!--/sizec-->

Official Guide: <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server#Server_Admin_System" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde...er_Admin_System</a>

The official guide is fairly comprehensive, I would suggest looking through it.

<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>NOTE: Currently the Wiki example is wrong because it does not have a "," after the groups block.</b><!--colorc--></span><!--/colorc-->

Now, there are two ways to make admin groups. By either specifying a list of "allowed" commands, or specifying a list of "disallowed" (blacklisted) commands.

That said, the examples on the official Wiki are straight forward but I will provide below how I setup my admin group:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
  "groups": {
    "mod_group": {
      "commands": [ "sv_reset", "sv_ban" ],
      "type": "allowed"
    },
    "admin_group": {
      "commands": [  ],
      "type": "disallowed"
    }
  },
  "users": {
    "Rothgar": {
      "id": XXXXX,
      "groups": [ "admin_group" ]
    }
  }
}<!--c2--></div><!--ec2-->

I have defined a group called "admin_group" and it has no commands disallowed so it will have full access to all commands.

In the Users block, I have not tested this but I would expect since it's using Steam ID's the "name" is only used for modification reference.

The "id" above would be my Steam ID in UWE's format.

NOTE: You can get your Steam ID in the correct NS2 format from looking at the Server.exe console when a player connects to the server. Otherwise it's detailed in the Wiki <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server#SteamID_Format" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde...#SteamID_Format</a>

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 8) Configuring the Web Administration (NS2 Web Admin)</b><!--sizec--></span><!--/sizec-->

Official Guide: <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server#Web_Administration" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde..._Administration</a>

The official guide is pretty detailed but I will post information below:

By default the NS2 Web Admin portal is not enabled.

To enable the NS2 Web Admin you can add to your start-up command-line option in your batch file:

"-webadmin" (This enables the Web Administration portal and does not require any value)

Now to configure the port that the NS2 Web Admin uses add the following option:

"-webport" (This takes an integer value and by default without this defined it will try to use port 80)

<b>NOTE: I would suggest using a port higher than 1024 as typically ports lower than this are reserved for system use.</b>

Using the above options only allows you to connect via "localhost" (The same machine as the NS2 Server is running on).

To allow connection from remote computers you need to add the following options:

"-webdomain" (This is a string value which is the address the server will listen on. You can use hostname values but I would expect that the best way to define this would be using an IP address. The value must be in double quotes.)
"-webuser" (This is the username you need to enter for authentication)
"-webpassword" (This is the password you need to enter for authentication)

<b>NOTE: This will allow a single user account to log in, for a multiple user setup check the official guide as it has instructions. If you do not use any authentication options with "-webdomain" Firefox will show a blank page and IE will give a 403 Forbidden error. You need to specify authentication details as outlined in the official guide.</b>

Assuming you have set the options above correctly and ensured you have added any necessary additional firewall rules, then the NS2 Web Admin should be working.

Once the NS2 Web Admin is running you can open a web browser to the correct address. When you go directly to the address it will show you a basic one-line JSON-formatted summary. If you visit the "index.html" page it will give you full access.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 9) Installing the DAK Server Admin Mod (Optional)</b><!--sizec--></span><!--/sizec-->

Official Thread: <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=120542" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=120542</a>
Official Project Site (Includes Variable Listing): <a href="https://github.com/xToken/DAK" target="_blank">https://github.com/xToken/DAK</a>

Please note documentation on this addon is rather hard to decipher and find, however from what I can tell it's getting better. I will post my installation instructions as I had to trawl through the entire DAK thread to find out how to properly install this however I am not going to go in-depth with options and configuration...

For example it does not clearly mention anywhere I can see how to use some non default "DAK" addons such as the reserve slots and automatic message notifications etc. However as mentioned I am not going to attempt to go in-depth with DAK configuration, I do believe it would be nice to try and collate this information somewhere though.

That said if you are interested in those options for reference the addons are called:
<ul><li>reservedslots</li><li>messages</li></ul>
Now DAK can be installed as a standard NS2 "Mod" however I have not used this method and will be explaining the alternate method of manual installation. For those that want to try and install using the standard methods I believe the Mod ID based on the website is "5f4f178". However note that any mods installed on the server including DAK (Since NS2 Team has not yet brought back a list of White-listed Mods) will cause your server to be flagged as "Modded". You and all your players will then need to use the "Modded Server" filter to see your server and it will show as Yellow.

<b>Manual Installation:</b>

Manual download Link: <a href="https://github.com/xToken/DAK/archive/master.zip" target="_blank">https://github.com/xToken/DAK/archive/master.zip</a>

Since we are not using the standard Mod installation methods I downloaded the file from the github site not the Workshop (I am unsure if there is a benefit to getting the players to download the Mod yet? i.e. maybe this would make menus work better or something?).

Once downloaded open the zip file and copy the "lua" folder to your Servers "ns2" sub directory folder i.e. E:\NS2\ns2\ the "lua" folder should exist already and you are just adding the DAK files.

Once you have extracted the files, you need to go into the "lua" folder and edit the "Server.lua" file. In the "Server.lua" file you need to add a new line after the line that says "Script.Load("lua/Shared.lua")" but before the line that says "Script.Load("lua/ServerConfig.lua")" the line added should be <b>Script.Load("lua/DAKLoader.lua")</b>

<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>Please note every time you run a server verify or update the server (Through SteamCmd.exe), the "Server.lua" file is probably going to need to be changed as it would not be consistent with the default. i.e. it's modified.</b><!--colorc--></span><!--/colorc-->

Also note: The manual installation method will make DAK run on any servers that are using the NS2 installation you modified.

Lastly to use the configuration files, run the server and they should be generated in your config folder as DAK*.json (Where * is a Wildcard for various DAK files generated).

Once the DAK config files have been created you need to edit the DAKConfig.json and under the "DAKLoader" section you need to change "LoadFromServerLUA" to true when using the "Server.lua" modification installation method.

<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo--><b>Step 10) Manually Downloading Mods when the Server.exe fails to download them (This will need to be updated every mod release)</b><!--sizec--></span><!--/sizec-->

Binary to Hex Calculator: <a href="http://www.binaryhexconverter.com/decimal-to-hex-converter" target="_blank">http://www.binaryhexconverter.com/decimal-to-hex-converter</a>

This is probably the main difference of my server guide. I believe there is a significant problem with the way the Server.exe downloads mods, in my experience it has a major problem downloading larger mods and I have posted about this here:
<a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=124547" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=124547</a>

And also made a GetSatisfaction Bug Report here:
<a href="https://getsatisfaction.com/unknownworlds/topics/downloading_larger_mods_from_server_exe_fails_with_error_28" target="_blank">https://getsatisfaction.com/unknownworlds/t...s_with_error_28</a>

<b><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->If you are having the same problems, to hopefully get the problem looked at faster, please add yourself on GetSatisfaction.<!--colorc--></span><!--/colorc--></b>

Now for "Mods" the NS2 Team are currently using the Steam Workshop to distribute files and I think this is a great idea. It allows them and us to take advantage of the Steam Cloud to distribute files which has much better bandwidth speeds and takes the load off the server.

Now in relation to MOD ID's you can get the correct "Mod ID" by visiting the Steam Workshop Natural Selection 2 section:

<a href="http://steamcommunity.com/workshop/browse/?appid=4920" target="_blank">http://steamcommunity.com/workshop/browse/?appid=4920</a>

Find the mod you want to use and look at the address bar (Example NS2:C):

<a href="http://steamcommunity.com/sharedfiles/filedetails/?id=100103964" target="_blank">http://steamcommunity.com/sharedfiles/file...s/?id=100103964</a>

Take the value of the "id" variable "100103964" and convert it to HEX: 5F7771C (This HEX value that the NS2 Team use to reference mods and in this example for NS2:C).

With that in mind here is information I have since found by reading and during my own travels.

When the Server (Or Client) downloads the mods, it creates a folder in the format of m<MODID>_<time_updated> (<b>NOTE the "m" before the MOD ID</b>). The <time_updated> and file download location are found from a HTTP query the server makes to the steam workshop. It then downloads a defined zip file and extracts the contents to the folder.

Combat Mod (Mod ID: 5f35045):
Manual Download Link: <a href="http://cloud-2.steampowered.com/ugc/541822566572991113/65BE728BB5C2C4E1E8E04749911DD05DC2E2667B/" target="_blank">http://cloud-2.steampowered.com/ugc/541822...1DD05DC2E2667B/</a>
Current Required Folder: m5f35045_1357409119

NS2:C (Mod ID: 5f7771c):
Manual Download Link: <a href="http://cloud.steampowered.com/ugc/882969765194660968/51B51D9F4E73493D7A3572685E60571EC41AB90E/" target="_blank">http://cloud.steampowered.com/ugc/88296976...60571EC41AB90E/</a>
Current Required Folder: m5f7771c_1356574527

NS2 Arcade (Mod ID: 6a5866b):
Manual Download Link: <a href="http://cloud.steampowered.com/ugc/1100267109599420324/96730E5EB9DBE09F59B93570BF8EB01A9E04F095/" target="_blank">http://cloud.steampowered.com/ugc/11002671...8EB01A9E04F095/</a>
Current Required Folder: m6a5866b_1355590925

ns2_co_stargate (Mod ID: 6523544):
Manual Download Link: <a href="http://cloud-2.steampowered.com/ugc/542946468792900812/536771C5F1D2006214F4E766517F96AC248B1078/" target="_blank">http://cloud-2.steampowered.com/ugc/542946...7F96AC248B1078/</a>
Current Required Folder: m6523544_1355245485

As we know from the above guide, these folders should be created in your previously created "_mods" folder.

Good Luck.
«1

Comments

  • kk20kk20 Join Date: 2012-10-30 Member: 164592Members
    good guide. should be stickied IMHO
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
  • DawormDaworm Join Date: 2009-06-22 Member: 67900Members
    Would you mind if I transcribed this to the wiki?

    Or you yourself could?

    <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server" target="_blank">http://www.unknownworlds.com/ns2/wiki/inde...edicated_Server</a>
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    I have not really used wiki's before and my formatting is rather crude (As you can tell I just know how to get the job done... not looking too pretty) so if you wanted to move various parts of the information to wiki I have no problems with that. During my travels I read through various official NS2 wiki pages and the forums and while they do contain a lot of the information I provided it does not have others.

    I have in this guide collated various information from around the place and also done some trial and errors myself to get my above guide.
  • DawormDaworm Join Date: 2009-06-22 Member: 67900Members
    No probs. That and the wiki page does need to be updated/refined I think anyway.
  • JektJekt Join Date: 2012-02-05 Member: 143714Members, Squad Five Blue, Reinforced - Shadow
    PS UWE - Fix server downloading of large files.
    Nice guide, unfortunate FTPing the workshop files isn't an option for me.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Fixed missing DAK installation step and updated manual NS2C details since there was a mod update.
  • bHackbHack Join Date: 2010-03-23 Member: 71059Members
    edited December 2012
    Add consistency checks as it is part of server setup? Well it's a good manner of having them on the server, otherwise modd-abuse can cause some issues for your players :>
    Good topic though.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    <!--quoteo(post=2039732:date=Dec 4 2012, 09:31 PM:name=bHack)--><div class='quotetop'>QUOTE (bHack @ Dec 4 2012, 09:31 PM) <a href="index.php?act=findpost&pid=2039732"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Add consistency checks as it is part of server setup? Well it's a good manner of having them on the server, otherwise modd-abuse can cause some issues for your players :>
    Good topic though.<!--QuoteEnd--></div><!--QuoteEEnd-->

    What do you mean, consistency checking is enabled by default?
  • bHackbHack Join Date: 2010-03-23 Member: 71059Members
    edited December 2012
    <!--quoteo(post=2039771:date=Dec 4 2012, 11:39 AM:name=Rothgar)--><div class='quotetop'>QUOTE (Rothgar @ Dec 4 2012, 11:39 AM) <a href="index.php?act=findpost&pid=2039771"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What do you mean, consistency checking is enabled by default?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Default CC is ***t.

    You might want to tweak it and add this to CC:

    "check": [ "game_setup.xml", "*.lua", "*.screenfx", "*.surface_shader", "*.fxh", "*.render_setup", "*.shader_template", "*.fsb", "*.dds", "*.material", "*.level", "*.cinematic" ]

    "ignore": [ "crosshairs.dds", "crosshairs-hit.dds", "exosuit_HUD1.dds", "exosuit_HUD4.dds", "*.tga" ]}

    This is a competitive server setup CC, which will exclude a lot of modds (most texture changes, including just community changes, as well as harmful ones - e.g. green skulks), so you might want to tweak it. There might be a 'sweet spot' in CC, but I don't know :) You will need to look into it yourself.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    <!--quoteo(post=2039776:date=Dec 4 2012, 10:45 PM:name=bHack)--><div class='quotetop'>QUOTE (bHack @ Dec 4 2012, 10:45 PM) <a href="index.php?act=findpost&pid=2039776"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Default CC is ***t.

    You might want to tweak it and add this to CC:

    "check": [ "game_setup.xml", "*.lua", "*.screenfx", "*.surface_shader", "*.fxh", "*.render_setup", "*.shader_template", "*.fsb", "*.dds", "*.material", "*.level", "*.cinematic" ]

    "ignore": [ "crosshairs.dds", "crosshairs-hit.dds", "exosuit_HUD1.dds", "exosuit_HUD4.dds", "*.tga" ]}

    This is a competitive server setup CC, which will exclude a lot of modds (most texture changes, including just community changes, as well as harmful ones - e.g. green skulks), so you might want to tweak it. There might be a 'sweet spot' in CC, but I don't know :) You will need to look into it yourself.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Well that is why I have not touched the exclude options at all, in case it allows for any potential exploits.

    I also have not checked whether this ConsistencyConfig.json file also modifies the validate function of SteamCmd. I assume it doesn't as they are two separate tools and SteamCmd is a generic Valve tool.

    What mods are you trying to allow though, and for general servers why would it be needed?

    I did see you added some additional options into the checking, Does this help with anything? What problems are with the defaults currently?
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Combat Mod Manual Install updated
  • AngeluszAngelusz Harmonic entropist Join Date: 2003-07-10 Member: 18072Members, Forum Moderators, Constellation, NS2 Playtester
    <sup><!--coloro:Orange--><span style="color:Orange"><!--/coloro-->Stuck!<!--colorc--></span><!--/colorc--></sup>
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Combat Mode & Added ns2_co_stargate manual Downloads.
  • InTriXInTriX Join Date: 2012-12-05 Member: 174227Members
    edited December 2012
    Can you explain how to get web admin working because all I see is This site is running TeamViewer presumably on port 80 so I change the port and look and all I see is

    "{ "map": "ns2_summit", "cheats": "false", "marines": 0, "aliens": 0, "player_list": [ ], "frame_rate": 30.018575668335, "devmode": "false", "marine_res": 50, "uptime": 76, "server_name": "XXXXX", "alien_res": 50, "webport": "120", "players_online": 0, "webdomain": "localhost" }"


    I don't see how you can use this to admin the server or to enable insight the spectator mod, any help is appreciated.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    edited December 2012
    <!--quoteo(post=2045109:date=Dec 14 2012, 07:44 AM:name=InTriX)--><div class='quotetop'>QUOTE (InTriX @ Dec 14 2012, 07:44 AM) <a href="index.php?act=findpost&pid=2045109"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Can you explain how to get web admin working because all I see is This site is running TeamViewer presumably on port 80 so I change the port and look and all I see is

    "{ "map": "ns2_summit", "cheats": "false", "marines": 0, "aliens": 0, "player_list": [ ], "frame_rate": 30.018575668335, "devmode": "false", "marine_res": 50, "uptime": 76, "server_name": "XXXXX", "alien_res": 50, "webport": "120", "players_online": 0, "webdomain": "localhost" }"


    I don't see how you can use this to admin the server or to enable insight the spectator mod, any help is appreciated.<!--QuoteEnd--></div><!--QuoteEEnd-->

    What is your command-line? You are better off to make a new thread as this is OT
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Guide to use a new method so I could set CPU priority and affinity automatically.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated with NS2 Arcade Mod
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    edited December 2012
    A small note on affinity:
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Affinity Reference (Decimal/Binary):
    CPU 0: 1
    CPU 1: 2
    CPU 2: 4
    CPU 3: 8
    CPU 4: 16
    CPU 5: 32
    CPU 6: 64
    CPU 7: 128<!--QuoteEnd--></div><!--QuoteEEnd-->

    These are all based on CPU flags in BINARY. There are 8 cpus, each represented by a 1 in a string of 8 bits.

    Here's what i mean:
    CPU CPU NR : BINARY VALUE : Hex Value
    CPU 0: 00000001 : 01
    CPU 1: 00000010 : 02
    CPU 2: 00000100 : 04
    CPU 3: 00001000 : 08
    CPU 4: 00010000 : 10
    CPU 5: 00100000 : 20
    CPU 6: 01000000 : 40
    CPU 7: 10000000 : 80

    Let's take a small binary number: 0100. To convert this to base 10 you do 0x2^0 + 0x2^1 + 1x2^2 + 1x2^3. Your powers of 2 are the digit number starting from right to left (first digit is 0, second digit is digit #1, third is digit #2 and so on). The multiplier in front of 2 is the binary digit that corresponds to the power.

    The above result is 4. Now let's take a larger number, like CPU 5: 00100000 -> 0x2^0 + 0x2^1 + 0x2^2 + 0x2^3 + 0x2^4 + 1x2^5 + 0x2^6 + 0x2^7 = 1x2^5 = 32.

    Another way to look at it is to think of each digit as a multiplier of 2 (except first digit, that's always 1).
    So the number
    1 1 1 1 1 1 1 1
    would be
    128+64+32+16+8+4+2+1=255

    If any of the ones are 0's, simply ignore that number (add 0 instead of the regular value).
    For example:
    The number
    1 0 1 1 0 1 0 1
    would be
    128+0+32+16+0+4+0+1 = 171. (Note how the bits corresponding to 64, 8 and 2 are 0's, so we used 0 in our calculation).


    Going from binary to hex is even easier. Simply start from right to left and count groups of 4. Evaluate the group of 4 and replace it with the value. If your evaluated number is over 9, use A for 10, B for 11, C for 12, D for 13, E for 14 and F for 15.
    Let's try the following number:

    01001110

    First, we break in groups of 4:
    0100 1110
    We evaluate each one. 0100 translates to 8, and 1110 translates to 14 (8+4+2). Since 14 is > 9, we use E for it.
    The number above becomes:
    8 E. So going from 01001110 binary to hex we get 8E in hex.

    Now, to use the CPU affinity, start with CPU 7, and while counting down to CPU0, type a 0 or 1 for each CPU, 0 if it's not set in affinity, 1 if it is.

    So if we choose CPU 7, 5 and 2 we do:
    10100100 -> This shows: CPU 7 is 1 (first digit), enabled since it's 1. CPU 6 is 0 (second digit), disabled since it's 0, and so on.
    Once you find your string, simply convert it to HEX as shown above.

    In this case we have:
    1010 0100
    or in hex:
    A8. So setting affinity this number will set affinity to CPU 7, 5 and 2.

    Don't worry, once you this a few times you will be able to do it on the fly!
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Combat Mode & ns2_co_stargate manual Downloads.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Combat Mod
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated with information on "Mod ID" calculations, turns out it is just a hex conversion of the Steam Workshop Mod ID.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Added Instructions for NS2 Web Admin
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Combat Mode Mod
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Updated Combat Mode again
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Added section on Admin Groups as some people seemed to have troubles.
Sign In or Register to comment.