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 Token API

Hi i'm new at using macros and i'm trying to use a macro to select tokens /em Points at @{target|foe|name}! but when i select the token i get No attribute was found for @{TARGET:foe|name}  i figured out that i'll need to make a Target API but i have no clue on how to do this Suggestions are appreciated
Try @{target|foe|token_name}. Unless the Token you're targeting represents a Character that has an Attribute named "name", @{target|foe|name} won't be found.
I got it thank you very much
Another question though is it possible to macro something for magic missile that adds 1d4 when a  spell level is added so it shoots 4d4 at lvl 2 and 5d4 at lvl 3?
1453057392

Edited 1453057648
[[ (?{Level of spell slot used|1|2|3|4|5|6|7|8|9} + 2)d4 + ?{Level of spell slot used} ]] damage to a single target. [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] ?{Level of spell slot used| 1, | 2, • [[ 1d4 + 1 ]] | 3, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 4, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 5, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 6, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 7, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 8, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 9, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] }
thank you :)
1453069577
vÍnce
Pro
Sheet Author
Silvyre said: [[ (?{Level of spell slot used|1|2|3|4|5|6|7|8|9} + 2)d4 + ?{Level of spell slot used} ]] damage to a single target. [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] ?{Level of spell slot used| 1, | 2, • [[ 1d4 + 1 ]] | 3, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 4, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 5, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 6, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 7, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]]  | 8, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] | 9, • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] • [[ 1d4 + 1 ]] } All these macros you create are awesome Silvyre.  Thanks
1453110726
Ziechael
Forum Champion
Sheet Author
API Scripter
I'm not sure Silvyre actually 'creates' them, I think he merely acts as a conduit for the greater gods of macros. Sort of like an oracle for maths and mathematical equivalents ;)
Macros can become... extensive... when trying to automate outputs. It just takes a little time and patience to figure out what you need to make it work. Take the rage bonus for barbarians in 5e. It took me awhile, but I finally figured out how to make it autocalculate based upon level, rather than having to manually change the number when you level: [[@{meleedmg1}+@{meleedmgbonus1}+[[ (?{Raged?|No,0|Yes,1}*({floor((@{barbarian_level})/9)+{floor((@{barbarian_level})/16)}-{floor((@{barbarian_level})/18)}+2))]] [Raged Damage] ]]