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

Yes/No query where Yes does a calculation, No does absolutely nothing

I have tried several variations of what to put for the 'No' result, which is currently set as &amp;nbsp; Is there a way for the result to be absolutely nothing? ie: Not a carriage return, not a space, simply nothing ?{Add Appraise check?|Yes,**[Appraise](<a href="https://www.d20srd.org/srd/skills/appraise.htm)**" rel="nofollow">https://www.d20srd.org/srd/skills/appraise.htm)**</a> Check:([[d20[Roll] +@{Int-mod}[Int] +@{Appraiseranks}[Ranks] +@{Appraisemiscmod}[Misc] +?{Bonus to Appraise Check?&amp;#124;0&amp;#125;[Bonus] ]])|No,&amp;nbsp;} The point of this is to add the check to an attack when desired, but not have it mess anything up when it's not. Thx
1645156904
The Aaron
Roll20 Production Team
API Scripter
Use a ! instead of the &amp;nbsp; ?{Add Appraise check?|Yes,[stuff] |No, ! } ! is the API command character, so it effectively sends the command off to the API (which you don't have anyway) and not to the chat.
1645156949
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The best you can do is a space character: ?{Add Appraise check?|Yes,**[Appraise](<a href="https://www.d20srd.org/srd/skills/appraise.htm)**" rel="nofollow">https://www.d20srd.org/srd/skills/appraise.htm)**</a> Check:([[d20[Roll] +@{Int-mod}[Int] +@{Appraiseranks}[Ranks] +@{Appraisemiscmod}[Misc] +?{Bonus to Appraise Check?&amp;#124;0&amp;#125;[Bonus] ]])|No, }
Ah damn, thanks but neither of these solutions will work for me. But at least now, I know that it cannot be done.
1645192611
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What's your end goal?
Scott C. said: What's your end goal? I've been working on making a Macro Machine for Roll20 that creates a variety of macros. This particular part is to add a Skill check into an attack macro, using Subtags2. This idea is to ask the query at the beginning of the macro and on a Yes, display the chosen skill. On a No, do absolutely nothing. Unfortunately, I don't believe that it is possible since any form out output on a No always ends up with a carriage return which makes the macro show a large blank space which annoys me. Thanks for the help though
What is the rest of your macro? If you make it so that the query is on the same line as the rest of the output, and just add the html carriage return on the ‘yes’ responses.&nbsp;
Jarren said: What is the rest of your macro? If you make it so that the query is on the same line as the rest of the output, and just add the html carriage return on the ‘yes’ responses.&nbsp; This is a stripped down version of of an attack macro, which uses a CR on Yes. Using &amp;nbsp; as the least impacting character (It only moves the title part over one space). It still causes things to line up improperly though. As I mentioned, I don't believe that I can do what I'm trying to do, Roll20 simply does not allow it. &amp;{template:DnD35Attack} {{flag=true}} {{fullattackflag=[[d1]]}} {{name=@{character_name} }} {{attack1=?{Add Appraise check?|Yes,**[Appraise](<a href="https://www.d20srd.org/srd/skills/appraise.htm)**" rel="nofollow">https://www.d20srd.org/srd/skills/appraise.htm)**</a> Check:([[d20[Roll] +@{Int-mod}[Int] +@{Appraiseranks}[Ranks] +@{Appraisemiscmod}[Misc] +?{Bonus to Appraise Check?&amp;#124;0&amp;#125;[Bonus] ]]) |No,&amp;nbsp; }**Longsword:** Hits AC([[ [Longsword] 1d20]])}}
1645239654

Edited 1645239883
Oosh
Sheet Author
API Scripter
A bit late to the party, but is this what you're trying to do? Line 2 only appears on a 'Yes' selection. &amp;{template:default} {{name=Name}} {{=Line1 ?{Title|Yes,Line2 |No,[stuff](#" style="display:none)}Line3}} One caveat with this approach, is it won't work on the left hand side of a template property, which is mostly only relevant for trying to use the left-hand side of the default template's allprops fields. The '=' in the inline style hack breaks the key/value assignment.
1645240818

Edited 1645241079
Oosh said: A bit late to the party, but is this what you're trying to do? Line 2 only appears on a 'Yes' selection. &amp;{template:default} {{name=Name}} {{=Line1 ?{Title|Yes,Line2 |No,[stuff](#" style="display:none)}Line3}} One caveat with this approach, is it won't work on the left hand side of a template property, which is mostly only relevant for trying to use the left-hand side of the default template's allprops fields. The '=' in the inline style hack breaks the key/value assignment. Holy crap, it works! Well, it works within the body of {{Attack1=}}, but in Subtags2 it still creates the carriage return. I'll take it and call this a solution.... Oosh, I owe you a beer!
I just used this and it seemed to work: &amp;{template:DnD35Attack} {{flag=true}} {{fullattackflag=[[d1]]}} {{name=@{character_name} }} {{attack1=?{Add Appraise check?|Yes,**[Appraise](<a href="https://www.d20srd.org/srd/skills/appraise.htm)**" rel="nofollow">https://www.d20srd.org/srd/skills/appraise.htm)**</a> Check:([[d20[Roll] +@{Int-mod}[Int] +@{Appraiseranks}[Ranks] +@{Appraisemiscmod}[Misc] +?{Bonus to Appraise Check?&amp;#124;0&amp;#125;[Bonus] ]]) |No,&amp;#13;}**Longsword:** Hits AC([[ [Longsword] 1d20]])}} First roll was with a 'yes' response, and the second roll was with a 'no' response: But I'm not familiar with D&amp;D 3.5, or if this is part of a larger/longer macro, so maybe it could still be improved?&nbsp;
Jarren said: I just used this and it seemed to work: &amp;{template:DnD35Attack} {{flag=true}} {{fullattackflag=[[d1]]}} {{name=@{character_name} }} {{attack1=?{Add Appraise check?|Yes,**[Appraise](<a href="https://www.d20srd.org/srd/skills/appraise.htm)**" rel="nofollow">https://www.d20srd.org/srd/skills/appraise.htm)**</a> Check:([[d20[Roll] +@{Int-mod}[Int] +@{Appraiseranks}[Ranks] +@{Appraisemiscmod}[Misc] +?{Bonus to Appraise Check?&amp;#124;0&amp;#125;[Bonus] ]]) |No,&amp;#13;}**Longsword:** Hits AC([[ [Longsword] 1d20]])}} Damn, I thought that I'd tried &amp;#13; but I guess that I hadn't. Guess this means that I owe you a beer too!