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

[5e OGL] Macro Help I am so Close

I made separate macros that recall NPC spells up to 9, It works it just dosnt formnate right it comes out as template code. I tried entering a template for 5ed ogl it works on first call but wont work on second. Here is what I have. ?{Name of Query|Label 1, #npcma0|Label 2, #npcma1 }       # is supposed to call these seprate macros here is what they contain.  #npcma0=%{selected|repeating_spell-npc_$0_spell} #npcma1=%{selected|repeating_spell-npc_$1_spell}
1476597533
Tetsuo
Forum Champion
You're going to have to  HTML escape any problem characters inside of all of the nested macros. 
1476622601
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can't use a query here as those macros contain calls to sheet generated macros, which you can't escape. Best bet is to make an ability command button "spellbook". You won't need all those global macros as you can just do [spell1](~selected|repeating_spell-npc_$1_spell) in the spellbook macro. <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a>
Ok, Scott for some reason it does as directed but it shuts down my chat, I tried trouble shooting my chrome broswer even with a clean reinstall it shuts my chat box down on my end. Awesome idea Scott, just isnt working for me at the moment.&nbsp;
?{Name of Query|Label 1, #npcma0|Label 2, #npcma1 } &nbsp;is my current querry to #npcma0 &nbsp;which preforms macro&nbsp;%{selected|repeating_spell-npc_$0_spell} . it works on test and if ran by clicking macro npcma0 works well, but when I use my querry it dose not use template. cut and paste from chat as follows to output.&nbsp; #npcma0 {{rname=Poison Spray}} 0 {{range=10 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=7}} {{dmg1type=Poison }} 0 {{dmg2=0}} {{dmg2type=}} {{save=1}} {{saveattr=Constitution}} {{savedesc=}} {{savedc=12}} {{desc=}} {{spelllevel=npc}} ammo= charname=Acolyte } Yes, Frank I had alot of trouble with that when I had this built as one whole macro with npc spell actions 0-9, I reduced it to 0-1 and could not get it to call 1 ability, it would output all abilities( would cast all spells at once into chat).&nbsp; When I do finally get this working i will be able to drag and drop any npc token onto board do nothing else and do all actions and spells the npc potentially has with two macros on the bar(not including the inititive macro), I did have it working when I added costume code but some monsters requires 15 additional ability lines instead of the standard 4 i was doing, honestly that is alot of work when your looking at 80+ separate npc sheets.