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

I Need Some Help with Upgrading, Another Roll, and Comparing Dice Macros

Greetings everyone, I returned to this site after a long time due to real life problems. About a year or so ago, I was able to construct a Macro with bits and pieces I found that allowed me to, when dice hit the max number, to upgrade the dice and roll that dice instead (chaining to upgrade the max dice), comparing, then displaying the largest number out of the group. If you need an example of what I am talking about... If the dice rolled a 4 on a D4, that dice would be re-rolled as a D6. And if that rolled as a 6, the dice would be a D8 then rolled but came out as a 4; thus the number being displayed would be a 6. The system I am working with (Tails of Equestria) calls it something akin to 'exploding dice' however their version of exploding dice is NOT the same as the the commonly used term which is causing problems recreating the Macro I used. Furthermore, the Exploding Roll on the Character Sheet fails to run as intended thus I cannot even copy the action down. Mind everyone, this was  done with a free account (not pro or anything like that), so I know that it is  possible unless there was some big shift (which would be rather distasteful if it was so). I've been looking for what seems to be almost a year now. If anyone can help me, that would be appreciated.
1684507597
GiGs
Pro
Sheet Author
API Scripter
There's been no big shift that would affect dice rolls. I don't know how to do what you;re asking but it mitht be possible. You'd have to describe it a bit more though,. If started with a d4, rolled a 4, and now roll a d6, what happens of the result is a 5? Why does the d8 that rolled a 4 get changed to a 6?
Essentially his dice were a d4, d6, and d8 and his rolls were 4, 6, 4. So the highest was 6. But he can only take the 6 because his first roll was max on that die. I also don't know how to do this, I'm just saying I think I get the logic.
The first answer would display the result of five. The second answer is because 6 was the highest number on the same macro roll; the dice had to reroll but didn't get a 8 thus was unable to be upgraded. A better way I might be able express the formula is... If Roll 1d4 = 4, auto roll 1d6 If Roll 1d6  ≠ 6, display the highest value (4 if the second roll was 1-4 (as 4 was the highest number the roll could get on the dice), 5 if the second roll was 5). If Roll 1d6=6, auto roll 1d8. If Roll 1d8  ≠ 8, display the highest value (6 if the third roll was 1-6 (as 6 was the highest number the roll could get on the dice), 7 if the second roll was 7. If 1d8 = 8, auto roll 1d10. If Roll 1d10  ≠ 10, display the highest value (much like before, comparing the rolls and taking the higher number), if the roll = 10, auto roll 1d12. If Roll 1d12  ≠ 12, display the highest value (same song and dance, comparing the rolls), if roll = 12, auto roll 1d20. If Roll 1d20  ≠ 20, display the highest value (once more, comparing rolls), if roll = 20, display 20. It could be possible that the chain itself was shown, and not the number itself, but continued to auto roll. Again, this was a long time ago. But I absolutely remember that I managed to at least get to the point of auto-upgraded and rerolling the dice.
This macro doesn't chain but rolls everything and then works out which roll to use through carefully chosen multipliers and offsets before eradicating them to get the true value {d4*776,{4+0d0,d6}k1*376+825,{6+0d0,d8}k1*176+1650,{8+0d0,d10}k1*76+2275,{10+0d0,d12}k1*26+2700,{12+0d0,d20}k1+2975}kl1%25 It does create some awful tooltips and since it's a finite sequence you might want to consider creating a Rollable table to use instead with the following weightings 1 to 3:115200 each 4:76800 5:19200 6:14400 7:2400 8:1920 9:240 10:200 11:20 12:12 13 to 20:1 each
As I was thinking about this still, I did remember that the older character sheets did the roll automatically. So I tried to look into that angle; trying to find older versions of character sheets; legacy character sheets and such. From what I can tell, the older version used an API script (within the sheet/game itself; being dirt poor, I know I wouldn't be able to afford getting access to using API scripts on my own). Basically, the character sheet will use the API to make Exploding Hoof rolls. Chances are, my younger self was able to get the macro used and combined it with others. HOWEVER, I do remember testing it on blank character sheets, ones with no game attached, and that worked fine. So who knows if that's really the case... Seems like 90% of the problem would be fixed with just making exploding dice work as intended within said game.
And thank you for your solution Rainbow Encoder; not sure if it will work, but I will give it a try.
1684626413
GiGs
Pro
Sheet Author
API Scripter
Mystery said: Seems like 90% of the problem would be fixed with just making exploding dice work as intended within said game. This is an extremely odd statement to me. It's basically saying: "Seems like something that doesn't work would be fixed by making it work." Which, yes, that's true but kind of pointless - we don't have the power to make that change to Roll20 as a whole. So we can only tell you what can be done. This problem is something that can be done easily as an API script, can be done with some effort using Custom Roll Parsing if you have can edit the character sheet code , and can be faked with a rolltemplate again if you have can edit the character sheet code. If you have neither of those otpions and want to use the normal dice mechanics: that is not supported at all, and is niche hat even if Roll20 had a habit of ever upgrading their dice code, I don't ever see it being supported. That means you have to look at solutions of the sort RainbowEncoder posted which work within the system we have.
Yes, I was expressing my frustration. I am working on ways to help with that problem, perhaps something with the success/failure rolls? But it is clear that the codes of the past were indeed significant enough to cause problems; more so the ones that were useful only to be scrapped. I do hope the problem will be fixed someday.
1684634758

Edited 1684634888
GiGs
Pro
Sheet Author
API Scripter
Just a note: RainbowEncoder's method will only work if you start from d4. You would need to build a different macro or rollable table for each die you can start with. For a roll as complex as this, it's best of the sheet author builds the roll into the sheet with CRP (or someone adds it later). This was always the case (except CRP is reletaively new), so I'm curious what macro the old sheet used.