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

Charsetattr and Max Value inside a Roll Template

1630684166

Edited 1630684962
Hi Roll20 o/ I Use CharsettAttr since 3 to 4 Month for put Auto Resolve on a lot of my Homemade TTRPG.  But I have now a thing that I can't really solve by myself. (Searched other Post on the Forum and on The Document)  Here is the full Macro &{template:default} {{name=Préparer Droite}} !setattr --charid @{Selected|character_id} --Droite|{{Dégats=[[?{Dégats:|0}]]}}!!! --Droite|{{Stat=[[?{Stats|Force,@{Selected|Force}|Agilité,@{Selected|Agilité}|Esprit,@{Selected|Esprit}}]]|max}}!!! {{desc=Vous avez préparez quelquechose...}} Everything Work "Alone" excepted for the "Bold" part. That is not working at all. The Roll Template show the Number linked to Force, Agilité or Esprit. But CharSetAttr do not Assigne it to the "Max" value of "Droite".  How can I use this code and CharSetAttr for change the Value of "Droite|max" ? Did I missplaced the "|max" in the code ?  Her is the usual Result, the Setting attributes do not even detect the second changement °^°)/
For CharSetAttr you don't actually write out the word 'max'. For example, if you want the 'Force' current attribute value to be 5, it would be:  --Force|5 But if you want the 'Force' max attribute value to be 5 it would be:  --Force||5 So you'll want to add another vertical pipe before the {{Stat= section: --Droite| | {{Stat=[[?{Stats|Force,@{Selected|Force}|Agilité,@{Selected|Agilité}|Esprit,@{Selected|Esprit}}]]}}!!!
Thank you for your answer, And okay, I understand it Now. o/