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

Asking for attribute to use in a target command

January 25 (4 years ago)

Hi all,

I would like to have an ability macro that asks to choose a token an then ask for the attribute to use for the test.

Something like : @{target|chosen_target|character_name} value for attribute ?{chosen_attribute|attribute1|attribute2|attribute3} is @{target|chosen_target|?{chosen_attribute|attribute1|attribute2|attribute3}}

Obviously this example doesn't work but is there a workaround that could be use, maybe with reference to some prefix attributes (with value "@{") or wathever ?

Thanks


January 25 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

If you want to choose an attribute, you can do it like so

?{Choose Attribute|
attribute1,@{target|attribute1}|
attribute2,@{target|attribute2}|
attribute3,@{target|attribute3}}

Just change the attribute1/2/3 to the actual attribute names.

The bit before the , is the text that is displayed in a dropdown, and can technically be anything. The bit to the right of the attribute must be the attribute name as it is name on the character sheet. So if you were picking the Strength, Dexterity, and Wisdom attributes from  character sheet, which where defined as str, dex, and wis, you can do

?{Choose Attribute|
Strength,@{target|str}|
Dexterity,@{target|dex}|
Wisdom,@{target|wis}}

February 04 (4 years ago)

Thanks ! that's exactly what i needed !

February 04 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Great :)