Selection Box

Ok... this one's, complicated. I know I probably CAN do this in the base system, but I was wanting to ask and see suggestions for the best way to pull it off.

Basically, I'm making a game where instead of an overworld, the player talks to an NPC who asks. "Where do you want to go" and it pops up a selection.

Here's the thing... I plan for that selection box to be ever changing.

When the game starts you have 3 options. The starter dungeon, and 2 others.

First, one of the dungeon's true name is a spoiler for said dungeon's story, so it's marked ???. However, upon beating that dungeon, the dungeon's name is revealed in the menu.

However... also, after beating EITHER of the new dungeons, a story event occurs that unlocks yet another one.

Now my first thought is to separate things into events with 4 different versions of the layout, 1 for ???, 1 for ??? + the new dungeon, one for the dungeon's name, and one for the dungeon's name with the new dungeon.


But that honestly sounded like there could be some errors in the event processing to get all 4 potential results, especially since I plan for the game to continue past that point and unlock even more after all 3 are completed.

Any ideas?
If you only have those 4, then it's pretty easy to do with events.

For simplicity, let's call them Dungeon 1, Dungeon 2, Dungeon 3 and Dungeon 4. Dungeon 3 will be the ???

Have 2 switches - one will be for Dungeon 2 Beaten, the other will be for Dungeon 3 Beaten

Code:
Conditional Branch: Dungeon 2 Beaten
  Conditional Branch: Dungeon 3 Beaten
    Show Choices: Dungeon 1, Dungeon 2, Dungeon 3, Dungeon 4
    (add the processing for each choice here)
  Else
    Show Choices: Dungeon 1, Dungeon 2, ???, Dungeon 4
    (add the processing for each choice here)
  End
Else
  Conditional Branch: Dungeon 3 Beaten
    Show Choices: Dungeon 1, Dungeon 2, Dungeon 3, Dungeon 4
    (add the processing for each choice here)
  Else
    Show Choices: Dungeon 1, Dungeon 2, ???
    (add the processing for each choice here)
  End
End

So, if Dungeon 2 has been beaten it will determine whether to show the name of Dungeon 3 or not, and regardless, will show Dungeon 4. If Dungeon 2 hasn't been beaten yet, then either Dungeon 3 has been and it will show its name as well as Dungeon 4, or it hasn't been beaten yet, so it won't show either.

A more simple approach is simply to use a variable to contain the name of Dungeon 3 - set the variable to "???" (via the Script box in the Control Variables command) at the start of the game (let's say you use variable 15), then when you beat Dungeon 3, do another Control Variables to set variable 15 to "Dungeon 3".

Then you can simply do this (assuming you used switch 8 and 9 for completing the two dungeons):
Code:
Conditional Branch: Script: $gameSwitches.value(8) || $gameSwitches.value(9)
  Show Choices: Dungeon 1, Dungeon 2, \V[15], Dungeon 4
  When Dungeon 1
    ...
  When Dungeon 2
    ...
  When \V[15]
    ...
  When Dungeon 4
    ...
Else
  Show Choices: Dungeon 1, Dungeon 2, \V[15]
  ...
End

What do you mean by "intend for the game to continue past that point and unlock even more"? Will they all be added to the same menu? In that case, you will probably need a plugin - Hime has a conditional choices and a larger choice box plugin that can be used together.
Yes.

For future dungeons beyond the initial 4, those would be handled via a "Story Progress" variable.

Unlocking more of them beyond the inital 4.

Once things get past 6, the menu will be handled by a "Show more" option to showcase more options.
An alternative option is to use Hidden Type A (or B) items to track unlocked destinations. You can add one every time the player unlocks a new destination, then use a Select Item command to get the player's input when they talk to the NPC. Select Item waits for the player to select an item of the specified type, then stores that item's ID (or 0 if cancelled) in the specified variable, which you can check with branches as usual. The downside is that there are only two hidden types available for items by default, so you might want to use them for something else.

If you want to avoid the branches with Show Choices then like Shaz suggests you can use a plugin to conditionally hide and/or disable choices that aren't yet available, e.g.
Related plugins are linked on that page~
Maybe this Plugin helps you: http://www.yanfly.moe/wiki/Common_Event_Menu_(YEP)

It's very flexible and you can add / remove items as you wish.
An alternative option is to use Hidden Type A (or B ) items to track unlocked destinations.
I have to say - I just LOVE this option and it's far better than my idea!
Hi there, first post so hopefully it is helpful. You could check out this plugin: https://forums.rpgmakerweb.com/inde...l-show-choices-hide-or-disable-choices.96941/

I've just implemented it the other day and it's very handy for hiding choices based on variables etc. Combined with some of the above answers you should be able to customise it as you want. All the best!
Went with Moerder's plugin. Seemed like the best option.
Thanks everyone.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/selection-box.134907/