PDA

View Full Version : Config file creator for Call of Duty 2


robert
01-07-2006, 01:03 PM
Hello,

I have written a simple webscript that generates config files for Call of Duty 2 dedicated servers:
http://callofduty2.infinity-shell.net/cod2config

I realise this script doesn't contain all the server vars that are available. However, this tool should still be very helpfull for starting admins that have never seen a config file before or have very less experience in creating those files theirselves.

Before I decide to spend some more time on the script (and add some other advanced features) I first show this script to the admins out here. I have no problems completing this script if there's people interested in using it.

So what do you guys think? Will this script be helpfull for others and should I complete it? Any suggestions are welcome.

Thanks in advance,
Robert

P.S. The generated config files are not stored on the server.

rudedog
01-07-2006, 06:17 PM
addd to guides

OldDog
01-08-2006, 12:48 PM
Robert,

This is good work. It's clear and understandable. After generating a test config myself, however, I would add the following:

First, the CoDBoards link is broken at the top of the page (no biggee, but if you want people to go there, you should fix it.
Add delimeters for each section in the resultant config output so the the output is more clearly sectioned, e.g.,:
//=== Public Information
//=== General Settings
etc.
Cosmetic, admittedly, but, add in the color parameters, so that people can generate their server names in color, if they choose:
// ^1 = red
// ^2 = green
and, so on
Add in:
set logfile (0, 1, 2, 3)
set g_log logfilename
set g_logsync
an algorithm that checks for "dedicated 2", which then generates:
set sv_gamespy "1"
set sv_master1 "cod2master.activision.com"
the "set dedicated n" as well as the "map_rotate" should probably be in the startup command-line, but if you ask for the server type, without generating the dvar, then you could still generate the "master"
There are others, of course, as you said, but this is a great start
for beginners

robert
01-08-2006, 01:00 PM
Awesome, thanks a lot for your reply. This is the kind of feedback I was hoping for.

I added your feedback to my to-do list. I will schedule an update at the end of next week.

Have a nice day,
Robert

fbihitman
01-09-2006, 12:37 AM
Ok, got the script copyed it then saved it into main as dedicated.cfg

But what is the command to execute the setup

I tried one but it was not working

OldDog
01-09-2006, 11:15 AM
Well, it would be the normal command-line, less the usual "+ set dedicated n" and "map_rotate", as follows (for Windows):
"C:\Program Files\Call of Duty\CoD2MP_s.exe" +exec dedicated.cfg

You could also edit dedicated.cfg, removing the "set dedicated" and "map_rotate" dvars, as mentioned above. Then the command-line would look like this:
"C:\Program Files\Call of Duty\CoD2MP_s.exe" +set dedicated 2 +exec dedicated.cfg +map_rotate

Buck[SWE]
01-17-2006, 11:52 AM
That's great! That's what I was looking for. I can use all the help I can get. I'm thinking of setting up a CoD2 CTF server and need help. All info about it is interesting. So please mail me if you feel you wanna help me out. I'm new to setting up game-servers, so consider me an idiot at the topic. ;)

br:salute:

tikia
01-31-2006, 02:20 PM
if i start server an i exec the dedicated.cfg file then i say that i must restart server
point one how do i do that??
point 2 if i load an map is say:


File Handles:
----------------------
249012 files in iwd files
ERROR: sound alias file iw_multiplayer2.csv: duplicate alias 'ps_breathing_tired'
------- Game Initialization -------
gamename: Call of Duty 2
gamedate: Dec 16 2005

******* script compile error *******
unknown function: @ 48695
************************************
********************
ERROR: script compile error
(see console for details)
********************
----- Server Shutdown -----
Sending heartbeat to cod2master.activision.com
==== ShutdownGame ====
---------------------------



PLZ send me an e-mail with awnsers send it to this e-mail; waterpolo_freak3@hotmail.com

robert
01-31-2006, 02:37 PM
if i start server an i exec the dedicated.cfg file then i say that i must restart server
point one how do i do that??


