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

[Bug?] Numbers between -1 and 0 not counting as negative

Hello, I noticed that if you type, "/roll -1" the result is a -1. However, if you type /roll -0.5 the result is 0.5. This seems like a bug to me, I'm not sure what's going on as the system recognizes other negative numbers just fine.
This is still happening and I never got a response. Although my example is simplistic, how this comes up in play is after rolling a 1d100, applying modifiers, dividing by ten to calculate the Degrees of Success (40k RPG), you will get either a positive number (Degrees of success) or negative number (degrees of failure). Since the macro is long I use [[ ]] to hide it to save text-chat space. Lets say the result is -0.7, that means you just barely failed. The yellow [[ ]] number will be -0.7, but the actual printed number, the one the eye gravitates towards for the result, is 0.7. Several times we've gotten tricked and thought a roll passed when it actually failed. All other negative numbers work fine. Even negative decimal values, such as -1.7. I'm not sure why -1 to 0 would report differently. Example output: Bob: Mod(20), Perception(40) rolling [[-0.1]] 0.1 = 0.1
1393969660
Lithl
Pro
Sheet Author
API Scripter
This is certainly very odd. If Gauss doesn't come in and confirm it as a bug in the next 3 hours, could you send me a PM with an actual roll your game is using? I'd like to check if the API has any further insight. (/totally shouldn't be surfing R20 at work)
1393974807

Edited 1393975148
Interesting. Sorry this slipped through before. I've confirmed that "rolling" straight numbers that are less than one as negative doesn't seem to work correctly, however if you do a math formula (I tried /roll 1-1.5 and also /roll 0.1-0.5) it gives the correct result. That might work as a work-around for the moment depending on what you're trying to do. I'll pass it on to the developers for review.
1393976614
Gauss
Forum Champion
To add to Sarah's statement, this only occurs when the first term is a negative decimal. Example: /r -0.5+1d20 = 0.5+(10) = 10.5 (incorrect) /r 1d20-0.5 = (10)-0.5 = 9.5 (correct) Until a fix is in I suggest adding 0 to the start of any roll which may start with a negative decimal. Example: /r 0-0.5
Now that i'm home I got the exact formula from Sunday's game that we saw this. This is the end result of the macro, with the 61 being the 1d100 result. Correct answer ((20+((40)/1))-((61)))/(10) = (60-61)/10 = (-1)/10 = -0.1 Roll20 answer Tim (GM): ((20+((40)/1))-((61)))/(10) rolling ((20+((40)/1))-((61)))/(10) ((20+((40)/1))-((61)))/(10) = -0.1 Which looks right, except this is what we got Sunday, the equation above is the equation that's actually within the [[ ]] Jeromy: Mod(20), Perception(40) rolling [[-0.1]] 0.1 = 0.1 I'm not sure what changes between the actual math output (correct) and the macro/roll output (incorrect). It'd be a lot of work to update the macros because, to make it easier on my players, I created a unique one for each skill. There are a lot of skills, across several characters. I'll take that "until a fix as in" as a "it's being fixed" and be happy with that. Possibly related, if I have /roll [[stuff]] is that redundant? I wonder if that is the cause, as it's saying to re-roll the roll again... ahah, I'll try deleting the /roll.
Taking out the /roll before the [[ ]] fixed my problem. I was telling the system to roll twice, and if it was in the Magic Range it was essentially doing /roll -.5, which the system doesn't handle well. Now I just have the [[ ]] and there are no problems.