
When trying to set certain attributes using setWithWorkers(), the sheet doesn't seem to update as expected. So I created a very basic test script to illustrate my problem: on('chat:message', function(msg) { if (msg.type === 'api' && msg.content.search(/^!new\b/) !== -1) { createSheet("Testing"); const char = findObjs({_type: "character", name: "Testing"})[0]; setAttributeWithWorkers(char.id, "npc", 1); setAttributeWithWorkers(char.id, "strength_base", 19); } }), createSheet = function(name) { const checkSheet = findObjs({_type: 'character', name: name}); if (checkSheet[0]) { return; } else { createObj('character', {name: name, archived: false}); } }, setAttributeWithWorkers = function(charid, attr, val) { let attribute = findObjs({_type: "attribute", _characterid: charid, name: attr})[0]; if (!attribute) { createObj("attribute", {name: attr, current: val, characterid: charid}); } else { attribute.setWithWorker("current", val); } }; Basically add the script to a campaign with the 5e OGL sheet and type the command !new. The script simply: Creates a new character sheet named Testing (works as expected) Sets the npc attribute to 1, making this an npc sheet (works as expected) Sets the strength_base attribute to 19 (doesn't exactly work as expected) Here is the screenshot, notice the value shows 19, but the sheet still show 10: If I go into the sheet and put the cursor in the STR field (where it says 19) then tab out of it, the STR updates on the sheet below. This obviously isn't helpful when trying to use the API to completely setup a sheet, because if you have to open the sheet and tab through all the fields to get it to update... well I might as well manually enter them. Also, is there any possible way via the API to use the "drop_" attributes to mimic importing a monster via the compendium?