Skip to content

Random Branch

Group
Flow
In the node menu
Flow › Branches › Random Branch
Where it can be used
Scheme graphs

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.

The Random Branch of the demo scheme Scheme 16: Season of War (Drafts/schemes/16-season-of-war.json). Three branches with the weights 2, 1 and 1; the card turns them into percentages.

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.

  • 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.
LabelDraft keyTypeDefaultShown if, tooltip and notes
draft onlyWeightslist of BranchWeight[]
  • The Studio shows a Weight on each linked branch instead (min 0); a branch without an entry weighs 1.

Draft only: a draft sets it; the Studio has no row of its own for it.

Weights (draft only): the settings of each one
LabelDraft keyTypeDefaultShown if, tooltip and notes
Node IDNodeIDtext""
  • The branch's node: "@alias".
WeightWeightnumber1
  • min 0
LinesLineswants linesnot in the data
  • Wants lines (draft-format.md, Amounts and wants): when, more, less, times, doesNotWant, label; none = Weight alone.
  1. Random
"type"
"Random Branch"
"set" keys
Weights
"then" keys
"Random"
"<alias>": {
"type": "Random Branch",
"then": "<alias>"
}