What I mentioned last time is how you’d trigger a quest at a certain stat level or above. Here’s how you’d randomize which quest out of ten someone sees, after going to the quest scene.
There’s a command called *rand which rolls a die for you:
*rand quest_number 1 10
Let’s say quest_number refers to each of your possible quests. (You could actually call this “quest” too, because a variable and a scene name are different things. But to avoid confusion, we’ll name variables and scenes uniquely.) The first number after *rand is the lowest result you could roll, the second is the highest.
This is what comes next:
…which leads to a label within the scene for that particular quest.
[Text quest, not indented]
Repeat 9 more times.
Now you’ll have to tell the code not to use any quest twice. Add a variable for every quest. Because the game will have to remember it despite leaving this scene and coming back, they’ll have to be permanent variables, so add them to startup.
*create quest_1_done false
(Do this for quests 2-10.)
Now you can do this with each quest:
*if not (quest_1_done)
*set quest_1_done true
[continue quest text]
[at end, use *return or *goto_scene (scene you came from)]
Final step: add this -
Just above your *rand command. Then if your player triggers the flag saying they’ve already been to that quest, they’ll invisibly go back to choose another.