Visual Dice Rolling Overlay v3.x

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

Jmr3366
Cave Troll
Posts: 81
Joined: Fri Feb 04, 2022 1:08 pm

Re: Visual Dice Rolling Overlay v3.x

Post by Jmr3366 »

These look really nice!!

I just finished integrating that exmaple.zip you had shared.
I've got some more tweaks I need to finish before next version.

The different die sets makes me think how much time it would take to make the actual die controls "dynamic" so the d6 or d12 (or any for that matter) swap out for whatever the set is (maybe a future release . . . )

maclud
Kobold
Posts: 13
Joined: Tue Jun 21, 2022 8:32 pm

Re: Visual Dice Rolling Overlay v3.x

Post by maclud »

Jmr3366 wrote:
Sat Jun 25, 2022 9:27 pm
These look really nice!!

I just finished integrating that exmaple.zip you had shared.
I've got some more tweaks I need to finish before next version.

The different die sets makes me think how much time it would take to make the actual die controls "dynamic" so the d6 or d12 (or any for that matter) swap out for whatever the set is (maybe a future release . . . )
I just added questions for you in my previous post ;)

not sure what you mean about the time and "dynamic" but I was thinking maybe load one "simple" table per campaign instead of giving the choice to the players to use "any" die ever made... or yes indeed, this will be a bit overkill if we keep making some...

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Visual Dice Rolling Overlay v3.x

Post by Full Bleed »

maclud wrote:
Sat Jun 25, 2022 8:29 pm
annddd... there you go...
did some retouch, those one should be better than the previous tests but I'm still not happy with the shadows (

https://drive.google.com/drive/folders/ ... sp=sharing

converted to webm 120px and 480px... added the blurry ss files in the 120px folder.
Some really nice ones in here... and haven't even had a chance to look closely at all of them all yet!

Thanks for sharing. :)


Out of curiosity, I was just looking at those sweet diamond dice... and I got to wondering if the die body could be set to around 10% transparent with the numbers being opaque? I think it could have an even better effect against the maps... same goes for all of the translucent type dice. Going to work up some rough Photoshop tests to see how it looks in theory... though it won't be as good as a native rendering/export (if it's possible.)

EDIT: Speaking of the Diamond dice... the 11 of the 12-sider is missing.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

maclud
Kobold
Posts: 13
Joined: Tue Jun 21, 2022 8:32 pm

Re: Visual Dice Rolling Overlay v3.x

Post by maclud »

Full Bleed wrote:
Sun Jun 26, 2022 12:12 am
Some really nice ones in here... and haven't even had a chance to look closely at all of them all yet!
Thanks for sharing. :)
my pleasure ;) dont look too close or you ll see all the little mistakes :p
Full Bleed wrote:
Sun Jun 26, 2022 12:12 am
Out of curiosity, I was just looking at those sweet diamond dice... and I got to wondering if the die body could be set to around 10% transparent with the numbers being opaque? I think it could have an even better effect against the maps... same goes for all of the translucent type dice. Going to work up some rough Photoshop tests to see how it looks in theory... though it won't be as good as a native rendering/export (if it's possible.)
mhhhh yes you are right, I'll try to do this during next week (need to change how to handle the renders and the shadows pass for the next batch because Im getting strange artefacts at the moment.... will probably redo the diamond one at the same time)
Full Bleed wrote:
Sun Jun 26, 2022 12:12 am
EDIT: Speaking of the Diamond dice... the 11 of the 12-sider is missing.
thank you! they havent been processed for some reason... just added in the drive folder and also repacking the zip... seems the ashes d8-05 also was missing..

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Visual Dice Rolling Overlay v3.x

Post by aliasmask »

Which program did you use to render the images and batch save? I just bought Corel Paintshop Pro 2022 Ultimate and it can not read those files. I'm complaining on their forum, so I'd like to tell them of the source.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Visual Dice Rolling Overlay v3.x

Post by Full Bleed »

aliasmask wrote:
Sun Jun 26, 2022 3:06 am
Which program did you use to render the images and batch save? I just bought Corel Paintshop Pro 2022 Ultimate and it can not read those files. I'm complaining on their forum, so I'd like to tell them of the source.
Looks like a known issue with CPSP 22: https://forum.corel.com/viewtopic.php?p ... 41#p389139
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Visual Dice Rolling Overlay v3.x

