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

Max attritube for character sheet rolls

1403475961

Edited 1403475988
I found this post that seemed to originally ask this question but wasn't really answered i'm interested in some suggestions based on a specific example. Reference post: <a href="https://app.roll20.net/forum/post/304431/accessing" rel="nofollow">https://app.roll20.net/forum/post/304431/accessing</a>... The next paragraph explains the system for reference. the following paragraph will have the actual question. So i'm trying to add a roll penalty to character sheet rolls based on how injured the PC is. This is using the new World of Darkness settings where health is tracked backwards in that you have a health attribute but you start with 0 "current health" and each time you take a point of damage, your "current health" goes up. If your current health equals your max health, bad stuff happens (depending on the type of damage it is). So if you have 7 health (max health) and you take 5 damage, your current health would be 5. Now if you have damage greater than or equal to 3 less than your health, you start to incur penalties. How can I access the max attribute of health without "selected" or "target" for the purpose of character sheet rolls? my roll is as follows to get the "wound penalty": {(@{Health|max}-3)-@{Health},0}kl1
1403476735
Lithl
Pro
Sheet Author
API Scripter
Is that not working? @{Health|max} is the correct syntax, assuming the attribute is named Health and has a maximum value.
1403482948

Edited 1403483049
i place the following into an ability on the character sheet to do roll testing, the character sheet has a Health attribute with both a current and max. {@{Health|max}-3)-@{Health},0}kl1 when i click on the roll button, i get the following: No character was found for 'Health' Dragonphire (GM): {Health|max-3)-1,0}kl1
Ok wow, i made a minor mistake, i'm just missing a parenthesis. { ( @{Health|max}-3)-@{Health},0}kl1 Thanks for your help, Brian.
Apparently i've been staring at this too long. so the missing parenthesis fixed my issue and i get the value i'm looking for. However, when i plug it into my roll check, it breaks again. I appreciate a 2nd pair of eyes. [[(@{Dexterity}+@{Composure}+{(@{Health|max}-3)-@{Health},0}kl1)d10&gt;8!&gt;10]] i get the following: No character was found for 'Health' SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "H" found.
1403720623
Gauss
Forum Champion
Dragonphire, try putting the character name into @{Health|max}. Example: @{charactername|Health|max}
the point is it is part of a character sheet... so i can't type the character name as it will change. unless you are saying to do something like @{@{charname}|Health|max}
1404283302

Edited 1404283620
Gauss
Forum Champion
Dragonphire , I understand you are working with a character sheet. What I am saying is that the only way to do a 'max' value, even in an ability, is to put the character name in the attribute section. For Abilities you leave off the character name for "current attributes" because it will automatically fill that with the character name. But for "max attributes" you must put the character name in the attribute string as shown below. @{character name|attribute name|max} If your character name will change in the future perhaps you can use @{selected|Health|max} and it will pull the attribute from the selected token's character sheet instead. This may qualify as a bug so I will bring it up with the Devs. The max attribute string should follow the same rules as the current string.
I will try the selected value as a work around. I do understand the function of the max attribute within roll20. But it seems that the disconnect is that you are telling me to enter a name, but if this is going into the character sheet HTML , and i have 4 players + NPCs, i cannot specify a single name. It would be a useless item as it would only apply to the one character.
1404595133

Edited 1404595245
Gauss
Forum Champion
Ahhh, you were not clear that you were discussing "character sheet HTML" rather than "character sheet Abilities". In the future please place "character sheet HTML" questions in the Character Sheet forum. I will move this to the appropriate forum. I suggest asking the Character Sheet (HTML) gurus if there is a way to get it to reference the character sheet name. Alternately, there may be another way to otherwise reference the desired value.