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

Need help with a macro

I created a witchbolt macro for my games wizard. I want to add a condition marker so he won't forget he cast the spell and will use his bonus witch bolt action in following turns. My macro works just fine but the condition marker I want to use doesn't get added to the character token. I'm not sure what I am doing incorrectly.  My macro is shown below. Any help would be appreciated. I am using jumpgate and the D&D 2024 character sheet. &{template:default}  {{name=WitchBolt for@{selected|character_name} }}{{[[?{SpellLevel?|0}d12+1d12}]] lightning damage. Take that you miscreant loser!}} !token-mod --set statusmarkers|lightning-helix /fx beam-water @{target|Caster|token_id} @{target|Foe|token_id}
1757027509
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Steve! Some quick preliminary questions You can set that token marker manually? Does the token-mod command work if just sent all by itself and is not part of a larger macro? Is his token selected when the macro is run?
1757040425
timmaugh
Forum Champion
API Scripter
I think the issue is that the @{target} syntax renders the message object to no longer have a selected token. Even though they are on different lines (the /fx command that contains the @{target} syntax and the TokenMod command line which would require a selected token), they are initially sent as a single message. If this is really the problem, the easiest way around it is to use the --ids argument of TokenMod: !token-mod --ids @{selected|token_id} --set statusmarkers|lightning-helix However, if you are only ever going to be selecting the wizard for this, you could just hardcode that character's name in the first line (instead of @{selected|character_name} ), and you could use the character ID instead of a token ID in the TokenMod line: --ids @{Wizard's Name Here|character_id} Then you don't have to worry about actually selecting the token on the board.
1757041523

Edited 1757041570
Gauss
Forum Champion
Hi Steve R.,  Just a note, since the beam originates from the token you have already selected you can remove one of the target dialogs with this:  /fx beam-water @{selected|token_id} @{target|Foe|token_id}
Thank you all for your quick response.  I used Keith's questions and ran a diagnostic test on the macro, and I still had the same issues. So, I used Tims' suggested change to the macro and it worked nicely - thank you!  I also changed the /fx line to the one suggested by Gauss - I like it, it is a much better dialog. My macro now works well.  Many thanks to you all.