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 sheet abilities to another sheet ability

Hello all! I'm trying to call 2 sheet abilities into a single sheet ability and running into some issues. I have 2 attributes: Imbue - 2d4 Output - 1d4 Those attibutes are called by abilities of the respective names like so: ?{Stack Amount?|Base,/r @{Imbue}  |1 Stack,/r @{Imbue} + @{Imbue}  |2 Stacks,/r @{Imbue} + @{Imbue} + @{Imbue}  |3 Stacks,/r @{Imbue} + @{Imbue} + @{Imbue} + @{Imbue} } ?{Stack Amount?|Base,/r @{Output}  |1 Stack,/r @{Output} + @{Output}  |2 Stacks,/r @{Output} + @{Output} + @{Output}  |3 Stacks,/r @{Output} + @{Output} + @{Output} + @{Output} } These work exactly as intended. The problem is coming when I try to then call those abilities into another ability "imbue-output": ?{Imbue or Output?|Imbue,%{selected|Imbue} |Output,%{selected|Output} } I think it might be something to do with calling queries into a query but I'm not sure why it'd be doing it. Any help would be greatly appreciated!
1761532476

Edited 1761532537
Gauss
Forum Champion
Hi Frey,  In short, you are running into a nested query issue. You can read about that here . The problem is that you see ?{queryname|option1,%{output1}|option2,%{output2}} Roll20 sees: ?{queryname|option1,contents of output1|option2,contents of output2} Which, when you have a second query it sees the control characters in the second query and that kills the first query.  You have to use HTML entities to substitute the control characters for HTML characters. Guidance on doing that in the link above. 
Thank you for the reply Gauss :) This method tells me in big bold letters to never  replace any of the characters in a call. Regardless, I tried out a few different ways of implementing it but none have worked. I believe that also means the "copying contents to dropdown" part also won't work as they're all attribute calls and I don't know if there's a way to split those two abilities as they all use the same syntax. I could definitely be missing something here though so please let me know 
Frey said: Thank you for the reply Gauss :) This method tells me in big bold letters to never  replace any of the characters in a call. Regardless, I tried out a few different ways of implementing it but none have worked. I believe that also means the "copying contents to dropdown" part also won't work as they're all attribute calls and I don't know if there's a way to split those two abilities as they all use the same syntax. I could definitely be missing something here though so please let me know  Never replace the characters in an attribute call . You want to replace the characters in ability or macro calls .  When you run this command: ?{Imbue or Output?|Imbue,%{selected|Imbue} |Output,%{selected|Output} } What happens is the contents of the Imbue and Output Abilities are expanded before the query is called  due to the Roll20 Order of Operations : ?{Imbue or Output?|Imbue,?{Stack Amount?|Base,/r @{Imbue}  |1 Stack,/r @{Imbue} + @{Imbue}  |2 Stacks,/r @{Imbue} + @{Imbue} + @{Imbue}  |3 Stacks,/r @{Imbue} + @{Imbue} + @{Imbue} + @{Imbue} } |Output,?{Stack Amount?|Base,/r @{Output}  |1 Stack,/r @{Output} + @{Output}  |2 Stacks,/r @{Output} + @{Output} + @{Output}  |3 Stacks,/r @{Output} + @{Output} + @{Output} + @{Output} } } Then all of the attributes are processed so it becomes this: ?{Imbue or Output?|Imbue,?{Stack Amount?|Base,/r 2d4 |1 Stack,/r 2d4 + 2d4 |2 Stacks,/r 2d4 + 2d4 + 2d4 |3 Stacks,/r 2d4 + 2d4 + 2d4 + 2d4 } |Output,?{Stack Amount?|Base,/r 1d4 |1 Stack,/r 1d4 + 1d4 |2 Stacks,/r 1d4 + 1d4 + 1d4 |3 Stacks,/r 1d4 + 1d4 + 1d4 + 1d4 } } The Roll20 parser will see the  ?{ and start processing the query. 'Imbue or Output?' is the query name. Then the options that are separated by a pipe and comma look like this: |Imbue,?{Stack Amount? |Base, /r 2d4 |1 Stack, /r 2d4 + 2d4  |2 Stacks,/r 2d4 + 2d4 + 2d4  |3 Stacks,/r 2d4 + 2d4 + 2d4 + 2d4 } That closing brace tells the parser to stop the query. Everything afterwards is not part of the query: |Output,?{Stack Amount?|Base,/r 1d4  |1 Stack,/r 1d4 + 1d4  |2 Stacks,/r 1d4 + 1d4 + 1d4  |3 Stacks,/r 1d4 + 1d4 + 1d4 + 1d4 } } You won't be able to use Input and Output in the Stack Amount query, unless you replace all of the control characters in Input and Output to html entities, which will then prevent those queries from working standalone. The other option is to use a Chat Menu  that could look something like this, but require two clicks to run: /w gm &{template:default} {{name=Stack Amount}} {{[Imbue](~Imbue) = [Output](~Output)}}
1761580395

Edited 1761764524
Thank you so much Jarren! That helped clear it up a lot for me. I'll try out replacing the control characters to HTML entities but I'll likely go with the Chat Menu option you've proposed as it looks like that will work the best for what I'm trying to do. o7 Edit: Used it in session one last night and the chat command solution worked perfectly! Thank you again :D