Question about DEFCVAR and Cvar

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

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.
snakebyte
Posts: 19
Joined: Sat Apr 22, 2023 10:47 am
Preferred Pronouns: He/Him

Question about DEFCVAR and Cvar

Post by snakebyte »

Why for some cvars, I cannot set the default value in DEFCVAR? I get a message like this.

Code: Select all

Cannot set cvar default for non-config cvar 'sv_noautoaim'
I get the same messages even if I try to set the default values for the cvars about jumping, crouching and falling damage.

I know I can anyway set the jumping, crouching and falling damage in the settings of my map. But what about autoaim? I am forced to set the autoaim "0" or use WEAPON.NOAUTOAIM on all my weapons.

But even if I hide the menu that allows the player to change those settings, what about the console? The player can still open the console and change the 'sv_fallingdamage'.

There is no way on GZDoom not to allow the player to change some configuration?

What if I want to develop a standalone horror game in GZDoom? It would be a shame if the player can use the console, "noclip" and bye bye
yum13241
Posts: 782
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support

Re: Question about DEFCVAR and Cvar

Post by yum13241 »

You can only set CVars that are saved to the config. Use MAPINFO.

Modify GZDoom if you really don't want cheats.

Return to “Assets (and other stuff)”