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

Reroll More than One set of dice does not show within Inline roll

1519183951

Edited 1519184305
Detailed Description of the Problem and Reproduction See here. -- Inline Rolls with multiple rerolls for dice less than 1  Sample Code: [[1d10r<1 [Weapon Critical Damage] +4d6r<1 +2d8]] Test 1 shows that everything after the 4d6r does not show up, so you can't get the specifics of what was done on the inline roll. It does add up all the dice though correctly. Test 2 shows how to mitigate the problem, however it doesn't give any info on what happened... and makes it more obtuse, if anything. Test 3 shows how to make that information visible but it's pretty clunky... not ideal but workable. Description of Setup. Most recent version of Google Chrome (64.0.3282.167 64 bit) and too many extensions to count. I tried it in Firefox (58.0.2) with only the Lastpass extension and it occurs there as well. Windows 10 Pro, version 1709 (OS Build 16299.248) AVG 18.1.3044, virus definitions 180220-2 Malwarebytes Anti-Malware, 3.3.1.2183, component package version 1.0.262, update package 1.0.4024 Bug Triage Results Tried both browsers as previously mentioned.  I didn't try disabling add-ons or antivirus initially, this doesn't seem to be related. Though I tried disabling Add ons in Firefox as well as antivirus. I cleared the cache in Firefox and it still occurs. Javascript is enabled in Chrome and firefox. Console Log for Firefox
Hi, Wade S. Thank you for your detailed bug report. This is behaviour that cropped up in response to a security patch, and the Dev Team is definitely aware of it. However, I'll also bring your report on the matter to their attention.
this might be related to my bug as well, I am trying to get a variable damage die on a Spell effect: ((abs(@{constitution_mod}))d(4)) that doesn't seem to work for whatever reason, which sounds like a simple "Can't bypass" except I recently made a breakthrough with a Healing Effect from a Spell, and it works for the Damage as well! (floor(((@{hd_d6})+(@{hd_d8})+(@{hd_d10})+(@{hd_d12}))d(((@{hd_d6})*6)+((@{hd_d8})*8)+((@{hd_d10})*10)+((@{hd_d12})*12))/2)) and THAT works!? here's the differences: the first one is potentially getting a double additive conflict, which I've done before manually and never had a problem, but after it runs that line, it then applies my Con Mod to the Spell Damage (idk, my brain hurts from trying to figure out this bug) the second one adds all of the hit dice together, then uses the max result of all of the hit die combined for it's sides. if i make "abs(" into "Abs(" it tells me one of it's expected results is "d", yet, it's error explicitly states the following: SyntaxError: Expected ")", "[", [ |\t] or [+|\-|*|\/|%] but "d" found. half of those commands I don't even recognize. Like, I'm guessing \t is to end a Table call or something, but idk \- or \/ and I don't trust % as far as I can see (I'm nearsighted, I know what Modulo/Modulus does, I just don't trust it) If you can't reproduce it, let me know and I can give you a copy of my Console Log, because I am having zero problem reproducing it, unfortunately.
1519632906

Edited 1519633275
Blue64 said: this might be related to my bug as well, I am trying to get a variable damage die on a Spell effect: ((abs(@{constitution_mod}))d(4)) that doesn't seem to work for whatever reason, which sounds like a simple "Can't bypass" except I recently made a breakthrough with a Healing Effect from a Spell, and it works for the Damage as well! (floor(((@{hd_d6})+(@{hd_d8})+(@{hd_d10})+(@{hd_d12}))d(((@{hd_d6})*6)+((@{hd_d8})*8)+((@{hd_d10})*10)+((@{hd_d12})*12))/2)) and THAT works!? here's the differences: the first one is potentially getting a double additive conflict, which I've done before manually and never had a problem, but after it runs that line, it then applies my Con Mod to the Spell Damage (idk, my brain hurts from trying to figure out this bug) the second one adds all of the hit dice together, then uses the max result of all of the hit die combined for it's sides. if i make "abs(" into "Abs(" it tells me one of it's expected results is "d", yet, it's error explicitly states the following: SyntaxError: Expected ")", "[", [ |\t] or [+|\-|*|\/|%] but "d" found. half of those commands I don't even recognize. Like, I'm guessing \t is to end a Table call or something, but idk \- or \/ and I don't trust % as far as I can see (I'm nearsighted, I know what Modulo/Modulus does, I just don't trust it) If you can't reproduce it, let me know and I can give you a copy of my Console Log, because I am having zero problem reproducing it, unfortunately. In my forum post  here , I mentioned that there's an issue that needed updated in the  Wiki for computed dice rolls ( per this source ). With that being said, you can run your macro mentioned there by simply putting a second set of brackets around it. I.E. [[ [[abs(@{constitution_mod}]]d4 ]] This will make it work just fine. The reason it didn't work before is due to the  order of operations performed in Roll20, as dice is rolled before functions like abs, ceil, and floor are used. By adding the brackets around it, roll20 will finish resolving the information inside the nested brackets before dealing with the outer brackets. 
the Wiki is actually contradicting that logic explicitly, specifically stating that it will stop inline roll operations at the first set of ]] brackets it encounters, meaning that it is directly opposed to Nested } & ]] brackets (which also means you can't do @{@{}} for example), so the logic flaw was actually within the Wiki it's self, Thank you for pointing this out for me, I shall test it right away and let you know the results! (btw, any ideas on how to make it so if the Con mod is =< 0 it returns 0 until >= 1?)
1519694538

Edited 1519695325
didn't work SyntaxError: Expected ")", "[", [ |\t] or [+|\-|*|\/|%] but "d" found oops, improper brackets Yay~! it worked! although it doesn't do it nested in chat [[[[(abs(@{constitution_mod}))]]d[[((@{constitution_mod})*4)]]]] returns [[0d (0) ]] with only the second 0 being "parsed" (although the 1st 0 was obviously parsed, it only appears as plain text) so, yeah, you are correct on them needing to overhaul their tutorial section to properly teach their own system.
1519696075

Edited 1519696170
Blue64 said: didn't work SyntaxError: Expected ")", "[", [ |\t] or [+|\-|*|\/|%] but "d" found oops, improper brackets Yay~! it worked! although it doesn't do it nested in chat [[[[(abs(@{constitution_mod}))]]d[[((@{constitution_mod})*4)]]]] returns [[0d (0) ]] with only the second 0 being "parsed" (although the 1st 0 was obviously parsed, it only appears as plain text) so, yeah, you are correct on them needing to overhaul their tutorial section to properly teach their own system. Yeah, I was going to say I know it works because I tested it out myself. Glad to see you figured it out. I just figured it made the most sense to update the Wiki on the computed dice rolls section since that's more or less what it's doing. 
any ideas on the making it return a 0 if =< 0?
Blue64 said: any ideas on the making it return a 0 if =< 0? There's not really enough information here for me to assist you with this question. What if the value is > 0? What should it return then? Because I'm assuming this is possible, but without knowing what this is being used for rule wise, I can't be sure of that. 
1519950506

Edited 1520476922
Wade S. said: Blue64 said: any ideas on the making it return a 0 if =< 0? There's not really enough information here for me to assist you with this question. What if the value is > 0? What should it return then? Because I'm assuming this is possible, but without knowing what this is being used for rule wise, I can't be sure of that.  if it is > 0 then it is behaving as intended, my problem is that a (@{constitution_mod}) will return (-1) for (@{constitution}) = (8) which obviously can't be rolled here's what I want, plain and simple: I don't want my players discovering this information before I preform a Dramatic Reveal of it at what I hope to be the worst possible moment This is specifically to modify the Ability Abyssal Coating which is simply a 1d4 Necrotic on Touch from the Chosen Undead Homebrew Race I'm turning it into ((con mod) d ((con mod)*4)) Necrotic Damage on Touch Con 12 = 1d4 con 14 = 2d8 con 20 = 5d20 I don't want con 8 to roll 1d4, con 6 = 2d8, etc. My Problems: I currently have this set up as a Spell This is better Suited to a Macro I have next to zero experience with setting up some form of comparative equation for a Macro I do have the available Template Macro somewhat Reverse Engineered and am able to utilize that knowledge to properly create this Effect once I have the proper Comparative Statement, specifically that's the only missing part. here's the Reverse Engineered Default Template: /em &{template:default} {{name=Shoot Web}} {{Attack=[[(1d20)+(@{selected|finesse_mod})]]}} {{Action=***-@{selected|token_name} Vomits Web at the Enemy-***}} {{Saving Throw=[[((@{selected|base_spell_dc})+(@{selected|pb})+(@{selected|finesse_mod}))]] DC vs Strength(Athletics) / Dexterity(Acrobatics)}} as you can see, it's not very different from the Default, but at the same time, is quite customized, this Action would not benefit from this improved Math which I desire, but if I can Modify the current setup I have and adapt it to fit in this simple format once I have the correct math to decide between -/+ hitpoints for example: /em &{template:default} {{name=Abyssal Coating}} {{Effect=[[(@{constitution_mod})<0|True, ?{effect|Healing|+} [[((@{constitution_mod})d((@{constitution_mod})*4))]]|False, ?{effect|Damage|-} [[((@{constitution_mod})d((@{constitution_mod})*4))]]]]}} {{Action=***-@{selected|token_name} ?{effect} [[(abs([[((@{constitution_mod})d((@{constitution_mod})*4))]]))]] on Touch-***}}
That doesn't make a whole lot of sense to me being that I don't play 5e myself, but this seems to be what you want. This first part verifies that the con mod value is equal to or greater than 1. It will return the con mod value for any constitution value equal to or over the value of 1, and it will return 0 for any value less than 1 for the constitution modifier. Thereby anything with a negative con value will not make a roll, it'll roll 0dwhatever. This essentially uses the  math only comparison I mentioned in the  prior post , so it's actually pretty easy to achieve once you understand how to do that.  [[ [[{{@{constitution_mod},0}>1}*((abs(@{constitution_mod}))) ]]d[[((abs(@{constitution_mod}))*4)]] ]]
1520019791

Edited 1520020379
if my comprehension of the evaluation is correct, it should return 1 if >= 1 or 0 if =< 0, then * (abs(Con Mod)) Meaning it's either gonna be (0*Con Mod) or (1*Con Mod) basically, if I understood that eval correctly. I shall try it right away. Edit: seems to have worked, although, just in case, probably want to enclose the first Con Mod as well (negative eval, you know the drill), and it needs a target as well of course if one is not using it as a token action, so I believe anyone wishing to use a similar template would end up with something along the lines of: [[[[{{(@{constitution_mod}),0}>1}*((abs(@{constitution_mod})))]]d[[((abs(@{constitution_mod}))*4)]]]] or [[[[{{(@{selected|constitution_mod}),0}>1}*((abs(@{selected|constitution_mod})))]]d[[((abs(@{selected|constitution_mod}))*4)]]]] now I just need to figure out how to get it to register if it's healing, just in case it comes in handy later lol
1520055547

Edited 1520055634
You don't really need to encase it with parenthesis to make it work, I tested it for that situation as well (negative modifiers). And if you were to put the abs() around the first constitution mod, you'd actually cause undesired behavior rather than prevent it. Further modification for selected targets or to select targets dynamically on the fly when the macro is pressed is really up to you.  As far as healing, I'm not sure what you mean by that. Again, I haven't touched 5e myself. 
1520187051

Edited 1520187528
I'm not saying to enclose it for abs() I'm saying to force it to recognize (-1) instead of it attempting ()-(1) (Error: (()-(1)) = Error), although it is good that you tested it for such errata, I know from experience that it's almost never a good idea to rely on what I call "fallback coding", it's plan B for a reason. as for the healing, the opposite of necrotic damage is radiant healing, so, I was going to inflict Healing for touching a creature that has Abyssal Coating Trait & a negative Con Mod, it's similar to a reverse cough, the healthier the person that has it actually is, the less appealing it is to give em a great big bear hug (Reverse Cough: when they aren't coughing, they're sick. When they are coughing, they're perfectly healthy. Superman + Reverse Cough = Metropolis getting blown away, unless Superman is Dying) So Abyssal Coating on a creature that has Con 4 would cause (-(3d12)) Necrotic Damage, which would be the polar opposite of something that eats away flesh simply because it's a double negative ((-12) Necrotic Damage = (12) Radiant Healing), it has nothing to do with 5e, it is as simple as the basic Elemental Table, they are Opposites, I am simply turning a Necrotic Coating into a Healing Salve because the creature that is Excreting it is simply too frail in order to produce it in any form of potent effectiveness, all the more reason for them to not be on the front line unless they are fighting Undead (think about the Halfling in the Order of the Stick Comic whilst he's under the Mark of Justice in a Town, he doesn't pick Fights because it's really bad for his health, unless it's an Undead, he will kill the hell out of an Undead first chance he gets, because it's all he is able to kill effectively) the hardest part is likely gonna be the Tagging system for actually deciding via Macro if I'm Healing/Damaging in order to reference it both via Damage Type and via the Flavor Text that goes with it, although I would assume that I could use the same True/False flag system in order to decide that. is there a way to decide ?{Damage|Radiant} for later use as ?{Damage} without it actually popping up the Window and asking? I know I can limit it to a Dropdown with ?{Damage|Radiant|Healing|+} or ?{Damage|Necrotic|Necrosis|-} but I don't know how to make it do that without a pop-up window.