PDA

View Full Version : Windows & Linux Server Guide

RaideR
13th June 2005, 19:20
Please refer to Phaedrus' post below for updated instructions.

Make sure you read the entire thread as updated information and frequent issues will be added below.

Ok, here you go for all you people wanting to install the server on your linux box.

login to you ssh shell with something like putty (http://files.sourcefm.net/mirror/putty/) as root!

STEP 2 Make a User to Run your server

first make a user to run your server.

shell> usermod -d /home/hlds hlds (you may change /home/hlds to where you want to install hlds, if its on another drive)

shell> mkdir /home/hlds
shell> chown hlds /home/hlds
shell> chmod 777 /home/hlds

shell> cd /home/hlds
shell> su hlds

hlds@shell> chmod +x hldsupdatetool.bin
hlds@shell> ./hldsupdatetool.bin

Now follow the help and install Steam and then update the steam server as you would for Half-Life Death Match.

Try to install this to /home/hlds, it will ask you

for those getting stuck the command to type is..

hlds@shell> ./steam -command update -game episode1 -dir /home/hlds
[size=1]Updated 24/08/2011 to reflect new Source Engine modes[/red]

that will update steam, if it asks you to retry the command, or takes less than 5 mins to complete the function, then try it again.

It will take about 30 - 40 mins for this bit

hlds@shell> cd /home/hlds
hlds@shell> wget http://taligari.lincoln.ac.uk/fun/HSB4a-serverfull.zip

hlds@shell> unzip HSB4a-serverfull.zip
it will uncompress and it's in the right place

STEP 5 Server Config

Edit you /home/hlds/hidden/cfg/server.cfg

to do this type

hlds@shell> vi /home/hlds/hidden/cfg/server.cfg

press insert to start editting and type ESCAPE > : > wq
to save!

STEP 6 Start you server! - With a auto respawn script

make the start script.

hlds@shell>vi startserver.sh

now copy this code into the vi windows, just press INSERT then right click with the mound on the window when you have the code in the copy buffer.

#!/bin/bash

while true
do
/home/hlds/srcds_run -game hidden -maxplayers 9 -tickrate 66 +port 27015 +map hdn_docks +exec server.cfg
echo "server crashed on date" > last_crash.txt
done

now save it.

and to start your server just type

hlds@shell> sh startserver.sh

now that it works press CTRL-C to exit the server, this will shutdown the server and return you to your shell, now we want to run the server in a screen so that we can let it run when we logout of the server shell. to do this type

hlds@shell> screen -m -d -S HIDDENSERVER sh startserver.sh

Now you are all done!

[NOTES]

*** If you wish to start more than one server - change (+port 27015) to (+port <another number>) and +exec server.cfg to +exec server2.cfg and write a new config file for that server.

**cp server.cfg server2.cfg (will make a copy of your main servers server config)

*if you dont have screen for any reason, on deb linux you can "apt-get install screen", it will install automatical

on some versions of linux you have to include a path as well.

or it has to be in the bash dir.

try doing /home/hlds/steam -command help

That may work :P

Knigh7s
13th March 2007, 01:01
Please refer to Phaedrus' post below for updated instructions.

Last Updated: 05/23/2007 - H:S ver. B4a

Reasons for posting this: I recieve alot of PM's/E-Mails asking for my server.cfg file and help setting it up. So I create this, to help.
To the Forum Mods: THANKS FOR THE STICKY!

Server.cfg - here is a "complete?" list to help you get started, at the end is an example of what my server config looks like.

HIDDEN SETTINGS

hdn_deathnotices
Description: Death Notices??
Value: 0 = Off, 1 = On

hdn_hiddenrounds
Description: How many rounds in a row a player can be Hidden
Value: # = to description

hdn_jointime
Description: wait time in seconds before first round begins
Value: Default 20

hdn_limitbombs
Description: On = 1/2 IRIS : 0 pipebombs, 3/4 IRIS : 1 pipebomb, 5/6 IRIS : 2 pipebombs, 7/8 IRIS : 3 pipebombs
Value: 0 = Off, 1 = On

Description: Controls the time between radio messages, stopping them from being spammed all the time.
Value: # in seconds

hdn_selectmethod
Description: Selection method to become the Hidden
Value: 0 = weighting, 1 = classic, 2 = random

hdn_deathwait
Description: Used for OVERRUN game mode only - Respawn Time
Value: # in seconds

hdn_survival
Description: Used for OVERRUN game mode only - Time required for an IRIS to survive to win
Value: # in seconds

sv_pigstick
Description: Pigstick settings
Value: 0 = Off, 1 = On

OTHER SETTINGS

mp_friendlyfire
Description: Friendly Fire
Value: 0 = On, 1 = Off

mp_roundtime
Description: Round Timer in seconds
Value: 300 = 5min, 240 = 4min

mp_timelimit
Description: Time before next map change in Minutes
Value: Default = 20, Maximum 20 minutes between map changes

Description: Allows clients to download custom maps you put on the server
Value: 0 = Off, 1 = On

sv_visiblemaxplayers
Description: *IMPORTANT* function if you have a 10 slot server (B4a only)
Value: set to 9

hostname
Description: The Name of your server that shows up in the server list

Description: Password to use console(~) or Remote Console(HLSW) commands

writeid
Description: Used to create banned_user.cfg
Value: N/A

writeip
Description: Used to create banned_ip.cfg
Value: N/A

sv_region
Description: Server Region Settings (not sure if this is necessary)
Value: 0 = Eastcoast, 1 = Westcoast, 2 = South America, 3 = Europe, 4 = Asia, 5 = Australia, 6 = Middle East, 7 = Africa, 255 = World

TO ALL:
Please if any information here is incorrect, let me know ASAP so I can make the corrections. Also if there is information missing, Please let me know as well and I will add it.

Knigh7s
13th March 2007, 01:01
Mani Admin Plugin - v1.2s, v1.2s (orange box)
Description: This is a very popular admin plugin, almost a must for hidden servers. (there are some function that do not work with Hidden)
Note: Install this using SourceMM below. It seems to run much smoother this way.

MetaMod: Source aka SourceMM - v1.6.2, v1.4.4
Description: Needed to run EventScripts and Mani Admin Plugin(recommended, but Mani can run stand alone w/o MetaMod)

Mattie Eventscripts - v1.5.0.171b
Description: This is used to create and run custom game scripts

Collection of Eventscripts. Look for "The Hidden Source" (http://forums.mattie.info/cs/forums/viewforum.php?f=56)

toejam316
27th March 2008, 06:28
hdn_limitbombs doesn't seem to work for me. Any idea why? I'm putting it in my server.cfg and its not doing ANYTHING.

Paegus
27th March 2008, 06:44
make sure you have the hot-fix/updated binaries

Phaedrus
2nd April 2008, 06:14
Here is the link to the hotfix:

This is the link you find in the news post. The link in the download section is for 4a, for some reason. The news post doesn't mention this problem, but it does fix it.

Phaedrus
6th June 2008, 18:11
People are always coming into the forums, frustrated and/or clueless, looking for help setting up a server. Everything you need to know about running a server is out there to be found, but it's not always easy to find and almost none of it is specific to Hidden: Source. I have set up and troubleshot Hidden:Source servers countless times for myself and many other community members. During that time I have learned a lot and found many great resources. I am gathering this knowledge here in one place to hopefully make things easier. I have provided links to all of the original sources. Some of the info quoted here has been modified for Hidden:Source.

1.0 Installation

1.1 Windows Installation
Modified Windows Guide from srcds.com (http://www.srcds.com/db/engine.php?subaction=showfull&id=1097362093):

Install: Windows (Rev. 2)

1) Getting started with HLDSUpdatetool
Navigate through the wizard like you are used to, which means next most of the time. When it asks you about the destination folder, click browse. Type c:\srcds in the textfield and click on OK. Finish the wizard.

Now click on Start, Run and type cmd . Type in the commands mentioned here and end a line with the enter key.
Command(s):
C:
cd \srcds
hldsupdatetool

The new version of HLDSUpdateTool will be downloaded now. As soon the cursor just blinks, press CTRL-C.

Now we can start downloading the files. This can take a few hours depending on the connection the server uses.
Command(s):
hldsupdatetool -command update -game episode1 -dir C:\srcds

At the same time, download the Beta 4b Dedicated Server package (http://www.hidden-source.com/downloads/hsb4b-full.zip) (220 MB) and the B4b server fix (http://www.hidden-source.com/downloads/hidden-beta4b1-server.zip) (5 MB). Go get yourself a cup of coffee. Extract them to the srcds directory. Make sure to extract the server fix last.

3) Starting srcds
Now we are ready to run the srcds. Click Start, Run, type in the box there:
c:\srcds\srcds.exe -console -game hidden +map hdn_docks -maxplayers 9 -autoupdate
and press enter. Your srcds is now up and running.

Extra) Restarting srcds at crash
Batch files are little script files that tell Windows what to do. If srcds crashes, it will not restart like possible under Linux. (Linux uses a "Script" file too)
What we are going to do is make sure that as soon SRCDS suddenly quits it will restart. First we open notepad. What we write in there is the following:
Command(s):
@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game hidden +map hdn_docks +maxplayers 9
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

Replace the marked part with your own commandline and values. Save the file as C:\srcds\srcds.bat in notepad (NOT .txt) and next time click the srcds.bat file. If you need to close srcds, close the hlds window and press Y (depending on language) at the Terminate batch question. Please do note this does not work with crashes/errors that involve a Windows error box.

1.2 Linux Installation

Modified Linux Guide from srcds.com (http://www.srcds.com/db/engine.php?subaction=showfull&id=1098643920&archive=):

Install: Linux (Rev. 2)

1) Getting started with HLDSUpdatetool
First of all download hldsupdatetool from the VALVe webserver (http://www.steampowered.com/download/hldsupdatetool.bin). Make a dir called srcds_l, and save hldsupdatetool in that dir and run it. (Check this (http://forums.srcds.com/showthread.php?tid=736&pid=3508#pid3508) out when you have an uncompress error.)
Command(s):
mkdir srcds_l
cd srcds_l
chmod +x hldsupdatetool.bin
./hldsupdatetool.bin
./steam

The new version of HLDSUpdateTool will be downloaded now. You will be returned to the console after its done.

We can start downloading the files. This can take a few hours depending on the connection the server uses.
Command(s):
./steam -command update -game episode1 -dir .

At the same time, download the Beta 4b Dedicated Server package (http://www.hidden-source.com/downloads/hsb4b-full.zip) (220 MB) and the B4b server fix (http://www.hidden-source.com/downloads/hidden-beta4b1-server.zip) (5 MB). Go get yourself a cup of coffee. Extract them to the srcds directory. Make sure to extract the server fix last.

3) Starting srcds
Now we are ready to run the srcds.
./srcds_run -console -game hidden +map hdn_docks -maxplayers 9 -autoupdate
and press enter. Your srcds is now up and running.

Extra) Running srcds in background (re-attachable)
We will make a script that will run the srcds in the background in a "screen"
you will need to have screen installed for this. make a file called server.sh and put this in:
Command(s):
#!/bin/sh
echo "Starting Hidden:Source Server"
sleep 1
screen -A -m -d -S hdn-server ./srcds_run -console -game hidden +map hdn_docks +maxplayers 9 -autoupdate

Save the file, and chmod it to run
Command(s):
chmod +x server.sh

If you want to start your server, simply run server.sh . It will start your srcd server in the background, to open it type:
Command(s):
screen -x hdn-server

If you want to close it again press ctrl+a+d, and it will detach the screen and keep it running in the background.
1.3 Port Forwarding

In order for your server to be visible to other players, you must forward the server port (default: UDP 27015). If you need help doing this, visit this site (http://www.portforward.com/routers.htm) for router specific guides and pick "Half-Life 2 Steam Server" after you select your router. Use this site (http://www.canyouseeme.org/) to test the port after you are done.

Other ports of interest:
UDP: 27015 and 27020 (default HLDS, SRCDS and HLTV port)
TCP: 27015 (SRCDS Rcon port)

Phaedrus
6th June 2008, 18:11
2.0 Installation Options

This section is optional. There steps are not necessary and/or relevant for everyone. However, they are useful in certain situations.

2.1 CPU Priority

High priority processes are given more attention by the cpu and are more responsive. Running a server with high priority will ensure smoother gameplay.

Modified High Priority Guide from srcds.com (http://www.srcds.com/db/engine.php?subaction=showfull&id=1103579727&archive=):

System: srcds at full throttle

1) Windows
For Windows, we will alter the "restart" script that is mentioned at the Windows installation tutorial (http://www.srcds.com/db/engine.php?subaction=showfull&id=1097362093&archive=). This one is very easy. We will change the "start line" to this:
Command(s):
start /high /wait srcds.exe -console -game hidden +map hdn_docks -maxplayers 9

The /high is the addition. You can also use /abovenormal, which is a bit less than high. What we did is telling our box that it has to be focussed on srcds. According to some users at Counter-Server, a very popular HLDS resource this (http://server.counter-strike.net/forums/showthread.php?s=&threadid=23088)can also increase the performance of hlds/srcds under Windows. This is not confirmed though.

2) Linux
To "renice" srcds under Linux we need to write the process id to a pid file. This is the number that is assigned to the srcds process. We will add this to the command line:
Command(s):
./srcds_run ... -pidfile srcds.pid

When you closed srcds and added this to the command line, please log in as root. Now we will use a tool that tells the system to ensure the process is at the highest priority every 5 minutes. (Otherwise as soon srcds crashes the priority would go back to normal)
Type crontab -e
Command(s):
*/5 * * * * renice -20 cat /home/yoursrcdspath/srcds.pid >/dev/null 2>&1

Now press CTRL-X

Replace /home/yoursrcdspath/ in the example with the path of your srcds server. (Without the moddir)

This should make your server alot smoother, even at large maps. The price is however, this is the application that gets the best performance and other applications might suffer. Good luck!

2.2 IP Assignment

IP assignment is for anyone with multiple IP addresses who wants to configure their server(s) to use a specific IP.

Modified IP Assignment Guide from srcds.com (http://www.srcds.com/db/engine.php?subaction=showfull&id=1102717219&archive=):

Setup: Assigning IPs to srcds
Usually you get several IP addresses with your dedicated server company. Not all of us know how to assign those and I will explain how to do so.

First we need to explain the operating system there is more than one IP address.

1a) Windows 95/98/98SE/ME
Under Windows we have to take a look in the registry. I could do a nice copy paste of a site that explains this perfectly well but I could also link you up to that site and that is what I am going to do. >> Assigning IPs for 98 etc. (http://www.winguides.com/registry/display.php/796/)

1b) Windows 2000/XP/2003
Go to your Network properties screen and click on TCP/IP. Now click on properties and advanced. Under the box Ip Addresses you can simply add or remove several IP addresses. Piece of cake :)

1c) Linux (Redhat, Fedora etc.)
On most Linux systems you can easily use ifconfig to assign multiple IPs.
To do so, you first have to try it out before you lock it to the "on startup" execution file. Here the usage:
/sbin/ifconfig eth0:0 123.123.123.123
This is the secondary IP. This means this is NOT the base IP, as the number suggests. Now if we want a third IP we are going to increase the number after the semicolon by one:
/sbin/ifconfig eth0:1 123.123.123.124
If you follow this pattern it should work fine depending on your Linux distribution. Also note your networkcard could be named different than eth0.
To save changes, you have to add all commands you had to use to assign the IPs to your "on boot" execution file". Under Redhat and Fedora this is /etc/rc.local. Please verify the location of your distribution with an advanced Linux user to be sure.

2) Telling srcds what IP to use
In order to tell srcds what IP you want to use, you add the +ip switch to the command line. Eg. ./srcds_run -game hidden +ip 123.123.123.124

