Allow CVARINFO cvars to be latched

Moderator: GZDoom Developers

Post Reply
argv
Posts: 184
Joined: Tue Aug 30, 2016 4:47 pm

Allow CVARINFO cvars to be latched

Post by argv »

I see that the “skill” CVar is latched. Changes to it do not take effect until a new game is started, and it says so in the console.

Please allow CVARINFO-defined CVars to be latched like this, as well.

The intended use case is to have additional difficulty settings that, like “skill”, only take effect on a new game. Currently, the only way I know of to do that is to capture the CVars' values upon game startup, and store them in a global somewhere, but that doesn't make the latch warning appear on the console.
ZippeyKeys12
Posts: 111
Joined: Wed Jun 15, 2016 2:49 pm

Re: Allow CVARINFO cvars to be latched

Post by ZippeyKeys12 »

Very interesting, would actually like this too. Currently I'm storing the CVar as well, but it would be nice to have the latch warning, provided that it's feasible to do.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow CVARINFO cvars to be latched

Post by Major Cooke »

Agreed, a useful one. It should be a keyword: "latch".
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Allow CVARINFO cvars to be latched

Post by Rachael »

Keep in mind even if you do this, CVAR latches are only saved on the console side.

If you modify the CVARs internally they will not latch.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow CVARINFO cvars to be latched

Post by Major Cooke »

That's precisely what I am hoping for.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”