π₯ Random path
π₯ Random path
The Random Path block picks one of the paths you've prepared in your story, at random. This is what creates surprise: a player who opens the same chest twice might find treasure the first time, and a trap the second.
Use it whenever you want the same spot in your story to not always play out the same way: an encounter, a reward, an obstacle...
π₯ Entries
- in (Flow): Triggers the draw when the flow reaches this block.
- paths (Number): Number of possible paths from which the block will choose randomly (default: 2).
- shuffle (Boolean): If activated (True), the block memorizes the paths already taken (draw without replacement) and excludes them until all have been used at least once.
π€ Outings
- 1, 2, 3... (Flow): Numbered outputs corresponding to the possible paths (their number depends on the value of "paths"). Only one output is activated randomly.
- end (Flow): Output triggered only if "shuffle" is enabled and all paths have already been taken at least once.
π‘ Example of use
Scenario: Opening a mysterious chest
- The player finds a chest in a dark room.
- A message is displayed: "You open the trunk carefully...".
- The Random Path block is placed with number = 3 to simulate three possible outcomes.
- The block randomly chooses an output:
- Exit 1: "The chest contains 100 gold coins!" (reward).
- Exit 2: "A trap is triggered! You lose 20 VP." (danger).
- Exit 3: "The trunk is empty..." (disappointment).
- The flow continues to the event corresponding to the selected output.
βοΈ Technical Details
- Path management: Outputs are generated dynamically based on the value of "paths". If paths = 2, only outputs 1 and 2 will be available.
- "Shuffle" mode (draw without replacement): When this mode is activated, the block uses an internal list to follow the paths already taken. Once all paths are used, the "end" output is triggered.
- Reset: The block does not automatically reset its state between game sessions. For a complete new draw, disable then re-enable "shuffle" mode.
Documented version: v1
Updated on: 06/09/2026
Thank you!
