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

Conditional hiding of lines

So I have been working to condense and improve my macros. Looking at them now I am down to 2 existing currently. Had many more before I starting messing with the conditional additions to the macros. A conditional query doesn't work for this as there are others in the line already best I can do for that is to make the line a 0. Wondering if there is another solution to it. Using ! at the start of a line makes the line not show up. Letting you stick your queries at the start and have the answers not show. Which is useful though my attempt to make it conditional didn't work. Will show what I have below if anyone cares. I was wondering if there is a way to conditionally hide a line or not. Figured asking out for people who know much more about roll20 macros than me would be wise. Thank you ahead of time for any responses to this. What it looks like before use ! ?{Enlarge|Yes, 2d6|No, 1d8|Double, 3d6} Bite&nbsp; &nbsp;[[1d20+10+7+1-3+?{ModifierA|0} + 3]] Damage [[?{Enlarge}+7+6+3+?{ModifierD|0}]] ?{Remove|Yes, ! Haste is off|No, Haste is on} (This line currently does not work) Claw [[1d20+10+7+1-3+?{ModifierA|0} + 3]] Damage [[?{Enlarge}+7+6+3+?{ModifierD|0}]] Claw [[1d20+10+7+1-3+?{ModifierA|0} + 3]] Damage [[?{Enlarge}+7+6+3+?{ModifierD|0}]] Claw [[1d20+10+7+1-3+?{ModifierA|0} + 3]] Damage [[?{Enlarge}+7+6+3+?{ModifierD|0}]] Claw [[1d20+10+7+1-3+?{ModifierA|0} + 3]] Damage [[?{Enlarge}+7+6+3+?{ModifierD|0}]] When used with default values. Bite&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20+10+7+1-3+0 + 3 = ( 4 )+10+7+1-3+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">22 &nbsp;Damage&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 2d6+7+6+3+0 = ( 3 + 6 )+7+6+3+0" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">25 ! Haste is off (This line currently does not work) Claw&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20+10+7+1-3+0 + 3 = ( 10 )+10+7+1-3+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">28 &nbsp;Damage&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 2d6+7+6+3+0 = ( 6 + 6 )+7+6+3+0" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">28 Claw&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20+10+7+1-3+0 + 3 = ( 8 )+10+7+1-3+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">26 &nbsp;Damage&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullfail" original-title=" Rolling 2d6+7+6+3+0 = ( 4 + 1 )+7+6+3+0" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(179, 21, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">21 Claw&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20+10+7+1-3+0 + 3 = ( 7 )+10+7+1-3+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">25 &nbsp;Damage&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 2d6+7+6+3+0 = ( 5 + 2 )+7+6+3+0" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">23 Claw&nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling 1d20+10+7+1-3+0 + 3 = ( 7 )+10+7+1-3+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">25 &nbsp;Damage&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullfail" original-title=" Rolling 2d6+7+6+3+0 = ( 4 + 1 )+7+6+3+0" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(179, 21, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">21
1584188128
Ziechael
Forum Champion
Sheet Author
API Scripter
You have a space as the first character in your query result, the chat message trims it but it will stop the ! from triggering as a 'hide' toggle, try without it: ?{Remove|Yes,! Haste is off|No,Haste is on} (This line currently does not work)
That worked thank you very much. I didn't even notice that and likely wouldn't have for the longest time. Now I can drop myself all the way down to one macro which is super amazing makes updating it so much simpler.