View Issue Details

IDProjectCategoryView StatusLast Update
0003934The Dark ModDef / Setuppublic08.12.2023 12:47
ReporterAluminumHaste Assigned Tonbohr1more  
Status resolvedResolutionfixed 
Product VersionTDM 2.02 
Fixed in VersionTDM 2.11 
Summary0003934: some values in autocommands.cfg are not kept when starting a mission.
DescriptionFrom this thread:

The OP doesn't like head bob so I suggested he add the cvars:
seta pm_bobroll "0"
seta pm_bobpitch "0"
seta pm_bobup "0"

to autocommands.cfg.

When you run the game, those CVARS are still at 0. However, once you start a mission they go back to their defaults.

This doesn't seem to be appropriate behaviour.
Steps To ReproduceCreate autocommands.cfg file in darkmod.exe directory.


seta pm_bobroll "0"
seta pm_bobpitch "0"
seta pm_bobup "0"

Run TDM and check the cvar values in the console, they should all be 0.

Start a mission and check those values again, they are back to their defaults.

    pm_bobroll = "0.0015"
    pm_bobpitch = "0.001"
    pm_bobup = "0.03"

Those cvars are not present in Darkmod.cfg or default.cfg, so not sure why they are being overridden.
TagsNo tags attached.


parent of 0006237 resolvednbohr1more Remove pm_noclipspeed from core def file 
related to 0003691 resolvednbohr1more CVAR persistence issue 
related to 0006310 resolvedDaft Mugi Add simplified head bob cvar 
related to 0005453 feedbackstgatilov Rethink how FM's should override cvars 




01.12.2014 16:21

viewer   ~0007194

Though these are cvars, they also appear in darkmod/def/tdm_player_thief.def:

// movement settings

"pm_bobroll" "0.0015" //side to side roll
"pm_bobpitch" "0.001" //forward roll
"pm_bobup" "0.03" //upward bounce
"pm_runroll" "0.003" //running side roll
"pm_runpitch" "0.001" //run forward pitch
"pm_runbob" "0.35" //speed of run bob
"pm_walkbob" "0.3" //speed of walk bob
"pm_crouchbob" "0.2" //speed of crouch bob

What's happening is that TDM reads Darkmod.cfg, processes the "seta" commands there to set certain cvars, then later reads autocommands.cfg and processes any "seta" commands there to set certain cvars, then loads the map and spawns the player, giving him the values set in the above *.def file.

So there's nothing we can do in the code to change the values of these things on the fly.

The player can either:

a - set up hot key bindings as discussed in the thread, and hit the appropriate key at the start of each mission


b - extract the def/tdm_player_thief.def file from tdm_defs01.pk4, change the values in that file, and place the file in the darkmod/def folder. This would need to be kept up to date as each TDM rev comes out, in case we make changes to that file


01.12.2014 17:18

developer   ~0007195

I suggested in the thread the player could assign a hot key to execute autocommands.cfg after the mission loads, but he'll have to do it every load more than likely.

So far he's the ONLY person to request it.

I'll let him know about your findings, he might want to do your B suggestion.


15.12.2014 17:24

reporter   ~0007263

Just a note, regardless of the "why does headbob not stick" issue:

autocommands.cfg was added to allow automatic dmap after the game DLL has been loaded and usually contains "quit" at the end.

It wasn't really meant for adding commands that should be stored and executed permanently.

"default.cfg" is what should be used for this, as it is executed before the game DLL is loaded.


07.02.2023 13:59

developer   ~0015931

The default cvar values were added to the source and given archive flags in 2.07
The pm bob and other pm args were removed from tdm_player_thief.def in 2.11

Issue History

Date Modified Username Field Change
26.11.2014 14:46 AluminumHaste New Issue
26.11.2014 14:46 AluminumHaste Status new => assigned
26.11.2014 14:46 AluminumHaste Assigned To => grayman
01.12.2014 16:21 grayman Note Added: 0007194
01.12.2014 16:32 grayman Status assigned => feedback
01.12.2014 17:18 AluminumHaste Note Added: 0007195
01.12.2014 17:18 AluminumHaste Status feedback => assigned
02.12.2014 03:06 grayman Status assigned => resolved
02.12.2014 03:06 grayman Resolution open => no change required
02.12.2014 03:06 grayman Fixed in Version => TDM 2.03
15.12.2014 17:24 tels Note Added: 0007263
07.02.2023 13:56 nbohr1more Relationship added related to 0003691
07.02.2023 13:59 nbohr1more Note Added: 0015931
07.02.2023 13:59 nbohr1more Assigned To grayman => nbohr1more
07.02.2023 13:59 nbohr1more Fixed in Version TDM 2.03 => TDM 2.11
07.02.2023 13:59 nbohr1more Target Version TDM 2.03 =>
07.02.2023 14:16 nbohr1more Resolution no change required => fixed
09.02.2023 15:45 nbohr1more Relationship added parent of 0006237
23.08.2023 02:17 Daft Mugi Relationship added related to 0006310
08.12.2023 12:47 stgatilov Relationship added related to 0005453