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

Weird Attribute Error...

1416952406
Tom
Plus
Sheet Author
At least, it seems like an error. I just can't figure out what is wrong. My character sheet has an "Avoidance" attribute, the value of which is: (floor((@{agility}+@{intuition})/2))+@{avoidmod}+@{actionmod}-@{arpenalty} (Roughly translated, that should be: ((Agility Ability + Intuition Skill)/2) + Avoidance Modifier + Action Modifier – Armor Penalty) As part of troubleshooting some token bar details last week, I went into my individual character journals and deleted the Avoidance attribute in the Attributes and Abilities section. This was done because it was creating two conflicting attributes (Avoidance vs avoidance). So now, here's what I'm running into. When the avoidance attribute is called in a macro, I get the formula, not the final number: Is there some way I have to write the formula for the value is it returns a result? Like an inline roll? It does this on the character sheet, but not the macro output as you can see. On top of this, is there any way to access a character sheet attribute in the attributes/abilities tab of the character journal? Creating a new "avoidance" attribute doesn't seem to be working. Thanks.
1416956873

Edited 1416961578
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I'm not sure I understand what you're asking. But I'm guessing you're looking for something like this: /r 5d10!sd>7 vs [[(floor(@{agility} + @{intuition})/2) + @{avoidmod} + @{actionmod} - @{arpenalty}]] You can also nest macros, so if for example you had an ability called Avoidance which looked like: [[(floor(@{agility} + @{intuition})/2) + @{avoidmod} + @{actionmod} - @{arpenalty}]] You could have a 2nd ability that looked like: /r 5d10!sd>7 vs %{Character Name|Avoidance}
1416972419

Edited 1416972427
Tom
Plus
Sheet Author
Mmmmaybe? All of this is already built into the character sheet, so I don't really need to nest my macros up the whazoo...because...well, because they already are. Just tucked behind the scenes. No, what I want is for my macro to return something nice and simple: ...rolling #d10!sd>7 vs # [Avoidance]. Currently, my character sheet code for the Avoidance attribute looks like this: input style="width: 3em" type="number" name="attr_avoidance" value="(floor((@{agility}+@{intuition})/2))+@{avoidmod}+@{actionmod}-@{arpenalty}" disabled="true" Can I put that value in brackets and not screw everything up? I've never seen that in a character sheet. And while I'm at it, is there anyway to get rid of the "!sd" in the macro output? How great would it be to only see "rolling #d10>7..." (and YES, the "!sd" NEEDS to be in there). And still want to know if and how you can bring a character sheet attribute into the attributes/abilities tab, especially once you've deleted it there (and does deleting it in that tab do anything to the rest of the system?)
1416972973
Tom
Plus
Sheet Author
Ok, tested adding brackets to the attribute value in the character sheet and it actually worked! So someone PLEASE let me know if that is going to blow up in my face elsewhere. So that still leaves the question of how do you call up an existing attribute in the Attributes list under the Attributes/Abilities tab of the character journal? And bonus question: how do I clean up my macro output to make it all nice, clean and shiny while still showing the dice rolls?
1416974227
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Tom, you can find all about how to reference macros/abilities/attributes here . As far as "prettifying" rolls, the best way is with inline dice returns.
1417044116
Tom
Plus
Sheet Author
Steve, Yeah, inline rolls as a whole don't work for us. We like having the dice rolls right there front and center. We do use them for damage rolls, though. Thanks for your help. I'll have to do more digging about the connection between character sheet attributes and those created elsewhere in the character journal. Thanks and Happy Thanksgiving!