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 .
×

Am I trying to do too much at the same time? chatbox w/varying # of targets and each can make saves

I'm trying to make a chat box menu that lets me fire off effects and status changes based off spell level changing number of targets. For spells with no saves I think I have it figured out, once queries for saves come into play, i'm stumped. I know there is the HTML issue for nested Queries and I  think  I have addressed that... maybe. I'll share what I've got so far. I have NO training in this stuff. All I know I learned through Nick Olivo's youtube channel, Several of Keithcurtis's posts here, google and stubborness... so... it's probably ugly as sin, but it's what I've got.  the working script with no queries is  &{template:default} {{name=Beacon of Hope}}{{When you are ready choose the number of affected creatures, then designate your targets}} {{[1](!
/fx glow-holy @{target|Target1|token_id} 
!token-mod --set statusmarkers|+Courage::1748637 --ids @{target|Target1|token_id} --ignore-selected)[2](!
/fx glow-holy @{target|Target1|token_id} 
!token-mod --set statusmarkers|+Courage::1748637 --ids @{target|Target1|token_id} --ignore-selected 
 
/fx glow-holy @{target|Target2|token_id} 
!token-mod --set statusmarkers|+Courage::1748637 --ids @{target|Target2|token_id} --ignore-selected)[Play sound](SYRINSCAPE LINK)}} !token-mod --set statusmarkers|+blue What I am tinkering with is this... &{template:default} {{name=Animal Friendship}}{{When you are ready choose the spell level, then designate your targets}} {{[1](!
/fx sparkle-charm @{target|Target1|token_id} 
!token-mod ?{Did Target 1 Fail|Yes, --set statusmarkers#Charmed::1748634|No} --ids @{target|Target1|token_id} --ignore-selected)[2](!
/fx sparkle-charm @{target|Target1|token_id} 
!token-mod ?{Did Target 1 Fail|Yes, --set statusmarkers#Charmed::1748634|No} --ids @{target|Target1|token_id} --ignore-selected 
 
/fx sparkle-charm --ids @{target|Target2|token_id} 
!token-mod ?{Did Target 2 Fail|Yes, --set statusmarkers#Charmed::1748634|No} --ids @{target|Target2|token_id} --ignore-selected)[Play sound](SYRINSCAPE LINK)}} For 1 target it works just fine... It won't fire for 2 though. Google and reading several of Keith's posts in here has gotten me this far, But I can't find the next step for the life of me. Honestly he probably answered it in one of the pages I read, and it was just above my head and i didn't even realize it. Would anyone know if this is possible/ where i'm messing up?
Hi, there appear to be two separate things going on. First, this line in the 2-target version looks wrong: /fx sparkle-charm --ids @{target|Target2|token_id} /fx does not use --ids . It should be: /fx sparkle-charm @{target|Target2|token_id} Second, the harder issue is the inline query inside an API command button. Once you put multiple ?{...} queries inside the same chat button, you need to be very careful with escaping the query separators. In particular, the | and } characters inside the button/query can break the button parsing. Try replacing the query pipes and closing brace with HTML entities inside the button: ?{Did Target 1 Fail|Yes, --set statusmarkers#Charmed::1748634|No} and: ?{Did Target 2 Fail|Yes, --set statusmarkers#Charmed::1748634|No} So the important changes are: | becomes | } becomes } Also, fix the second FX line, so it is: / fx sparkle-charm @{target|Target2|token_id} Rather than using --ids . One other suggestion: for sanity, I would split this into smaller abilities/macros if possible. Have the menu buttons call separate macros, such as  #animal-friendship-1 and #animal-friendship-2 . It makes the escaping much easier to debug than having the whole spell nested inside one giant chat menu.