That is a good idea! I think it may work with what I'm trying to accomplish.
I should have been more descriptive on what I'm exactly trying to do, so It's probably best that I explain sooner than later!
Basically, the player character will interact with a bed, and it will ask the player whether they wish to sleep or not. When the player confirms they want to sleep, there will be a chance that the player will receive a dream. Some dreams will be rarer than others. The most likely outcome of the interaction would be no dream at all. After the player has woken up, their MP and HP will be fully replenished.
I hope that better explains what I'm going for, I apologize for not specifying earlier.
Ahh, yeah well that is pretty much the way I'd think you should do it.
Event Commands > Control Variables > (pick a variable) > Random > between 1-100
Spoiler: screenshot for clarification
then in your actual sleepytime event, just add extra pages that would trigger the dreams or however that works, and set the extra pages to have an event trigger that maps to the same variable with a number that represents the chance
Spoiler: another screenshot for clarification
A couple things to note about this pattern:
- higher page numbers take priority over lower page numbers, so be sure to order your page conditions accordingly.
- in the variable event trigger, I wrote 80, but its actually the inverse % chance based on the setup (20% chance) because when we control the variable, we ask it to pick a random number between 1-100, and in the trigger we're saying "if its greater than or equal to 80", which... well, logic dictates that would be about 20% chance.