View Issue Details

IDProjectCategoryView StatusLast Update
0006674The Dark ModCodingpublic07.02.2026 12:09
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilitysometimes
Status assignedResolutionopen 
Product VersionTDM 2.13 
Target VersionTDM 2.14 
Summary0006674: mission.cfg makes no sense
DescriptionTDM 2.13 added "mission overrides" concept, so that mappers could temporarily override cvars without messing with player's config.
Unfortunately, a somewhat hacky feature of "mission.cfg" file which was added in TDM 2.12 was not killed.
Mappers still try to use it and still get surprised that it breaks the user config (which is expected since it was only done for non-archived cvars).
Additional InformationHow mission.cfg was born:
  https://forums.thedarkmod.com/index.php?/topic/22284-212-overriding-cvars/
New discussion:
  https://forums.thedarkmod.com/index.php?/topic/22460-213-mission-overrides-for-cvars/#findComment-505762
  
TagsNo tags attached.

Relationships

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

Activities

stgatilov

stgatilov

07.02.2026 12:06

administrator   ~0017175

r11141 Parse mission.cfg using custom code and set as mission overrides.
r11142 Set mission overrides from mission.cfg on game start/end.

Now values from mission.cfg are read and processed with custom code.
They are automatically turned into mission overrides.

They are set on game start, game end, and engine init.
They are not set only on game load (but they should have got into savefile anyway).
stgatilov

stgatilov

07.02.2026 12:09

administrator   ~0017176

I noticed a problem for pm_* cvars, like pm_runmod for instance.
They have yet another mechanism of mission-specific changes.

This code exists in idPlayer::Init and idPlayer::Restore:
    // set the pm_ cvars
    const idKeyValue *kv;
    kv = spawnArgs.MatchPrefix( "pm_", NULL );
    while( kv ) {
        cvarSystem->SetCVarString( kv->GetKey(), kv->GetValue() );
        kv = spawnArgs.MatchPrefix( "pm_", kv );
    }
As the result, the pm_* values from player spawnargs (which are usually inherited from core def) take precedence.
And these values are not even mission overrides, they are normal values.

Issue History

Date Modified Username Field Change
07.02.2026 11:46 stgatilov New Issue
07.02.2026 11:46 stgatilov Status new => assigned
07.02.2026 11:46 stgatilov Assigned To => stgatilov
07.02.2026 11:46 stgatilov Relationship added related to 0005453
07.02.2026 12:06 stgatilov Note Added: 0017175
07.02.2026 12:09 stgatilov Note Added: 0017176