Tabletop Simulator

Tabletop Simulator

Ocen: 46
Click Roller Universal
2
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Assets: Scripting
Tagi: Misc, Templates
Rozmiar pliku
Zamieszczono
Zaktualizowano
61.814 KB
12 sierpnia 2017 o 14:49
14 sierpnia 2017 o 13:55
Listy zmian: 2 ( zobacz )

Zasubskrybuj, aby pobrać
Click Roller Universal

Opis
My best scripted tool that can roll any dice for you and announce the roll results. Click it one to spawn a die that is then rolled, click it again before it rolls the first die and it will spawn a second then roll both.

You can change what type of die it rolls and how it works without any scripting or modeling knowledge. The image you see on the tool is a DECAL, so you can also swap out new images onto the tool without needing to edit the object's texture (although you still could).

MODIFIABLE FEATURES:
I have added new features over the previous Click Roller and Click Roller Strip models. This is probably my ultimate version. You can modify all of this stuff by just tweaking variables at the top of the script. Instructions are included there.
  • Setup Mode - If enabled, this will remove the clickable button from the tool and spawn some "display" icons to show you where the dice are going to be spawned. Use this mode while setting up your tool if you like, and especially if you need to change/remove the decal on it.
  • Die Placement - You can set how far from the tool the dice are spawned. You can select how long of an arc they are spawned on now too (360 degrees for all around the tool, 180 degrees so they only spawn on one side of it, etc). Not to mention how high off the table they are spawned.
  • Die Scale - The die will be spawned with the same scale as the die you put into the tool. You can, however, modify that scale with the script if you please.
  • Die Color - By default, the dice will be the color of the die that is in the tool. Or you can overwrite it so that the spawned dice will be the color of the player who clicked the button.
  • Overflow Protection - Set a max limit of dice each tool can spawn. You can also disable it and live dangerously, you mad rebel.
  • Roll Delay - How long after you click before the dice that you have spawned with clicks are rolled.
  • Automatic Cleanup - The dice can be automatically cleaned up after a roll is finished. You can set a length of time after the roll to clean them up. Alternatively, you can turn this time off. Either way, if you still have dice on the table that this tool spawned when you go to start a new roll, it will just delete them for you then.
  • Printing Options - Each roll can announce sorted results using Rotation Value if you so desire. You can print the player who did the rolling, each individual roll result and/or the total combined value. If your Rotation Values are not numbers, obviously Total will not be able to add them together. You can also choose to have the announcement font color be white or to be set to the rolling player's color.
  • Coop Mode - This mode is the biggest new feature. It allows copies of this tool to work together. Click one tool to spawn a die, then start clicking another to spawn more and the first tool is going to be synced up, waiting to roll with the second tool. Works with as many tools at once as desired. They all roll at once and then, once all dice have come to a stop, you get a single printed result. Works by color of the clicker. It can also be disabled.

