call-of-duty-2-logo.jpg

Note: Look here for the original Call of Duty HOWTO guide.

Call of Duty 2 is a first-person shooter game. The dedicated server component can be run as a Windows Service using FireDaemon Pro, which lets you start the application automatically at boot prior to login, start multiple instances of the application and more. This HOWTO will show you how to set it up. You can also use Fusion to manage FireDaemon and other Windows services via a web browser.


Call of Duty 2 Dedicated Server Setup Under FireDaemon Pro

Before getting started, ensure that Explorer (not IE ... but the Windows File Explorer) has the option "Hide extensions for known file types" switched off. To do this go to Tools -> Folder Options -> View and then uncheck "Hide extensions for known file types". This will allow you to see all the extensions on your files in the Call of Duty directories and not accidentally name them things like dedicated.cfg.txt.


Install Call of Duty 2 into the directory of your choice. For the purposes of this HOWTO we will use C:\Program Files\Activision\Call of Duty 2 as the installation directory.


Create a player profile. This is mandatory. Your dedicated server will not run if you do not complete this step. The creation of player profiles is documented in C:\Program Files\Activision\Call of Duty 2\Docs\TechHelp\Readme\readme.txt as well as C:\Program Files\Activision\Call of Duty 2\Docs\readme_patch_13_enu.txt. In summary:

  • Create the folder: C:\Program Files\Activision\Call of Duty 2\main\players
  • Create the folder: C:\Program Files\Activision\Call of Duty 2\main\players\DummyProfile
  • Create an empty text file: C:\Program Files\Activision\Call of Duty 2\main\players\active.txt with the first the profile name in the first line (ie. DummyProfile)
  • Create an empty text file: C:\Program Files\Activision\Call of Duty 2\main\players\DummyProfile\config_mp.cfg

Here is a batch file to do this for you:

@echo off

REM Change PATH, Directory and Profile name as necessary
REM This batch script can be launched as a FireDaemon Pre-Service
REM in order to pre-setup the players directory each time
REM the dedicated server is restarted

set COD2_DRIVE=C:
set COD2_HOME=%COD2_DRIVE%\Program Files\Activision\Call of Duty 2
set COD2_PROFILE=DummyProfile

REM Delete the _ENTIRE_ players directory
rmdir /s /q "%COD2_HOME%\main\players"

REM Create the profile directory
mkdir "%COD2_HOME%\main\players\%COD2_PROFILE%"

REM Create active.txt containing the profile name
echo %COD2_PROFILE% > "%COD2_HOME%\main\players\active.txt"

REM Create an empty config_mp.cfg file in the profile directory
copy /y nul "%COD2_HOME%\main\players\%COD2_PROFILE%\config_mp.cfg"

REM Delete that pesky __CoD2MP_s file
del /q "%COD2_HOME%\main\__CoD2MP_s"

Create a dedicated server configuration file (e.g. dedicated.cfg). This file needs to be placed in the Main directory, i.e. C:\Program Files\Activision\Call of Duty 2\main. This file should optimally contain at least one map cycle definition. A map cycle is defined by one variable which stores a list of maps and game types. Pay close attention to the quotation marks and make sure your map cycle is inside them. Here is an example dedicated server map cycle configuration:

seta sv_gamespy "1"
seta sv_master1 "cod2master.activision.com"
seta sv_master2 "master0.gamespy.com"
seta sv_master3 "master1.gamespy.com"
seta sv_master4 "cod2authorize.activision.com"
seta sv_master5 "cod2master.infinityward.com"
seta sv_master6 ""
set sv_hostname MyServerName
set sv_mapRotation "gametype sd map mp_brecourt gametype sd map mp_burgundy gametype sd map mp_trainstation gametype sd map mp_carentan gametype sd map mp_decoy gametype sd map mp_leningrad gametype sd map mp_matmata gametype sd map mp_downtown gametype sd map mp_dawnville"

Note that the sv_mapRotation cannot be run over multiple lines as you could do with the original Call of Duty.


Download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.


Next start the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation. Note the required parameters.


The Parameters list defines how the dedicated server is to start. There are multitudes of other parameters, but the basic three you need to get your dedicated server going are:

+set dedicated
Valid values are 0, 1 or 2. 0 = Normal Multiplayer, 1 = Private Dedicated Server (LAN), 2 = Public Dedicated Server (Internet)

+exec
Name of your map cycle configuration file to execute that is located in your "main" folder.

+map_rotate
This kicks off the map cycle.

Two additional options that you might require if you wish to bind your CoD2 DS to a specific IP and port are:

+set net_ip
Add +set net_ip <a.b.c.d> to the parameters list. Where <a.b.c.d> is the required IP address. The angle brackets should be removed.

+set net_port
Add +set net_port <n> to the parameters list. Where <n> is the port you wish to have the server bind to (eg. 28960). The angle brackets should be removed.