This allows you to run multiple srcds instances at one box with several IPs.
Have fun!
2.3 Command-line Arguments

Command-line arguments are options given to the server at startup. Options beginning with a '-' (ie -tickrate or -maxplayers) can not be changed anywhere else. Normal console variable can also be set here using a '+' (ie. +map or +hostname).

Command-line options from Valve Wiki (http://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server):

Command-line arguments for the Source Dedicated Server executable (srcds.exe, srcds_run)
Command-line parameters
-allowdebug - (Same as -debug ?)
-autoupdate - The server is searching for updates on startup (Linux/Unix only).
-console - SrcDS will run in console mode (Windows only).
-dev - Show developer messages.
-debug - Debug Mode.
-game <game> (http://developer.valvesoftware.com/wiki/Game_Name_Abbreviations) - Specifies which game/mod to run.
-insecure - Will start the server without Valve Anti-Cheat technology.
-nobots - Disable bots.
-ip - Specifies the IP when multiple network cards are installed.
-port - The port the server advertises to clients.
-maxplayers <number> - Specifies how many player slots the server can contain.
-tickrate <number> - Specifies Server-Tickrate (for more info see Source Multiplayer Networking (http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking)).
-verify_all - Will check that each file in the install matches the latest Steam version. Console variables
+<console variable> <arg> - Sets the Cvar (or console variable (http://developer.valvesoftware.com/wiki/Category:Console_Variables)) to the specified setting. Some useful console variables
+hostname "Server Name" - Specifies the name of the server.
+ip - Specifies the IP when multiple network cards are installed (Old, but still works).
+map <map> - Specifies which map to start.
+maxplayers <number> - Specifies how many player slots the server can contain (Old, but still works).
+hostport <port> - Specifies the host port (Port specification before -port was added, but can still be used).
+clientport <port> - Specifies the client port (The port the server advertises to clients, the same as -port and clientport in console)
+sv_lan <0/1> - If set to 1, server is only available in Local Area Network (LAN). Example command-line arguments:

-console -game hidden -maxplayers 9 -tickrate 100 +fps_max 600 +port 27015 +map hdn_stalkyard +exec server.cfg

Phaedrus
6th June 2008, 18:12
3.0 Configuration

3.1 Server.cfg

There are over 3000 console variables, for server and client configuration, most of which you never want to touch. Here is a list (http://developer.valvesoftware.com/wiki/Console_Command_List) of these for anyone interested. Knigh7s also has a list he maintains on the forums (http://forum.hidden-source.com/showthread.php?t=8024).

Example server.cfg:

// General settings
hostname "My Server Name" // Server name
sv_region 1 // Server region (0 = Eastcoast, 1 = Westcoast, 2 = South America, 3 = Europe, 4 = Asia, 5 = Australia, 6 = Middle East, 7 = Africa, 255 = World)
sv_lan 0 // Not a LAN server
sv_contact "http://www.hidden-source.com" // Contact info

// Rate settings
fps_max 600 // Maximum server fps
sv_minrate 0 // Minimum bandwidth
sv_maxrate 20000 // Maximum bandwidth
sv_minupdaterate 10 // Minimum updates per second
sv_maxupdaterate 60 // Maximum updates per second
sv_mincmdrate 10 // Minimum updates per second
sv_maxcmdrate 40 // Maximum updates per second
sv_unlag 1 // Lag compensation (0 = off, 1 = on)
sv_maxunlag .1 // Maximum lag compensation (seconds)
sv_timeout 60 // Client dropped after timeout (seconds)

// Query settings
sv_max_queries_sec 3 // Maximum queries per second to respond to from a single IPaddress.
sv_max_queries_sec_global 60 // Maximum queries per second to respond to from anywhere.
sv_max_queries_window 30 // Window over which to average queries per second averages.

// Chat settings
sv_alltalk 1 // All talk (0 = off, 1 = on)
sv_voiceenable 1 // Voice chat (0 = off, 1 = on)

// Game settings
mp_friendlyfire 1 // Friendly Fire (0 = off, 1 = on)
mp_roundtime 300 // Round time (seconds)
mp_timelimit 30 // Map time (minutes)

// Hidden settings
sv_pigstick 0 // Pigstck (0 = off, 1 = on)
hdn_deathnotices 1 // Death notices (0 = off, 1 = on)
hdn_deathwait 10 // Over-run respawn delay (seconds)
hdn_hiddenrounds 1 // Maximum consecutive rounds as Hidden
hdn_jointime 30 // Delay before first round (seconds)
hdn_limitbombs 1 // Limit pipebombs by IRIS: 1-2 = 0, 3-4 = 1, 5-6 = 2, 7-8 = 3 (0 = off, 1 = on)
hdn_selectmethod 0 // Hidden selection method (0 = Weighted, 1 = Classic, 2 = Random)
hdn_staminadrain -0.055 // Stamina drain while clinging (-0.095 Default)
hdn_survivaltime 15 // Over-run survival time for last IRIS

// Tweaks
sv_friction 5 // World friction (default = 4)
sv_stopspeed 100 // Stop speed (default = 100)
sv_stepsize 22 // Step size (default = 18)

// Log settings
log 1 // Turn on logging
sv_log_onefile 0 // Log server information to only one file.
sv_logbans 1 // Log server bans in the server logs.
sv_logblocks 0 // If true when log when a query is blocked (can cause very large log files)
sv_logfile 1 // Log server information in the log file.
sv_logflush 0 // Flush the log file to disk on each write (slow).

// Ban settings
exec banned_user.cfg // Load banned STEAMs
exec banned_ip.cfg // Load banned IPs

3.2 Rate Settings

Server rate settings are very important to performance. The higher your rates, the more updates the server can send and receive, which means better performance for clients. However, exceeding the available bandwidth will result in lag spikes, rubber banding, timeouts, etc. Rate setting calculation is rather complicated. There is useful info on rate settings here (http://www.serverwiki.org/index.php/Advanced_Tickrate) and here (http://forums.srcds.com/viewtopic/1094), but it is much simpler to follow the rates calculator here (http://www.reece-eu.net/drekrates.php). If bandwidth is an issue, consider lowering the maxplayers first as this will improve bandwidth more dramatically while preserving gameplay. This is because each additional player creates more updates for each of the other clients in addition to the updates they require themselves.

Tickrate determines how frequently the game state is updated. Running a higher tickrate increases the responsiveness of the game and improves hit registry. In Hidden:Source, this also currently affects stamina for the Hidden. Increased tickrates result in higher regeneration and higher drain. SRCDS runs at 33 tick by default, which leads to noticeable stamina shortages compared to the 66 and 100 tick servers that most players are used to.

From Valve: (http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking#Basic_Networking)

During each tick, the server processes incoming user commands, runs a physical simulation step, checks the game rules, and updates all object states. After simulating a tick, the server decides if any client needs a world update and takes a snapshot of the current world state if necessary. A higher tickrate increases the simulation precision, but also requires more CPU power and available bandwidth on both server and client.
The tickrate can only be modified using the -tickrate command-line argument (see section 2.3). You should also increase the the fps_max setting. This can be done in the command-line (+fps_max 600) or in the server.cfg (fps_max 600). If you run a windows server, you must also pingboost your server with a pingboost program like this (http://whisper.ausgamers.com/downloads/srcdsfpsboost.zip) or your server fps will be capped at 64. Use the RCON stats command to make sure your pingboosting is working properly.

RCON stats:

CPU In Out Uptime Users FPS Players
0.00 0.00 0.00 412 13 518.47 1

Stats system is currently offline.
3.3 Hidden-Stats

You can configure your server to send its logs to the Hidden-Stats server. This lets players track their overall performance on all servers using this system.

Attention: do NOT add these lines to ANY other file than valve.rc, this causes all sorts of stupid problems and will end up with your servers being banned from stats. If you are unsure what you are doing, DONT DO IT. Ask one of us to help.

Locate your valve.rc file in you server installation. Add the following two lines to this file (log 1 may already be there, in which case do not add another).
Code:

log 1
Then you will need to restart your server. If you rent a server, you may need to ask your providor to do this for you, or you can do it through rcon.

Phaedrus
6th June 2008, 18:12
4.0 Customization

4.1 Custom Maps

Community members have created many custom maps over the years. Most are incomplete, but there are quite a few which are fun to play.

Recommended Custom Maps:

hdn_cemetery
hdn_dam_b3
hdn_dispatch
hdn_manufactory_b7
hdn_mobscene
hdn_nova_b
hdn_psychiatry_b3
Hdn_Ravenholm
The first thing you need are the maps, of course. Cheesey maintains a map pack of just about every map ever made for Hidden:Source. You can download them all at once (http://files.filefront.com/Hidden+Source+Mappack+4/;11482785;/fileinfo.html) or individually (http://hosted.filefront.com/cheeseyfighter/2086100/). This forum thread (http://forum.hidden-source.com/showthread.php?t=4740) also has links to map downloads, but some are broken or outdated.

Next you will need to add the new maps to your maplist.txt and mapcycle.txt files in the /hidden folder. The maplist.txt file is a list of all the available maps on your server and the mapcycle.txt file determines a play order of these maps. Both have the same format, which looks like this:

Default mapcycle.txt:

hdn_decay
hdn_derelict
hdn_docks
hdn_discovery
hdn_executive
hdn_highrise
hdn_origin
hdn_sewers
hdn_stalkyard
hdn_traindepot
ovr_derelict
ovr_decay

Add these lines to the server.cfg:

Addons, or plugins, are typically installed into the /hidden/addons folder. These must have a corresponding .vdf file in this folder to tell your server to load them on startup. The format of this file should look like this:

Typical .vdf file:

"Plugin"
{
}The plugin_executable is the path and file name, excluding the extenstion (.dll for windows or .so for linux), to the plugin executable. Some addons come with this file, some do not. Those that do come with it will need to be edited to use the hidden folder as they usually have cstrike instead.

Eventscripts (http://www.eventscripts.com/pages/EventScriptsGuide) runs server side scripts which modify gameplay. Useful hidden scripts can be found here (http://forum.hidden-source.com/showthread.php?t=7871) and here (http://forum.hidden-source.com/showthread.php?t=7871).

Es_Tools (http://forums.mattie.info/cs/forums/viewtopic.php?t=3413) is a helper plugin for evenscripts which adds many new features not available in eventscripts alone. Some scripts for eventscripts will also require Es_Tools.

MetaMod:Source (http://www.sourcemm.net/) is another scripting addon with several useful plugins for Hidden:Source.

SourceMod (http://www.sourcemod.net/) is a more extensible scripting addon, based on MetaMod:Source.

Mani Admin Plugin (http://www.mani-admin-plugin.com/) is a server administration plugin with many features including voting, tk protection, high ping kicker, afk manager, reserve slots, and much more. It can run as a standalone plugin or under SourceMod.

HLstatsX (http://www.hlstatsx.com/) is a stats package for display in game and through a website. It requires access to a web host with MySQL, PHP, and/or Perl. It is not designed for Hidden:Source, but does have some useful features.

4.3 Weapon Scripts

You can modify the weapon scripts to alter weapons in various ways by changing the appropriate weapon_ file in the /hidden/scripts directory. This is rather advanced and not everything works as you might expect, so do this at your own risk. I recommend backing up the entire scripts directory before you begin. Here are some example changes.

Edited weapon_fn303.txt:

"clip_amount" "4"
"clip_size" "20"
This will give the Less Lethal Launcher 1 extra clip and make each clip have 20 rounds instead of 15.

Edited weapon_shotgun.txt:

"Damage" "15"
"Bullets" "8"
This will reduce the number of bullets that the shotgun shoots as well as reducing the damage per bullet.

Phaedrus
6th June 2008, 18:12
5.0 Troubleshooting

5.1 Server crash on map change

Windows servers can not currently run hdn_origin, hdn_decay or any other map that is compiled with HDR. Remove these maps from the maplist.txt and mapcycle.txt files in the /hidden folder.

5.2 Client disconnect on spawn

If your server disconnects clients during spawn with the error: "material mismatch, we reckon you're cheating!", it means that the the /hidden/materials folder on the server does not match with the clients. This usually happens when you forget to install the server fix last during the installation process, but can also indicate that the files are corrupted or missing, which may happen during a transfer. First try installing the B4b server fix (http://www.hidden-source.com/downloads/hidden-beta4b1-server.zip) (5 MB). If this does not work, reinstall the materials folder from the Beta 4b Dedicated Server package (http://www.hidden-source.com/downloads/hsb4b-full.zip) (220 MB).

5.3 Bans reset on server start up

The commands writeid and writeip store bans to the banned_user.cfg and banned_ip.cfg files respectively. These commands must be executed after issuing a banid or banip command for the ban to be saved. Furthermore, the ban lists are not automatically loaded when the server starts. You must tell the server to load these in your server.cfg or autoexec.cfg as follows.

Example server.cfg settings:

// Ban settings
exec banned_user.cfg // Load banned STEAMs
exec banned_ip.cfg // Load banned IPsAnother common mistake people make is including a writeid and/or writeip command in their server.cfg or autoexec.cfg. If this is done before the files are loaded, the file will be overwritten with nothing. There is no reason to have either of these commands in your configurations, as they only need to be executed after a new ban is added. Either remove them or make sure the lists are loaded first.

5.4 Maps repeating

Sometimes a server will get stuck playing the same map over and over. This is usually the result of a missing or misspelled map in your mapcycle.txt file. Also, linux servers are case sensitive, so make sure you check that since some custom maps have capitals (Hdn_Ravenholm, hdn_SeaMadness, Hdn_storage).

Hidden is designed for 9 players but the server supports 10 slots so servers can keep an open reserve slot. If you run your server with 10 slots, make sure you have at least 1 slot reserved to prevent the head bug or use my headbug script (http://forum.hidden-source.com/attachment.php?attachmentid=546&stc=1&d=1218646852) to fix this.

5.6 Sonic alarms don't work & round restart exploit

Phaedrus
6th June 2008, 18:29

6.1 RCON

RCON gives you remote control of your server in-game or with a third party program like HLSW (http://www.hlsw.org/). To enable RCON, add the following line to your server.cfg:
rcon_password "adminpass" // RCON (remote control) passwordFor in-game control, you must first enter the password in console with the same command (rcon_password). Once this is done, you can send console commands with the RCON command (ie. rcon changelevel hdn_docks).

6.2 RCON Commands

Here is a list of useful commands that can be sent through RCON:

_restart // Restart the server
banid < minutes > < userid | uniqueid > { kick } // Ban user by id .Use 0 minutes for permanent
banip < minutes > < ipaddress > // Ban user by IP address. Use 0 minutes for permanent
changelevel < map > // Change server to the specified map
exec < file > // Execute a script (ie. server.cfg or autoexec.cfg)
kick < name | userid | uniqueid > // Kick a user from the server
kill < name | userid | uniqueid > // Kill user
listid // List banned users
listip // List banned IP addresses
maps < substring > // List maps
removeid < uniqueid > // Remove user from ban list
restart // Restart the game on the same level
say < message > // Send console message
stats // Prints server performance variables
status // Display map and connection status
sv_cheats < 0 | 1 > // Allow cheats on server
sv_gravity < number > // World gravity
users // Show user info for users on server
writeid // Writes a list of permanently-banned user IDs to banned_user.cfg
writeip // Save the ban list to banned_ip.cfg
6.3 Ban Lists

Old Timers (http://forum.hidden-source.com/attachment.php?attachmentid=543&stc=1&d=1217616852) - The Old Timers servers had excellent ban management when they were around. Their ban system can still be found here (http://forums.oldtimersclan.com/ot_tkbanlog.php).
Hidden-Stats (http://forum.hidden-source.com/attachment.php?attachmentid=547&d=1218740704) - The new hidden stats system can generate (http://stats.hidden-source.com/tk.php?n=500) a ban list of stat-proven team killers.

6.4 External Programs

HLSW (http://www.hlsw.org/) is a standalone program for remote server control. It provides RCON access, logging, and more.
XQF (http://www.linuxgames.com/xqf/index.shtml) is another server control program like HLSW, but for Linux.
ServerChecker (http://www.dumbclan.co.uk/downloads/serverchecker/) is a server control program. It launches your servers and restarts them automatically when they crash.
ServerDoc (http://www.serverdoc.com/) is another server control program which also features website server administration.

Mani Admin Plugin (http://www.mani-admin-plugin.com/) is a powerful plugin with many useful features for Hidden:Source. You can find a complete list of commands here (http://www.mani-admin-plugin.com/mani_admin_plugin/documentation/index.php). To set up admins, you need to create a clients.txt file in the \hidden\cfg\mani_admin_plugin folder. You can find documentation on this file here (http://www.mani-admin-plugin.com/index.php?option=com_content&task=view&id=24&Itemid=25) or use this tool (http://www.wildfireclan.co.uk/?act=maniclients) to create one for you.

Example clients.txt:

"clients.txt"
{
"version" "1"

// This key group lists all your client players
"players"
{
// This must be a unique client name
"Phaedrus"
{
// Client real name
"name" "Phaedrus"
// Steam ID for client
"steam" "STEAM_0:1:5194101"
"groups"
{
}
}
}

// These are global groups of flags that can be assigned to clients
"groups"
{
"Immunity"
{
"Server Admin" "a b c d e f g h i k l m n o p q r s t u v w x y afk autojoin"
}
{
"Server Admin" "A C F I Q V a b c e i k l m o s t v admin"
}
}
}

A // Accept Vote
C // Cancel Vote
E // Ma Rates
F // Burn
G // No Clip Mode
H // War
I // Mute
J // Reset All Ranks
K // Cash
L // RCON Say
N // Set Skins
O // Drop C4
P // Set Client Flags
Q // Console Question Vote
R // RCon Vote
S // Set Skin Colour
T // Time Bomb
U // Fire Bomb
V // Map Vote
W // Freeze Bomb
X // Health
Y // Beacon
Z // Give Item
a // Private Say
b // Non permanent Ban
c // Map Change
client // Create Clients and Accesses
d // Drug
e // Explode
f // Freeze
g // Swap Player
grav // Per Player Gravity
i // Blind
j // Gimp
k // Kick
l // Slap
m // Slay
p // Sound
pban // Permanent Ban
q // RCon Menu Level 1
q2 // RCon Menu Level 2
q3 // RCon Menu Level 3
r // RCon
spray // Spray Tag Tracking
t // Teleport
v // Random Map Vote
w // Restrict Weapons
x // CExec
z // Config

Phaedrus
12th June 2008, 07:34
From Gentoo Linux Wiki (http://gentoo-wiki.com/TIP_Using_screen#Scrolling_back_in_Screen):

Scrolling back in Screen

To enter the scrollback mode press C-a <Esc>. When you do this, a notice briefly appears in the terminal's status-bar, which says "Copy mode...". Now, you can scroll up and down in the current terminal using the <PageUp>/<PageDown> keys or the C-u and C-d commands.

The capital C is for CTRL. Hit ESC or CTRL-c to exit when finished.

Paegus
12th December 2008, 19:57
When i checked 27015
it said:
Reason: Connection timed out

I dont know why! I DID open the ports!

if you did open the port then there are 4 possible issues still facing you... in order of most to least likely...

1) DHCP. i've mentioned this before. you should set the server computer's IP MANUALLY to something outside the router's DHCP range. Some routers are nice and don't mind. My router is super cool and let me assign ports by MAC address. but yours is likely a smoking pile of poo that thinks "why am i assigning a port to an address that can change at any moment?"

2) your computer's firewall is not allowing communications on that port.

3) dual-routers. also mentioned i'm sure. If you have a Cable/DSL modem and a separate purely ethernet based router then there's a good chance that your modem is in fact also a router and you'll need to configure that as well. Probably easiest to put the internal router's IP in the Cable/DSL Modem/Router's DMZ though you can just as easily just forward the port accordingly. and again, DHCP rules above apply. Manually assign the dedicated router's modem-side IP to something appropriate though not the same as the LAN-side range. If you LAN network is 10.0.0.X then set the router<->modem's address to 192.168.0.X or something that fits the Modem's setup.

4) as phaed mentioned, your ISP is blocking those ports. you should be able to check the website's support section so see a list. or you can contact them directly and ask.

there is no such thing as "some kind of error". they are always details or screenshots etc...

Paegus
24th August 2011, 12:44
Updated the server update command lines to reflect the new Source engines. As of Beta 4 you need to use the Episode1 engine as using the OrangeBox engine will cause the server to crash.

the command lines should be for Linux:

\$ /path/to/steam -command update -game episode1 -dir /path/to/server

and for Windows:

...\path\to\hldsupdate.exe -command update -game episode1 -dir ...\path\to\server

Paegus
12th October 2012, 13:10
7.0 Server Security

7.1 Pure Servers:

Pure Server (https://developer.valvesoftware.com/wiki/Pure_Servers): The source multiplayer engine comes with a built in method for enforcing file consistency. This will automatically kick any players whose files do not match those on the server.

It does need to be used with some care though as sometimes players do modify perfectly acceptable files like weapon sounds etc.

Also, by default it does not ban players for violating files consistency, it just kicks them. I've made a SourceMod plugin to enable server-side logging of failed consistency checks which you can download from here (http://forums.alliedmods.net/showthread.php?t=81647)

There is a basic version of the .../hidden/pure_server_whitelist.txt (http://forum.hidden-source.com/attachment.php?attachmentid=457&d=1182682696) file that will enforce a reasonable level of consistency on all hidden source servers. I'll update it as and when I can to maximise cover while minimizing overhead.

I recommend using the following setting for the server:
autoexec.cfg:

sv_pure 1
sv_pure_kick_clients 1
sv_pure_trace 1

7.2 SourceMod Anti-Cheat:

The direct successor to Kigen's Anti-Cheat Module is the SourceMod Anti-Cheat (http://forums.alliedmods.net/forumdisplay.php?f=133) system. It is module based and can interact directly with things like SourceBans.

I recommend using the 'required' and 'recommended' plugins only as the others don't work or aren't applicable.

Installation is simple enough if you have a working install of Metamod:Source and SourceMod:

Place the various .smx files in the .../hidden/addons/sourcemod/plugins folder.