
Hi folks, I'm trying to build a halfway decent sheet for Unity RPG by Modiphius as my first custom, and, predictably, I'm having beginner's issues. I copied a pre-existing formula for importing race-linked attribute values from a table in a sheet worker, which seemed pretty simple, but it seems to be doing nothing. To keep it simple I stripped out the HTML I've got so far so I could reproduce just the relevant stuff. So: <select name="attr_race"> <option value="none" selected>Race?</option> <option value="afflicted">Afflicted</option> <option value="furian">Furian</option> <option value="human">Human</option> <option value="vallan">Vallan</option> </select> <label>MIGHT</label> <input type="number" class="sheet-open" name="attr_might"/> <br/> <label>AGILITY</label> <input type="number" class="sheet-open" name="attr_agility"/> <br/> <label>MIND</label> <input type="number" class="sheet-open" name="attr_mind"/> <br/> <label>PRESENCE</label> <input type="number" class="sheet-open" name="attr_presence"/> <br/> <script type="text/worker"> on("change:race sheet:opened", function () { getAttrs(['race'], function(values) { const races = { none: {might: 0, agility: 0, mind: 0, presence: 0}, human: {might: 1, agility: 1, mind: 1, presence: 1}, vallan: {might: 0, agility: 2, mind: 1, presence: 1}, furian: {might: 2, agility: 1, mind: 0, presence: 1}, afflicted: {might: 1, agility: 1, mind: 2, presence: 0} }; let race = values.race; if (!races.hasOwnProperty( race )) { console.log("Error: The item " + race + " is not found within the race Object."); return; } setAttrs({ "might": races[race].might, "mind": races[race].mind, "agility": races[race].agility, "presence": races[race].presence }); }); }); </script> In case it's not obvious, it's just supposed to populate the core attribute fields with those bases when you pick a race, but right now nothing happens. I'm sure it's a rookie mistake, but I'm pretty sure my code is just like the one linked above, so I'm at a loss. Would love some feedback, thanks!