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 with macro

Heya, was wondering if someone could help me. Basically have a macro for my dragon age game, roll query for attacking and would like to make one for spells too, except spells are currently setup as a template and I'm having issues. So far tried using html work around I saw on wiki but it still ain't working. Is this doable? example of one of the spell macros: &{template:default} {{name= SHOCK}} {{School = Primal}}{{Mana Cost = 3 MP}}{{Casting Roll = [[2d6+d6+@{selected|Magic}+2]]>13}} {{Test = Constitution(Stamina) vs Spellpower ([[@{selected|Magic}+10+2]])}} {{Effect = [[d6]] damage if saved vs Spellpower otherwise +@{selected|Magic}}}
1450211963

Edited 1450212004
Silvyre
Forum Champion
It's very possible. I would recommend a macro framework like this: &{template:default} ?{Spell| Spell1, {{name=SHOCK}} {{School=Primal}} {{Mana Cost=3 MP}} {{Casting Roll=[[2d6+d6+@{selected|Magic}+2]]>13}} {{Test=Constitution(Stamina) vs Spellpower ([[@{selected|Magic}+10+2]])}} {{Effect=[[d6]] damage if saved vs Spellpower otherwise +@{selected|Magic}}} | Spell2, {{name=NAME}} {{School=SCHOOL}} {{Mana Cost=MANA COST}} {{Casting Roll=CASTING ROLL}} {{Test=TEST}} {{Effect=EFFECT}} | Spell3, {{name=NAME}} {{School=SCHOOL}} {{Mana Cost=MANA COST}} {{Casting Roll=CASTING ROLL}} {{Test=TEST}} {{Effect=EFFECT}} | etc., etc. | etc., etc. }
Right, so I can't make a macro for each spell then use the roll query to select which macro to use (like I've done for the normal attacks), I have to list all the spells in a single macro?
1450214073

Edited 1450215219
Silvyre
Forum Champion
Unfortunately, that is correct. Advanced Usage for Roll Queries said: On the flip side, if the assigned value of a nested Attribute, Ability or Macro contains any problematic characters, that nested item will cause its Roll Query to break as surely as if that item's assigned value was inserted directly into its Roll Query in place of its call. So, if the assigned value of your nested Attribute, Ability or Macro does contain problematic characters, consider replacing any or all instances of that nested item's call with that item's assigned value, and then subjecting that assigned value to the above character replacements. As long as your macros contain one or more closing braces (e.g. from Roll Template syntax), commas or vertical bars, they will break a Roll Query that they are nested within. If you replace these "problematic characters" within each individual macro with HTML entities, you will be able to nest their calls within a Roll Query, but those macros are most likely now broken as individuals. Essentially, one must decide between using multiple macros individually or nesting their assigned values within a single Roll Query. Troubleshooting (Nesting Macros) said: Due to the order of operations , macro calls nested within Roll Queries are fully expanded before the query is executed. This means that if a macro nested within a Roll Query contains any problematic characters, which conflict with Roll Query syntax, that nested macro may cause the Roll Query to break. If this is the case, it may be necessary to either remove or replace problematic characters within that nested macro with HTML entities (see: Advanced Usage for Roll Queries ). Note that macros which contain HTML entities may no longer function autonomously and must be saved as Abilities .
Well that was what I was going for, (the fact that macros cant be used solo is fine) I tried to replace the characters and it still wouldn't work. Have macro Spells which says: ?{What Spell|Spell1, %{Selected|Spell1}|Spell2, %{Selected|Spell2}|Spell3, %{Selected|Spell3}} With a macro for each spell, spell1, 2 3 etc looking like the one I posted in first post: &{template:default} {{name= SHOCK}} {{School = Primal}}{{Mana Cost = 3 MP}}{{Casting Roll = [[2d6+d6+@{selected|Magic}+2]]>13}} {{Test = Constitution(Stamina) vs Spellpower ([[@{selected|Magic}+10+2]])}} {{Effect = [[d6]] damage if saved vs Spellpower otherwise +@{selected|Magic}}} Replaced the brackets and such like in your example yet when I do the Spell macro it appears as What spells followed by a text input with essentially the entire macro written in it. Any thoughts?
1450215590

Edited 1450215766
Silvyre
Forum Champion
Could I ask that you post the values of the nested Abilities (%{Spell1}, %{Spell2} and %{Spell3}), with care taken to ensure that the HTML entities aren't converted by the forum (i.e. by placing a space within the HTML entities, e.g. & #125; ). I'll need to see the macro in full (with the usage of HTML entities visible) before I can help diagnose the issue. Thanks.
&{template:default & #125; {{name= SHOCK & #125; & #125; {{School = Primal & #125; & #125; {{Mana Cost = 3 MP & #125; & #125; {{Casting Roll = [[2d6+d6+@{selected|Magic}+2]]>13 & #125; & #125; {{Test = Constitution(Stamina) vs Spellpower ([[@{selected|Magic}+10+2]]) & #125; & #125; {{Effect = [[d6]] damage if saved vs Spellpower otherwise +@{selected|Magic} & #125; & #125;
1450216503

Edited 1450216657
Silvyre
Forum Champion
If you're also using the above as the value of %{Spell2} and %{Spell3}, try deleting the &{template:default} from all three of them and, instead, place &{template:default} outside of the ?{What Spell} Query. I generally recommend that elements common to every field within a drop-down be factored out in that way .
Tried that, still no joy :/
1450217523

Edited 1450217610
Silvyre
Forum Champion
I created the Abilities in question as you posted above (but without spaces within the entities and without &{template:default}), and was able to get the macros working via &{template:default} ?{What Spell|Spell1, %{Selected|Spell1}|Spell2, %{Selected|Spell2}|Spell3, %{Selected|Spell3}} Since the above isn't working out so well, I'll recommend that you replace %{Selected|Spell1} and %{Selected|Spell2} and %{Selected|Spell3} within your Roll Query with {{name=SHOCK}} {{School=Primal}} {{Mana Cost=3 MP}} {{Casting Roll=[[2d6+d6+@{selected|Magic}+2]]>13}} {{Test=Constitution(Stamina) vs Spellpower ([[@{selected|Magic}+10+2]])}} {{Effect=[[d6]] damage if saved vs Spellpower otherwise +@{selected|Magic}}}
Ah I've got it! Since I was testing, I had only put a single option for the roll query when of course it needed at least 2. ME and my (mage) players thank you! :D
1450218054
Silvyre
Forum Champion
Cool, enjoy. :)