To enable PunkBuster:

+set sv_punkbuster
Add +set sv_punkbuster <n> to the parameters list. Where <n> is 0 or 1. 0 means PunkBuster is disabled. 1 means PunkBuster is enabled. The angle brackets should be removed.

More information on dedicated server dvars for CoD2 can be found here.


If you want to observe your dedicated server running, click on the FireDaemon settings tab, and check Interact with Desktop. If you want to change the priority of the server or bind it a specific CPU (e.g. on multi-processor or multi-core machines), ensure that you set the Job Type to Global if you do.

Firedaemon-nojob-interact-settings.jpg


Some users report that the file __CoD2MP_s is left behind on reboot. This stops the CoD2 DS from starting. To resolve this, go to the Pre/Post-Service tab and click the Insert button on the Pre-Service Programs section. Fill in the Pre Service values as follows, adjusting paths to suit your installation, then click OK. Alternately you could run the batch file listed earlier in this post, changing the parameters to read: /c <d:\path\to\batch\file\batchfile.cmd>. Change the path and file name to suit your installation and remove the angle brackets. Note that there is a space between /q and __CoD2MP_s.


Now click the OK button to finish setup and start Call of Duty 2!

Configuration Notes

Below is a faily complete CoD2 configuration leeched from Hitmouse @ OC LAN.

Command line configuration:

"C:\Program Files\Activision\Call of Duty 2\CoD2MP_s.exe" +set net_ip 00.00.00.00 +set net_port 28960 +set fs_game main +set dedicated 2 +exec oclan2.cfg +map_rotate

Configuration:

//*************************************************************************
// Call of Duty 2 - Server Config
// Server Configuration File Call of Duty 2 Multiplayer
// Updated : 27 October 2005 by Hitmouse
//*************************************************************************
//Color Codes
//*************************************************************************
// These are the codes used to make your text colored...
// "^1OC_^3PlayerName"  <-- like that
//
// ^1 = Red*
// ^2 = Green*
// ^3 = Yellow*
// ^4 = Blue*
// ^5 = Cyan*
// ^6 = pink/Magenta*
// ^7 = White*
// ^0 = Black*
//*************************************************************************
//Public Information
//*************************************************************************
set sv_hostname "OCLAN Rape & Pillage"

// Color codes used ing the Welcome line below
set scr_motd "^2Welcome to the ^1OCLAN CoD2 Server ^2Visit us at: ^1[URL]http://www.oclanparties.com/[/URL]"

sets_Admin "Hitmouse"
sets_Email "Hitmouse@gmail.com"
sets_Irc ""
sets_Website "www.oclanparties.com"
sets_Location "CA, USA"
// set net_ip "64.66.44.50" I have to put this in the command line to make it work
// set net_port "28964"  I have to put this in the command line to make it work

// The following is a list of server 'I think that half of them don't matter
set sv_master1 "cod2master.activision.com"
set sv_master2 "master.gamespy.com:28960"
set sv_master3 "master0.gamespy.com"
set sv_master4 "clanservers.net"
set sv_master5 "cod2authorize.activision.com"
set sv_master6 "codmaster.activision.com"
set sv_master7 "coduomaster.activision.com"
set sv_master8 "master0.gamespy.com"
set sv_master9 "master1.gamespy.com"
set sv_master10 "master.gamespy.com:28960"
set sv_master11 "coduoauthorize.activision.com"
set sv_master12 "master0.gamespy.com"
set sv_master13 "clanservers.net"
set sv_master14 "codmaster.infinityward.com"
set sv_master15 "codauthorize.activision.com"
set sv_gamespy "1"

// Server password
set g_password ""

// Rconpassword
set rcon_password "password"

// Maximum Clients
set sv_maxclients "40"
set sv_privateclients "0"
set g_gametype "tdm"

// Max Ping
set sv_maxping "200"

// Team Icons
set scr_drawfriend "1"
// Forced Respawn
set scr_forcerespawn "1"

// Rate
set sv_maxRate "25000"

//Map/Team/Player Settings
set g_deadChat "1"
set scr_drawfriend "1"
set scr_forcerespawn "1"
set scr_friendlyfire "2"
set scr_freelook "1"
set scr_spectateenemy "0"
set g_forceteamspectate "1"
set scr_teambalance "0"
set sv_invulnerabletime "5"
set g_teamswitchdelay "25"

// Killcam
set scr_roundcam "0"
set scr_killcam "0"

// Temporary Ban duration, in hours? minutes?
set sv_kickBanTime "24"

// Drop inactive players
set sv_timeout "120"
set sv_zombietime "1"
set g_inactivity "0"
set g_inactivityspectator "0"

// Anti lag settings
set g_antilag "1"