If you are talking about warnings like 'net_ip will be changed upon restart' - ignore it, it means nothing. If you mean something else, please post it.


point 2 if i load an map is say:


File Handles:
----------------------
249012 files in iwd files
ERROR: sound alias file iw_multiplayer2.csv: duplicate alias 'ps_breathing_tired'
------- Game Initialization -------
gamename: Call of Duty 2
gamedate: Dec 16 2005

******* script compile error *******
unknown function: @ 48695
************************************
********************
ERROR: script compile error
(see console for details)
********************
----- Server Shutdown -----
Sending heartbeat to cod2master.activision.com
==== ShutdownGame ====
---------------------------



PLZ send me an e-mail with awnsers send it to this e-mail; waterpolo_freak3@hotmail.com

You have either installed a mod incorrectly or something's messed up with your .iwd files. Please check their filesizes.

tikia
01-31-2006, 04:22 PM
erm sommething els if i do exec dedicated its says that its read only an then it say server shut down like this

execing dedicated.cfg
net_ip will be changed upon restarting.
net_port will be changed upon restarting.
dedicated is read only.
********************
ERROR: Attempted to overrun string in call to va()
********************
----- Server Shutdown -----
Sending heartbeat to cod2master.activision.com
====ShutdownGame====
---------------------------
Hitch warning: 583 msec frame time

what to do!!!


ann how can i put an rcon pass on it?

robert
01-31-2006, 04:43 PM
erm sommething els if i do exec dedicated its says that its read only an then it say server shut down like this

execing dedicated.cfg
net_ip will be changed upon restarting.
net_port will be changed upon restarting.
dedicated is read only.
********************
ERROR: Attempted to overrun string in call to va()
********************
----- Server Shutdown -----
Sending heartbeat to cod2master.activision.com
====ShutdownGame====
---------------------------
Hitch warning: 583 msec frame time

what to do!!!

You can ignore that 'changed upon restarting' and 'read only' warnings, they mean nothing.

You have either corrupt .iwd files or there's something unexpected in your config (like a line break or something that got messed up while copy/pasting).

tikia
01-31-2006, 05:00 PM
i reinstalled it


an it gives it again
but when i exec dedicated then it shut down

whitout
loading me an my friend can get in so.. i think theres sommething wrong with ur generater or sommething if u got msn plz add me waterpolo_freak3@hotmail.com

robert
01-31-2006, 05:04 PM
Again: 'dedicated is read only' is not an error, it's just a warning that's shown on lots of servers but normally people don't see it cause the text in the console scrolls very fast. I read it my console to and it works fine, it means nothing.

Please post your config.

