Tabletop Simulator

Tabletop Simulator

43 평점
Yet Another Roller
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Assets: Scripting
파일 크기
게시일
업데이트일
19.934 KB
2017년 5월 28일 오후 12시 04분
2017년 6월 11일 오전 11시 49분
업데이트 노트 5개 (보기)

다운로드 위해 구독하기
Yet Another Roller

설명
I keep fiddling with this concept and, eventually, I may someday make one I'm really pleased with.

With this one, you place a die on top of the device, click the + and - buttons to set how many of it to roll, and click the number to roll. You can turn printing of the results on or off with a button. You can change variables at the top of the script to set how far dice are placed from center or if they are organized in order after rolling.

UPDATE 6/3:
Added a clean button to removed the rolled dice. No matter what, the old dice will still be removed any time you make a fresh roll, this is just an optional button to use.

I also added an auto-cleanup feature that will clean up the dice after and N seconds. You can set it up by changing a number at the top of the code. By default, this feature is off.

I also used the new cast system to do a sphere cast to find the die on the device instead of checking the distance of all objects.
댓글 38
JJ.Sch 2023년 6월 8일 오전 3시 58분 
Is it also possible to use custom dice and display the legacy? When I use my HeroQuest dice, it also only shows 1-6 as a result!
Sabreman 2022년 3월 24일 오후 2시 01분 
The die-roll intensity may be governed by table gravity.
gmdmb3 2022년 3월 24일 오후 12시 08분 
Is there a way to increase the "intensity" of the rotational force of the rolling of dice itseems a little weak sometimes or is it possible to make this an option
Sabreman 2021년 12월 29일 오전 11시 43분 
It does print the number in the chat sorted by results, so I've always found it easy to check rolls over or under a threshold.
Top Shagger 2021년 12월 28일 오후 10시 39분 
Is it possible for a dice roller to detect successes rather than adding up all the results? like it counts how many dice rolled 5 and up and broadcasts that number?
Boki 2021년 8월 29일 오전 12시 10분 
My friends and i love this dice roller for our battletech rounds. I've added some bits of script for players to be able to use scripting shortcuts to roll 1 or 2 dice or clear them.
I had to script one for each player's color though, as otherwise everyone would've rolled everyone's dice, and i got an error for the object not being able to get the color when passing it to the callback function. Maybe someone can and actually want's to fix it and make it more flexible.

Here's the code snipped on Pastebin [pastebin.com]
Damien Thorn 2021년 4월 3일 오후 8시 50분 
Hey, I've edited your dice roller to add a unlocking line on the cloned die, so that we can lock the die inside the roller and still roll dice.

if die.getLock then
die.setLock(false)
end
msiggins 2021년 3월 16일 오전 5시 52분 
Ideal. Thanks. Would like to turn off sound and keep print results until Clear. Is this possible? I haven't yet used scripting. Mike
rhinotekmn 2021년 1월 16일 오후 10시 41분 
Would like to pick your brain on a roller I am working on if you'd be willing.
Whyrocknodie 2020년 3월 30일 오전 6시 55분 
Top notch.
I also have a question, is there a way to print the results in the chat in groups of values - say you roll six dice and get 1,2,2,2,5,6 - can it be made to say 1, 2 (x3), 5, 6 by some sorcery?