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

Detect Magic Macro Help

I think I need some help with setting a macro. I'm trying to use the macro for detect magic in Diana P.'s 3.5 Char sheet, but I keep getting the message in the chat box "You attempted to use a roll command looking for the value of a selected token, but no tokens are selected." even though I've changed "{{name=@{selected|token_name} }}" to "{{name=@{character_name} }}". When I put in macros for Magic Missile, or Fire Ball they work fine, but this one just eludes me. Can someone please point me in the right direction?&nbsp; The macro I'm using is: &amp;{template:DnD35StdRoll} {{spellflag=true}} {{name=@{selected|token_name} }} {{subtags=casts [Detect Magic]( <a href="http://www.dandwiki.com/wiki/SRD:Detect_Magic" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Detect_Magic</a> ) }} {{School:=Div}} {{Level:= Brd 0, Clr 0, Drd 0, Sor/Wiz 0}} {{Comp:=V, S}} {{Cast Time:= 1 std action}} {{Range:= 60 ft }} {{Area:= Cone-shaped emanation }} {{Dur:= Concentration, up to [[@{selected|casterlevel}]] minute(s) (D)}} {{Save:= None }} {{SR:= No }} {{notes= 1st Round: Presence or absence of magical auras. 2nd Round: Number of different magical auras and the power of the most potent aura. 3rd Round: The strength and location of each aura. If the items or creatures bearing the auras are in line of sight, you can make Spellcraft skill checks to determine the school of magic involved in each. (Make one check per aura; DC 15 + spell level, or 15 + half caster level for a nonspell effect.) Each round, you can turn to detect magic in a new area. The spell can penetrate barriers, but 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt blocks it. See full description for more details. PHB p.219}}
The error message&nbsp; "You attempted to use a roll command looking for the value of a selected token, but no tokens are selected." happens when you do not have a token selected when you click on the macro. Any @{selected|something here} causes that. Try changing @{selected| to @{Bob|casterlevel} ect. where the selected is the actual name of your character. This way even if your token is not selected it should pull the attributes from the sheet anyway.
I input the line in as shown. i then changed "Bob" to my characters name, but I still recieve the message " You attempted to use a roll command looking for the value of a selected token, but no tokens are selected." Mark (GM) said: The error message&nbsp; "You attempted to use a roll command looking for the value of a selected token, but no tokens are selected." happens when you do not have a token selected when you click on the macro. Any @{selected|something here} causes that. Try changing @{selected| to @{Bob|casterlevel} ect. where the selected is the actual name of your character. This way even if your token is not selected it should pull the attributes from the sheet anyway.
1589688974
GiGs
Pro
Sheet Author
API Scripter
As Mark points out, you have to change every selected instance. There's also a character level: @{selected|casterlevel} in that macro.
GiGs said: As Mark points out, you have to change every selected instance. There's also a character level: @{selected|casterlevel} in that macro. Yes, this was a case of&nbsp; me doing some selective reading on my part. Thank you so much Mark and GIGs!
1589689486
Oosh
Sheet Author
API Scripter
Use a text editor like Notepad with a "replace all" function, then copy/paste the text into the macro dialogue. It's much faster than doing it manually &amp; missing instances if you're doing a bunch of spells.
andrew p. said: Use a text editor like Notepad with a "replace all" function, then copy/paste the text into the macro dialogue. It's much faster than doing it manually &amp; missing instances if you're doing a bunch of spells. That is some extremely helpful info. Thank you andrew p.!
1589690919

Edited 1589690976
I think a lot of my headache with this is that I am a player putting in the macros so I can't move to the GM layer to select a token for the macro to run correctly. I tried the substitution as stated above for another spell, but it won't work for that spell. I'm just going to input the macros, and then get my GM to link them to my token. Thank y'all so much for your help.
1589692016
GiGs
Pro
Sheet Author
API Scripter
You can use target in place of selected , that will allow you to select tokens you dont control.
Thank you GIGs for your help. I will post an update as soon as I am able to.