PC server admin guide for Call of Duty 4: Modern Warfare

Qualsiasi cosa inseritela qui
Rispondi
Avatar utente
Matteo
Admin
Admin
Messaggi: 46
Iscritto il: venerdì 5 novembre 2021, 11:10

PC server admin guide for Call of Duty 4: Modern Warfare

***IN PROGRESS***

I will be adding to this in the coming days, but to get you guys started, here's the basics. If you have questions or would like something in particular, please speak up and I'll see what I can do.

Sample Server Configuration can be found: Here

Required Ports
-----
UDP 20800
UDP 20810
UDP 28960

Hardware + Bandwidth Requirements
---------------------------------

Bandwidth and server resource usage should be lower than that of COD2 in most situations, but it is not guaranteed. There are some situations where bandwidth usage may spike, and the server will get hit harder than usual. Generally, if you're capable of hosting a COD2 dedicated server you should be just fine for COD4.


starting a dedicated server
----------------------------
LAN server
] iw3mp.exe +set dedicated 1

Internet server
] iw3mp.exe +set dedicated 2

Modded server
] iw3mp.exe +set dedicated [1,2] +set fs_game "mods/<modname>"

start map
] map <mapname>

example usage:
] iw3mp.exe +set dedicated 2 +exec my_server.cfg +map mp_crash

my_server.cfg contains customized settings which are detailed below.
syntax: set <dvar> <value>


server commands
---------------
] killserver
] quit
] map_restart
] say "my message"
] tell [clientnum] "my message to you"

server settings
--------------
map rotation
] sv_mapRotation gametype <gametype> map <mapname> gametype <gametype> map <mapname> ...

<gametype> is one of:
"dm" - free for all deathmatch
"dom" - domination
"koth" - headquarters
"sab" - sabotage
"sd" - search & destroy
"war" - team deathmatch

] sv_hostname "my server"
] g_gametype <gametype>
] sv_maxclients [1-32]
] g_password "my password"
] sv_voice [0-1]
] scr_teambalance [0-1]
] g_allowvote [0-1]
] sv_punkbuster [0-1]
] sv_minping [0-n] (milliseconds)
] sv_maxping [0-n] (milliseconds)
] sv_connectTimeout [0-n] (seconds)
] sv_timeout [0-n] (seconds)


gameplay options
----------------
] scr_oldschool [0-1]
] scr_hardcore [0-1]
] scr_game_spectatetype [0-2] (Disabled, Team/Players Only, Free)
] scr_game_allowkillcam [0-1]
] scr_team_fftype [0-3] (Disabled, Enabled, Reflect, Shared)

] scr_game_perks [0-1]
] scr_game_onlyheadshots [0-1]
] scr_game_forceuav [0-1]
] scr_game_hardpoints [0-1] (i.e. artillery, uav, helicopter)
] scr_hardpoint_allowartillery [0-1]
] scr_hardpoint_allowuav [0-1]
] scr_hardpoint_allowhelicopter [0-1]


free for all deatmatch
-----------------------
] scr_dm_scorelimit [0-n]
] scr_dm_timelimit [0-n] (minutes)


domination
-----------
] scr_dom_scorelimit [0-n]
] scr_dom_timelimit [0-n] (minutes)


team deathmatch
-----------------
] scr_war_scorelimit [0-n]
] scr_war_timelimit [0-n] (minutes)


sabotage
---------
] scr_sab_scorelimit [1-n] (points)
] scr_sab_timelimit [0-n] (minutes)
] scr_sab_roundswitch [0-n] (after how many rounds)
] scr_sab_bombtimer [0-n] (seconds)
] scr_sab_planttime [0-n] (seconds)
] scr_sab_defusetime [0-n] (seconds)
] scr_sab_hotpotato [0-1] (shared bomb timer)


