Changing multiple CVARs in MenuDef

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

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: Changing multiple CVARs in MenuDef

Re: Changing multiple CVARs in MenuDef

by Revae » Mon Jul 12, 2021 8:36 pm

Hey, an old thread relevant to my interests...
The problem with this seems to be that it won't save the cvars between plays. You can't exec an external list of settings from an alias, either. Or force a writeini.
So what do? How would I set something like this up without the player having to hop into the menu every time they play?

Re: Changing multiple CVARs in MenuDef

by LanHikariDS » Thu Dec 06, 2018 8:46 pm

Aha, thank you!

Re: Changing multiple CVARs in MenuDef

by Lord Misfit » Sun Nov 18, 2018 5:44 pm

You need to define aliases for your "set to default" command in the KEYCONF lump of your project:

Code: Select all

alias mygame_defaults1 "set mygame_var1 [whatever the default number is]; set mygame_var2 [whatever the default number is] (etc)"
Then in MENUDEF:

Code: Select all

	Command "Restore Default Settings", 			"mygame_defaults1"
Hope that helps. o.o

Changing multiple CVARs in MenuDef

by LanHikariDS » Wed Nov 14, 2018 8:50 pm

My question is pretty much as the title states, how do I change multiple CVARs in MenuDef?
I'm doing up a mod with some custom CVAR setup in the menus, and I'm trying to have a single button that sets most of the CVARs to predefined values, not unlike a "Reset to Defaults" button. How can I go about doing this?

Top