Toggleable template fields, an update on reusing rolls Following on from the earlier toggleable template fields post : Attempting to reuse rolls
in a hide-able section would prevent that section from being hidden.
However this problem can be avoided by using HTML entities to partially
escape any roll reference. So $[[0]] becomes $[[0]].
Reusing a roll this way doesn't interact with the rest of the roll
parsing making it safe to use for our purposes here. (Note: It only
works when using roll templates) Toggleable template fields, roll controlled Those
familiar with reusing rolls know that trying to reuse a roll before it
happens breaks any roll it was nested inside of. This behaviour can be
used to control if a set of template fields is inside a working roll or
not, since a "broken" roll won't hide the fields but a working roll
will. By using a dynamic roll reference
to conditionally reference a nested roll within a hide-able section.
That hide-able section can then be hidden or shown based on a roll
result. A single section example In this example 2d4 is rolled and on double one will show "Snake Eyes!" after the roll plus a "Bonus Section" $[[$[[1]]]] [[[ [[ {0,[[2d4]]}=2*2 ]] ]]] &{template:default} {{2d4=$[[0]]}} [[[0 [[0]] {{2d4=$[[0]] Snake Eyes!}} {{Bonus Section}}]]] A multi section example In this example a d6 is rolled that highlights a roll of 1 and a roll of 6 with bonus d6 $[[$[[1]]]] [[[ [[ {1,6,6}=[[d6]]*2 ]] ]]] &{template:default} {{d6=$[[0]]}} [[[0 [[0]] {{d6=$[[0]] One!}} ]]] [[[0 [[0]] {{d6=$[[0]] Six!}} {{Bonus d6=$[[5]]}} ]]] [[d6 Bonus]]