search and destroy
-------------------
] scr_sd_scorelimit [1-n] (points)
] scr_sd_timelimit [0-n] (minutes)
] scr_sd_roundswitch [0-n] (number of rounds before switching teams)
] scr_sd_bombtimer [0-n] (seconds)
] scr_sd_planttime [0-n] (seconds)
] scr_sd_defusetime [0-n] (seconds)
] scr_sd_multibomb [0-1]


headquarters
-------------
] scr_koth_scorelimit [1-n] (points)
] scr_koth_timelimit [0-n] (minutes)
] koth_autodestroytime [0-n] (seconds)
] koth_kothmode [0-1] (classic mode, non-classic)
] koth_spawntime [0-n] (seconds, hq spawn time)


________________________________________________


This guide is intended for server admins wanting to set up a dedicated server at a remote datacenter. It is based on a Windows 2003 server setup, which is the only type of server I have. Hopefully someone knowledgeable about the Linux server setup (when it comes out) can add that information when it comes available.

CoD4 Windows Remote Dedicated Server Setup:



Part 1: Getting the files to the server
1. Buy and install the game on your home computer.

2. FTP the ENTIRE installed game to your remote dedicated server. Be certain to maintain the directory structure from the game's ROOT directory on. The game's root directory contains the iw3mp.exe file.

Note: Eventually we may find some files are unnecessary, but for now uploading them all is your safest bet.



Part 2: Creating a shortcut to run your server
1. On your dedicated server, RIGHT click on the iw3mp.exe file found in the CoD4 server's ROOT directory and DRAG it to the desktop. Have the server create a SHORTCUT. Be sure you only created a shortcut and did not actually MOVE the file.

2. Right click on the new shortcut you just created and go to its properties.

3. Find the TARGET field and add the following to the END of the existing target, do not DELETE any of the existing tartget!

[code:1:afc3f8aaee]+set dedicated 2 +set sv_punkbuster 1 +exec mp-server.cfg +map_rotate[/code:1:afc3f8aaee]

Note: Make sure there is a SPACE between "iw3mp.exe" and "+set dedicated 2".

Note 2: I am not sure if the CoD4 server will run on Windows 2000, but if you are trying you will very likely need to enclose the part of your target line that existed BEFORE you changed it in quotation marks. I noticed my Windows 2003 server did not need this, but I always had to have it before when I ran a Windows 2000 server.

The above command line assumes you intend to use Punkbuster of course. If not, remove that part of the command line. Also, you can obviously change the name of your config file to what ever YOU want to call it.

Other optional commandline items:

+set net_ip xxx.xxx.xxx.xxx
+set net_port xxxxx
+set fs_game mods/modwarfare



Part 3: Creating your config file
1. On your remote server, browse to CoD4's main/ directory. You should see many .IWD files in this directory. Create a new text file and rename it to mp-server.cfg. (The name of this config file MUST match what you put in the server's command line)

2. Open your newly created config file with a text editor (such as notepad).

3. Copy and paste this basic config into your new config:



[code:1:afc3f8aaee]seta sv_punkbuster 1
wait
pb_sv_enable

// Server name
set sv_hostname "My CoD4 Server" //Change this to whatever you want your server to be named in the server browser

// Server password
set g_password "" // blank means NO password

// Rconpassword
set rcon_password "change_me" // Change this to your rcon password!

// Maximum Clients
set sv_maxclients "32"
set sv_privateclients "6"

// Max Ping
set sv_maxping "225"

// Rate
set sv_maxRate "25000"

// Map_rotation
set sv_mapRotation "gametype war map mp_backlot gametype war map mp_bloc gametype war map mp_bog gametype war map mp_cargoship gametype war map mp_citystreets gametype war map mp_convoy gametype war map mp_countdown gametype war map mp_crash gametype war map mp_crossfire gametype war map mp_farm gametype war map mp_overgrown gametype war map mp_pipeline gametype war map mp_showdown gametype war map mp_strike gametype war map mp_vacant"

set sv_maprotationcurrent ""[/code:1:afc3f8aaee]

Note: The above is a VERY basic config, just to get the server up and running. A more complete config file will be coming.



