thank you keith, the following code does it on the API side in case anyone else needs it Weirdly enough the Don't Auto Roll Damage (dtype) doesn't seem to work, i see the value getting modified on the sheet but even if i modify it manually in the editor the NPCs are always rolling damage for me. let targetAttr = findObjs({_type: "attribute", name: "rtype", _characterid: shiftData.targetCharacterId})[0]; if (targetAttr) { targetAttr.set('current', "@{advantagetoggle}"); targetAttr = findObjs({_type: "attribute", name: "advantagetoggle", _characterid: shiftData.targetCharacterId})[0]; if (targetAttr) targetAttr.set('current', "{{query=1}} {{normal=1}} {{r2=[[0d20"); }
targetAttr = findObjs({_type: "attribute", name: "wtype", _characterid: shiftData.targetCharacterId})[0]; if (targetAttr) targetAttr.set('current', "");
targetAttr = findObjs({_type: "attribute", name: "dtype", _characterid: shiftData.targetCharacterId})[0]; if (targetAttr) targetAttr.set('current', "pick");