Tabletop Simulator

Tabletop Simulator

Dice ruler
100 Comments
The Cereal Killer 12 Sep, 2023 @ 7:30am 
Awesome!
HellHorde 24 Oct, 2022 @ 3:12pm 
This is THe best rice roller / ruler for use in dice throne thank you!
drNoodles  [author] 30 Jul, 2022 @ 10:18am 
"is it possible to make it so that you input the dice and it's get random sorted on 3 rows instead of all dice on 1 row ?"

you would have to manipulate params.position = { } part

I won't be adding it, but you can just select dice, pick them up and press 3, to get 3 rows without affecting faces

tbh the "roll" command should be changed not to do physical throw but just set the dice, cards or whatever to a random face with a little "just randomized" icon hovering over just like the "peek" action does.

going for phy simulation wastes time and is messy

"you need vpn in ru to load assets"
once you have it in cache it should work without them
this probably affects most other mods as steam cloud is the recommended default
That Dutch Guy 29 Jul, 2022 @ 3:42pm 
@drNoodles.

i love the dice ruler you made,
But i was wondering, is it possible to make it so that you input the dice and it's get random sorted on 3 rows instead of all dice on 1 row ?

I'm not a programmer myself. but if you have a line of script that i can implement that would be really helpful!
シ★S L A D K I Y★シ 30 Jun, 2022 @ 11:34pm 
Но этот способ не всем может помочь! Если вы живёте в России, то вам нужен VPN и тогда всё будет спокойно загружаться
drNoodles  [author] 28 Jun, 2022 @ 1:31pm 
thanks for checking
シ★S L A D K I Y★シ 25 Jun, 2022 @ 6:11am 
All right! All right! I tured off Threading mod and script earned:steamthumbsup:
drNoodles  [author] 25 Jun, 2022 @ 3:36am 
@ シ★S L A D K I Y★シ, what kind of error?
I checked and they load for me - fyi object and texture is hosted on steam cloud http
シ★S L A D K I Y★シ 22 Jun, 2022 @ 8:23am 
There is an error importing your objects
drNoodles  [author] 15 Feb, 2022 @ 9:05am 
@02202002 - some of the choices are the result of restrictions in the api at the time it was written, adding more unplanned features on top of it might not be that easy

@ZeroFarad - try matching rotation value in order in rotations menu
Professor Zero 15 Feb, 2022 @ 1:24am 
I don't really understand the purpose of the numberList:sub line and the setRandom(v) portion. Is the setRandom(v) just taking the value of v and adding it to the string? And when I drop the dice in with the following broadcast:
broadcastToAll("Roll Results: " .. numberList .. " | " .. result, {r=1, g=0, b=0})

All I get is "Roll Results: | 20", so the numberList isn't appearing. Putting in a random letter inside numberList like " b ", doesn't show in the final broadcast either.
Professor Zero 15 Feb, 2022 @ 1:24am 
I'm not sure how to reference the player's name in the broadcast. Would I have to store the player that last picked up the dice before it was dropped and then reference their name in the broadcast somehow? Or is there a simpler solution? If I am supposed to store the player, I could probably reference their color too and put it into a variable like playerColor for the broadcast.

As for the numbers, I tried to recreate the portion of code in the Roll button item: result = result .. setRandom(v) .. ", ", and have it be something like numberList instead of result. Couldn't get it to work either. I feel like I'm close to figuring it out, but I can't quite find a solution.

This is the closest I got at the moment for the number portion:

numberList = ""
for _,v in ipairs(diceGuids) do
if (v.type=="Dice") then
numberList = numberList .. setRandom(v) .. " + "
end
end
numberList = numberList:sub(1, -3)
Professor Zero 15 Feb, 2022 @ 1:24am 
Yea I noticed your other workshop item and tried it out with my project, but I prefer this one a lot more. Also I forgot to mention that I did want to get the total of the dice rolls.

On the brightside though, I managed to figure out a decent solution for now.

After the line n=1, I added result = 0.
Right before the line n = n + 1, I added result = result + diceGuids[key].
Then I added broadcastToAll("Roll Results: " .. result, {r=1, g=0, b=0}) at the end of the takeDiceOut function.

With this I get something like "Roll Result: 21".

