I would like to add a custom class to a div with a class sheet-template-row in the roll template that displays the results, depending on what the computation yields (success, failure). This is the action call: <button type="action" class="dice d100" name="act_pw_st"></button> This is my rolltemplate: <rolltemplate class="sheet-rolltemplate-pw"> <div class="sheet-template-container"> <div class="sheet-template-header">{{name}} für {{character}}</div> <div class="sheet-template-content"> <div class="sheet-template-row"> {{computed::roll1}} </div> </div> </div> </rolltemplate> This is the worker sheet code: <script type="text/worker"> let lookupPw = { 'st': { 'name': 'Stärke', 'attribute': 'St', 'bonus': 'ItemBStärke' } } // Custom Role Parse für Prüfwürfe //let pwlist = ["st", "gs", "gw", "ko", "in", "zt", "au", "pa", "wk", "git", "kaw"]; let pwlist = ["st"]; pwlist.forEach(pw => { on(`clicked:pw_${pw}`, event => { const roll_string = `&{template:pw} {{name=Prüfwurf auf ` + lookupPw[pw]['name'] + `}} für {{character=@{character_name}}} {{roll1=[[1d100cs1cf100]]}} {{basiswert=[[@{`+ lookupPw[pw]['attribute'] + `}]]}} {{bonus=[[@{`+ lookupPw[pw]['bonus'] + `}]]}} {{modifier=[[@{popBonusAttribute}]]}}`; startRoll(roll_string, (roll) => { console.log(roll); let basis = roll.results.basiswert.result; let bonus = roll.results.bonus.result let rollresult = roll.results.roll1.result; let modifier = parseInt(roll.results.modifier.result); let addendum = ''; let resultdetail = (modifier != 0) ? ' (' + rollresult + '+' + modifier + ')' : '' ; let basisdetail = (bonus != 0) ? ' (' + basis + '+' + bonus + ')' : '' ; if (modifier < 0) { addendum = ' Der Wurf war erleichtert um ' + Math.abs(modifier) + '.'; } if (modifier > 0) { addendum = ' Der Wurf war erschwert um ' + modifier + '.'; } let comp1 = basis + bonus; let comp2 = rollresult + modifier; let compare = comp1 - comp2; let computed = ''; let success = ''; if (compare < 0){ computed = 'Misserfolg: Der Wurf von ' + comp2 + resultdetail + ' ist um ' + Math.abs(compare) + ' schlechter als der Wert für ' + lookupPw[pw]['name'] + ' von ' + comp1 + basisdetail + '.' success = 'failure'; } else { computed = 'Erfolg: Der Wurf von ' + comp2 + resultdetail + ' ist um ' + compare + ' besser als der Wert für ' + lookupPw[pw]['name'] + ' von ' + comp1 + basisdetail + '.'; success = 'success'; } if (addendum.length > 0) { computed += addendum; } $20('.sheet-rolltemplate-pw .sheet-template-row').addClass(success); finishRoll( roll.rollId, { roll1: computed } ); }); }); }); </script> So first of all, in order to specifically target the message div that corresponds to the roll output, I need to find its message-id, right? Is there a way to derive that? Second of all, even the unspecific $20('.sheet-rolltemplate-pw .sheet-template-row').addClass(success); doesn't seem to add any class to the div. Is there an easy way to style the roll output from within the custom role parser code in the worker sheet?