[SOLVED] [MENUDEF] My OptionValue is behaving weirdly.

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom 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.

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!)
yum13241
Posts: 853
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

[SOLVED] [MENUDEF] My OptionValue is behaving weirdly.

Post by yum13241 »

It's not cycling properly:

Code: Select all

OptionValue "y_LightModes"
{
	-1, "$MENU_LIGHT_NOTOUCH" // sets gl_maplightmode to -1.
	0, "$MENU_LIGHT_STANDARD" // standard OGL formula.
	1, "$MENU_LIGHT_BRIGHT" // Brighter than Standard.
	2, "$MENU_LIGHT_DOOM" // not real Doom.
	3, "$MENU_LIGHT_DARK" // Darker than "Doom".
	4, "$MENU_LIGHT_LEGACY" // Doom Legacy lighting.
	5, "$MENU_LIGHT_BUILD" // ala Duke 3D.
	8, "$MENU_LIGHT_ZDOOM" // aka "Software". This is supposed to be the ZDoom renderer, but it looks like Vanilla.
	16, "$MENU_LIGHT_VANILLA" // aka "Vanilla". It's a whole lightstep darker.
}
Anything after 5 is not working, and I can't cycle backwards. How do I solve this?
Last edited by yum13241 on Thu Nov 09, 2023 1:41 am, edited 1 time in total.
User avatar
Player701
 
 
Posts: 1685
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support

Re: [MENUDEF} My OptionValue is behaving weirdly.

Post by Player701 »

It looks like values 8 and 16 are not supported by the gl_maplightmode CVAR - they cause it to reset itself to -1. Remove the lines corresponding to unsupported values from your OptionValue definition, and it should work properly.
yum13241
Posts: 853
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: [MENUDEF} My OptionValue is behaving weirdly.

Post by yum13241 »

Thanks!

Return to “Scripting”