
They are also unable to do math so every disable and readonly attribute is not usable. I'm not sure if it was specifically intended or not but I really do not want to write a massive sheet worker for this. character sheet is 3.5 dnd if it matters.
They are also unable to do math so every disable and readonly attribute is not usable. I'm not sure if it was specifically intended or not but I really do not want to write a massive sheet worker for this. character sheet is 3.5 dnd if it matters.
Hi Tristan P.,
Could you provide a screenshot of the token settings and post the attribute contents you are trying to put into them?
Regarding token bars not being able to do math, that is not a bug, just how it works.
You have to do the math in advance of the token bar, either via a script or character sheet code.
Example for script:
Use ChatSetAttr to run the calculation then push the result into an attribute. Then the bar reads the attribute.
<td><input class="inputbox" type="text" name="attr_armorclass" title="armorclass" value="(10+@{armorclassbonus}+@{totalabilityacbonus}+@{armorclasssizemod}+@{acdodgemod}+@{acnaturalarmor}+@{acdeflectionmod}+@{acmiscmod})" disabled style="height: 24px; width: 35px;" /><br><div style="font-size: 0.5em;" data-i18n="total">Total</div></td>
That is the specific line that is my issues just because its armorclass.
This comes from the dnd 3.5 sheet. It seems most older sheets used 'disabled' to do math for them and call those equations into more disabled attributes. That is the specific line that is my issues. I don't mind about most disabled attributes not being used but being unable to link armorclass.
Actually the further I look into this only certain tokens can get disabled attributes?
I have tried refreshing the page as well as restarting the API.
I have significantly re wrote the encumbrance tabs in the 3.5 sheet to dynamically update values. I'm not sure if that could cause any issues, as the sheet functions just fine and I have other values with will display the correct number when the sheet updates.
Ok so the temp solution is to use ChatSetAttr to force an update? I do think this is a bug, the ac attribute changed multiple times with nothing printing until ChatSetAttr was used. This is also a repeatable issue, with multiple stats apparently. For each token, when 'armorclass' is selected (in any bar) it will be left blank, when ChatSetAttr is used, the stat will be de selected then once selected again will update to the correct value and continue updating on all changes. This happens for new and old tokens.
Ok, you seem to be heading into Character sheet coding territory. Are you trying to code a character sheet?
If so the best place for that is the Character Sheet forum.
Regarding the token, I think you misunderstood the application here.
Lets say you have an attribute, lets call it "Armor_Formula".
In that attribute it has 10+@{dexterity_mod}+@{armor value}
You cannot put "Armor_Formula" directly into the token, it will not calculate.
So instead you put it through an API Script and then push the result into a different attribute.
Lets call that attribute "Armor_Calc"
THAT attribute is then assigned to the Token.
Example:
!setattr --sel --Armor_Formula|[[@{charactername|Armor_Calc}]]
Dang, old sheets I guess. I have not changed the formula at all. It is unfortunate it was built this way, looks like using a workaround like chatsetatt is the only easy way without re writing the entire ac formula and every disabled attribute it calls on, I guess it could be worse .Thank you for your help! Luckily it's only needed for player characters.
Could you please provide the full name of the character sheet? Or a screenshot so that it can be identified?
I took a look, it appears that the person that made this sheet did not put that calculation behind character sheet code, as a result the attribute is not designed to go into the token.
Your options are to have someone update the character sheet or to use an API script as I outlined above.
I would repost this in the Character Sheet forum and request someone update the sheet to move this calculation behind the charactersheet so that @{armorclass} can be used in a token bubble.
I don't know if Diana P. is still working on it as they have not posted in the forum in over a year.