I would be willing to settle for this, but if at all possible, do you have an idea as to how I could get the message to be something like this: "02202002 rolled: 1 + 2 + 3 + 4 + 5 + 6 = 21" (the text color is the player color)?

I feel like the final broadcast line would be something like:
broadcastToAll(playerName .. " rolled: " .. numberList .. " = " .. result, playerColor)
ZeroFarad 14 Feb, 2022 @ 1:27pm 
I wonder if you could help with a challenge I'm having? I love the sorting feature, but it doesn't quite work for Roll for the Galaxy. In that game different colors of dice have some faces different, so I'd need to sort by the value of the face instead of by which physical face it is. But I haven't gotten that to work just by trying to change the part where it sorts the dice.
drNoodles  [author] 14 Feb, 2022 @ 10:12am 
@02202002 try https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1913446324
it already prints to chat and you can add broadcast by changing in script



if self.getDescription()=="global" then
printToAll(result, stringColorToRGB(player))
elseif self.getDescription()=="me" then
printToColor(result, player, stringColorToRGB(player))
end


to


if self.getDescription()=="global" then
printToAll(result, stringColorToRGB(player))
broadcastToAll(result, stringColorToRGB(player))
elseif self.getDescription()=="me" then
printToColor(result, player, stringColorToRGB(player))
Player[player].broadcast(result)
end
Professor Zero 14 Feb, 2022 @ 1:29am 
Could you possibly help me with trying to script a result announcer for when the dice is rolled? I'm trying to create something like the announcer from this other workshop item: URL , where the message pops up at the top of the screen and also in chat.

Never scripted anything for Tabletop so I'm not really sure where to start on this.
ZeroFarad 25 Feb, 2021 @ 12:34pm 
Great, thank you!
drNoodles  [author] 22 Feb, 2021 @ 9:15am 
@ZeroFarad please feel free to add it to whatever table you want, that goes for everyone as well :tableflip:
ZeroFarad 21 Feb, 2021 @ 3:30pm 
(I've provisionally included your dice ruler for demonstration, but I'm happy to change or remove it before listing my mod!)
ZeroFarad 21 Feb, 2021 @ 3:24pm 
@drNoodles Would it be okay with you if I were to include your dice ruler in my modified Roll for the Galaxy mod , so each player can roll their many dice in a private and organized way?
drNoodles  [author] 28 Nov, 2020 @ 4:15am 
Are you talking about lite or normal version?
Can you make a screenshot to explain what you meant?

