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

[Help] How to optimize my macro?

Hey everyone! I am rather new to roll20 (some friends and I started a DnD 5e Campaign a few days ago but looked into roll20 some time ago) we were and are playing almost every day and had/have tons of fun our DM bought the PH, MM and essential kit bundle, we the players bought the pro sub. Now I am trying to get into macros and have read plenty about it. Yet i am still struggling getting some thoughts of cool macros worked out (not sure if its possible) e.g.: my current magic missile macro // = comment /me attacks @{target|Foe|token_name} with Magic Missiles! /fx MagicMissile @{target|Caster|token_id} @{target|Foe|token_id}  //Custom FX i created and the DM added Magia indicibus, exitium hostibus!   //some fresh latin google translator /roll 1d4+1 /w gm Wild Magic? 1d20, 1=rnd spell selected with 1d100  //DM info coz we all new I currently gotta click 3 times for each magic missile 1. time on my target to select the token name 2. time on myself for proper fx effects anchors 3. time on the same target again so the fx effects have the proper angle and dont shoot anywhere else this will result in displaying the token name, one magic missile shooting from my PC to my selected target and rolling 1d4+1 (also whispering the DM coz i am a sorc with wild magic) My Question: Is it possible to combine 1. and 3. into one selection and set 2. to always chose me without needing me to click myself? (basically reducing clicks from 3 to 1) If this wont work as intended maybe you know some other cool macros i could look into. Thank you all so much for your Help!
1590965410

Edited 1590965527
Alright A nice soul on a Discord server helped me big time! and we came up with this: 1 click macro (i gotta have my token selected tho) /me chants: "Magia indicibus, exitium hostibus!" as @{target|Foe|token_name} is pelted with Magic Missiles! /fx MagicMissile @{selected|token_id} @{target|Foe|token_id} Causing damage as each missle hits with [[1d4+1]], [[1d4+1]] and [[1d4+1]] damage. /w gm Wild Magic Surge possible! 2 click macro (no token needs to be selected) /me chants: "Magia indicibus, exitium hostibus!" as @{target|Foe|token_name} is pelted with Magic Missiles! /fx MagicMissile @{target|caster|token_id} @{target|Foe|token_id} Causing damage as each missle hits with [[1d4+1]], [[1d4+1]] and [[1d4+1]] damage. /w gm Wild Magic Surge possible! my new question is: Is it possible to auto select my own player token? If yes how could i do that with a macro? Are there other ways?
1590966017

Edited 1590966026
GiGs
Pro
Sheet Author
API Scripter
You cant auto select tokens, unfortunately.  You can use values from your own token by hardcoding the character name in place of selected. If your character is called Frodo, this line would be /fx MagicMissile  @{Frodo|token_id}  @{target|Foe|token_id}
1590967293

Edited 1590967536
Oh thats really helpful So if my character name would be "Bilbo Baggins" would it be: /fx MagicMissile  @{ Bilbo Baggins|token_id}  @{target|Foe|token_id} ? edit: apparantly not, i just tested it and it wont work that way (i have first and second name) Thanks for your answer!!!
1590969034
GiGs
Pro
Sheet Author
API Scripter
I just noticed you are using token_id. For commands that reference tokens, you should use the token name, not the character name. Depending how you have set up your token, they may be different. For calls that reference a characters abilities, using character_id instead @{Bilbo Baggins|character_id}
1590971832
Oosh
Sheet Author
API Scripter
I only played with FX briefly, but I believe they only work with token_id. The only way to get rid of the clicking is the hard-code it. @{selected|token_id} will output your token_id to chat. Copy and paste this into your FX macro instead of a {selected} or {target} call. You will need to redo this every time you change map, as your token_id will change every time it is copied & pasted. This is why I "briefly" played with FX. If you have API access you can use a custom Attribute on your sheet and automate the token_id update every time you change map, but I just could not be bothered doing it manually. If you want the damage totaled automatically, you could tweak your damage line to: Causing [[[[1d4+1]] + [[1d4+1]] + [[1d4+1]]]] total damage as the missles hit for $[[0]], $[[1]] and $[[2]]. $[[0]] is all the rage these days, you've gotta shoehorn it into every macro!
Many thanks to both of you for your assistance! Unfortunately "@{Bilbo Baggins|character_id}" will result in errors for me Bilbo Baggins beeing ofc replaced with correct token names, i tried fixing this by changing my token name (and ofc the macro as well) to something different and more. nothing worked. Combining "[[[[1d4+1]] + [[1d4+1]] + [[1d4+1]]]]" with "$[[0]], $[[1]] and $[[2]]" is really helpful! My current macro looks like this: /me chants: "Magia indicibus, exitium hostibus!" as @{target|Foe|token_name} is pelted with Magic Missiles! /fx MagicMissile @{target|caster|token_id} @{target|Foe|token_id} Causing [[[[1d4+1]] + [[1d4+1]] + [[1d4+1]]]] total damage as the missiles hit for $[[0]], $[[1]] and $[[2]]. /w gm Wild Magic Surge possible!
1591008787
Oosh
Sheet Author
API Scripter
Kurao Fynn said: Unfortunately "@{Bilbo Baggins|character_id}" will result in errors for me Bilbo Baggins beeing ofc replaced with correct token names, i tried fixing this by changing my token name (and ofc the macro as well) to something different and more. nothing worked. Yep, you need the {token_id} for FX, not {token_name} or anything to do with the character sheet. Token_ids look like this: -M475AGjuN98THqqzF-- As I said above, if you select your token and paste @{selected|token_id} into chat, it will spit out your token_id. This is the only thing, apart from {selected} and {target}, which will work with token-to-token FX. Token_id is unique to each token, if you move map or have to replace your token for any reason it will break all your FX macros.... so you're best off leaving it as you have it!