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

Need help with Query rolls

1377467218

Edited 1377468829
Hi, I'm trying to write a macro that I use when I take damage, to easily see my new health and temp hp values. When I execute the macro, though, nothing happens. I assume that this means there's a syntax error somewhere. The whole thing is: He has [[@{Lifnak|Temp Health}-?{Damage Taken}]] Temporary Hitpoints remaining, and [[@{Lifnak|Health}-{{?{Damage Taken}>@{Lifnak|Temp Health}}*{?{Damage Taken}-@{Lifnak|Temp Health}}}]] Hitpoints remaining. I've broken it down, and the problem seems to be that I am unable to compare the value I input for "Damage Taken" with my Temp Health value. Is there a work-around for this, or am I simply doing something wrong? All help is greatly appreciated! Thanks :D
1377487147

Edited 1377487239
Most of those { } should be ( ) I think. He has [[@{Lifnak|Temp Health}-?{Damage Taken}]] Temporary Hitpoints remaining, and [[@{Lifnak|Health}-((?{Damage Taken}>@{Lifnak|Temp Health})*(?{Damage Taken}-@{Lifnak|Temp Health}))]] Hitpoints remaining. Try that and see if it works. However it will ask you for "Damage Taken" 3 times, it won't just add the same value into all 3 fields. Also if you're using the Health-bubbles over your token to keep track of HPs and Temp HPs and so, you can just type for example "-12" or "+5" into that field and it will subtract 12 or add 5 to the current value.
1377493419

Edited 1377493559
Gauss
Forum Champion
The first part (Temp HP remaining) is ok.  The second part (Hitpoints remaining) is not going to work as written because there is no dice roll involved in the inequality check.  If I understand the second part correctly you want the following:  [["Health" - ("Damage Taken">"Temp Health")*("Damage Taken"-"Temp Health")]] Here is what will work:  [["Health" - {{1d1-1+"Damage Taken"}>"Temp Health"}*("Damage Taken"-"Temp Health")]] In full macro form:  [[@{Lifnak|Health - {{1d1-1+?{Damage Taken}}>@{Lifnak|Temp Health}}*(?{Damage Taken}-@{Lifnak|Temp Health})]] Hitpoints remaining Note: the 1d1-1 cannot be taken out. The reason is that, with the current way the dice roller is set up, in order to perform a success check you must have a dice roll as part of the check. Math checks are a new element and the dice roller was not designed with an inequality math check in mind.  Note 2: The () can be {} and it won't matter but the check will not work if you use () in place of any of the {} I put in. Let me know if works for you.  - Gauss