View Issue Details

IDProjectCategoryView StatusLast Update
0006655The Dark ModGUIpublic15.01.2026 23:40
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.13 
Fixed in VersionTDM 2.14 
Summary0006655: idChoiceWindow linked to cvar converts mission override into user value
DescriptionSince recently, cvar may have "mission override", which is part of game state and should be dropped at game end.
However, when main menu starts, every idChoiceWindow element reads its linked cvar and immediately sets the value back into it.
This effectively elevates mission override to user-set value, which is veeeery nasty.
Steps To Reproduce1) Take some mission, find its main script file (e.g. fms\bakery_job\maps\bakery.script).
2) Add the following in main function (add it missing):
  void main() {
      sys.setcvar("tdm_hud_hide_lightgem", "1");
  }
3) Now start this mission, start gameplay.
4) Notice that when game starts, your HUD hides.
 Execute "tdm_hud_hide_lightgem" in game console to verify that mission override is set to 1.
5) Press Esc to get into in-game main menu.
6) Execute "tdm_hud_hide_lightgem" in game console again.
  Now the value "1" has become the user value instead of mission override.
TagsNo tags attached.

Relationships

related to 0005453 resolvedstgatilov Rethink how FM's should override cvars 

Activities

stgatilov

stgatilov

15.01.2026 23:39

administrator   ~0017129

Here is the main fix:
  r11092 Fixed idChoiceWindow promoting mission override for a cvar into user value.
Basically, only set cvar value if the UI holds a value different from the one currently in cvar,
I checked that the issue does not happen any more as described above.

Some extra changes:
  r11093 Added "listcvars -mission" command to list all cvars with mission overrides.
  r11094 Added sys.unsetcvar script event so that mapper could drop mission override on cvar.

Issue History

Date Modified Username Field Change
15.01.2026 18:13 stgatilov New Issue
15.01.2026 18:13 stgatilov Status new => assigned
15.01.2026 18:13 stgatilov Assigned To => stgatilov
15.01.2026 18:14 stgatilov Relationship added related to 0005453
15.01.2026 23:39 stgatilov Note Added: 0017129
15.01.2026 23:39 stgatilov Fixed in Version => TDM 2.14
15.01.2026 23:40 stgatilov Status assigned => resolved
15.01.2026 23:40 stgatilov Resolution open => fixed