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

Attribut_max Attribute defined in HTML not updating in Players Sheet

Hi. I am trying to use an atrr_max value for a Button Roll from my Custom Character Sheet.  But when I change the Max value from the sheet I get the original value it was defined for.   I have tried it with other attributs and it gets updated correctly the problem is when i try to use the atr_max.  I dose not  change  This is how the Attribut is defined  <input type="number" name="attr_might_max" value="8" min="0" class="nospin" title="@{might_max}" /> This is the operation i want in my Roll Template  {{totaldicepool=[[(@{might_max})+@{might_edge}]]}} But no matter how many times I change the might_max in my player Sheet i alway get 8 for the Value If i use Only @{might} it works perfectly  How can i fix this so that it gets up-dated by the player sheet and not a constant number. Thanks  
1566334313
Kraynic
Pro
Sheet Author
I'm not sure a max value can be called that way.  Does [[@{might_max}]] work if you put it in a macro on the Attributes & Abilities tab?  I was thinking to get max of a characteristic you needed a 3 part label like: @{"character name here"|might|max}.  I think it may even work that way from the Attributes & Abilities tab of the sheet you want to pull the value from.  It has been a while since I tried/tested anything like that though, so I may be wrong.
If you create a token and set bar1 to might does it show the might and might_max values in the bar?
1566407854

Edited 1566408092
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is because of how max attribute values have to be called. You have to do the full attribute call syntax when using max; @{Character Name|attribute|max}. There are some exceptions to this, like if you're calling a repeating attribute max value from within the repeating item. I'd recommend using a sheetworker to construct the macro so that you can insert the character's name. Something like (untested): on('sheet:opened change:character_name',(event)=>{     getAttrs(['character_name'],(attr)=>{         setAttrs({             might_dice_pool:`[[(@{${attr.character_name}|might|max})+@{might_edge}]]`         },{silent:true});     }); }); This assumes that you would use a new attribute for your dice pool. I've set it up so that you'd have a might, speed, and will (if I'm remembering cypher system correctly) pool. Then in your macro you'd have this: {{totaldicepool=@{might_dice_pool}}} EDIT: and just realized that that requirement for calling the max value is no longer spelled out in the wiki.
Thank you for you solution Scott I will try it and le you know.   Josh: yes I have tested putting the might attribute in a token and I can change it but when the page makes the Roll I always get the Value defined in the character page  HTML. It doesn’t ge uptadete. 
Scott, I’ve tested your suggestion and it works. Thanks!  You said there is an exception when using a repeating attribut. How do you call a repeating max value?  Thanks Again
1566747700
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you're writing a macro in a repeating section, you can call the max attribute by just doing @{attributename_max}. Or did you mean for the sheetworker solution?
Sheet worker solution please