Post by aliasmask »

Yep, saw that post. I told them I'm looking a solution be it 3rd party or unofficial hotfix. I know photoshop has driver you can drop in to plug-ins. I'm tempted to see if it works for PSP, but I doubt it. I basically told them they have 30 days or else I'm retuning product.

maclud
Kobold
Posts: 13
Joined: Tue Jun 21, 2022 8:32 pm

Re: Visual Dice Rolling Overlay v3.x

Post by maclud »

aliasmask wrote:
Sun Jun 26, 2022 3:06 am
Which program did you use to render the images and batch save? I just bought Corel Paintshop Pro 2022 Ultimate and it can not read those files. I'm complaining on their forum, so I'd like to tell them of the source.
oh seems they have the same problem with Affinity.. and yes, indeed webp is a pain. (used it because of the previous files I found in here and the post mentioning the better ratio size/quality , but honestly I didnt know anything about it before this week..)
anyway, used photosh with the 8bi plugin you mentioned for automated task concerning the alpha/color profils/normal maps etc.
I know Krita handle them too natively...and gimp (but i know nothing about gimp scripting ).. you can also open them with XnView and convert from there (simple and easy)

couldnt really work properly this week so I didnt even bothered opening max nor blender, and went with an old version of C4D with basic simple render engine.

also used a lot of AutoHotKey (because for some reason toshop dont like to import color profiles during batch task, this one I may complain on their forum ;) )

Jmr3366
Cave Troll
Posts: 81
Joined: Fri Feb 04, 2022 1:08 pm

Re: Visual Dice Rolling Overlay v3.x

Post by Jmr3366 »

