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

Calling Repeating Attacks from a Query

I am using the OGL 5E character sheet, and I can call a repeating attack from an ability using %{character_name|repeating_attack_$0_attack} But, when I put it in a query, such as ?{Attack?|Weapon1, %{character_name|repeating_attack_$0_attack}|Weapon2, %{character_name|repeating_attack_$1_attack}} it errors out.  It errors out so badly that the sandbox crashed.  I know calling an ability from an ability requires substitution.  Is this what I'm running into here?  Is this not possible? Thanks!
1680464128

Edited 1680464286
Gauss
Forum Champion
In short, when you put a macro call inside a query the system sees the ENTIRE macro in each query entry. This will cause issues because the macro will have things like commas ",", pipes "|", and braces "}". Those are commands for the query and will tell the query things it shouldn't be told too early.  For example, a brace will tell the query that the query is over.  You can use HTML replacement to solve that, but after a certain point it becomes a nightmare. Chat Menus are the suggested method for this.  Note: You will not be able to use the character sheet attacks for this as you will have to alter the attacks to accomplish the nesting. They will need to be turned into macros and then altered to accomplish the nesting.  Relevant wikis:  Roll Queries , Nesting Queries , HTML Entities , and Chat Menus If you need help with the Chat Menus let us know. If you need help with Nesting...well....we can advise, but generally I wouldn't subject anyone to the pain of what you are about to attempt. Just two full attack macros being nested into a query will be a significant amount of work. 
1680473998

Edited 1680500410
GiGs
Pro
Sheet Author
API Scripter
An expanded explanation of what Gauss is talking about: You have this ability: %{character_name|repeating_attack_$0_attack} That ability might contain text like &{template:5e}} {{something=this, is,an|example}} You then create this macro: ?{Attack?|Weapon1, %{character_name|repeating_attack_$0_attack} } Before that macro runs, roll20 reads it and "expands" all entries to other macros and abilities, swaps the name with the text. So Roll20 sees this: ?{Attack?|Weapon1, &{template:5e}} {{something=this, is,an|example}} } There's also some way of recognising which character it came from. Only then , does Roll20 attempt to run the macro. at that point, it hits a break. Your macro depends on certain characters: | , } . But they are also in the imported text, so the macro fails. Chat menus are the ideal solution here.
I am familiar with the html replacement issue.  But I've not had an issue before calling repeating templates.  I've never done that with a character, only NPC repeating attacks and traits, and have not had a problem.
1680479813
Gauss
Forum Champion
NPC repeating attacks and traits are usually simpler. You might have gotten lucky.  I would suggest firing off the attack, then click on the Chat tab window (where you type), hit the up arrow on your keyboard, copy the text then paste it here. We can point out what may be causing issues.