This is a continuation of <a href="https://app.roll20.net/forum/post/11740051/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/11740051/slug%7D</a> I am finally able to continue working on this sheet and it is still absolutely kicking my ass. Here's what I have thus far: Button: <div class="sheet-row">
<div class="sheet-col">
<button type="roll" value="&{template:default} {{name=Syphon}} {{Roll=[[@{syphonroll}d6>4]]}}" name="SyphonRoll">Syphon</button>
</div>
<div class="sheet-col">
<button type="action" name="StainCheck">Stain</button>
</div>
<div class="sheet-col">
<button type="roll" value="&{template:default} {{name=Spell Battery}} {{Roll=[[@{spellbatt}d6kh1]]}}" name="SpellBatt">Spell Battery</button>
</div>
<div class="sheet-col">
<button type="roll" value="&{template:default} {{name=Syp Check}} {{Roll=[[1d6]]}}" name="SypCheck">Syp Check</button>
</div>
</div> Worker Sheet: on('clicked:StainCheck', () => {
getAttrs(["AETHERSCORE","AETHERSTAIN","CORRUPTIONSCORE","CORRUPTIONSTAIN","DESTRUCTIONSCORE","DESTRUCTIONSTAIN","PURITYSCORE","PURITYSTAIN","VITALITYSCORE","VITALITYSTAIN"], function(values) {
let aetherscore = parseInt(values.AETHERSCORE)||0;
let aetherstain = parseInt(values.AETHERSTAIN)||0;
let corruptionscore = parseInt(values.CORRUPTIONSCORE)||0;
let corruptionstain = parseInt(values.CORRUPTIONSTAIN)||0;
let destructionscore = parseInt(values.DESTRUCTIONSCORE)||0;
let destructionstain = parseInt(values.DESTRUCTIONSTAIN)||0;
let purityscore = parseInt(values.PURITYSCORE)||0;
let puritystain = parseInt(values.PURITYSTAIN)||0;
let vitalityscore = parseInt(values.VITALITYSCORE)||0;
let vitalitystain = parseInt(values.VITALITYSTAIN)||0;
setAttrs({
aetherscore: aetherscore,
aetherstain: aetherstain,
corruptionscore: corruptionscore,
corruptionstain: corruptionstain,
destructionscore: destructionscore,
destructionstain: destructionstain,
purityscore: purityscore,
puritystain: puritystain,
vitalityscore: vitalityscore,
vitalitystain: vitalitystain
})
const stain_string = '&{template:default} {{name=StainCheck}} {{roll=[[ [[@{aetherscore}d6>@{aetherstain}]] + [[@{corruptionscore}d6>@{corruptionstain}]] + [[@{destructionscore}d6>@{destructionstain}]] + [[@{purityscore}d6>@{puritystain}]] + [[@{vitalityscore}d6>@{vitalitystain}]] ]]';
startRoll(stain_string, stain_roll => {
console.log(stain_roll);
finishRoll(stain_roll.rollId);
});
});
}) HTML: <rolltemplate class="sheet-rolltemplate-staincheck">
<div class="aetherstainheading">{{title}}</div>
<div class="results">
<div class="key">Aether Stain</div>
<div class="value">{{aetherstain}} + "+"</div>
<div class="key">Roll</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
<div class="corruptionstainheading">{{title}}</div>
<div class="results">
<div class="key">Corruption Stain</div>
<div class="value">{{corruptionstain}} + "+"</div>
<div class="key">Roll</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
<div class="destructionstainheading">{{title}}</div>
<div class="results">
<div class="key">Destruction Stain</div>
<div class="value">{{destructionstain}} + "+"</div>
<div class="key">Roll</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
<div class="puritystainheading">{{title}}</div>
<div class="results">
<div class="key">Purity Stain</div>
<div class="value">{{puritystain}} + "+"</div>
<div class="key">Roll</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
<div class="vitalitystainheading">{{title}}</div>
<div class="results">
<div class="key">Vitality Stain</div>
<div class="value">{{vitalitystain}} + "+"</div>
<div class="key">Roll</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
<div class="unstainedstainheading">{{title}}</div>
<div class="results">
<div class="key">Unstained Stain</div>
<div class="value"><span class="dice">
{{computed::roll}}</span> = {{roll}}
</div>
<div class="key">Result</div>
<div class="value">
{{#rollGreater() computed::score 0}}
({{computed::score}}
{{/rollGreater() computed::score 0}})</div>
</div>
</rolltemplate> CSS: .sheet-rolltemplate-staincheck {
background: white;
}
.sheet-rolltemplate-staincheck .sheet-heading {
background: black;
color: white;
text-align: center;
}
.sheet-rolltemplate-staincheck .sheet-results {
display: grid;
grid-template-columns: 49% 49%;
column-gap: 2%;
line-height: 1.8em;
}
.sheet-rolltemplate-staincheck .sheet-results {
text-align: right;
}
Right now, my ONLY objective is to at least get the console.log to show so I know what I have to work with. Any help is appreciated!