Part 4: DirectX file
1. Download the attached directX file in this post:
http://www.fpsadmin.com/forum/showthread.php?t=13492

2. Upload the d3dx10_34.dll file to your Window's Servers system32 directory (Mine was in C:\WINDOWS\system32).



Part 5: PunkBuster files
1. Download pbsetup.exe from evenbalance.com here:
http://www.evenbalance.com/index.php?page=pbsetup.php

2. Upload pbsetup.exe to your server. It does NOT need to be in the CoD4 directories, in fact it is probably best if you treat this as a stand-alone application (it can update ALL PB servers from one application).

3. Run pbsetup.exe and click "Add a Game". Choose a CoD4 server. You will likely need to browse to the iw3mp.exe file so that pbsetup knows where your CoD4 server is located.

4. Once you have added your CoD4 server, select/highlight the CoD4 server in the list and click "Check For Updates". This should download a number of files to your CoD4 server directories. You should not have to do anything else.

Finally you are there! Simply use the shortcut you made on the server's desktop to start your server.

NOTICE!

In CoD4 if you put the map_rotate command in the startup config file, the server will CRASH.

I have changed the above instructions to put the map_rotate command in the command line parameters, which seems to solve the problem.
Avatar utente
Matteo
Admin
Admin
Messaggi: 46
Iscritto il: venerdì 5 novembre 2021, 11:10

Re: PC server admin guide for Call of Duty 4: Modern Warfare

for Debian 7 64bit:

dpkg --add-architecture i386
apt-get update
apt-get install libc6-i386
Avatar utente
Matteo
Admin
Admin
Messaggi: 46
Iscritto il: venerdì 5 novembre 2021, 11:10

Re: PC server admin guide for Call of Duty 4: Modern Warfare

Overview
This guide will cover the installation and operation of a Call of Duty 4 (COD4) server using screen. In this tutorial, we will install COD4 on Debian 7.

Requirements
Call of Duty 4 game client installer CD or image.
Debian server running a stable release (Wheezy, Jessie)
Xen/KVM VPS (1 CPU, 1GB Memory, 20GB Storage) as a minimum. This configuration may not be suitable for large servers.

Installation

Login as root on the server that you will be using for this installation.

Run the command below to update your server's list of available packages from the repositories and then upgrade any existing packages.
 

apt-get update && apt-get upgrade



Screen is often times included with the OS image by default, but you may be required to install it yourself.
 

apt-get install screen


Because the Call of Duty 4 server only runs on i386 machines, you have to enable the "multilib" feature in Debian.




apt-get install lib32stdc++6


 

dpkg --add-architecture i386
apt-get update



For security purposes, we do not want to run the server using the root account. You should use a standard user account.

Create a directory for the game server.
 

cd ~
mkdir cod4


Download the Call of Duty 4 dedicated server.
 

cd cod4
wget http://treefort.icculus.org/cod/cod4-li ... 08.tar.bz2


The download size is roughly 280 MB. When the download finishes, unpack the package.
 

tar -xvjf cod4-linux-server-06282008.tar.bz2


Install the COD4 game client onto your computer. Copy the main and zone folder of the game client onto the COD4 directory of your server using your favorite SCP client.

Once your upload completes, download the IceOps made executable. It contains various bugfixes and improvements.
 

wget https://iceops.in/cod4x17a_dedrun


Make the server "executable".
 

chmod +x cod4x17a_dedrun


Create a config file for the dedicated server.
 

nano general.cfg


If you want to run a simple "Team Deathmatch" or "Search & Destroy" server, then use this sample config.
 

//************************************************** ****************************
// Call of Duty 4
//************************************************** ****************************
//************************************************** ****************************
// Public Information
//************************************************** ****************************
sets sv_hostname "CoD4 Server" // Change this field, what is the server name
sets _Admin "Admin" // Change this
sets _Email "admin@admin.com" // Change this
sets _Website "www.website.com" // Change this
sets _Location "Location" // Change this
sets _Irc ""
sets _Mod ""
sets _ModVer ""
sets _ModUpdate ""
sets _Maps "COD4 Stock"
set scr_motd "Message of the Day when the gamer joined the server" // Change it