The problem with randomness is that random does not mean different - what *looks* random and *is* random is different.
I tested outputs with statistical methods and results looked random with a high confidence, but I admit it was tested without concurrency. We can check that...
BUCHA 27 Nov, 2020 @ 4:32pm 
randomizer looks cool, but its not randomizer. if we use 3 Dice ruler in same time with 2-4 dices, we get many same values. Its not random :(
Zalehov9 11 Sep, 2020 @ 9:34am 
Brilliant! Thank you so much! :steamhappy:
drNoodles  [author] 11 Sep, 2020 @ 8:38am 
ok I noticed that in sorting version the faces always face "table north", if that's what you meant it's fixed now to behave the same way as lite version - you might need to adjust yOffset value for example to 0 if you want it flipped
Zalehov9 11 Sep, 2020 @ 3:48am 
Similar to DarkAce I too wanted to know how to change the orientation of the rolled dice but I prefer to use the non-lite version mainly because of the sorting function. Am a noob when it comes to programming so my question is: can the orientation of the rolled dice be manually adjusted within Lua and if so then how?
drNoodles  [author] 6 Aug, 2020 @ 8:39am 
Thank you for the badge :cleancake:
drNoodles  [author] 24 Apr, 2020 @ 1:02pm 
Workshop expand for latest https://i.imgur.com/cxtD6V0.jpg or save a copy in "Saved Objects"
Unreal Ed 23 Apr, 2020 @ 3:51pm 
What he said, or you add it to your "saved objects" to take it out later. The disadvantage of that one is that you won't get the latest version of the object, only the exact one you saved. Can mean you save yourself from bugs that are later introduced though.
BaconCatBug™ 23 Apr, 2020 @ 2:29am 
You just copy the box? Or expand the mod and drag it in?
RustyBandit 22 Apr, 2020 @ 6:48pm 
How do I get this into a game? SW Super Destiny to be specific...others as well...
striderpaul 24 Aug, 2019 @ 7:38am 
Brilliant thank you.
cholsy 27 Feb, 2019 @ 4:45am 
This tool is really what I wanted !! Thank you !!
Curby 21 Jul, 2018 @ 5:19pm 
Hey Noodles, I love this mod! Can I request an option to sort by color as well? I have a dice game that rolls dice of several colors at a time, and color and value both matter. It can be as simple as doing a string sort by the tint value (e.g. #555555 before #990000) but if you're feeling ambitious you could add support for a list of tints in the desired order in the description. There's no need to leave gaps for missing colors as you do with empty rows for missing numbers: the goal is to ensure that ordering is consistent. Thanks!
M4lk4v00 12 Jul, 2018 @ 10:42am 
thx! I can't use the crazy tts rolls after your mod, haha
drNoodles  [author] 12 Jul, 2018 @ 9:32am 
they also changed callback functions on taking stuff out. Should be fixed now.
BaconCatBug™ 12 Jul, 2018 @ 8:54am 
The TTS update depricated the Timer function, it needs to be re-built with Wait now.
M4lk4v00 12 Jul, 2018 @ 8:37am 
Hi, the message: "Error in script (Global) function <setVallueCallback>: <Unknown Error>" is apearing when I try to use the ruler, and the dice aren't "rolled".
drNoodles  [author] 2 Jul, 2018 @ 11:46am 
I'll look into it in spare time, but no promises...
WTHale 2 Jul, 2018 @ 10:05am 
This is star wars destiny, so it could be any of them. You might be forced to reroll any dice by another player, or you don't want the discard dice faces for example. Since the dice faces are just number 1 through 6, but those don't have any real meaning to the game itself, the sort doesn't help. Again... just a thought. I like just not having to hand cleanup a pile of dice as it is.
drNoodles  [author] 2 Jul, 2018 @ 7:08am 
what's your criteria for re rolling? If it's the high/low value you can ask it to sort them and re roll ones closest to the box. That's what I usually do.
WTHale 1 Jul, 2018 @ 6:26pm 
Feature request: For games that have selective re-rolling, could the ruler detect if there are dice still in that "position" and try the next spot to put the rerolled dice.

For example... you have 5 dice already rolled out, and you want to re-roll the 3rd and 5th dice in the line. Right now, if I do this, it will try to put those two dice on top of the 1st and 2nd dice that are still there.

Right now I just move the whole line, before selecting dice to re-roll, which is not a big deal. Great MOD as is, and my OCD thanks you :)
DarkAce 22 Jun, 2018 @ 10:58am 
It's fine! Thank you so much!
New ruler works perfectly, I am very grateful to you.

drNoodles  [author] 1 May, 2018 @ 5:35am 
try the new lite version - it should be facing them based on box angle
drNoodles  [author] 26 Apr, 2018 @ 8:41am 
ok, I think this is a side effect of relying on setValue that always uses the same orientation. Maybe it could be done with new getRotationValues and figuring the translations on these... I'll look into it but no promises.
DarkAce 25 Apr, 2018 @ 11:14am 
DarkAce 25 Apr, 2018 @ 11:04am 
I can, but it is not work. https://pastenow.ru/30KMY
The orientation of the dices on the table is always one-way
drNoodles  [author] 25 Apr, 2018 @ 10:07am 
can't you just put it on the left like on the first pic?
DarkAce 25 Apr, 2018 @ 7:02am 
Well, I'll try to explain. Sorry for my bad english. I don`t speak.
There is a game Star Wars Destiny where dice with pictures are used.
If I`m Player-1, all looks great nice! https://pastenow.ru/30IW6
But, I`m Player-2 dice looks conversely =( https://pastenow.ru/30J0B
Сan be rotate "dice ruler" in any side, but orientation dice will always remain the same.
Need option to change the corner rotation. Is this possible?
For example, how did you do with the option "sort" in the field "description"
drNoodles  [author] 24 Apr, 2018 @ 9:51am 
like changing your seat?
DarkAce 24 Apr, 2018 @ 3:06am 
Cool mod! Thank you!
Help, need small fix...
Can you make the cube rotate when changing sides of the table?