// Anti Cheat Settings
set sv_disableClientConsole "1"
set cl_autocmd "0"
set sv_floodProtect "1"
set sv_cheats "0"
set sv_pure "1"
set g_banIPs ""
set g_no_script_spam "1"

//RD Msg Center Text Settings
seta sv_linerd1 ""^2Welcome to the ^1OCLAN CoD2 Server ^2Visit us at: ^1[URL]http://www.oclanparties.com/[/URL]"
seta sv_linerd2 "^2Sponsored by: Hitmouse.com"
seta sv_linerd3 "^3^1 IMPORTANT ^7Please close all P2P Clients. Stops Lag! Thank you.^7"
seta sv_linerd4 "^1 Join our website at [URL]http://www.oclanparties.com[/URL]"
seta sv_linerd5 "^3Turn allowdownloads ^5ON ^3for extra features & ^1OFF ^7when done."
seta sv_linerd6 "^3 Don't Cheat! ^1This Server is protected by Admins!^7"
seta sv_linerd7 "^3DON'T SQUAWK WHEN YOU GET KILLED! ^7You can always run your own SERVER!"
seta sv_linerd8 "^5Don't ask support questions here. ^1Use OCLANParties forum."
seta sv_rddelay "45"  // Time between msg's, must be >5 secs

// Allow Voting
// It is recommended if you have friendly fire on
// that you also enable voting so that players can kick team-killers.
set scr_allow_vote "1"
set g_allowvote "0"
set ui_allowvote "0"
set g_oldVoting "0"
set logfile "2"
set g_log "games_mp.log"
set g_logsync "0"
set sv_log_damage "0"

// Ingame Voice Chat
set sv_voice "0"
set sv_voiceQuality "1"
set voice_deadChat "0"
set voice_global "0"
set voice_localEcho "0"
set winvoice_mic_mute "1"

// Weapon Ammo Pools
set g_weaponAmmoPools "0"

//Snipers
set scr_allow_enfieldsniper "1"
set scr_allow_kar98ksniper "1"
set scr_allow_nagantsniper "1"
set scr_allow_springfield "1"
set scr_allow_svt40 "1"

// Rifles
set scr_allow_enfield "1"
set scr_allow_kar98k "1"
set scr_allow_m1carbine "1"
set scr_allow_m1garand "1"
set scr_allow_nagant "1"
set scr_allow_g43 "1"

// MGs
set scr_allow_bar "1"
set scr_allow_bren "1"
set scr_allow_mp44 "1"
set scr_allow_ppsh "1"

//SMGs
set scr_allow_sten "1"
set scr_allow_mp40 "1"
set scr_allow_thompson "1"
set scr_allow_pps42 "1"
set scr_allow_greasegun "1"

// Shotgun
set scr_allow_shotgun "1"

// Grenades
set scr_allow_smokegrenades "1"
set scr_allow_fraggrenades "1"

// Gametype Settings
set scr_dm_scorelimit "50"
set scr_dm_timelimit "30"

set scr_tdm_scorelimit "300"
set scr_tdm_timelimit "30"

set scr_ctf_scorelimit "5"
set scr_ctf_timelimit "30"

set scr_hq_scorelimit "600"
set scr_hq_timelimit "30"

set scr_sd_bombtimer "60"
set scr_sd_graceperiod "15"
set scr_sd_roundlength "4"
set scr_sd_roundlimit "0"
set scr_sd_scorelimit "10"
set scr_sd_timelimit "0"

// Autodownload
set sv_allowDownload "1"
set sv_allowedClan1 ""
set sv_allowedClan2 ""

// File-Check
set sv_iwdNames "iw_14 iw_13 iw_12 iw_11 iw_10 iw_09 iw_08 iw_07 iw_06 iw_05 iw_04 iw_03 iw_02 iw_01 iw_00"
set sv_iwds "-1449716526 780394069 -1333623355 -1980843666 1334775335 -621896007 1101180720 1046874969 1053665859 1842349204 -1652414412 1659111092 -1085686032 -2025394354 178615151 "

set sv_referencedIwdNames "main/iw_13 main/iw_08 main/iw_07 main/iw_06 main/iw_03"
set sv_referencedIwds "780394069 1101180720 1046874969 1053665859 1659111092 "

//Map_Rotation
set sv_mapRotationCurrent ""
set sv_mapRotation "gametype tdm map mp_breakout gametype tdm map mp_brecourt gametype tdm map mp_burgundy gametype tdm map mp_carentan gametype tdm map mp_dawnville gametype tdm map mp_decoy gametype tdm map mp_downtown gametype tdm map mp_farmhouse gametype tdm map mp_leningrad gametype tdm map mp_matmata gametype tdm map mp_railyard gametype tdm map mp_toujane gametype tdm map mp_trainstation"


Download 30-Day Trial