Disable Game End

I tried posting this an hour ago, but it didn't work, so I've been waiting an hour for a response that would never exist 😛

Anyway! I'm wondering if it is possible to disable the Game End button in the menu.

There's an event in my game where the player is forced into the menu, and told to use an item. I realised that it's possible to end the game during that event! What if someone ends the game by accident? Then they have to start from the start because they didn't have a chance to save earlier, therefore causing them to not being bothered to go through all the text at the start, deleting the game from their computer, and telling everyone not to download it! D:

In all seriousness, I really would like to know if there was a way to do this. And if not, perhaps there is a script? I only need the Game End button to be disabled. Not anything else 🙂

Also, if it helps... I'm using Galvs Menu Themes Engine

Thanks in advance!  :stache:
you could use the 'change menu access' and set it to 'disable' and then i'm pretty sure it's possible to go directly to your items panel (via a script) that way

it stops the ability to end the game and forces item choice?

perhaps right before you get them to do the item choice you do an auto save? 🙂

again a script 🙂
In the Window_MenuCommand script, comment out line 41 (add_game_end_command)


I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Wait, Shaz. I don't want to get rid of the button entirely. Just for a little while. :stache:
Do you want to remove it altogether for that period of time, or just disable it so it can be seen but not selected?


Here's how you can do it using a switch. I'll use switch 15 in the example, but you change it to whatever you want. Switch 15 = ON means the command is DISabled.


So, if you want the command to not be there at all, go to line 41, which is this:

Code:
add_game_end_command
and change it to this:
Code:
add_game_end_command if !$game_switches[15]
If you want it to be there, but just greyed out and not selectable, go to line 73 instead, which is this:
Code:
add_command(Vocab::game_end, :game_end)
and change it to this:
Code:
add_command(Vocab::game_end, :game_end, !$game_switches[15])
Sorry about that, I went on holiday for awhile but I'm back!

I wanted it to be grayed out and not selectable, so I changed the script line you told me too. Now I need to know how to go about making the command grayed out. It's too my understanding that the changes I made enabled me to be able to do that somehow, but I'm not exactly sure on how. Do I use a script call or something?
So if you want it just greyed out and not selectable, you want to use the bottom two options, not the top two.
Yup. I did that, but it's still possible to select it and exit the game. Do I need to do a script call or flip a switch or something like that?

Command.png
maybe you have a script that modifies the menu?

Original thread: https://forums.rpgmakerweb.com/threads/disable-game-end.21592/