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 .
×
Why do rogues wear leather armor? Because it’s made of hide. 🥷

[Tormenta20] Token *carefully* linked to Journal, but max hp/mp doesn't update correctly

1594243331

Edited 1594733996
Hello! First of all, I don't know how other sheets behave, so I choose to specify the one I'm using. I just want to be sure that I'm not doing anything wrong or something is missing before open an issue in github or anything. My problem is exactly as I said: I link the token to the character journal. Then I test if it's correctly linked and it is. But, if I try to change the character max hp or max mp, the token won't update. I kinda understood what's wrong.There are some attributes I'm gonna describe below: - vida (hp), vidatemp (any temporary additional hp), vidatotal (max hp) - mana (mp), manatemp (any temporary additional mp), manatotal (max mp) vida and mana are the ones I'm choosing when selecting things to be displayed by the bars. The max hp and the max mp are auto-populated in the sheet "attributes & abilities" tab and in token menu with the values defined in vidatotal and manatotal , however they are hardcoded into max field of each one (as shown in the screenshot below). There is something that I'm missing here or the sheet should populate the values with "variables" and there it's an issue with the sheet code? Thanks for your time =)
1594417697
vÍnce
Pro
Sheet Author
"The max hp and the max mp are auto-populated in the sheet "attributes & abilities" tab and in token menu with the values defined in  vidatotal  and  manatotal , however they are hardcoded into max field of each one (as shown in the screenshot below)." It sounds like "vida_max" and "mana_max" are being auto-calculated by the sheet . "if I try to change the character max hp or max mp, the token won't update." If that's true, I don't think you can simply "override" the sheet's auto-calculated attributes.  You probably need to adjust one or more of the sub-attributes used to calculate "vida_max" and "mana_max" in order for those max values to be properly updated.
1594422400
GiGs
Pro
Sheet Author
API Scripter
I had a quick look at the sheet. Vida_max and mana_max are autocalc fields, as Vice suggests, which means they dont really work with manual adjustments. The only way to change their values is to change the attributes they are calculated from: vida_max = vidatotal + vidatemp mana_max = manatotal + manatemp
1594653737

Edited 1594653867
thanks for your responses, guys the *total and *temp fields are updated when changed in the sheet, but the *_max value doesn't. I did some more tests. Changing manually vida_max and mana_max attributes works and sticks, but I really wanted it to happen just changing the sheet value, so I wouldn't need to change it in two places. The fields are auto-calculated but only in the first time you set the token to the journal entry. In my pov, it should recalculate the *_max value everytime you update vidatotal and manatotal which doesn't happen. The thing is: is it a sheet issue or roll20 just doesn't work that way? (it seems a sheet issue to me btw). If it is sheet related, I'm gonna try to reach its mantainer =) Thanks again ^^ PS: "Changing manually vida_max and mana_max attributes works and sticks" -> I'm referring to their values in "attributes & abilities", not the sheet vidatotal or manatotal fields
1594677513
GiGs
Pro
Sheet Author
API Scripter
When using a character sheet, you should not generally be fiddling with the attributes on the Attributes and Abilities tab. The sheet will always override those, and not every attribute on the sheet will appear there. It's rare, but you can also sometimes cause errors in values because the sheet can get confused over whether to use the value on the sheet, or the value on that tab.
Yeah, I have no intention to be fiddling with it, its just a "workaround" I've found so token bars gets updated. The worst thing about this is that it won't calculate again the *_max attributes even if I unlink and relink token, because the *_max attributes is autocalc'ed on the first time you do the link and then it doesn't calculate anymore. I'm not html or js (for the script right?) expert, so I don't really know what is needed for the autocalc to work correctly and update the values everytime the value changes on the sheet, but I'm gonna take some time and see if I can suggest something to the sheet author.
1594697608
GiGs
Pro
Sheet Author
API Scripter
I mentioned earlier: find the vitatotal and vidatemp attributes on the sheet. Alter them, and it'll change the vida_max attribute. Likewise for mana.
1594698177
GiGs
Pro
Sheet Author
API Scripter
I just made a sheet, and I see your frustration: I hadnt realised it wasn't working properly. Probably because its using an autocalc field, which dont really work well with token bars. The solution to this would be to replace the hidden autocalc field with a sheet worker.
1594700210
GiGs
Pro
Sheet Author
API Scripter
I've just submitted an update to the sheet which changes the autocalc field to a sheet worker. It'll go live sometime around this time next week.
1594733945

Edited 1594734014
Ow man! That's awesome ^^ PR's are merged on mondays iirc, right? Well, no problem, it's really nice to know it'll be fixed ^^ I took a look at your PR, thanks for the other changes too. Maybe now the dice animation will be fixed too (the chat log displayed the right rolls but often the table was filled with more dices than the correct xD) Thank you so much =D
1594736467
GiGs
Pro
Sheet Author
API Scripter
Vinicius S. said: I took a look at your PR, thanks for the other changes too. Maybe now the dice animation will be fixed too (the chat log displayed the right rolls but often the table was filled with more dices than the correct xD) They make changes on the github on Mondays or Tuesdays, but it goes live in roll20 a day or say later. I didnt make any changes to the dice animation. But that sounds like a common problem there's no solution for. It's a problem with the way rolltemplates and 3d dice work together. The way roll20 dice work, you cant do conditional rolls. If you want to test for a critical, and roll extra damage on a critical, you have to roll all the dice at once, and manually disregard which rolls aren't needed. Rolltemplates can be programmed to hide unneccessary rolls. So in chat you only see the rolls that are relevant. The extra rolls are made, but you dont see them. 3d dice cant do that: they display all dice that are rolled, regardless. So if you use 3d dice, you just have to accept that you'll see extra dice.
Ok, now I understood. I've saw the thing about repeating attacks and thought it would have something to do with it. The animation of multiple dice which was not meant to be there scared me at first, but as log register it correctly, it was no problem at all. It's nice to see the dice rolling xD