
So, been testing the sheet and its been working fine, then I had my first session last night and it was *kinda* working, it was triggering and changing attributes *some* of the time. And seemingly stopped updating attributes towards the end of the session.I just pulled up my sheet and its not triggering at all. Its a World of Darkness style system, you select a Skill and an Attribute and use the roller button in the top right to roll. In the below example, I've selected Close Combat and Cunning. The sheet worker below should trigger when a rollSkill or rollAttribute changes on the sheet. Transferring the appropriate attribute's value to active_Skill or active_Attribute. I even added a console log to see if its triggering and I'm not seeing it in my console. Here's just the sheet workers... I figure if I put a new typo somewhere, one of the functions should still trigger but the roller is rolling 0+0 <!---------Sheet Workers --------------->
<script type="text/worker">
const skills = ['Academics', 'Athletics', 'CloseCombat', 'Culture', 'Empathy', 'Firearms', 'Integrity', 'Leadership', 'Medicine', 'Occult', 'Persuasion', 'Pilot', 'Science', 'Subterfuge', 'Survival', 'Technology'];
on(`change:${skills.join(' change:')} change:rollskill sheet:opened`, function() {
console.log(Script Worker, setting Skill);
getAttrs([...skills, 'rollSkill'],function(values) {
const skill_name = values.rollSkill;
const skill_value = values[skill_name];
setAttrs({ active_skill: skill_value });
});
});
const attributes = ['Intellect', 'Cunning', 'Resolve', 'Might', 'Dexterity', 'Stamina', 'Presence', 'Manipulation', 'Composure'];
on(`change:${attributes.join(' change:')} change:rollattr sheet:opened`, function() {
console.log(Script Worker, setting Attribute);
getAttrs([...attributes, 'rollAttr'],function(values) {
const attr_name = values.rollAttr;
const attr_value = values[attr_name];
setAttrs({ active_attribute: attr_value });
});
});
</script> Full HTML here if you need to test it. <a href="https://pastebin.com/WuwyVftS" rel="nofollow">https://pastebin.com/WuwyVftS</a> Full CSS <a href="https://pastebin.com/ay0KrRFy" rel="nofollow">https://pastebin.com/ay0KrRFy</a>