[Added] Allow CVARINFO cvars to be latched

Moderators: Developers, ZDoom.org Team

Allow CVARINFO cvars to be latched

Postby argv » Thu Nov 09, 2017 3:44 pm

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.
argv
 
Joined: 30 Aug 2016

Re: Allow CVARINFO cvars to be latched

Postby ZippeyKeys12 » Thu Nov 09, 2017 8:55 pm

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.
ZippeyKeys12
 
Joined: 15 Jun 2016

Re: Allow CVARINFO cvars to be latched

Postby Major Cooke » Fri Nov 10, 2017 11:34 am

Agreed, a useful one. It should be a keyword: "latch".
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow CVARINFO cvars to be latched

Postby Rachael » Fri Nov 10, 2017 12:15 pm

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
Rachael
Not all elves needs a stocking hat...
 
Joined: 13 Jan 2004

Re: Allow CVARINFO cvars to be latched

Postby Major Cooke » Sat Nov 11, 2017 9:16 am

That's precisely what I am hoping for.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests