Tabletop Simulator

Tabletop Simulator

Dice ruler
100 kommentarer
The Cereal Killer 12. sep. 2023 kl. 7:30 
Awesome!
HellHorde 24. okt. 2022 kl. 15:12 
This is THe best rice roller / ruler for use in dice throne thank you!
drNoodles  [ophavsmand] 30. juli 2022 kl. 10:18 
"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. juli 2022 kl. 15:42 
@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. juni 2022 kl. 23:34 
Но этот способ не всем может помочь! Если вы живёте в России, то вам нужен VPN и тогда всё будет спокойно загружаться
drNoodles  [ophavsmand] 28. juni 2022 kl. 13:31 
thanks for checking
シ★S L A D K I Y★シ 25. juni 2022 kl. 6:11 
All right! All right! I tured off Threading mod and script earned:steamthumbsup:
drNoodles  [ophavsmand] 25. juni 2022 kl. 3:36 
@ シ★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. juni 2022 kl. 8:23 
There is an error importing your objects
drNoodles  [ophavsmand] 15. feb. 2022 kl. 9:05 
@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 kl. 1:24 
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 kl. 1:24 
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 kl. 1:24 
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 kl. 13:27 
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  [ophavsmand] 14. feb. 2022 kl. 10:12 
@02202002 try https://gtm.steamproxy.vip/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 kl. 1:29 
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 kl. 12:34 
Great, thank you!
drNoodles  [ophavsmand] 22. feb. 2021 kl. 9:15 
@ZeroFarad please feel free to add it to whatever table you want, that goes for everyone as well :tableflip:
ZeroFarad 21. feb. 2021 kl. 15:30 
(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 kl. 15:24 
@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  [ophavsmand] 28. nov. 2020 kl. 4:15 
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 kl. 16:32 
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 kl. 9:34 
Brilliant! Thank you so much! :steamhappy:
drNoodles  [ophavsmand] 11. sep. 2020 kl. 8:38 
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 kl. 3:48 
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  [ophavsmand] 6. aug. 2020 kl. 8:39 
Thank you for the badge :cleancake:
drNoodles  [ophavsmand] 24. apr. 2020 kl. 13:02 
Workshop expand for latest https://i.imgur.com/cxtD6V0.jpg or save a copy in "Saved Objects"
Unreal Ed 23. apr. 2020 kl. 15:51 
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 kl. 2:29 
You just copy the box? Or expand the mod and drag it in?
RustyBandit 22. apr. 2020 kl. 18:48 
How do I get this into a game? SW Super Destiny to be specific...others as well...
striderpaul 24. aug. 2019 kl. 7:38 
Brilliant thank you.
cholsy 27. feb. 2019 kl. 4:45 
This tool is really what I wanted !! Thank you !!
Curby 21. juli 2018 kl. 17:19 
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. juli 2018 kl. 10:42 
thx! I can't use the crazy tts rolls after your mod, haha
drNoodles  [ophavsmand] 12. juli 2018 kl. 9:32 
they also changed callback functions on taking stuff out. Should be fixed now.
BaconCatBug™ 12. juli 2018 kl. 8:54 
The TTS update depricated the Timer function, it needs to be re-built with Wait now.
M4lk4v00 12. juli 2018 kl. 8:37 
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  [ophavsmand] 2. juli 2018 kl. 11:46 
I'll look into it in spare time, but no promises...
WTHale 2. juli 2018 kl. 10:05 
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  [ophavsmand] 2. juli 2018 kl. 7:08 
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. juli 2018 kl. 18:26 
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. juni 2018 kl. 10:58 
It's fine! Thank you so much!
New ruler works perfectly, I am very grateful to you.

drNoodles  [ophavsmand] 1. maj 2018 kl. 5:35 
try the new lite version - it should be facing them based on box angle
drNoodles  [ophavsmand] 26. apr. 2018 kl. 8:41 
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 kl. 11:14 
DarkAce 25. apr. 2018 kl. 11:04 
I can, but it is not work. https://pastenow.ru/30KMY
The orientation of the dices on the table is always one-way
drNoodles  [ophavsmand] 25. apr. 2018 kl. 10:07 
can't you just put it on the left like on the first pic?
DarkAce 25. apr. 2018 kl. 7:02 
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  [ophavsmand] 24. apr. 2018 kl. 9:51 
like changing your seat?
DarkAce 24. apr. 2018 kl. 3:06 
Cool mod! Thank you!
Help, need small fix...
Can you make the cube rotate when changing sides of the table?