View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006674 | The Dark Mod | Coding | public | 07.02.2026 11:46 | 09.02.2026 09:36 |
| Reporter | stgatilov | Assigned To | stgatilov | ||
| Priority | normal | Severity | normal | Reproducibility | sometimes |
| Status | suspended | Resolution | fixed | ||
| Product Version | TDM 2.13 | ||||
| Target Version | TDM 2.14 | Fixed in Version | TDM 2.14 | ||
| Summary | 0006674: mission.cfg makes no sense | ||||
| Description | TDM 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 Information | How 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 | ||||
| Tags | No tags attached. | ||||
|
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). |
|
|
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. |
|
|
pm_* cvars no longer have the problem: r11143 Deleted C++ code to reset pm_* cvars from player spawnargs on player spawn and game load. I need to not forget to update the old missions... Also, better delete the pm_* spawnargs from player def. |
|
| 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 | |
| 07.02.2026 19:50 | stgatilov | Note Added: 0017177 | |
| 08.02.2026 16:49 | stgatilov | Status | assigned => resolved |
| 08.02.2026 16:49 | stgatilov | Resolution | open => fixed |
| 08.02.2026 16:49 | stgatilov | Fixed in Version | => TDM 2.14 |
| 09.02.2026 09:36 | stgatilov | Status | resolved => suspended |
| 09.02.2026 09:36 | stgatilov | Note Edited: 0017177 |