Latch cvars cannot be changed on a TITLEMAP

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Latch cvars cannot be changed on a TITLEMAP

Re: Latch cvars cannot be changed on a TITLEMAP

by Graf Zahl » Thu Sep 14, 2023 1:59 pm

The only native latch CVARs are deathmatch and gameskill, which - big surprise! - were never supposed to be used in a menu.
Unfortunately there is no trivial fix because the latched values are stored out of reach from the menu.

My general advice here is, do not use latch variables in the menu.


I'll file this as "can't fix".

Re: Latch cvars cannot be changed on a TITLEMAP

by Zhs2 » Tue Mar 21, 2023 8:30 am

That sounds like a lot of extra effort to work around an oversight in the menu code.

Re: Latch cvars cannot be changed on a TITLEMAP

by Player701 » Tue Mar 21, 2023 2:59 am

Clarification: latch CVARs can be changed, the actual problem is that there is no way to retrieve the pending value from user code - thus, you always see only the current value in the menu, and this is indeed confusing. This likely stems from the fact that latch CVARs were not designed to work with menus in the first place. I believe this issue has been brought up multiple times before, and the only workaround I know of is to use non-latch CVARs instead and implement the "latching" mechanism manually in ZScript, which is exactly what I did in my own project.

Latch cvars cannot be changed on a TITLEMAP

by Zhs2 » Mon Mar 20, 2023 9:15 am

... because a TITLEMAP counts as a game in progress. This hinders end user experience when you're developing a mod with a TITLEMAP (or an addon to one) involving options that shouldn't be able to be changed in the middle of a game session, as when the user enters the options menu they find options that inexplicably can't be changed plus zero feedback on why they can't change them.

Top