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

A solution for "interactive" dice ?

July 08 (7 years ago)

Edited July 08 (7 years ago)

Hello,

I'm trying to port to Roll20 a RPG which relies heavily on the "materiality" of dice. Its core mechanics requires not only rolling a bunch of different colored 6-sided dice, but fiddling with them a lot : only players roll all the dice, but the GM often pick dice from a pool, distribute some between players, move them around once they've rolled to sort the results (push the successs on one side, the fails on another...), discard a few, group and match some others, use them as tokens, pass them on... On the character-sheet side, tickable gauges would be helpfull but, really, movable dice is my main problem right now. The game's name translates as Shadow of the Dungeon (SotD, for short), and it's a rather atmospheric, roleplay heavy dungeon-crawler.

Though I have a "pro" account for play-testing, graphic-design skills and some experience porting my boardgames to Roll20, I'm not very handy with macros and API yet : previous attempts to play SotD online have been "clunky", to say the least. I'm painfully aware of the intrinsic contradiction in wanting material dice online, but the game is poised to be published in a few months and, right now, Roll20 is my best bet to play-test it extensively before it ships (and, frankly, dynamic lighting on isometric maps really helps with the game oppressive atmosphere). I went so far as to try and hire a developer who often works with the Roll20 team, but the guy is already swamped and won't be able to help for months.

So, finger-crossed, I hope some of you macro-wizards would be interested in such a challenge : any idea how I could go about "materializing" dice ? Maybe by hacking the 3D dice thingy ? I don't mind putting work into it (creating tokens and icons, coding to the best of my limited abilities... I'm reading everything I can on the forums, right now), I'm available for any question (maybe explaining the mechanics would help ?).

July 08 (7 years ago)

