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 .
×

Exalted 2e Attack @{selected|character_name} Macro error...

Hey there roll20  I am trying to create a generic "attack" macro for a specific type of weapon that each player in my game will have and I want the macro to connect to the Exalted 2e character sheet.. Im having some trouble pulling in the name of the character sheet assocated with the macro.  here is my generic attack macro &{template:attack} {{name=BladeFury}} {{attribute=[[@{@{selected|character_name}|Dexterity}]]}} {{ability=[[@{@{selected|token_name}|MartialArts}*(1-@{@{selected|character_name}|MartialArts|max})]]}} {{specialty=[[0]]}} {{accuracy=[[14]]}} {{bonus dice=[[?{What is the Soak of your target)|0}]]}} {{bonus successes=[[?{Bonus Successes|0}]]}} {{roll=[[(@{@{selected|character_name}|Dexterity}+@{@{selected|character_name}|MartialArts}*(1-@{@{selected|character_name}|MartialArts|max})+0+14+?{Bonus Dice ( Stunts,etc.)})t[exalted]+?{Bonus Successes}]]}} I want the macro to dynamically pull in the name of the selected token's character sheet the way this post says i should be able to. Any help? No character was found for '@{selected'
1591742802
GiGs
Pro
Sheet Author
API Scripter
You have a lot of invalid syntax like this: @{@{selected|character_name}|Dexterity} You cant built attribute names like that, because of roll20's Order of Operations. When you run a macro, roll20 reads the macro and reads all the attribute names at once. This means it does not grab this name @{selected|character_name} and then grabs this @{Frodo|Dexterity} It tries to get both  @{selected|character_name} and  @{@{selected|character_name}|Dexterity} at the same time. But that second attribute doesnt exist, so it fails. But you dont need to build it that way. You can just use @{selected|Dexterity} Just get rid of those nested attributes, and replace with selected . 
I am still getting the error "No character found for "selected"
I should add.. that I do have a character token with an attached character sheet selected.
My code now looks like... &{template:attack} {{name=Lightsaber}} {{attribute=[[@{selected|Dexterity}]]}} {{ability=[[@{selected|MartialArts}*(1-@{selected|MartialArts|max})]]}} {{specialty=[[0]]}} {{accuracy=[[14]]}} {{bonus dice=[[?{Bonus Dice (Charms, Stunts, etc.)|0}]]}} {{bonus successes=[[?{Bonus Successes|0}]]}} {{roll=[[(@{selected|Dexterity}+@{selected|MartialArts}*(1-@{selected|MartialArts|max})+0+14+?{Bonus Dice (Charms, Stunts, etc.)})t[exalted]+?{Bonus Successes}]]}}
1591754090
GiGs
Pro
Sheet Author
API Scripter
Check your token settings, and make sure your character is selected in the Represents dropdown.
That fixed it! thank you very much!
1591810539
GiGs
Pro
Sheet Author
API Scripter
You're welcome :)