Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

First token bar not reading max value.

Good day. I seem to be having an issue with a number of my tokens. For some reason, bar 1 will not read the maximum value of the attribute assigned to it. I am trying to use this bar as an HP bar. It is reading the basic value of the number. However, it will not show any value other than "0" as the maximum, meaning that it also will not generate a bar. Manually editing the value does nothing; it just resets itself to 0 after I save it. The issue primarily exists in any new tokens I create, or any tokens that I edit the first value of. Any tokens that already have a working bar keep it so long as I do not try to change the identity of that bar. The issue is not game breaking, just annoying. Thank you very much for any assistance.
1449648330

Edited 1449648356
What's the Max value of the Attribute in question?
1449652876
Ziechael
Forum Champion
Sheet Author
API Scripter
In addition to Silvyre's question, what sheet are you using? If the HP max is an auto-calculated field it is likely that the sheets in question have something that is throwing the calculation off. Double math symbols often result in a '0' output (++, --, **) and this can happen easily if a value is deleted that forms part of the calculation or additional symbols are added into the fields that make up that calculation. For example, if you have HP max which is the result of level + constitution + hitdice it would work fine if you have 4 + 15 + 1d10 as the auto-calculating HP max would do the math and insert the value of 20-29 as needed. However if constitution didn't have a value at all you would end up with 4 + + 1d10 which would trigger the 0 output. Likewise if the hitdice was inputted as +1d10 you would get 4 + 15 + +1d10 which again gives the double + and therefore a 0 output. A quick way to test is to select one of the offending tokens and use [[@{selected|hitpoints|max}]] (replace hitpoints with the field name as needed). This will give the value in chat of '0' but if you hover over it you will see the calculation that makes up that value (if one exists), look in there for double symbols to get an idea whether anything is missing or has been added where it shouldn't have been. Finally, it is also possible that there is a duplicate attribute entry for HP max on the attributes tab of the character journal. Find the one with a 0 in it and delete it then reassign the bar.
I am using the pathfinder character sheets. However, I am only using them for the roll templates. I am not using them for the actual character sheet itself, and am ignoring that whole tab. Also, I am using a simple number, "6" in the most recent case, as the max hp. It is not a formula, nor does it have any stats or rolls in it. I initially thought that using a formula was the problem, as I tried to use a formula to determine max hp. That caused one of the first instances of the health bar remaining 0, so I thought it simply didn't work. However, it is now doing it with max hp values that are just numbers. Also, my other bars seem to be unaffected. Bar2 and Bar3 are both correctly using the max value and generating bars. They are also only using simple numbers. [[@{selected|HP|Max}]] is showing a value of 6. Upon mouseover, it shows "Rolling 6 = 6." The max hp on the bar, however, continues to stubbornly remain at 0.
Is this issue present in Tokens representing newly-created Characters, as well? Is this issue occuring for every Attributes linked to Bar 1 [that has a Max value]? Using your browser's element inspector to examine Bar 1's Max value on the Edit Token window , are you able to discern its origin?
1. It seems to primarily affect newly created characters. Old characters (who were using pure pathfinder, with the appropriate pathfinder sheet stats) did not have the problem, with the exception of one character. It wasnt until I was working on new characters that the problem appeared. 2. No. Both "Mana" (14) and "Hero Points" (2) correctly show their max value. When I switch it back to "HP" it changes back to 0, however. 3. <input class="bar1_max" type="text"></input> Possible Resolution: After writing the above bit, I noticed that changing the stat to "Hit Points" instead of "HP" seems to have fixed it, for now at least. This might indicate that the problem has to do with "HP" being a stat used by the pathfinder sheets (which I am ignoring), which causes the character sheet HP max to constantly be forced to "0." Thanks to all for your help. Your suggestions definitely helped me narrow down possible issues. Hopefully this fixes it for good.
1449747324
Ziechael
Forum Champion
Sheet Author
API Scripter
That was likely the issue, since HP was used by the PF sheet for it's max HP it is potentially a disabled field (i'm not familiar with the sheet to be honest) in which case the attribute exists behind the scenes and until other details are filled in to create the actual value it would default to 0. Basically it was the duplicate attribute issue but with a hidden attribute from the sheets html to just add to the confusion ;) It might be worth inspecting the sheets base HTML (available via the Roll20 GitHub) to check what attributes are used to avoid any other conflicts? Alternatively since you are a pro subscriber you could rip out the roll templates of the PF sheet and put that into your game as a 'custom' sheet in the game settings menu. This would give you their functionality without the need to have the full sheet show up in your game and cause potential conflict? Happy rolling otherwise :)