tikia
01-31-2006, 05:10 PM
sets _ADMIN "Tiki.A."
sets _EMAIL "Tiki_gamer@hotmail.com"
sets _IRC ""
sets _WEBSITE ""
sets _LOCATION ""
set sv_hostname "^3#^9G^7o^9H^3|^7 Fun ^9Server"
set net_ip "83.83.198.150"
set net_port "21000"
set dedicated "2"
set sv_pure "1"
set sv_maxplayers "20"
set sv_minping "0"
set sv_maxping "300"
set sv_maxrate "2000"
set sv_voice "1"
set g_password ""
set sv_drawfriend "1"
set scr_friendlyfire "2"
set scr_forcerespawn "1"
set scr_killcam "1"
set g_allowvote "0"
set scr_teambalance "1"
set scr_spectateenemy "0"
set scr_spectatefree "0"
set scr_allow_bar "1"
set scr_allow_bren "1"
set scr_allow_enfield "1"
set scr_allow_enfieldsniper "1"
set scr_allow_g43 "1"
set scr_allow_greasegun "1"
set scr_allow_kar98k "1"
set scr_allow_kar98ksniper "1"
set scr_allow_m1carbine "1"
set scr_allow_m1garand "1"
set scr_allow_mp40 "1"
set scr_allow_mp44 "1"
set scr_allow_nagant "1"
set scr_allow_nagantsniper "1"
set scr_allow_pps42 "1"
set scr_allow_ppsh "1"
set scr_allow_shotgun "1"
set scr_allow_springfield "1"
set scr_allow_sten "1"
set scr_allow_svt40 "1"
set scr_allow_thompson "1"
set scr_allow_fraggrenades "1"
set scr_allow_smokegrenades "1"
set scr_ctf_scorelimit "10"
set scr_ctf_timelimit "30"
set scr_dm_scorelimit "100"
set scr_dm_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 "30"
set scr_sd_timelimit "30"
set scr_tdm_scorelimit "300"
set scr_tdm_timelimit "0"
set scr_hq_scorelimit "450"
set scr_hq_timelimit "30"
set sv_mapRotationCurrent ""
sv_maprotation "gametype dm map mp_breakout gametype dm map mp_brecourt gametype dm map mp_burgundy gametype dm map mp_carentan gametype dm map mp_dawnville gametype dm map mp_decoy gametype dm map mp_downtown gametype dm map mp_farmhouse gametype dm map mp_leningrad gametype dm map mp_matmata gametype dm map mp_railyard gametype dm map mp_toujane gametype dm map mp_trainstation 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 gametype sd map mp_breakout gametype sd map mp_brecourt gametype sd map mp_burgundy gametype sd map mp_carentan gametype sd map mp_dawnville gametype sd map mp_decoy gametype sd map mp_downtown gametype sd map mp_farmhouse gametype sd map mp_leningrad gametype sd map mp_matmata gametype sd map mp_railyard gametype sd map mp_toujane gametype sd map mp_trainstation gametype ctf map mp_breakout gametype ctf map mp_brecourt gametype ctf map mp_burgundy gametype ctf map mp_carentan gametype ctf map mp_dawnville gametype ctf map mp_decoy gametype ctf map mp_downtown gametype ctf map mp_farmhouse gametype ctf map mp_leningrad gametype ctf map mp_matmata gametype ctf map mp_railyard gametype ctf map mp_toujane gametype ctf map mp_trainstation gametype hq map mp_breakout gametype hq map mp_brecourt gametype hq map mp_burgundy gametype hq map mp_carentan gametype hq map mp_dawnville gametype hq map mp_decoy gametype hq map mp_downtown gametype hq map mp_farmhouse gametype hq map mp_leningrad gametype hq map mp_matmata gametype hq map mp_railyard gametype hq map mp_toujane gametype hq map mp_trainstation"
map_rotate

robert
01-31-2006, 05:18 PM
Please try running your server with just 3 (for example) maps in the maplist: the maximum lenght for a string is 255 chars in the cod2 engine and your sv_maprotation exceeds that by far.

tikia
01-31-2006, 05:21 PM
ok i will but how can i put an rcon pass on it?:confused:

tikia
01-31-2006, 05:30 PM
ok it works ty but there is still a but
now it says



exec dedicated
execing dedicated.cfg
net_ip will be changed upon restarting.
net_port will be changed upon restarting.
dedicated is read only.
WARNING: Non-localized Game Message string is not allowed to have letters in it. Must be changed over to a localized string: "PAM2: DVAR change detected: scr_friendlyfire --> 2"
WARNING: Non-localized Game Message string is not allowed to have letters in it


i know i must ignore the restart thing but all those warnings:S

Krigu
02-01-2006, 08:06 AM
tikia:

Edit: How did you get it to work? To set the RCON password add:

// Rconpassword
set rcon_password "<your pass>"

robert
02-01-2006, 06:29 PM
WARNING: Non-localized Game Message string is not allowed to have letters in it. Must be changed over to a localized string: "PAM2: DVAR change detected: scr_friendlyfire --> 2"
WARNING: Non-localized Game Message string is not allowed to have letters in it


Isn't PAM some kind of a MOD? It seems to conflict with your general config settings.

OldDog
02-02-2006, 10:41 AM
Those "non-localized string Game Message string" messages happen with all mods. You can ignore them. I have a string of them in my console all the time.