Tabletop Simulator

Tabletop Simulator

Pathfinder Scripted Dice Roller v2.0
13 条留言
Niki 2020 年 6 月 15 日 上午 2:29 
I've re-uploaded a version of this wonderful calculator with a more random seed generation (using lua math.random () instead of operating system time) here:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2130864721

Clearly, if not allowed - I'll take it down, but I'm using it at my table and figured other people might get some use out of it.
TikiTyler 2019 年 12 月 1 日 下午 1:24 
If you want it even more random you could
on load math.randomseed(os.time())
on roll math.randomseed(math.random(1,9999999999))
That way you get new seeds each time that are not based on the time.
TikiTyler 2019 年 12 月 1 日 上午 9:11 
Hey so the seed generation is done wrong. Its based on time. Make a button with just a d20 and press it once every second or so and you will see its not random at all but time based.
Its because of where the seed generation happens on roll.

You need to take math.randomseed(os.time()) out of the roll function

Current location

--Roll function. Displays roller, then does the random rolls
function roll(o,c)
printThis("((Roll by " .. Player[c].steam_name.."))", c)
math.randomseed(os.time())
local modTotal = 0


Better Location
(Very Top)
function onload(saved_data)
math.randomseed(os.time())
if saved_data ~= nil and saved_data ~= "" then
memory = JSON.decode(saved_data)

I love this thing but the non random nature was pissing me off. If you click too quickly it still will give you duplicates but if you wait at least 1 second between clicks it now does it randomly instead of going 1, 11, 2, 12, 3, 13, 4, 14,...
tOXIC OVER 9K 2018 年 7 月 7 日 下午 2:57 
where can i rename the dice buttons in script?
example: I would like rename d6 to black dice

and where can i change the result of d6 to: if 1,2,3 then 2, and elseif 4,5 then 1, and else 3
MrStump  [作者] 2017 年 12 月 10 日 下午 6:56 
Alternatively I am MrStump#7107 on Discord
MrStump  [作者] 2017 年 12 月 10 日 下午 6:55 
@Knosan, this has been a project I've been interested in re-visiting, since I saw it tends to get a lot of use. They've added a lot ot scripting, and I've learned some nice tricks, that could REALLY add a lot to it. But I'd like to discuss all the feature ideas (including the ones you mention) with someone who actually uses it (I don't actually play tabletop RPGs generally)

I'd love it if you added me to steam so we can talk through some ideas.
Ray 2017 年 12 月 10 日 下午 12:42 
Thank you for the excellent mod, MrStump. This streamlines our D&D rolls dramatically.
Well done and thank you for the time and effort you've put into this essential addition to many hours of fun.

May I suggest an addition, for the sake of larger parties and chat clarity?
If feasible, printing the name of often used Memory Buttons would further help (ie. WHO > WHAT > RESULT on the same line; such as Melee ATK or Wisdom ST).

Or, similarly to using the Name field, we could use the Description field for a more spacious print out, allowing more flavour and flexibility, visually (RP friendly, no / higher character cap, improved readability / syntax, etc.)

This suggestion only comes from being in a larger-than-average party with active voice and text chat, where rolls may get lost, or need explaining or repeating. Hmm... perhaps a 'Repeat Last Result' button may also be handy as a refresher or spamming a great roll! Thanks for reading.
MrStump  [作者] 2017 年 10 月 3 日 上午 7:49 
Replace math.random(1,20) with 20
Зронцевое Бубило 2017 年 10 月 3 日 上午 5:53 
And whether it is possible to make so that dropped out only 20 from 20 always
Gaudaloht 2017 年 1 月 13 日 上午 5:44 
ty
MrStump  [作者] 2017 年 1 月 12 日 下午 3:57 
Sure. Look for math.random(1,20) and replace the 20 with 100!
Gaudaloht 2017 年 1 月 12 日 下午 3:28 
Please could you make it to roll d100? or just tell me where i can edit it
Dung3onlord 2016 年 9 月 11 日 上午 12:02 
OUTSTANDING!