Edited July 08 (7 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Start here: https://wiki.roll20.net/3D_Dice

Then get familiar with the dice rolling syntax: https://wiki.roll20.net/Dice_Reference

Macros should be able to let you roll any number of any colored die.  

Trying to put a drag/drop for those die to individual players, unlikely you'll be able to do that.  But you'll probably need to create a custom character sheet and within it provide some type of markers for dice given/dice used, etc.  Dice used could trigger rolling of dice, etc..

https://wiki.roll20.net/Building_Character_Sheets

July 08 (7 years ago)

Edited July 08 (7 years ago)

Thanks Victor B., I'm looking at two different concepts...

Hacking the 3D dice system to make them "interactive" : the whole thing seems to mostly be an animation overlay, but it already does a few useful thing. Namely : every dice seems to be a distinct animation displayed in its' own sprite, meaning theiy're probably separate graphical objects already, each linked to the RNG script (am I mistaken ?). If I could re-use parts of the code for another kind of graphical interactive objects and keep the dice-overlay displayed at all times, I'd be halfway there : I'd simply copy and paint over the d6 animation to get a white and a black versions (the game requires white, red and black d6), and cobble something up to launch the RNG function, either from the sprite themselves (that would be very cool indeed) or more likely from the chat input.

Display dice's outputs as tokens : instead of turning dice animations into moveable tokens, let's turn tokens into dice. Six sided dice rolls are easy enough (even for a bunch of different colored ones that's the one thing I got remotely right on the last attempt), but I would need every die output to prompt a different token on a defined layer. I'd have to create 18 different "mook" tokens (one for each side in every color), but that's simple enough, no animation required. I can work around rolling those dice-tokens again (by simply offing them and rolling new ones) and, since sorting/moving the dice around is the GM's job, those output wouldn't even require automated permissions. It seems waaaay simpler than hacking 3D dice...

So, the question is : what kind of script could select tokens from a library folder depending on a die output, and prompt that onto the on-screen token layer ? Is that even possible ?

July 08 (7 years ago)

Edited July 08 (7 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

You can't use the 3d dice to do this (they're just a graphical representation of what quantum roll has already rolled and not interactive at all). However, you can use the /r syntax and enabling advanced dice. This allows you to drag the actual dice rolled onto the table as tokens and manipulate them there as if they were actual dice. You can even change what side is displayed since they are rollable table tokens.


EDIT: You can even expand on this general method to accomodate the color coding of your system by making a rollable table for each color and size of dice, then doing:

/r Xt[dYColor]

July 08 (7 years ago)

Edited July 08 (7 years ago)


Scott C. said:

You can't use the 3d dice to do this (they're just a graphical representation of what quantum roll has already rolled). However, you can use the /r syntax and enabling advanced dice. This allows you to drag the actual dice rolled onto the table as tokens and manipulate them there as if they were actual dice. You can even change what side is displayed since they are rollable table tokens.

Houuuuuuuuuuu ! Advanced dice ARE BLOODY AWESOME ! Thanks a bunch Scott C !

Is there any way to automaticaly pop those "icon dice" from the chat to the main screen ? How can I edit the displayed icons in those 'advenced dice" ? Because if I could simply create different white, red and black dice, and let the players "roll" them from the "display random side" function, my problem is actually solved !

When you say "a graphical representation of what quantum roll has already rolled", do you mean all the diplayed dice are in fact just one big sprite ?


July 08 (7 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator


Sébastien D. said:

Houuuuuuuuuuu ! Advanced dice sounds very handy, thanks ! Is there any way to automaticaly pop those "icon dice" from the chat to the main screen ?

Nope, unfortunately not.

When you say "a graphical representation of what quantum roll has already rolled", do you mean all the diplayed dice are in fact just one big sprite ?

I'm not sure what it is exactly, but I'm pretty sure that it's just a massive (or several individual) .png's.theres no way to access them in the vtt (even via API). You could maybe do something via an extension, but it'd only be on your instance of the vtt.

July 08 (7 years ago)

Edited July 08 (7 years ago)

Just seen your edit, Scott : I'll try to fiddle with the roll table. Thanks !

July 08 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Sebastien, You could simply roll the maximum number of dice you are likely to need and keep them in a "dice tray", a designated part of the VTT. Whenever people need to roll dice, they grab as many as they need and choose "random side". Changing dice colors is trivial: Double click on one and change the tint color.

Depending on what you need to do with the dice, your dice tray could have separate "compartments" for rolling, sorting, trading or otherwise organizing.

Indeed, keithcurtis : now I discovered the "advanced dice" (thanks to Scott C) and explored it a little further, basic mechanical needs are met. I'm trying to find a better way to implement it, though, because the gameplay often requires players to roll a bunch of dice at once. "Randomly displaying a side" for 6 to 10 dice in a row might be tedious but, combined with a "tray", it does allow the game to be played simply enough.

On the other hand, drag-and-dropping rolled dice from the chat to the main screen doesn't unlock them for the players to use : I'd still need to give them permission over the dice-tokens, which would slow the whole thing down (which is a bit of a bother for an "atmospheric" kind of game).

I'm also looking at Dice in The Vineyard, which is a dice rolling, stacking and discarding script by Brother Daniel...

July 08 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

You can select a group of dice, right-click and select random side for all of them with one command. You can also double-click and die and give control to "All Players".

Set up your dice tray before the game, and no one even has to roll them in chat to begin with. Anyone can grab any number of dice tokens and roll them at any time.

July 08 (7 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator


keithcurtis said:

You can select a group of dice, right-click and select random side for all of them with one command. You can also double-click and die and give control to "All Players".

Set up your dice tray before the game, and no one even has to roll them in chat to begin with. Anyone can grab any number of dice tokens and roll them at any time.


Huh, did not know you could randomize several tokens at once. Nice suggestion Keith.

July 08 (7 years ago)
Gold
Forum Champion


Advanced Dice is also the key to the method for "Putting Roll20 dice in dice jail", aka dice shaming.


Been planning to make a GIF demo of that for Keith's Stupid Roll20 Tricks thread.


@ Sébastien D. I will be following the progress of your game development!

July 08 (7 years ago)

Edited July 08 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Also, you to quickly populate a lot of dice tokens, create one, copy it. Paste it. Select those two, copy and paste them, select those four, and so on, doubling each time. They are not linked to a character sheet, so they add no appreciable overhead to the game performance. Just be sure to set permissions and colors before duplicating them.

July 08 (7 years ago)

Edited July 08 (7 years ago)

keithcurtis said:

You can select a group of dice, right-click and select random side for all of them with one command. You can also double-click and die and give control to "All Players".

Set up your dice tray before the game, and no one even has to roll them in chat to begin with. Anyone can grab any number of dice tokens and roll them at any time.

[...]

Also, to quickly populate a lot of dice tokens, create one, copy it. Paste it. Select those two, copy and paste them, select those four, and so on, doubling each time. They are not linked to a character sheet, so they add no appreciable overhead to the game performance. Just be sure to set permissions and colors before duplicating them.

Yes, @keithcurtis : I just came to those conclusions after fiddling with the function for a while. :) This is prrrretty cool : thanks a lot, guys ! Now I need to fit tickable gauges in a character-sheet (but I'll try to manage by myself for a while : I need to learn that stuff)...

@Gold : are you only interested in the technical Roll20 stuff or would you like me to explain the themes and mechanics of the game ?

July 08 (7 years ago)

Edited July 09 (7 years ago)

Okay, I know I'm being a diva, here but... do you think there's anyway I could swap the basic "black number on light-shade color" display of those (otherwise awesome) advanced dice for custom ".png" pictures of the sides ? This would allow me to make something prettier (and more in-line with the rest of the game's aesthetic), but also slightly more ergonomic since my d6's sides have various meanings depending on their color...

► Found the answer : YES ! Create a Rollable Table, link each entry to a picture, enable "advanced dice" and display as "tokens". I'm so haaaappy !

July 09 (7 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

Congrats :)

Thanks ! Now, I need to make tickable gauges for the character-sheets...