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 .
×
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Help] Wrong macro lines? See the result in a yellow box

1464092990

Edited 1464199939
Hi Guys Problem 1 : SOLVED this is the macro   : &{template:default} {{name= Monstre ATTAQUE}} [[d100<@{Force} +?{Mod?|0}]] And this is what I get once executed : I expected to see in the yellow box the result of dices which is "52" But I think it shows only  1 or 0 as success or not. How can I fix it , if it's possible ? thank u very much  EDIT : I forgot to mention, I use macros in abilities and not the "my settings" Problem 2 : SOLVED /r 1d100<@{Force}+?{Mod?|0} shows : I want to add a modifier to an attribute ( here it's "force" which means strenght) this addition, Attribute + modifier is the target and is compared to 1d100. So I expected ,: rolling 1d100<70 (42) = 1 Successes I believe many games use that system ( modifiers to the attributes and not the dices) Is it again the target option which makes impossible formulas??
1464093738

Edited 1464093792
&{template:default} {{name= Monstre ATTAQUE}} {{Attaque=[[1d100]]}} You won't be able to use the <50 option and show the result. It's one or the other.
SkyCaptainXIII said: &{template:default} {{name= Monstre ATTAQUE}} {{Attaque=[[1d100]]}} You won't be able to use the <50 option and show the result. It's one or the other. Ohhh I see,  thank u 
The > and < return a 1 or a 0 to indicate true or false respectively. So with the way you have it set up, it would return a 1 if the d100 resulted in a 49 (possibly 50, not sure) or lower. If you're wanting it to show up like a critical strike (green) or a critical fail (red), I would suggest tacking the cs># so that it'll automatically do that for you. All you do is replace the # with whatever number (or attribute that has a numerical value) that you'd like it to be.
qwerty4132 said: The > and < return a 1 or a 0 to indicate true or false respectively. So with the way you have it set up, it would return a 1 if the d100 resulted in a 49 (possibly 50, not sure) or lower. If you're wanting it to show up like a critical strike (green) or a critical fail (red), I would suggest tacking the cs># so that it'll automatically do that for you. All you do is replace the # with whatever number (or attribute that has a numerical value) that you'd like it to be. Qwerty4132, thanks for your post I  wanted to see the result of  1d100 ≤ Strength + Modifie r in the box  the  < (which indeed means  ≤ for roll20) is just for a target, not about the critical strike here.  But yeah, the fact I included a condition with the  < ,  the result is logically 0 or 1 ...
I think that would require some math wizardry, which happens to be the unofficial side job of The Aaron (not really, but he is found replying to a lot of math wizardry stuff and usually is the one that solves them). I'm positive there's a way to go about getting the result that you want using some math wizardry, but I'm just not the person to to really ask about this kind of thing. I'm more of a query maker myself and as such, trying to figure out some of the issues people have with queries while also making some that anyone can use. So if you ever need help with queries, I'll more than likely be able to help you out with those. I've already gotten something made that apparently has been an issue (?) for some people or people simply haven't done yet (saying this because I don't really see many threads for multi-query systems or seeing people get successful ones, but for all I know everyone could have it done already).
1464197297

Edited 1464197560
that shouldn't be that complicated lol  I thought there would be more flexibility but as newbie I shouldn't get an opinion that fast.. I dont want to pollute the forum each time I get a problem, but here another  : ( I edit my first msg with that part) /r 1d100<@{Force}+?{Mod?|0} shows : I want to add a modifier to an attribute ( here it's "force" which means strenght) this addition, Attribute + modifier is the target and is compared to 1d100. So I expected ,: rolling 1d100<70 (42) = 1 Successes I believe many games use that system ( modifiers to the attributes and not the dices) Is it again the target option which makes impossible formulas??
1464198028

Edited 1464198510
Have you tried putting () around the attribute call and the modifier query? Basic rules of math. Parentheses first. Using your items: Number 1: [[d100cs<(@{Force}+?{Mod?|0})cf>(/r 1d100<@{Force}+?{Mod?|0} + 1) ]] The above if you're wanting it to succeed below the set number and fail when above it. That's the simplest way I can think of for seeing the result and if it succeeded or not. Number 2: /r 1d100<(@{Force}+?{Mod?|0})
1464198420

Edited 1464214178
Here's some math wizardry: [[ floor(d100 * (1e2 - 1/50)) * 1e-2 + 1/50 ]] or [[ floor(d100cs<50 * (1e2 - 1/50)) * 1e-2 + 1/50 ]] This adds 0.01 to rolls that are ≤ 50, indicating success.
qwerty4132 said: Have you tried putting () around the attribute call and the modifier query? Indeed—we have to be careful to work with the mathematical order of operations. However, in this case, we additionally have to work around the Order of Operations of Roll20's dice engine by using [[inline roll brackets]]. e.g. /r 1d100<[[@{Force}+?{Mod?|0}]] or [[ 1d100<[[@{Force}+?{Mod?|0}]] ]]
@Qwerty,  Yes i had thought of it but with ( ), it didn't work. @ Silvyre, oh wow  thank u very much,  it does work like that thanks guys;  I can't edit the title of my post as "SOLVED"; but I put it in the first post.
1464200194
Pat S.
Forum Champion
Sheet Author
As this has been solved to your liking, I will close this thread.