Additional menu on "new game"? Like player class selection?

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!)
Post Reply
User avatar
Sunbeam
Posts: 104
Joined: Tue Apr 09, 2013 4:38 am
Contact:

Additional menu on "new game"? Like player class selection?

Post by Sunbeam »

So when selecting "new game" from the main menu the following sub-menus get opened:
Player class, episode, skill level. Is there any way to add another menu after this with which I can set an option for the new game? Like a CVAR or a variable in ACS? Or just call a script?
If possible I would like to avoid ACS-based ingame "menus" to achieve the same because it would be best for the setting to be set before the level actually starts.

This seems to be an easy task, but I couldn't find anything.
User avatar
PlayTheDemO65
Posts: 5
Joined: Mon May 25, 2020 1:26 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Additional menu on "new game"? Like player class selecti

Post by PlayTheDemO65 »

it's in the gameinfo lump
User avatar
PlayTheDemO65
Posts: 5
Joined: Mon May 25, 2020 1:26 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Additional menu on "new game"? Like player class selecti

Post by PlayTheDemO65 »

Sorry I This may be more use than my last post

decorate lump

actor Player_DoomGuy : DoomPlayer
{
Health 75
player.maxhealth 75
}

mapinfo lump

gameinfo
{
playerclasses = "Player_DoomGuy", "Player_ZombieMan" , "Player_DoomImp"
}
User avatar
Sunbeam
Posts: 104
Joined: Tue Apr 09, 2013 4:38 am
Contact:

Re: Additional menu on "new game"? Like player class selecti

Post by Sunbeam »

Thanks. However using the class selection menu seems like a hack to me. I want to avoid using it for this purpose if I can. Especially if I really want to use it for selecting a class at a later point.

I realized that CVARs are also ruled out, because they can change during the course of the game. I need the value to only be set once at the beginning.

Are there any other ideas? Or is this currently not possible?
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Additional menu on "new game"? Like player class selecti

Post by wildweasel »

Sunbeam wrote:I realized that CVARs are also ruled out, because they can change during the course of the game. I need the value to only be set once at the beginning.
Not necessarily, as CVARINFO has a "latch" keyword that will prevent the value from taking effect until the game is started again. I would imagine you could specify it like so:

Code: Select all

server int latch mymod_everythingsucks = 0
Then, if the user tries to enable "Everything Sucks!" from the menu during a game, they'd be greeted with the message "mymod_everythingsucks will be changed for next game."
User avatar
Sunbeam
Posts: 104
Joined: Tue Apr 09, 2013 4:38 am
Contact:

Re: Additional menu on "new game"? Like player class selecti

Post by Sunbeam »

Thanks for the info. However I would need the value not to change for the whole rest of the game. So an ACS variable seems the better option here.

Still, is it possible to create an additional menu like the class selection?
Post Reply

Return to “Scripting”