<div class="sheet-maindiv">
<button type="roll" value="&{template:bug} {{name=Bug}} {{target=[[?{Choose|Fire,0|Water,1}]]}}">BUG</button>
<button type="roll" value="&{template:bug-free} {{name=Bug}} {{target=[[?{Choose|Fire,0|Water,1}]]}}">OK</button>
</div>
<rolltemplate class="sheet-rolltemplate-bug">
<div style="color: #7F0000">
<span
{{#rollTotal() target 0}}title="Fire"{{/rollTotal() target 0}}
{{#rollTotal() target 1}}title="Water"{{/rollTotal() target 1}}
>Element</span>.
Hovering the number gives a nicely sized hint box in Firefox. Unfortunately, the roll query will always evaluate to fire/0.
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-bug-free">
<div style="color: #007F00">
<span title="
{{#rollTotal() target 0}}Fire{{/rollTotal() target 0}}
{{#rollTotal() target 1}}Water{{/rollTotal() target 1}}
">Element</span>.
Hovering the number gives a big hint box in Firefox. At least, the roll query evaluates correctly.
</div>
</rolltemplate> When using roll templates, I came across the following problem. I used roll helper functions within an HTML element (<span> in the above example) and noticed that when giving the attribute "title" as above I will get a big hint box. Trying to mask the whitespace (inspired by LaTeX) with <!-- [... whitespace ...] --> did not work, but putting the whole title attribute inside worked. Kinda. The roll query always evaluates to the first option. I have not found a definite answer on what exactly causes this problem, tried to replace = and " with their HTML entities to no avail. Not sure whether this really is a bug or just me doing it wrong.