View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005453 | The Dark Mod | Design/Coding | public | 20.12.2020 17:43 | 08.12.2023 18:19 |
Reporter | duzenko | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | PC | OS | Windows | OS Version | 10 |
Product Version | SVN | ||||
Target Version | TDM 2.13 | ||||
Summary | 0005453: Rethink how FM's should override cvars | ||||
Description | 1. Are the mappers supposed to override the cvars via the local copy of autoexec.cfg? 2. If so, are they supposed to include the default autoexec.cfg content in their copy? 3. If so, what about future-compatibility? | ||||
Steps To Reproduce | Install "Crucible of Omens: Behind closed doors" Restart TDM Press the console (tilde) key | ||||
Tags | No tags attached. | ||||
related to | 0000833 | confirmed | Add mapvars options for extra variations | |
related to | 0005926 | resolved | nbohr1more | tdm_player_thief.def needs to contain default pm_runmod value |
related to | 0003934 | resolved | nbohr1more | some values in autocommands.cfg are not kept when starting a mission. |
parent of | 0005892 | resolved | nbohr1more | Cant mantle while carring a body |
If we are to allow cvar customization per map, we should look into resurrecting \ expanding mapDef https://modwiki.dhewm3.org/Mapdef_%28decl%29 That may also be useful for something like the mapvars proposal: 0000833 |
|
The best long-term idea is to introduce the concept of "mission-controlled" cvars. Also, we should add a new cvar flag CVAR_MISSION, which is used to mark cvars that can become mission-controlled (incompatible with CVAR_ARCHIVE). The script event which now can change any cvar will only change cvars marked with CVAR_MISSION and produce warning otherwise. The full proposal is on dev forums: https://forums.thedarkmod.com/index.php?/topic/22284-212-overriding-cvars/&do=findComment&comment=490062 The main idea is that calling setcvar script function becomes the only supported way for mappers to modify cvars. If it is called, then cvar becomes "mission-controlled" for this game run and is treated as part of gameplay state (saved/loaded in save file). If mapper does not call setcvar, then the same cvar is not mission-controlled and behaves just like ordinary cvars behave now. Very similar but slightly different proposal (same forum post) is to allow mappers to set "override" value for CVAR_MISSION cvars. The difference is that in this case we actually add a new "overrideValue" data to cvar (can be NONE). We still store normal value of cvar that player can change, but the "overrideValue" takes precedence when choosing the value that takes effect. |
|
For now, Daft Mugi is going to commit a patch which allows mappers to override cvars in "mission.cfg" file. Also, we have some values in player entityDef, and these values somehow (not sure about exact mechanics) can override player movement cvars. If the proper system with mission-controlled cvar or mission overrides is implemented, the older two approaches should be deleted. |
|
Committed code rev 10555. Added 'mission.cfg' for mappers. Also, resets cvars on mission change so that non-archived, modified cvars do not carry over to the next mission. Committed code rev 10556. Removed CVAR_ARCHIVE from some player movement cvars. Committed assets rev 16869. Removed some player movement cvars from player entityDef. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
20.12.2020 17:43 | duzenko | New Issue | |
20.12.2020 17:43 | duzenko | Steps to Reproduce Updated | |
15.03.2021 15:46 | stgatilov | Target Version | TDM 2.10 => |
08.08.2022 12:33 | nbohr1more | Relationship added | parent of 0005892 |
05.02.2023 18:29 | nbohr1more | Note Added: 0015929 | |
05.02.2023 18:30 | nbohr1more | Relationship added | related to 0000833 |
05.02.2023 18:31 | nbohr1more | Note Edited: 0015929 | |
08.12.2023 12:46 | stgatilov | Relationship added | related to 0005926 |
08.12.2023 12:47 | stgatilov | Relationship added | related to 0003934 |
08.12.2023 12:54 | stgatilov | Note Added: 0016227 | |
08.12.2023 12:54 | stgatilov | Severity | minor => feature |
08.12.2023 12:54 | stgatilov | Target Version | => TDM 2.13 |
08.12.2023 12:56 | stgatilov | Note Added: 0016228 | |
08.12.2023 18:19 | Daft Mugi | Note Added: 0016237 |