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

Target call nested inside of an attribute call.

Good day, Recently, I figured out, with the help of Silvyre, how to use an @{attribute} call and @{selected|attribute} inside of an %{ability} call. Despite a minor bug when the edit window for the ability is open, it works reliably. I have been trying to do the same type of thing with a @{target|attribute} inside of an %{ability} and/or another @{attribute} but have been having some difficulty. In particular, I want something along the lines of @{@{target|Equipped_Armor}|Armor}. This would allow me and my players to simply type the name of a type of armor into the attribute Equipped_Armor and have it auto-populate into any attacks where I need it. Thus far, I typically get the error "No character was found for '@{target'" If I try to experiment and find a workaround by using an ability rather than attribute, as in %{@{target|Equipped_Armor}|Armor}, I typically get the error "No ability was found for %{@{TARGET:target|Equipped_Armor}" As far as I can tell thus far, I cannot use this kind of call against a target, despite it working with a call of the currently selected token, at least when looking for an ability. Hopefully I am just missing something obvious. Are there any known workarounds that I can use for this? Thank you for any assistance or advice.
Here's a workaround: Use the following as the Current value of @{equipped_armor}: %{ArmorName Then, use @{target|equipped_armor}|Armor} This actually seems to work outside of Abilities, unlike %{@{selected|equipped_weapon}|Attack} As such, you could alternatively use the following as the Current value of @{equipped_weapon}: %{WeaponName Then, use @{selected|equipped_weapon}|Attack} outside of an Ability.
I see. That seems to work so far. Thank you very much for the assistance. I doubt that I would have thought of that.
You're very welcome! Happy rolling!
Is there a work around stuff like this? %{Macros|@{target|token_name}} I would name a character Macros, and name the macros for it the token names, but it gives me an error.
Yup; Add an Attribute to the Macros Character with the Current value of "%{Macros|". I'd name this Attribute something like "MacrosPrefix". Use @{Macros|MacrosPrefix}@{target|token_name}}