In my game The Shades of Dominion, the players are Shade Mages that drain The Shade from the realm into their Shade Vessels, which they can then use to cast spells. Each Shade Vessel has a "Syp Level" which determines how full it is and how difficult it would be to get Shade from it at a moment's notice. The first roll/button, is the Stain Button circled in Red. In addition to all of the things it does with The Shade, I also need it to Uncheck the first left-most Checked box in the Syp Level bar. I just need it to subtract one Syp Level. That's it. The second roll/button is the Syphon Button circled in Green. This button is pressed when the Player wants to fill their Shade Vessel with Shade from the realm. The roll is always a Xd6>4 roll, with usually 2 or more successes. I then need this roll to Check as many boxes, from right-to-left, as there are successes or until the Syp Level reaches "full". The third roll/button is the Syp Check, highlighted in yellow. The purpose of this button is to determine whether or not the Shade Mage was able to concentrate hard enough to extract Shade from their Shade Vessel in high-stress situations (like combat or in the middle of disabling a trap, ect). When pressed it needs to read what the current Syp Level is and roll a single d6. If the result succeeds and is equal to or higher than the current Syp Level, the roll continues as if the Stain Button had been pressed, generating Shade and reducing the Syp Level by one. If the result is a failure, no Shade is generated and the Syp Level remains the same. The point is to not require the player to make any changes the Syp Level Bar themselves, but to have the game track that on its own. I have not started any Sheet Worker or CSS for the Syp Level Bar on any of the above buttons yet...I will provide below what I have done for each button and the HTML of the Syp Level Bar. Syp Level Bar: <label>Syp Level:</label><span> Full: <input type="checkbox" class="syplevel" name="attr_syplevelfull" value="6" style="pointer-events: none;"> 2+: <input type="checkbox" class="syplevel" name="attr_syplevel2+" value="5" style="pointer-events: none;"> 3+: <input type="checkbox" class="syplevel" name="attr_syplevel3+" value="4" style="pointer-events: none;"> 4+: <input type="checkbox" class="syplevel" name="attr_syplevel4+" value="3" style="pointer-events: none;"> 5+: <input type="checkbox" class="syplevel" name="attr_syplevel5+" value="2" style="pointer-events: none;"> 6+: <input type="checkbox" class="syplevel" name="attr_syplevel6+" value="1" style="pointer-events: none;"> Empty: <input type="checkbox" class="syplevel" name="attr_syplevelempty" value="0" style="pointer-events: none;"></span> Syphon (HTML): <button type="roll" value="&{template:syphonroll} {{title=Syphon the Realm!}} {{subtitle= @{magename} Drinks Deeply and drains the Realm for [[@{syphonroll}d6>4]] Syp Levels!}}">Syphon</button>
<rolltemplate class="sheet-rolltemplate-syphonroll">
<div class="sheet-container" >
<div class="sheet-header">
{{#title}}<div class="sheet-title">{{title}}<br></div>{{/title}}
{{#subtitle}}<div class="sheet-subtitle"><br><br>{{subtitle}}</div>{{/subtitle}}
</div>
<div class="sheet-content">
{{#allprops() title subtitle desc color}}
<div class="sheet-key">{{key}}</div>
<div class="sheet-value">{{value}}</div>
{{/allprops() title subtitle desc color}}
</div>
</div>
</rolltemplate> Stain (HTML): <button type="action" name="act_staincheck">Stain</button>
<rolltemplate class="sheet-rolltemplate-staincheck">
<div class="sheet-header">
{{#name}}<div class="sheet-name">{{name}}</div>{{/name}}
</div>
<table>
<tbody>
<div class="sheet-template-content">
<tr class="sheet-aether_row">
{{#Aether}}
<td><div class="sheet-aether-roll-icon"><img class="sheet-aether-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387716976/LoT1TR39hDI8vQiFTd34Kg/thumb.png?1712432342" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387716976/LoT1TR39hDI8vQiFTd34Kg/thumb.png?1712432342</a>" alt="Aether Icon Logo"></div></td>
<td><div class="sheet-aether-roll-title">Aether</div></td>
<td><div class="sheet-aether-roll-result">{{Aether}}<br></div></td>
{{/Aether}}
</tr>
<tr class="sheet-corruption_row">
{{#Corruption}}
<td><div class="sheet-corruption-roll-icon"><img class="sheet-corruption-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387716826/vQzXciBjpL8mmM4d6zwu7g/thumb.png?1712432290" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387716826/vQzXciBjpL8mmM4d6zwu7g/thumb.png?1712432290</a>" alt="Corruption Icon Logo"></div></td>
<td><div class="sheet-corruption-roll-title">Corruption</div></td>
<td><div class="sheet-corruption-roll-result">{{Corruption}}<br></div></td>
{{/Corruption}}
</tr>
<tr class="sheet-destruction_row">
{{#Destruction}}
<td><div class="sheet-destruction-roll-icon"><img class="sheet-destruction-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387716891/GreHB-W2DFGcHqwUrmfqSw/thumb.png?1712432316" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387716891/GreHB-W2DFGcHqwUrmfqSw/thumb.png?1712432316</a>" alt="Destruction Icon Logo"></div></td>
<td><div class="sheet-destruction-roll-title">Destruction</div></td>
<td><div class="sheet-destruction-roll-result">{{Destruction}}<br></div></td>
{{/Destruction}}
</tr>
<tr class="sheet-purity_row">
{{#Purity}}
<td><div class="sheet-purity-roll-icon"><img class="sheet-purity-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387716865/pJTQKWHxPghesYG2oRv7Sw/thumb.png?1712432306" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387716865/pJTQKWHxPghesYG2oRv7Sw/thumb.png?1712432306</a>" alt="Purity Icon Logo"></div></td>
<td><div class="sheet-purity-roll-title">Purity</div></td>
<td><div class="sheet-purity-roll-result">{{Purity}}<br></div></td>
{{/Purity}}
</tr>
<tr class="sheet-vitality_row">
{{#Vitality}}
<td><div class="sheet-vitality-roll-icon"><img class="sheet-vitality-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387716923/J3FOFhYEFRuRveVN9_nWTg/thumb.png?1712432328" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387716923/J3FOFhYEFRuRveVN9_nWTg/thumb.png?1712432328</a>" alt="Vitality Icon Logo"></div></td>
<td><div class="sheet-vitality-roll-title">Vitality</div></td>
<td><div class="sheet-vitality-roll-result">{{Vitality}}<br></div></td>
{{/Vitality}}
</tr>
<tr class="sheet-unstained_row">
{{#Unstained}}
<td><div class="sheet-unstained-roll-icon"><img class="sheet-unstained-icon" src="<a href="https://s3.amazonaws.com/files.d20.io/images/387718371/YUXVmE5_RKEaaOy_UEcCVA/thumb.png?1712432787" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/387718371/YUXVmE5_RKEaaOy_UEcCVA/thumb.png?1712432787</a>" alt="Unstained Icon Logo"></div></td>
<td><div class="sheet-unstained-roll-title">Unstained</div></td>
<td><div class="sheet-unstained-roll-result">{{computed::Unstained}}<br></div></td>
{{/Unstained}}
</tr>
</div>
</tbody>
</table>
</rolltemplate> Stain (Sheet Worker): on('clicked:staincheck', event => {
const stain_string = "&{template:staincheck} {{name=Stain Check}} {{Aether=[[@{aetherscore}d6>@{aetherstain}]]}} {{Corruption=[[@{corruptionscore}d6>@{corruptionstain}]]}} {{Destruction=[[@{destructionscore}d6>@{destructionstain}]]}} {{Purity=[[@{purityscore}d6>@{puritystain}]]}} {{Vitality=[[@{vitalityscore}d6>@{vitalitystain}]]}} {{Unstained=[[0]]}}";
startRoll(stain_string, roll => {
console.log(roll);
let aether_dice = parseInt(roll.results.Aether.dice.length)||0;
let aether_results = parseInt(roll.results.Aether.result)||0;
let corruption_dice = parseInt(roll.results.Corruption.dice.length)||0;
let corruption_results = parseInt(roll.results.Corruption.result)||0;
let destruction_dice = parseInt(roll.results.Destruction.dice.length)||0;
let destruction_results = parseInt(roll.results.Destruction.result)||0;
let purity_dice = parseInt(roll.results.Purity.dice.length)||0;
let purity_results = parseInt(roll.results.Purity.result)||0;
let vitality_dice = parseInt(roll.results.Vitality.dice.length)||0;
let vitality_results = parseInt(roll.results.Vitality.result)||0;
let unstained_results = parseInt(roll.results.Unstained.result)||0;
let dice_total = aether_dice + corruption_dice + destruction_dice + purity_dice + vitality_dice;
let result_total = aether_results + corruption_results + destruction_results + purity_results + vitality_results;
let new_unstained = dice_total - result_total;
roll.results.Unstained.result = new_unstained;
roll.results.Unstained.expression = new_unstained;
finishRoll(roll.rollId, {
Unstained: new_unstained
});
});
}); Any suggestions and pointers are appreciated!