04-20-2005, 11:41 AM
I posted this on steamfourms, I thought I'd post it here as well...
I've not seen this documented yet anywhere else in the
forum, so I thought I'd add it here.
So I've been experimenting with writing .cfg files for my
indivudal maps in rotation on my server. The purpose being
so I could set various cvars for each map (like mp_falldamge 0
for dm_avalon_b1) and have some maps teamplay while
others are deathmatch.
So here's the example... First off, let's say for demo purposes
my map rotation is the following...
(deathmatch) dm_cigsub_revised
(deathmatch) dm_depot_rc2
(teamplay) dm_combinefort
(teamplay) dm_powerhouse
(deathmatch) dm_rebar_b6
(deathmatch) dm_avalon_b1
So in order to make this work, I had to write custom .cfg files
for each map and stick them in my /hl2mp/cfg directory.
I commented out those .cfg variables from my server.cfg, since
I was going to set them with the map .cfg files.
An example of dm_depot_rc2.cfg deathmatch config file
mp_friendlyfire 1
mp_teamplay 0
mp_timelimit 60
mp_fraglimit 30
mp_falldamge 1
An example dm_combinefort.cfg teamplay config file
mp_teamplay 1
mp_teamlist hgrunt;scientist
mp_autoteambalance 1
mp_friendlyfire 0
mp_timelimit 30
mp_fraglimit 60
mp_falldamge 1
Ok, now here comes the weirdness...
So you figure, well, my maps that I want to run as teamplay
maps will use the teamplay .cfg, and my deathmatch maps
will run the deathmatch .cfg. In theory, this should work.
But here's what I found. Let's say I'm playing dm_depot_rc2
deathmatch, and my next map is dm_combinefort teamplay,
when the map switches dm_combinefort will still be deathmatch
even though the teamplay dm_combinefort.cfg loaded when the map
loaded, and SRCDS shows that the variables are set for
teamplay, not deathmatch. But it still plays as deathmatch.
Now when dm_combinefort expires and dm_powerhouse loads
up, dm_powerhouse will play as a teamplay map as intended.
Now it gets weirder...
when dm_powerhouse expires and dm_rebar_b6 loads up,
dm_rebar_b6 will be running as teamplay even though the
dm_rebar_b6 deathmatch .cfg file loaded up, and once again
SRCDS shows that deathmatch mp_ cvars are loaded, but the
map is still playing as teamplay.
So in simple terms, it looks like when you're switching between
deathmatch and teamplay with custom .cfg files, the switches you
make don't get applied till the next map after you make the
switches is loaded. Or, you load the map twice. Or in simpler
terms, the .cfg changes seem to lag one map behind when
they are actually loaded. They don't get applied to the map
that they load with, but to the map that loads up next.
To make things work the way I wanted I had to set up the
following hack.
(deathmatch) dm_cigsub_revised (deathmatch cfg plays as deathmatch)
(deathmatch) dm_depot_rc2 (teamplay cfg but plays as deathmatch)
(teamplay) dm_combinefort (teamplay cfg plays as teamplay)
(teamplay) dm_powerhouse ( deathmatch cfg but plays as teamplay)
(deathmatch) dm_rebar_b6 (deathmatch cfg plays as deathmatch)
(deathmatch) dm_avalon_b1 (deathmatch cfg plays as deathmatch)
That's how I had to set things up to get my maps to play in the
deathmatch/teamplay manner I wanted them to.
Another strange thing is that the dm_avalon_b1.cfg file has
mp_falldamage 0, and this loads up when dm_avalon_b1 loads
and works perfectly. And on switch to the next map the
mp_falldamage 1 cvar in the next map's .cfg file gets applied
and the mp_falldamage 0 cvar specified in dm_avalon_b1's .cfg
file does not carry over to that map like the teamplay bug does.
This is pretty tough to follow, and what I wrote may just confuse
most people, but it's a pretty tricky and fustrating bug that can
kill a couple hours of your time trying to diagnose.
Thanks,
-Mike-
I've not seen this documented yet anywhere else in the
forum, so I thought I'd add it here.
So I've been experimenting with writing .cfg files for my
indivudal maps in rotation on my server. The purpose being
so I could set various cvars for each map (like mp_falldamge 0
for dm_avalon_b1) and have some maps teamplay while
others are deathmatch.
So here's the example... First off, let's say for demo purposes
my map rotation is the following...
(deathmatch) dm_cigsub_revised
(deathmatch) dm_depot_rc2
(teamplay) dm_combinefort
(teamplay) dm_powerhouse
(deathmatch) dm_rebar_b6
(deathmatch) dm_avalon_b1
So in order to make this work, I had to write custom .cfg files
for each map and stick them in my /hl2mp/cfg directory.
I commented out those .cfg variables from my server.cfg, since
I was going to set them with the map .cfg files.
An example of dm_depot_rc2.cfg deathmatch config file
mp_friendlyfire 1
mp_teamplay 0
mp_timelimit 60
mp_fraglimit 30
mp_falldamge 1
An example dm_combinefort.cfg teamplay config file
mp_teamplay 1
mp_teamlist hgrunt;scientist
mp_autoteambalance 1
mp_friendlyfire 0
mp_timelimit 30
mp_fraglimit 60
mp_falldamge 1
Ok, now here comes the weirdness...
So you figure, well, my maps that I want to run as teamplay
maps will use the teamplay .cfg, and my deathmatch maps
will run the deathmatch .cfg. In theory, this should work.
But here's what I found. Let's say I'm playing dm_depot_rc2
deathmatch, and my next map is dm_combinefort teamplay,
when the map switches dm_combinefort will still be deathmatch
even though the teamplay dm_combinefort.cfg loaded when the map
loaded, and SRCDS shows that the variables are set for
teamplay, not deathmatch. But it still plays as deathmatch.
Now when dm_combinefort expires and dm_powerhouse loads
up, dm_powerhouse will play as a teamplay map as intended.
Now it gets weirder...
when dm_powerhouse expires and dm_rebar_b6 loads up,
dm_rebar_b6 will be running as teamplay even though the
dm_rebar_b6 deathmatch .cfg file loaded up, and once again
SRCDS shows that deathmatch mp_ cvars are loaded, but the
map is still playing as teamplay.
So in simple terms, it looks like when you're switching between
deathmatch and teamplay with custom .cfg files, the switches you
make don't get applied till the next map after you make the
switches is loaded. Or, you load the map twice. Or in simpler
terms, the .cfg changes seem to lag one map behind when
they are actually loaded. They don't get applied to the map
that they load with, but to the map that loads up next.
To make things work the way I wanted I had to set up the
following hack.
(deathmatch) dm_cigsub_revised (deathmatch cfg plays as deathmatch)
(deathmatch) dm_depot_rc2 (teamplay cfg but plays as deathmatch)
(teamplay) dm_combinefort (teamplay cfg plays as teamplay)
(teamplay) dm_powerhouse ( deathmatch cfg but plays as teamplay)
(deathmatch) dm_rebar_b6 (deathmatch cfg plays as deathmatch)
(deathmatch) dm_avalon_b1 (deathmatch cfg plays as deathmatch)
That's how I had to set things up to get my maps to play in the
deathmatch/teamplay manner I wanted them to.
Another strange thing is that the dm_avalon_b1.cfg file has
mp_falldamage 0, and this loads up when dm_avalon_b1 loads
and works perfectly. And on switch to the next map the
mp_falldamage 1 cvar in the next map's .cfg file gets applied
and the mp_falldamage 0 cvar specified in dm_avalon_b1's .cfg
file does not carry over to that map like the teamplay bug does.
This is pretty tough to follow, and what I wrote may just confuse
most people, but it's a pretty tricky and fustrating bug that can
kill a couple hours of your time trying to diagnose.
Thanks,
-Mike-