Random Branch
Random Branch
- Group
- Flow
- In the node menu
- Flow › Branches › Random Branch
- Where it can be used
- Scheme graphs
What it does
Section titled “What it does”A Random Branch starts exactly one of the nodes linked to Random. The pick is made anew each time the node runs.
Every branch can have a weight. A branch with a higher weight is picked more often. Equal weights give equal odds.
Example
Section titled “Example”Random Branch
One of 3 branches: 50% · 25% · 25%
When to use it
Section titled “When to use it”Use it when the story should take one of several turns and you do not want to decide which. Give a branch a bigger weight when it should happen more often.
Use a Chance instead when there are only two outcomes, success and failure, and the odds are one percentage.
Good to know
Section titled “Good to know”- With one branch linked, the card says it is always taken. With none linked, it says no branches are linked.
- When every branch has weight 0, the branches are picked with equal odds, and the card shows equal odds.
- A branch can carry lines that change its weight each time the node runs. The card then shows each branch as its start weight plus the number of lines, and it lists the problems of the lines per branch.
- A line that says the branch is not wanted gives that branch weight 0 while it holds.
Settings
Section titled “Settings”| Label | Draft key | Type | Default | Shown if, tooltip and notes |
|---|---|---|---|---|
| draft only | Weights | list of BranchWeight | [] |
|
Draft only: a draft sets it; the Studio has no row of its own for it.
Weights (draft only): the settings of each one
| Label | Draft key | Type | Default | Shown if, tooltip and notes |
|---|---|---|---|---|
| Node ID | NodeID | text | "" |
|
| Weight | Weight | number | 1 |
|
| Lines | Lines | wants lines | not in the data |
|
Outputs
Section titled “Outputs”- Random
In a draft
Section titled “In a draft”"type""Random Branch""set"keysWeights"then"keys"Random"
"<alias>": { "type": "Random Branch", "then": "<alias>"}