
I am not certain if I should be posting this here or in the API section, but ...
Something weird is happening whenever I include an Attribute in a roll button.
First some background.
I am trying to make an Earthdawn Character sheet, and Earthdawn uses a weird step system, where you add and subtract various numbers until you come up with a step number, then you look on a table to see which dice that is, and you roll those dice. For example if your Dex is step 5, your melee skill is step 2, and you have one serious wound, your attack step is 5+2-1 = 6, you look on a table and see that is 1d10!. If next round you have two serious wounds, your attack step is step 5 = 1d8!. This system is a perfect candidate for being computerized to make it easier to use.
So I have an API routine that looks for a certain string in the chat window, and if it sees it, looks at the step number that follows that string, converts it to dice, rolls the dice and displays the results. Simple, no Problem.
My problem is that I can't get it to work on the character sheet.
If I just hardcode a number onto the button, everything works fine. For example
button name="roll_Dex-test" type="roll" value="!edsdr~ 5"> test
the API sees and correctly processes
{"content":"!edsdr~ 5","playerid":"-Juqd6bJVF43cGrbxX1d","type":"api","who":"Chris D. (GM)"}
Once again, the API sees it and correctly processes it.
However if I try something such as
button name="roll_Dex-test" type="roll" value="!edsdr~ @{Dex}"> test
*** (edited to remove some misleading stuff. See next post for what I should be seeing) ***
Thanks.
Something weird is happening whenever I include an Attribute in a roll button.
First some background.
I am trying to make an Earthdawn Character sheet, and Earthdawn uses a weird step system, where you add and subtract various numbers until you come up with a step number, then you look on a table to see which dice that is, and you roll those dice. For example if your Dex is step 5, your melee skill is step 2, and you have one serious wound, your attack step is 5+2-1 = 6, you look on a table and see that is 1d10!. If next round you have two serious wounds, your attack step is step 5 = 1d8!. This system is a perfect candidate for being computerized to make it easier to use.
So I have an API routine that looks for a certain string in the chat window, and if it sees it, looks at the step number that follows that string, converts it to dice, rolls the dice and displays the results. Simple, no Problem.
My problem is that I can't get it to work on the character sheet.
If I just hardcode a number onto the button, everything works fine. For example
button name="roll_Dex-test" type="roll" value="!edsdr~ 5"> test
the API sees and correctly processes
{"content":"!edsdr~ 5","playerid":"-Juqd6bJVF43cGrbxX1d","type":"api","who":"Chris D. (GM)"}
Once again, the API sees it and correctly processes it.
However if I try something such as
button name="roll_Dex-test" type="roll" value="!edsdr~ @{Dex}"> test
*** (edited to remove some misleading stuff. See next post for what I should be seeing) ***
Thanks.