Page 1 of 1

Allow CVARINFO cvars to be latched

Posted: Thu Nov 09, 2017 2:44 pm
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.

Re: Allow CVARINFO cvars to be latched

Posted: Thu Nov 09, 2017 7:55 pm
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.

Re: Allow CVARINFO cvars to be latched

Posted: Fri Nov 10, 2017 10:34 am
by Major Cooke
Agreed, a useful one. It should be a keyword: "latch".

Re: Allow CVARINFO cvars to be latched

Posted: Fri Nov 10, 2017 11:15 am
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.

Re: Allow CVARINFO cvars to be latched

Posted: Sat Nov 11, 2017 8:16 am
by Major Cooke
That's precisely what I am hoping for.