
I'm working on a character sheet and find I am in need of help regarding the Script Worker. In my sheet, the "Intuition" has a name="attr_Intuition" value="@Intuition". Another field (that I added) is: name="attr_InitModifier" (using <select> for possible values) that is used for Initiative rolls. What I would like to do is to get rid of the selection and have it auto-compute. In JavaScript, this would be something like this: if (@Intuition <= 10) { attr_InitModifier = 0; } else if (@Intuition > 10 && @Intuition <= 20) { attr_InitModifier = 1; } else if (@Intuition >20 && @Intuition <= 30) { attr_InitModifier = 2; } ... else { attr_InitModifier = 6; } How would I go about making that work in the Script Worker? I'm guessing the first line would be: <script type="text/worker"> on("change:intuition", function() { // here's where I need code to do the above }); </script> Any help / guidance would be appreciated (or even a link to a real sample (aka - not the samples shown in the wiki - one using actual code)). Thanks!