So you want to host a Modular Combat server? Follow these steps and you’ll be up and running in no time! In order to make this HOWTO understandable for all users, I noobified it.
Note 1: At this time there is no Linux server version of Modular Combat, so you will need to host the server in Windows or use Wine/Mono in Linux.
Note 2: Modular Combat requires "Half-Life 2: Episode 2 files", if you do not own it, then your server will be extremely buggy (some monsters won't even move or attack). Step 12 describes what you need to do with the Episode 2 files.
1) Download the HLDSUpdateTool from valve’s servers here
2) Open up the tool you just downloaded;
Press “Next”, then “I Agree” and enter the path where you want to install the files. For the sake of simplicity, I’ll use “C:\Modular Combat Server”, but you can use anything you want. Click “Next” again and then choose then choose the region that's closest to where your server is located.
Click Next, uncheck "View ReadMe" and click "Finish".
3) Navigate to the folder “C:\Modular Combat Server”.
4) Right click "HldsUpdateTool" and select "Copy" near the middle of the context menu. Then right click any white area in the folder window and select "Paste" (also near middle) to create a shortcut to HldsUpdateTool.
5) Right click this new shortcut and select "Properties" at the very bottom of the context menu. In the "Target" box copy and paste the following to the end of the line (including a space between the last double quote and the hyphen)
-command update -game orangebox -dir .
6) Now double click this edited shortcut to start the SRCDS installation process. The window will display for a few minutes to update your HLDSUpdateTool and then it will close. Just start it up again to start downloading the core files. Depending on your internet speed and how busy Valve's content servers are, this can take anywhere from a few minutes to a few hours so go take a break from the computer or play a single player game as downloading other things while the update is running will just slow it down.
Note: Valve updates the Orangebox server files from time to time and the Windows version of SRCDS cannot automatically update. So you should run this update shortcut occasionally (first stop the server) or if you notice you or your player's unable to connect to the server.
7) Download the latest full version Modular Combat files from here. Sometimes the full version does not include patches or hotfixes so grab those too.
8) If you downloaded the full version, then extract/install to "C:\Modular Combat Server\orangebox". If you are installing a patch or hotfix, then extract to "C:\Modular Combat Server\orangebox\modularcombat".
9) Navigate to "C:\Modular Combat Server\orangebox\" and create a shortcut to srcds in the same folder (newbies see step 4 on how to create shortcuts).
10) Go into the properties of this shortcut (newbies see step 5 on how to go to properties) and enter the following to the end of the "Target" box:
-console -game "modularcombat" -secure -ip 188.8.131.52 +port 27015 +maxplayers 16 +exec server.cfg
-console - This is required for the server to run. Never remove it.
-game "modularcombat" - This tells SRCDS to load Modular Combat.
-secure - This tells SRCDS to enable VAC (Valve Anti Cheat). Change it to -insecure if you dont want VAC to run.
-ip 184.108.40.206 - This tells the server to listen on a specific IP (change 220.127.116.11 to any IP). It's mainly useful if you have access to multiple IPs (not router IPs) from your ISP or server host. If you're running this server from home, then remove this parameter completely as the server will not start (see Addedum at bottom for more info).
+port 27015 - This tells SRCDS to listen on port 27015. Generally most servers run on ports 27015 to 27019. Don't change it to anything outside of this range or else some players may not be able to connect to your server.
-maxplayers 16 - This tells SRCDS to run with 16 slots. Modular Combat is limited to 16 slots (engine limitations) so even if you put more than 16 slots, the mod will never allow more than 16 players.
+exec server.cfg - This tells SRCDS to execute server.cfg upon server startup.
11) The server is nearly ready to be started. Don't start it yet though! You still have a few more steps to go.
12) Navigate to the directory where you installed Steam (eg. C:\Program Files\Steam\SteamApps). Copy "episode two content.gcf" and "half-life 2 content.gcf" to the "C:\Modular Combat Server\orangebox" Directory.
13) Download this tool and install it. You will first have to run GCFScape to configure it to open GCF files. In GCFScape, go to the Options Menu -> Associations and click "Associate with GCF Files". Then exit GCFScape.
14) Now go to your "C:\Modular Combat Server\orangebox" directory and open each of the GCF files (one at a time). With the mouse, select all the directories in the right pane, then right click the mouse and select "Extract". A "Browse for folder" window will pop up and you need to choose "C:\Modular Combat Server\orangebox" as the directory to extract to. You will need to do this extract procedure for both GCF files. Also, from time-to-time Valve will update Half-Life 2 and Half-Life 2: Episode 2, so you will need to repeat this copy GCF file/extract GCF file process again (first stop the server).
15) Download this file and extract its contents to your "C:\Modular Combat Server\orangebox\modularcombat\cfg" directory. It contains the text files: autoexec.cfg, banned.cfg, banned_ip.cfg, banned_user.cfg and server.cfg.
15A) First open up "autoexec.cfg" and edit the third line "map dm_datacore". Change "dm_datacore" to whatever map you want the server to load when it first starts up. If you do not choose a map, then your Modular Combat server will not start up properly.
15B) Now open up server.cfg file. Most of the contents of this file are configured for security so the only things you really need to edit are the Hostname and RCON password (at the top of file). I included in this file tons of comments about what the various sections do. In the Modular Combat section near the bottom of the file, I included the most common CVARs that you might want to edit. If you want to change more of the mod, see here for other CVARs.
16) If you further want to customize the server, you can change the Respawn Requency, Experience Scale, Health and Damage of every single monster. Look in "C:\Modular Combat Server\orangebox\modularcombat\pvm" and you'll see text files for all the monsters. Just find the monster you want to edit and open its corresponding file.
17) Now you can start the server! Just go back to "C:\Modular Combat Server\orangebox" and double click your SRCDS shortcut.
This part is for problems you may encounter while trying to host a Modular Combat server.
If you're able to connect to your server but no one else (on the internet) can, then its a ports issue. Ignore what other sites say about what ports you need to open. Through a long process of trial and error i found the following list to be the absolute bare minimum for your server to work without comprimising security.
TCP: 27015 (Change this to whatever port you specified +port parameter in Step 10)
UDP: 26901, 27014 to 27017, 27030 to 27039
How you open ports entirely depends on what Firewall and/or Router you have. You can find out how to open ports by reading the manual that came with your Firewall/Router or by going to Portforward.com Again ignore what this site says about what ports you should open for SRCDS. Use the list above instead.
Opening ports can also be dangerous. Someone i know learned this the hard way in when a server he was hosting from home got hacked. The previous day he banned a cheater and the next day was attacked. The attacker corrupted the bios of his router, and then proceeded to format the server box and gaming computer while he was at it trying to scan for viruses.
If you get the error message "Server uses different class tables" when trying to connect to your server. Then either the Modular Combat files on the server are out of date or an Orangebox update came out and you need to run the HLDSUpdateTool. Always stop your server before installing Modular Combat updates or running the HLDSUpdateTool.
If you plan on hosting the server on the same computer you use to play other games, then you're in for some bad news. When you do anything on the server computer that uses lots of CPU, your Modular Combat server will lag heavily. So either put the Modular Combat server on an extra computer or turn off the server when you plan on playing games (players will simply avoid your server if its too laggy).
Servers tend to eat bandwidth like its candy and most ISPs won't allow you to host a server from home. So either don't tell them and hope you dont get caught (they can cancel your internet) or rent a server at a hosting company, the latter costs more (around $16 per month) but saves you headaches as you dont have to open ports, worry about going over your monthly bandwidth limits and they automatically restart a crashed server (and you get a web cp to start/stop/restart). If you do plan on hosting from home, make sure you have at least 50KBs of upload bandwidth. With some tweaking to the rates on your server, you can comfortably host a server even with 50KBs of upload. See this site for a calculator that will help you to set your rates.
Crashes are the single most annoying thing that will happen. When they do, they typically take down your server and if you arent around, it will stay down until you restart it. There are products online that can automatically restart your server if/when it crashes but these cost around $30 (FireDaemon Pro is once such example).
These are just the basic tips to help you on your way, there's a lot more out there so look around on a site such as Forums.srcds.com.
ADDENDUM 2 (Evil Police)
It is possible to have your server automatically restart in the event of a crash via a batch script.
Create a new .bat file in the same folder as srcds.exe, and paste the following code in it.
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
echo (ti;me%) srcds started.
start /wait srcds.exe -console -game "modularcombat" -secure -ip 18.104.22.168 +port 27015 +maxplayers 16 +exec server.cfg +maxplayers 16
echo (ti;me%) WARNING: srcds closed or crashed, restarting.
Save it, and run your server by opening this script. Credits to srcds.com authors for this script.