//************************************************** ****************************
// Common Server Settings
//************************************************** ****************************
// Log Settings
set g_logsync "2" // 0=no log, 1=buffered, 2=continuous, 3=append
set logfile "1" // 0 = NO log, 1 = log file enabled
set g_log "games_mp.log" // Name of log file, default is games_mp.log
set sv_log_damage "1"

// Network options
set net_ip "192.168.1.1" // Set your servers IP address
set net_port "28960" // Set your port number
set com_hunkMegs "512"
set net_noipx "1" // Allow ONLY tcp/ip protocol, player/server communications

// Server Network Mode
set dedicated "2" // 0 = Listen, 1 = LAN, 2 = Internet

// Password Settings
set rcon_password "yourpass" // RCON must be set.
set sv_privatePassword "" // Private slots, non-public slots

// The following can be used to lock out the server so that only those
// players that have been provide the password can connect. Good for
// matches, practices, etc.
set g_password ""

// Player slots setup
set sv_maxclients "32" // MAX server player slots, this is TOTAL player slots
set sv_privateclients "" // Number of private player slots, maxclients - privateclients = public slots

// Ping
set sv_minPing "0" // MIN player ping on CONNECT, any lower and player isnt allowed to connect
set sv_maxping "250" // MAX player ping on CONNECT, any higher and player isnt allowed to connect

// Client Download Settings. (0=off/1=on) Used for MODs and custom maps
// You have to got a working httpd server if fast downloading enabled.
set sv_allowdownload "0"
seta sv_wwwDownload "0"
seta sv_wwwBaseURL ""
seta sv_wwwDlDisconnected "1"

// Rate
set sv_maxRate "25000"


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

// AntiFlooding Settings
set sv_floodProtect "1"
set sv_reconnectlimit "3"

// Anti Cheat Settings
// In IceOps Dedicated server have their own cheat protection, so Punkbuster not needed
set sv_punkbuster "0"
set sv_disableClientConsole "0"
set cl_autocmd "0"
set sv_cheats "0"
set sv_pure "1"
set g_banIPs ""
set g_no_script_spam "1"

// Temporary Ban duration, in seconds
set sv_kickBanTime "3600"

// In-game voice communication system
set sv_voice "0"
set sv_voiceQuality "4"
set voice_deadChat "0"
set voice_global "0"
set voice_localEcho "0"
set winvoice_mic_mute "1"

//************************************************** ****************************
// Misc
//************************************************** ****************************
set sv_allowAnonymous "0"
set g_antilag "0"
set g_compassShowEnemies "0"
set scr_hardcore "1"
set g_allowvote "0"
set scr_allow_vote "0"
set scr_teambalance "1"
set ui_hud_hardcore "1"
set scr_game_allowkillcam "0"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "1"
set scr_game_spectatetype "1" // [0-2] 0=none, 1= team only, 2=spectate all
set scr_team_fftype "1" // 0=off 1=on 2=reflect damage 3=shared


//================================================== ===============================
// Gametype Settings
//================================================== ===============================

// First gametype to load
// "dm" - free for all deathmatch
// "dom" - domination
// "koth" - headquarters
// "sab" - sabotage
// "sd" - search & destroy
// "war" - team deathmatch

// Deathmatch
set scr_dm_scorelimit 150
set scr_dm_timelimit 10
set scr_dm_roundlimit 1
set scr_dm_numlives 0
set scr_dm_playerrespawndelay -1
set scr_dm_waverespawndelay 0


// Domination
set scr_dom_scorelimit 200
set scr_dom_timelimit 0
set scr_dom_roundlimit 1
set scr_dom_numlives 0
set scr_dom_playerrespawndelay -1
set scr_dom_waverespawndelay 0


