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

Is multiple attribute interpolation possible?

I'm trying to create relatively complex macros on a character sheet I'm building, and the user has to select an attack and defense stat for the attack they're using. They select one of the valid attack and defense stats from the dropdown and the roll needs the attack stat against a target number dependent on the target's defense stat. Is something like this possible, and I'm just getting the syntax wrong? {{roll=[[ [[1d100]] + [[ @{@{action_attackstat}_points} ]] ]]}} {{targetnumber=[[ [[ @{action_diff} ]] + [[ @{target|@{action_defensestat}_points} ]] ]]}}
1583595464
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is possible, you just can't nest attribute calls the way you are for your target call. You need to have the drop down for the target's defense stat resolve to @{target|armor_points} (as an example), and then it will work. Note though that doing it this way requires that there be tokens on the board to interact with, which prevents theater of the mind playstyles.