maclud wrote:
Sat Jun 25, 2022 8:38 pm
yes sorry the one I made earlier this week were not great and I couldnt find an easy way to rename/convert to webp at the time ...
could you point out exactly which sprite seems offsetted? I ll try to align everything properly if needed next time..
Actually when I first saw the blood dice d4 ss it didn't look right (when I made that post). After checking, it was good.
maclud wrote:
Sat Jun 25, 2022 8:38 pm
also, I tweaked your macro a little last week and added an option for rolling the dice with "bonus" added to the result (sending 0 as an argument if no bonus is send) and show some critical hit and fail text in the chat window. also added a simple script button for removing the other people dice (because my players just cant remind themselves to do so on their own)...
Oddly enough I have this added in the next version (+ or - # appear as white text with black shadows on top of the die).
It will also be included in the output.
maclud wrote:
Sat Jun 25, 2022 8:38 pm
next question is : would it be possible - in the futur - to add an option for "explosive" dice (re-roll every max roll). like, saving the result temporarly, re-roll a second dice on the board without erasing the first one (this I guess is not doable).. and adding its value to the final result ?
If you're on Discord it would be nice only because we could chat / exchange ideas and images more easily

I also have an unimplemented only tested flame ring in the next version (50 image ss of a flaming "donut" that sits behind the die. I was going to use some hue tricks and make a "poison" green options for "1"s).

My hope is to make the flame ring "clickable" to activate another roll. It can't really be dynamic due to overlay and possible infinite loop woes.

I have some bugs with this. For some reason there is a "jump" in the flame animation at random moments (I'm thinking 50img ss maybe too much but it looks good :p). Another bug is the ring shows up before the die lands, you see a "ring" first, then the die animations finish. Last, the flame ring just stops animating sometimes even when set to infinite. So it may play 10s 5s 2mins, etc just "stops" (this could be my own syntax issues as no formal css, html, etc training).
maclud wrote:
Sat Jun 25, 2022 8:38 pm
not sure what you mean about the time and "dynamic" but I was thinking maybe load one "simple" table per campaign instead of giving the choice to the players to use "any" die ever made... or yes indeed, this will be a bit overkill if we keep making some...
The controls image itself where you throw dice, clear, config. That is a "baked" image but it could be something that I just pull images from the chose dice table (it may not be different colors but it would match the "chosen" dice).

What I've started and not finished
- RollAnimation is being changed to rollDO with a new syntax and now feeding into RollDice
rollDO("{die number}d{die faces}{die bonus},{..}","{die result},{..}","{die color},{..}","{die size})
[r: rollDO("2d20:18:18,2d6:4:3","Plastic Amber,Metalic Green","2")]<br>
[r: rollDO("2d20,1d8,2d6","Plastic Red,Plastic Green, Plastic Plum")]<br>
[r: rollDO("2d20,10d6")]
[r: rollDO("1d20+4,2d6-2")]
macro.result output is a string syntaxed: {roll num}:{die}:{value},{..}
example: 1:D20:5,2:D20:6

Not yet started but have white boarded
- Multi table option (not too far)
- Exploding / Poison die option (farther but not too far)
- Dynamic die controls to match chosen set (farther but not too far)
- New LIB token for die table management (farther than I'd want)

I use GIMP and Autohotkey as well (specifically Pulover's Macro Creator for ease of use)

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Visual Dice Rolling Overlay v3.x

Post by Full Bleed »

maclud wrote:
Sun Jun 26, 2022 6:32 am
oh seems they have the same problem with Affinity.. and yes, indeed webp is a pain. (used it because of the previous files I found in here and the post mentioning the better ratio size/quality , but honestly I didnt know anything about it before this week..)
Lazy developers are behind the times. Webp is ridiculously superior to PNG with alpha (and, as I'm sure you know, jpg's don't have alpha.)

And in a case like this where MT supports webp, and we're (potentially) using a tons of 480x480 images, size is beginning to matter to the size of a campaign file.

Take a look at the examples in this article.
Book cover – Baseline PNG (30.2 KB)
Book cover – Lossless WebP (8.9 KB)
Book cover – Lossy WebP, quality 100 (32.1 KB)
Book cover – Lossy WebP, quality 80 (8.3 KB)

Tickets – Baseline PNG (243 KB)
Tickets – Lossless WebP (183 KB)
Tickets – Lossy WebP, quality 100 (94.5 KB)
Tickets – Lossy WebP, quality 80 (6.4 KB)
Lossy 80 quality for the 480x480 images will be totally fine for these dice and save us a ton of space.

EDIT: You can check to see what the difference between a lossless webp and a lossy 80 webp is with the dice... I'm betting that the lossy80 will be a lot better though.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

maclud
Kobold
Posts: 13
Joined: Tue Jun 21, 2022 8:32 pm

Re: Visual Dice Rolling Overlay v3.x

Post by maclud »

Full Bleed wrote:
Sun Jun 26, 2022 2:37 pm
Lossy 80 quality for the 480x480 images will be totally fine for these dice and save us a ton of space.
EDIT: You can check to see what the difference between a lossless webp and a lossy 80 webp is with the dice... I'm betting that the lossy80 will be a lot better though.
yes thanks ! I noticed the significant reduced size for the files last week ;) did some test and found some pretty nasty compression artefacts at 80% at that time with some of the textures I made (thats why I pushed the lossless up to 95% for my first batch - still 7 times smaller than png - to avoid any issues)... but however - I admit - I do not see much of those issues anymore (maybe I imagined it ... theres some blur, but i guess we can live with that)... so I guess I can recompressed to whole stuff to cut 2ko per image if needed for the 120px... the transparent ones I ve done today are at 80% (seems ok)
Jmr3366 wrote:
Sun Jun 26, 2022 8:33 am
Actually when I first saw the blood dice d4 ss it didn't look right (when I made that post). After checking, it was good.
nope I checked also and there was indeed some issues (mhh well maybe just in the preview.... will check the file alignement before I save from now on)
Jmr3366 wrote:
Sun Jun 26, 2022 8:33 am
I have some bugs with this. For some reason there is a "jump" in the flame animation at random moments (I'm thinking 50img ss maybe too much but it looks good :p). Another bug is the ring shows up before the die lands, you see a "ring" first, then the die animations finish. Last, the flame ring just stops animating sometimes even when set to infinite. So it may play 10s 5s 2mins, etc just "stops" (this could be my own syntax issues as no formal css, html, etc training).
I can/will gladly help with custom "donut" animation effects if needed (fire, poison etc.) - the visual aspect I mean - not sure I'll be much help with the code (no formal css, html, etc training either here, havent for too long, and only for "fun" ;) but strangely I remember the exact same issues of "jumping" at random moments some yrs ago, cant remember the solution unfortunately ...
*but* from a UI/UX point of view I'm not sure about the clickable donut anyway. why not make only the die clickable (or a simple flat re-reroll button under) and use a "one time explosion" behind for 1 or 2sec ?

will PM you in discord, might be indeed easier to share things there...

and thank you for the Pulover's Macro Creator :) seems i can use this....

Im super excited about the futur released and white boarded ideas :shock: !!!! :D

or and I just finished some transparent test btw ;) https://drive.google.com/drive/folders/ ... k-E9rANSIU

Jmr3366
Cave Troll
Posts: 81
Joined: Fri Feb 04, 2022 1:08 pm

Re: Visual Dice Rolling Overlay v3.x

Post by Jmr3366 »

Just put up the latest version and it has major updates I'd expect you'll like (probably a bit hastily so let me know if you see / find issues).

Let me know what you think.

I've got some notes in there re: the flame ring if you want take a stab.
I can share a campaign file where I have it active with the bugs.
I'm open to any ideas or changes, replace the ring with an explosion would be fine too. I like the idea as well and if we can get the "animation" working then I'll try to make some clickable code for the "flame" and go from there . . .

And yes, I can go ahead and start putting together clickable "max rolled dies" (as they're nice to have regardless of the animation :) )

Oh, and exploding die on natural max rolls not bonused (+ xx).

Longshot
Giant
Posts: 117
Joined: Tue Feb 22, 2011 8:59 am
Location: Honolulu, Hi.

Re: Visual Dice Rolling Overlay v3.x

Post by Longshot »

For starters: Love it.


I did find an issue though when rolling multiple dice. To reproduce it, assign values to two die types in a row. It rolls correctly if you skip a die type, just not two in a row.
Example:

This throws an error

Code: Select all

[r: rollDO("2d20:18:18,2d6:4:3","Plastic Amber,Metalic Green","2")]
But this won't

Code: Select all

[r: rollDO("2d20:18:18,1d8,2d6:4:3","Plastic Amber,Metalic Green","2")]
I troubleshot it, found the issue, and this is how I fixed it:


Under Macro RollDice
Right above the while loop, I added two lines

Code: Select all

[h: rdResCnt = -1]
[h: lastDieType=listGet(jDiceOrder,0)]
[h, while(totalDie>0),CODE:{
Then, the 2nd and 3rd lines were added in the if roll_DO section

Code: Select all

[h: rdResList = json.get(rdResultList,rdDie)]
[h: rdResCnt = if(lastDieType==rdDie,rdResCnt + 1,0)]
[h: lastDieType=rdDie]
[h: tDRoll = if(rdResList=="",0,listGet(rdResList,rdResCnt,":"))]
Last, be sure to remove the original "rdResCnt =" line after the 4th line.

Explanation
The index that pulls the assigned Die Roll Result needs to reset between die types. If the last die type didn't have an assignment, it reset fine. But if the last die type and the current one had assigned die rolls, the counter kept climbing when it should have been set back to "0".

Jmr3366
Cave Troll
Posts: 81
Joined: Fri Feb 04, 2022 1:08 pm

Re: Visual Dice Rolling Overlay v3.x

Post by Jmr3366 »

Longshot wrote:
Sun Oct 09, 2022 12:03 pm
For starters: Love it.
Thank you for the kind words.

Also thank you for finding and better yet posting an "update/fix"!!

I have a new version in the works that I'm slowly working through. I've wanted to change some of it as it grew way beyond my initial scope.
It will include one set of the fantasy dice made by gunnarskeep (in the Dice thread) and several die explode backdrops.

Longshot
Giant
Posts: 117
Joined: Tue Feb 22, 2011 8:59 am
Location: Honolulu, Hi.

Re: Visual Dice Rolling Overlay v3.x

Post by Longshot »

Thank you for the great add-in!

Just for fun, I'll share some other changes I made. See, I have a concern that players may feel like rolling 1000 dice, or roll a dozen in the middle of DM rolling, etc. So I put a cap at 10 dice as a default.

Player Configs
Then, I made a config property on the library to store individual maximums.
That way, I can increase or decrease the max amount on the fly, or set it to "0" if someone is abusing it.

Die Sets
Also, I have it set to filter out all tables that are not Dice tables when selecting a Dice Set.
All dice tables have a "DO_" prefix (though I clean the prefix off in the dropdown list).
I plan on making it so players only get one Die Set each, though as DM, I can make as many as I want.

Upcoming
I think it could be neat to color dice by the roll types (attacks, skill checks, damage, and so forth). So I'm looking in to that.

Post Reply

Return to “User Creations”