// Teamdeath Match
set scr_war_scorelimit 750
set scr_war_timelimit 10
set scr_war_roundlimit 1
set scr_war_numlives 0
set scr_war_playerrespawndelay -1
set scr_war_waverespawndelay 0

// Sabotoge
set scr_sab_scorelimit 3
set scr_sab_timelimit 10
set scr_sab_roundlimit 3
set scr_sab_roundswitch 1
set scr_sab_numlives 0
set scr_sab_bombtimer 30
set scr_sab_planttime 3
set scr_sab_defusetime 3
set scr_sab_hotpotato 0
set scr_sab_playerrespawndelay -1
set scr_sab_waverespawndelay -1

// King of the Hill
set scr_koth_scorelimit 250
set scr_koth_timelimit 15
set scr_koth_roundlimit 1
set scr_koth_roundswitch 1
set scr_koth_numlives 0
set scr_koth_playerrespawndelay -1
set scr_koth_waverespawndelay 0
set koth_autodestroytime 60
set koth_spawntime 0
set koth_kothmode 0
set koth_capturetime 20
set koth_destroytime 10
set koth_delayPlayer 0
set koth_spawnDelay 60

// Search and Destroy
set scr_sd_scorelimit 6
set scr_sd_timelimit 3
set scr_sd_roundlimit 0
set scr_sd_roundswitch 3 // rounds between switching teams
set scr_sd_numlives 1 // elimination
set scr_sd_bombtimer 60
set scr_sd_planttime 7
set scr_sd_defusetime 7
set scr_sd_multibomb 0
set scr_sd_playerrespawndelay -1
set scr_sd_waverespawndelay 0

// Team-Balance and Voting
set scr_teambalance "1"
set g_allowvote "0"

set sv_mapRotation "gametype sd map mp_bloc gametype sd map mp_backlot gametype sd map mp_crash gametype sd map mp_convoy gametype sd map mp_vacant gametype sd map mp_bog gametype sd map mp_pipeline gametype sd map mp_farm gametype sd map mp_crossfire gametype sd map mp_overgrown gametype sd map mp_citystreets gametype sd map mp_showdown gametype sd map mp_strike gametype sd map mp_cargoship gametype sd map mp_countdown"


Save your changes to the config file.

Next, create a start-up script that starts a dedicated server (with screen) and enables map rotation.
 

nano cod4.sh

Paste the following content into the script file.
 

#!/bin/bash
screen -dmS cod4 ./cod4x17a_dedrun +set sv_authorizemode "-1" +exex general.cfg +map_rotate

Save your changes to the script file, then make it "executable".
 

chmod +x cod4.sh

If you are using the iptables firewall, add the following rules. Update the ports if you have changed them in the server configuration file.
 

-A INPUT -p udp --dport 28960 -j ACCEPT
-A INPUT -p udp --sport 28960 -j ACCEPT
-A INPUT -p tcp --dport 28960 -j ACCEPT
-A INPUT -p tcp --sport 28960 -j ACCEPT
-A INPUT -p udp --dport 20800 -j ACCEPT
-A INPUT -p udp --sport 20800 -j ACCEPT
-A INPUT -p tcp --dport 20800 -j ACCEPT
-A INPUT -p tcp --sport 20800 -j ACCEPT
-A INPUT -p udp --dport 20810 -j ACCEPT
-A INPUT -p udp --sport 20810 -j ACCEPT
-A INPUT -p tcp --dport 20810 -j ACCEPT
-A INPUT -p tcp --sport 20810 -j ACCEPT

Finally, start your server.
 

./cod4.sh
Avatar utente
Matteo
Admin
Admin
Messaggi: 46
Iscritto il: venerdì 5 novembre 2021, 11:10

Re: PC server admin guide for Call of Duty 4: Modern Warfare

If you get this error:

./cod2_lnxded: error while loading shared libraries: libstdc++.so.5:
cannot open shared object file: No such file or directory

Fix:

dpkg --add-architecture i386

apt-get update




apt-get install libstdc++5:i386
Rispondi