<2d6>
– Two Six-Sided Dice RollThe <2d6>
tag instructs the game engine to roll two six-sided dice and store the result for use in later conditional logic. This tag is used in paragraphs where a dice-based event or test is about to occur.
<2d6>
<if dice ...>
checks if it is to be meaningful.When <2d6>
is encountered:
g_dice
value for the current player.g_dice
is already set), it is not re-rolled. This preserves the original result for consistent conditional logic in the same paragraph.<if dice ...>
Once the dice have been rolled using <2d6>
, you can conditionally branch using the result:
<if dice gt 9> You rolled high! <else> Not high enough. <endif>
This will compare the stored 2D6 result (range 2–12) with the condition.
<2d6>
before using <if dice ...>
, otherwise the condition will fail or be ignored.<2d6>
do nothing once g_dice
is set.<2d6>
<if dice lt 6>
You barely managed to react in time!
<else>
You react confidently, unfazed.
<endif>
This rolls two dice and uses the result to determine how well the player responds.
<if dice ...>
– Used to evaluate the result of the last dice roll.<dice>
– For a single six-sided die roll (see separate documentation).