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

Macro: Dice Games and Error?

1587891361

Edited 1587892047
First Post so please excuse my errors and bad formatting, I'm trying to make a Macro for the dice game "Pig" where I'd like some clearance/help on, and I've also made a Macro for a dice game called "Mason" but it seems to be buggy for no reason. So  let's tackle Pig first, The rules I'm using here is: you roll a d6 until you either hit a 1 on the die (on which you'll loose all points this turn and gets skipped) or until a total of 7 or higher has been rolled (which gets added to your score) I'm having trouble coming up with a roll command that re-rolls/explodes the dice on a 2 or higher but only until the total is 7 or higher (we can check for 1s with hovering over the roll... but it'd be cool if normal dice rolls could do that as well, but I doubt that's possible without an API) Any Ideas on that? As for Mason... The general rule of the game is, you roll 6d6 and re-roll any 4 or higher that you've got until there are no more rolls possible, you then total all rolls that were 4 or higher and add them to your score (this should work with {6d6!>4}>4) The Macro itself looks something like this: &{template:dmg}{{damage=1}}{{dmg1flag=1}}{{dmg1type=Points}}{{dmg1=[[{6d6!>4}>4]]}}{{rname=Mason Score}} as to why I do a template: so that it looks nicer (we pretty much have 5eOGL format throughout every roll, and yes all my macros look something like that..) but when I hovered over a roll, I sometimes get weird results that shouldn't happen so the first dice was 5 "re-rolled" (exploded in this case) into 1 2nd: 4, 4, 6, 6 and 3 3rd: 4, 5, 5, 5, 5, 4 and 1 4th: 6, 6 and 3 5th: 3 6th: 2 so the total should be 13 points (every roll that was higher than 4, totalling 13 rolls that were 4 or higher) but for some reason there was a 7th roll of 6 and 4; it doesn't happen all the time but when it happens it just makes no sense and completely defeats the purpose of creating the roll since you have to hover over said roll and check each group to see if it's even correct.... Edit: added cs>4cf<3 for better visuals (no errors in the following Screenshot) As a bonus I'll throw in my Potion of Healing query Macro for anyone interested (and no, nothing's wrong with that one c: just sharing it): &{template:dmg}{{damage=1}}{{dmg1flag=1}}{{dmg1type=Healing}}?{Potion of Healing|Healing,{{dmg1=[[2d4+2]]}}{{rname=Potion of Healing}}|Greater Healing,{{dmg1=[[4d4+4]]}}{{rname=Potion of Greater Healing}}|Superior Healing,{{dmg1=[[8d4+8]]}}{{rname=Potion of Superior Healing}}|Supreme Healing,{{dmg1=[[10d4+20]]}}{{rname=Potion of Supreme Healing}}} looks something like this:
1587909705

Edited 1587909720
GiGs
Pro
Sheet Author
API Scripter
Sinned17DRP  said: So  let's tackle Pig first, The rules I'm using here is: you roll a d6 until you either hit a 1 on the die (on which you'll loose all points this turn and gets skipped) or until a total of 7 or higher has been rolled (which gets added to your score) I'm having trouble coming up with a roll command that re-rolls/explodes the dice on a 2 or higher but only until the total is 7 or higher (we can check for 1s with hovering over the roll... but it'd be cool if normal dice rolls could do that as well, but I doubt that's possible without an API) Any Ideas on that? This cant be done without a custom API script. The macro system can not do conditionals. So, "reroll until you get 7+" is not possible. As for Mason... The general rule of the game is, you roll 6d6 and re-roll any 4 or higher that you've got until there are no more rolls possible, you then total all rolls that were 4 or higher and add them to your score (this should work with {6d6!>4}>4) Your images aren't loading so I cant see the output. But I made a few of my own and didnt take long to find one that looks wrong: It looks like there are 7 dice rolled here 4+6+5+6+6+5+6+4+4+2 2 1 2 1 2 4 Furthermore the last 4 isnt rerolled. i did wonder at first if the ordering was not as it appeared - like, the first 6 dice were the original 6 dice. Then the next 6 dice were the rerolls for those dice, and so on. That would give us 4+ 6 +2 6 +4 +1 5 +4 +2 6 +2 +4 6 +2 5 +1 But even if so, the last die should not be a 4 - that should not be possible. The 4th die above hasnt finished all it rerolls. So something isnt right here. It does look like a bug.
Thanks for the quick response GiGs said: Sinned17DRP  said: So  let's tackle Pig first, The rules I'm using here is: you roll a d6 until you either hit a 1 on the die (on which you'll loose all points this turn and gets skipped) or until a total of 7 or higher has been rolled (which gets added to your score) I'm having trouble coming up with a roll command that re-rolls/explodes the dice on a 2 or higher but only until the total is 7 or higher (we can check for 1s with hovering over the roll... but it'd be cool if normal dice rolls could do that as well, but I doubt that's possible without an API) Any Ideas on that? This cant be done without a custom API script. The macro system can not do conditionals. So, "reroll until you get 7+" is not possible. Thought so, guess we'll have to use the usual method with manually rolling the dice then. The Images aren't loading in? I "uploaded" them via the Picture from URL, it shows for me but something might go wrong for some reason... Trying it with Uploading files: I'd update the first post accordingly to make sure it makes sense if they're visible. So something isnt right here. It does look like a bug. Yea it's weird how there can be a random mess in the rolls in the example I gave (5+1+4+4+6+6+3+4+5+5+5+5+4+1+6+6+3+3+2+6+4) you could also say the first 6 were the originals then the next x number of dice that needed to be re-rolled etc. that'd give us 5+1+4+4+6+6 for the first set with 5 dice having to be re-rolled. 3+4+5+5+5 for the second set with 4 dice re-rolling and so on (for completions sake: 5+4+1+6;  6+3+3;  2) and again a 6 and a 4 from out of nowhere in the roll... I mean, going with the way the rolls are with the r and ro commands, it'd re-roll any die it rolled instantly (as described in the first post). Perhaps the coding has trouble with ordering the rolls somehow/somewhere if it's overloaded or something like that? It should be looked into regardless of why it happens though. Well thanks again for answering my questions :)
1587918662
GiGs
Pro
Sheet Author
API Scripter
Sinned17DRP said: I mean, going with the way the rolls are with the r and ro commands, it'd re-roll any die it rolled instantly (as described in the first post). Perhaps the coding has trouble with ordering the rolls somehow/somewhere if it's overloaded or something like that? It should be looked into regardless of why it happens though. Well thanks again for answering my questions :) Replaying to the bold - yes, that's my understanding of how it happens too, i was just exploring all possibilities. I';m wondering if its due to the server load roll20 is under now, causing issues with the quantum roller. If that's the case, thats a serious problem and wont be just affecting rolls like these.