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

Referencing Rolls in a Drop Down macro

1453488463

Edited 1453488594
Alicia
Sheet Author
Has anyone gotten a query to work to reference another Ability roll? example: ?{Statuses|Weapon Jam,%{TokenMod|WPN-Jam}|Prone,test} %{TokenMod|WPN-Jam} contains /desc @{selected|token_name}'s weapon is ?{Description|jammed}  !token-mod --set statusmarkers|!interdiction I should note I'm creating the Status query as an Ability in the same sheet to keep the macro panel uncluttered. If there's alternatively a way to move the WPN-Jam contents into the query then I'd be satisfied with that as well.
I think it works, might be a syntax issue with your first statement. This worked for me: ?{Statuses|Weapon Jam,%{statuses|Weapon-Jam} | Prone,%{statuses|Prone} }
1453496899
Silvyre
Forum Champion
Alicia G said: If there's alternatively a way to move the WPN-Jam contents into the query then I'd be satisfied with that as well. This is your best option, imo. Read through Advanced Usage for Roll Queries and let me know if you get stuck.
1453497710

Edited 1453498031
Alicia
Sheet Author
Silvyre said: Alicia G said: If there's alternatively a way to move the WPN-Jam contents into the query then I'd be satisfied with that as well. This is your best option, imo. Read through Advanced Usage for Roll Queries and let me know if you get stuck. The problem was I need to be able to do line breaks to insure that the API command isn't added to the /desc. I'll keep playing with calling the roll and maybe try replacing characters in the secondary rolls with the entities
1453499031

Edited 1453499094
Alicia
Sheet Author
This is as close as I've been able to get: However in chat I get this: @{selected|token_name}'s weapon is jammed So now I just need to get the token name to show up. Replacing the entity code with @ just gives me the following error No character was found for 'selected|token_name}'s weapon is ?{Description|jammed} !token-mod --set statusmarkers|!interdiction'
1453501789

Edited 1453502012
Silvyre
Forum Champion
@ is one character that you should not have to ever replace within a Roll Query (although it is a replacement you'll usually want to make when dealing with API Command Buttons). Rest assured, though, that line breaks work fine within Roll Queries. Note that you will not be able to subject @{selected|token_name} to character replacements: Advanced Usage for Roll Queries said: Due to the order of operations , @{Attribute}, %{Ability} and #Macro calls are converted to their assigned values before Roll Queries are executed. That is to say, the vertical bar and closing brace characters that exist as the syntax of Attribute and Ability calls are replaced before those characters are able to prove problematic to a Roll Query that they are nested within. 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. All said, subjecting any Attribute, Ability or Macro calls to any character replacements will, under most use cases, cause that call to fail!
1453502642
Alicia
Sheet Author
Think I've got it now. I was still ignoring the OoO apparently. I was able to get it to work like I originally wanted but was thinking the initial macro wasn't working because the entities in %{TokenMod|WPN-Jam} were throwing the conflicts. All it took was my driving home to realize how silly I was being.