FAQ:
  • How do I change the die? - On the tool, around its edge (so you don't click the button), right click. Select RESET from the context menu. Now drop your die onto the tool. It is an infinite bag, so what you are doing is replacing the contents of the bag. Don't forget to save.
  • Is there an UNDO button? - I did not include an undo button. I feel like there is so little time between the click and the roll ending, it just isn't worth it. In the same way that if you picked up too many dice and physically rolled them, you would just roll again. However, the tool can handle you deleting a die mid-roll. So if you spawn too many, you can quickly click and delete one if it fills you with joy.
  • Can I change the model? - Yes. Button placement and such may be thrown off depending on the model you use, but as long as the model/assetbundle is still set to act as an infinite bag, it should work.
  • Can I change just the texture? - Yes. This is a custom model, so you can download its texture and modify it. This would be a good way to put the image of what it is rolling if you didn't want to use a decal.
  • Do I have permission to use this in my own mod? Or release it with my own modifications? - Absolutely. I love hearing about/seeing my tools being put to good use. If possible, I do appreciate a being credited.
  • How does coop mode work if you have 2 players rolling at once? - Coop mode only links together buttons by the color of the player who is pressing them. So you can have as many players rolling at once using any number of tools. It is NOT recommended that they try rolling using the same tool at the same time. There are limits =P

KNOWN BUGS:
  • PRINTING IN COOP MODE - Right now, the last roller to have dice come to a stop while in coop mode (other rollers also being used by that player at the same time) will have its print settings used. That means if you have different rollers with different print settings, there could be a conflict. I don't really forsee it being a problem, but please leave a comment if it impacts you. Maybe I am just not thinking of any examples.
  • WON'T ANNOUNCE RESULTS - If you are using a non-standard die, it needs to have ROTATION VALUES set on it. This can be done with one of the GIZMO tools (the rotation value one). The basic idea is you are setting each side that is "UP" with what number that side represents. Once you set up the die, save the table. Now that die will remember the rotation values you set for it forever and you can put it into the tool.
  • DICE WON'T GO BACK INTO THE BAG - This tool is an infinite bag. I designed it so dice that are taken out by the script to be rolled are altered so they cannot re-enter the bag. This prevents "fall back in" problems. In other words, this is a design feature, not a bug. The script can clean up the dice for you after the roll or you can feel free to delete it yourself.
  • WEIRD RESULTS WHEN TWO PEOPLE USE THE SAME TOOL AT ONCE - This is not really designed to be used by multiple people at once. It would be possible, but would require a major redesign so I have decided to leave it out. You can just use two copies of the tool instead, one for each player.

If you like this tool and are vastly wealthy, please consider supporting my work by donating one or more wealths to me. I am not wealthy and would very much like to try it.
[www.paypal.com]
Komentarzy: 45
AmFliPlain 11 sierpnia o 3:57 
Changing Decals: I'm not sure if you have to reset in the context menu, but try it and re-add it if it's giving you problems

Open Click Roller Universal: Let the table load, then create your own save file.

Create Your Save: Ensure it's your own save to avoid issues.

Load Your Save: Immediately open and load the save file you just created.

Delete Existing Decals: Go to the DECAL tab (F9) and delete all existing decals.

Upload New Decals: Click the plus sign to upload your decals (PNG, 512x512).

Enter Setup Mode: In the script editor, find setting.setup = false and change false to true. Then, IMPORTANT: Click "Save & Play" to apply the change.The button will disappear, entering setup mode.

Apply Your Decal: Place your decal on the dice roller without being interrupted by the button.

Revert Setup Mode: Change true back to false in the script editor. IMPORTANT: Click "Save & Play" again to finalize changes.
FizzMan 13 kwietnia o 16:24 
How to you change the decal image for the dice?
Duke Blitzein 11 marca o 10:16 
After I reset the dice roller and add a die how do stop the dice from falling into it?
MU/TH/UR 17 grudnia 2022 o 11:13 
Hi, "if you need to change/remove the decal on it." I cannot figure out how to change decal in setup mode. Help anyone?
Zabi 20 sierpnia 2022 o 20:24 
Same question as the one [NS] zu Pferd asked before, any way to make the dice rolled, at least by the Game Master, to not be announced to the rest of the table?

It could help a lot in my D&D sessions.

Thanks for creating this mod, is awesome.
Groovebot 4 kwietnia 2022 o 13:10 
This mod is brilliant and is almost exactly what I need for the game I'm working on.

Is there a way to bypass the cleanupDice() function and have rollInProgress still get set back to false? I'm looking for a version of this that doesn't ever clean up the dice, basically.
Rebe 21 stycznia 2022 o 11:01 
Ceigar

noone forces you to use this tool, get a grip lol
{†k£r$} Kill Biu Goiaba 11 listopada 2021 o 16:02 
Can i add a custom die like the one on betrayal at the house on the hill?
Happy Wanderer 25 lutego 2021 o 14:03 
...a brilliant mod Mr. stump...thank you!
JJ.Sch 20 grudnia 2020 o 10:43 
Hello MeStump! I changed the die as described. Unfortunately I always get a script error!

Error in Script (Click Roller Universal - 64e216) function <startLuaCoroutine/coroutine_monitorDice>: Object reference not set to an instance of an object !

What am I doing wrong? I'm slowly overwhelmed!