Tabletop Simulator

Tabletop Simulator

Not enough ratings
RNG Dice Roller (also works with custom dice)
   
Award
Favorite
Favorited
Unfavorite
Assets: Scripting
Tags: Misc, Templates
File Size
Posted
Updated
23.475 KB
14 Jul, 2017 @ 4:02am
16 Jul, 2017 @ 6:32am
14 Change Notes ( view )

Subscribe to download
RNG Dice Roller (also works with custom dice)

Description
The dice are "rolled" by RNG rather than "physically" rolled.

Put moderate amount of dice onto the roller and click "Roll" to roll your dice.

Do not press the button too fast (wait at least 1 second) or new random seed will not be generated.

You can have a roller for dice with every number of side(s), just change the description of the roller into the number of side(s) of the dice you're rolling.

Unfortunately if you resize the roller you may have to change the size of the cast box (instruction found in Scripting).

If you have any idea on improving this gadget, feel free to tell me.


Update:
Physics.cast(...) is used instead of Scripting zone, now you can pull out the Dice roller and use it immediately (but better check the number in description first).
Because changing GUID in Scripting is no longer needed, I've made altering side(s) of dice being rolled in the gadget needless editing Scripting as well, so users can be completely Scripting-free if they don't resize the Dicer roller.


Acknowledgement:
I used the Dice Reroller from Eskander's Star Wars: Rebellion (scripted) to be the model of this Dice Roller, with some modification.
The idea of this Dice Roller is inspired by mkanoap's Flash Point: Fire Rescue scripted and Eskander's Star Wars: Rebellion (scripted).
dzikakulka suggested me to use Physics.cast(...) instead of Scripting zone, and helped making the Physics commands work.
4 Comments
junesdream 13 Apr, 2020 @ 3:59pm 
THIS THING IS GREAT
buddypun  [author] 14 Aug, 2018 @ 7:26am 
doesn't work with custom dice now because you can't set the value of dice in any way now
dzikakulka 15 Jul, 2017 @ 10:12am 
You can check what objects are on it using Physics.cast(...) instead of scripting zone - this can work wherever you move it.

You can use e.g. roller GUID to set the random seed - this will ensure there's no two objects using the same seed.

The dice face count could be set in e.g. roller description field so you don;t have to edit the script every time :)
darleth 15 Jul, 2017 @ 12:48am 
Thanks....