Pool of Possible Scenes: Anyone tried it?

Hello People,

I am new here,just got into ChoiceScript, which serves my purposes relatively decently, and I am right now working on the baseline gameplay and plot-line development of my project. An idea I have would be randomized scenes, for replay-ability.

Essentially, I would have a scene be selected from a pool of premade scenes, selected by random number generation:
Randomize a number between 1 to 3
if number_generated == 1, go to scene X
if number_generated == 2, go to scene Y
if number_generated == 3, go to scene Z

Pretty basic concept, not that difficult to pull off as I have some programming background knowledge in Python and R, and honestly I am willing to put up with the difficulty of doing more work as this can provide player some more fun and become my staple of gameplay.

What I am wondering about, has anyone tried this? And if so how did you audience react to it?


I would try the Vendetta demo. It is set up to be like an axle with spokes for questlines and have random scenes, some repeatable, some one-time and so forth. Programming is my weakness but what @Vendetta describes in his WiP thread sounds like he has done this and more.

Here is the link to his thread:

Vendetta WiP

Edit - Also, welcome to the community. There are a lot of good people here and I hope you find a home here as others have.


Thank you for the advice and lead.

And thanks for the warm welcome!


I would probably recommend not using randomness. Letting the player choose which scene they see, or basing it on stats, would make it much easier for players to get all of the different scenes, making it far less frustrating, while still keeping the same level of replayability.


Letting the player choose which scene they see, or basing it on stats

I might be doing this in that case, as I angry I case see player getting annoyed getting the same event multiple times. Also might be easier to balance it that way in comparison to random method.

You could use flags to avoid re-visiting scenes, that’d work if those scenes were just small changes in descriptions.

If you’re thinking about taking players down completely different random paths, you’re opening up a huge can of difficult to debug worms and probably going to end up with thoroughly confused players. Personally I wouldn’t do it, certainly not without warning the player beforehand.

My personal view on this topic; if the randomized scene is non-critical to your story, something like tertiary quest, I’d say go ahead.

The problem might lies in how you make a coherent transition between these scenes to the main plot, probably.

*create scene_select 0


*rand scene_select 0 2
*if (scene_select = 0)
  *goto_scene scene0
*elseif (scene_select = 1)
  *goto_scene scene1
  *goto_scene scene2

More complicated (but honestly not that complicated at all), if you’ve got a hub and you don’t want to reuse scenes:

*label randomise_scene

*rand scene_select 0 2

*if (((scene0_finished = true) and (scene1_finished = true)) and (scene2_finished = true))
  *goto_scene scene3

*elseif ((scene_select = 0) and (scene0_finished = false))
  *goto_scene scene0

*elseif ((scene_select = 1) and (scene1_finished = false))
  *goto_scene scene1

*elseif ((scene_select = 2) and (scene2_finished = false))
  *goto_scene scene2

  *goto randomise_scene


Essentially the storyline is going to be linear in its flow, as it follows the PC going up North to where most of the series is going to take place.

The general idea behind this book is that is that is acts as a prologue and world building book, where the player learns about the various cultures, mythology, and the environment in which they will stay for the next five years (at least that is what they think).

Because of that I am honestly going to have different events show depending on class and ethnicity, to show what various societies will think of you.

Thanks for the code. And thanks for reminding me about numbers in coding start at 0 as well.

Actually it works fine if you start at 1, ha ha. *rand 1 3 is legitimate.

As someone from Python, this blows my mind and it very interesting.

But yeah, I will probably have a hub style quest system during the Second Book, as that is where the PC begins to settle down in the town, and begins to learn about it.

I’ve got a hub system in my game right now. It’s a bit more complicated, however.

  # Work on myself.
    *goto_scene skills
  # Seek out rumours.
    *goto_scene rumours
  *selectable_if (exploring = true) # View the map.
    *goto map

Under skills we’ve got a tonne of different options that can improve your character or finish a (very) short goal. Some of them have flags that prevent re-use, whereas others you can do repeatedly. After each one is finished it takes you back to the hub.

And under rumours we’ve got actual quest hooks that take the main character on a longer adventure. I actually managed to get it so that it randomises which rumours appear for you, and it only re-rolls the rumours after you’ve spent some time doing something else: after it rolls, it switches a toggle to turn off rolling and the only way to switch it back to roll again is to move the clock forward through my “increase time” subroutine, which triggers whenever you do do something that takes a while (such as building a skill).

At the moment it works without any bugs, but we’ll see how things go later on.

Thought it might be enlightening to see how other people struggle through it.


Okay, that is cool!

I actually imagine this might be useful in the future depending on the baseline mechanics.

But yes, thanks for inspiration and advice. And I will probably end creating a development blog.

P.S. It reminds of games like Sryth and Torn City in which you select adventures based on text choices.

@MahatmaDagon’s The War for the West mentions:

I do think it contributes a great deal in a positive fashion to replayability and though I have only checked out the demo recently, the game is fascinating.


I have a setup similar to this for my new WIP, which is not yet up on Dashingdon. Each chapter has 2 scenes usually picked at random from a pool of 4-5 (with some as mandatory). I have a variable called scene which starts at 0, and at the start of the chapter a random dieroll to send them to their first scene. No matter which one it goes to, it adds +1 to the scene number at the beginning of that scene. Then at the end of each scene is a *if where if scene is < 2 it rerolls again, which will add +1 to scene once more. Then when it gets to the *if and has scene > 1, it jumps to the conclusion of the chapter. Rinse and repeat.

Probably not the most efficient; I am not a master coder. But it works and is easy to copy and paste.


Heart of the House did this; there are scenes within the House that can be reached at random. I quite liked the way it was used to represent the House sort of shuffling the MC off to wherever it fancied.


Yes I’ve also got one that is not released. It’s a stat based dragon survival/hoard gathering game with lots of randomised events and scenes, as well as many that have a percentage trigger (ie the more food and treasure you steal from the locals, the more likely you are to be hunted.) Kind of like Bunnies! which I’m pretty sure uses some randomised events and stats but with some extra mini-chapter kind of events mixed in. You can definitely set it so events don’t happen twice, there’s been a few options to do this in this thread. I’ve done it so that I label events like event1, event2 etc and mark them chosen or not_chosen. An if command sends you back to the random number reroll until it comes up with one you haven’t done yet. (Makes sense to me, but however suits you best)


*label eventselect

*label reroll
*rand event 1 2
*if event = 1
  *goto event1

*if event = 2
  *goto event2

*label event1
*if (event1= "completed")
  *goto reroll
*if (event1 != "completed")
  *set event1 "completed"
  Proceed to event.

Seedship also uses random events and is very popular. (Although it’s not choicescript.)

1 Like

Holy crap. you guys, there are so many replies and feedback here, thanks for all the help and showing a really warm community.