Advanced server extras
This section will go over some more advanced topics on running your server. Do not try anything here that you do not understand!
Other than configuration profiling, all guides here are implementations outside of our game and are provided only as advice. Therefore, we cannot provide any official support for them. Any help you require should be posted in our server support forum
, where you may receive assistance from our community
Contents
- Administrative plug-ins
- Multiple servers on a single Sven Co-op install
- HTTP downloads for your Sven Co-op server content
Administrative plug-ins
Coming soon...
Multiple servers on a single Sven Co-op install
In short, HLDS configuration profiling is where you run multiple game servers with different configurations on top of a single set of game files.
You must first ask yourself, is profiling for you? Take a look at the pros and cons of configuration profiling. If any of the disadvantages will effect you, then profiling is not for you.
Advantages | Disadvantages |
---|---|
|
|
Configuration profiling is intended for people who want to run multiple game servers of the same mod on a single computer (maybe a large server with many processors) without the hassle of multiple software installations. This is very common on game service providers or large clans/guilds.
Fortunately, configuration profiling for HLDS is very simple and pretty well implemented -- for 1998. First, navigate to the svencoop folder on your HLDS installation. Create a folder in here called profiles. In here you will be creating a sub-folder for each profile you want to have. There is no limit to how many profiles you can have.
Example folder structure:
![Example HLDS profiling folder structure Example HLDS profiling folder structure](images/hlds-profiling-folder-structure.png)
You can actually organise your configurations however you like, this is just what I recommend to keep it all neat.
Each profile folder will then have it's own set of configuration files inside. You don't have to use all of them, but a unique servercfgfile is pretty much essential. A logs folder will also be needed if you ever intend on using the log files again.
Next, all you have to do is sort out your command line parameters to use the profiles you've created. This is very easy to do when running HLDS as services either manually created or through FireDaemon or ServerDoc. Otherwise, make a new file "Run Profilename.cmd" and put the command in here instead. Examples:
- hlds.exe -console -game svencoop -port 27015 -noipx -num_edicts 4096 +maxplayers 16 +log on +servercfgfile "profiles/classic-cycle/server.cfg" +logsdir "profiles/classic-cycle/logs"
- hlds.exe -console -game svencoop -port 27025 -noipx -num_edicts 4096 +maxplayers 16 +log on +servercfgfile "profiles/custom-cycle/server.cfg" +logsdir "profiles/custom-cycle/logs"
- hlds.exe -console -game svencoop -port 27035 -noipx -num_edicts 4096 +maxplayers 16 +log on +servercfgfile "profiles/fun-cycle/server.cfg" +logsdir "profiles/fun-cycle/logs"
- hlds.exe -console -game svencoop -port 27045 -noipx -num_edicts 4096 +maxplayers 4 +log on +servercfgfile "profiles/testing/server.cfg" +logsdir "profiles/testing/logs"
You can also profile other common files such as Metamod's plug-in list (plugins.ini) and AMX mod X's configuration (core.ini). This can be done by adding the following parameters:
- +localinfo mm_pluginsfile "profiles/yourprofile/metamod-plugins.ini"
- +localinfo amxx_cfg "profiles/yourprofile/amxx-core.ini"
You can then point your AMXX configuration files in the amxx-core.ini to files that sit within your profile folder.
Hopefully you can now understand how configuration profiling an installation of HLDS can really help, and how easy it is to set up.
HTTP downloads for your Sven Co-op server content
If you have a server with a very fast Internet connection or on a local area network, then providing fast downloads through HTTP is a must have. A common solution people take is uploading all their custom content to a web host or another location on the same computer. However, like the configuration profiling advice above, this wastes disk space by duplicating content.
Here I will show you how to set up an Apache web server that serves the same set of files from your single Sven Co-op installation, without leaking your configuration files and logs (which include passwords). The configuration I provide will also allow you to run a regular website off the same Apache instance.
First visit the Apache Software Foundation, download Apache HTTP Server (I'm working with version 2.2.15 for this guide), and install it.
Navigate to your Apache configuration folder (usually at C:\Program Files\Apache Software Foundation\Apache2.2\conf), and open httpd.conf in a text editor.
Here is a similar (but censored/stripped) copy of my configuration. You will need to replace values that are surrounded with curley brackets { } to relate to your server. Obviously ensure you remove the brackets.
Once you've done that, create a new file called httpd-websites.conf in the conf folder. This is where you will define each website that your Apache will host, including Sven Co-op content. The following example includes a regular website and a file pool for any game on your HLDS.
The key things to note about this example configuration is:
- Each site must operate off a different sub-domain (i.e. www.some.host and hlds.some.host), or you could change to address-based virtual hosts where each site is defined by a different IP address and/or port
- Like configuration profiles, you still only need Sven Co-op (or any HLDS game) installed once to save time and disk space
- Only files within sub-folders gfx, maps, models, recommended_sounds, sound, sounds, and sprites inside game folders will be permitted
- WAD files are also permitted within mod folders
- Your configuration files (profiled or not) and logs will be denied
You will need to restart the Apache HTTPD service for configuration changes to take effect. Finally, set your sv_downloadurl to your HLDS website with the mod folder (i.e. http://hlds.computername/svencoop/ for sub-domain based or http://192.168.0.1:8000/svencoop/ for address/port based) -- the trailing forward slash / is important.
If you do not have a domain name and do not wish to use your IP address in your sv_downloadurl (perhaps because it's dynamic), you can get a dynamic hostname for free from many dynamic DNS providers that can be mapped to your server for both the game server and web server