-
December 1st, 2020, 20:30 #11
- Join Date
- Aug 2019
- Posts
- 2,025
Seems like I made it work. Instead of issuing a new math.randomseed with every roll I did so only during initialization of the extension. This at least leads to different rolling results every time FGU is restarted.
-
December 1st, 2020, 22:49 #12
- Join Date
- Jul 2018
- Posts
- 223
-
December 2nd, 2020, 00:07 #13
- Join Date
- Aug 2019
- Posts
- 2,025
Nah, I am not the original author and still testing and working on the modification.
-
December 2nd, 2020, 02:48 #14
- Join Date
- Aug 2019
- Posts
- 2,025
Here is how to fix this. Just replace the following function (textblock) with my modification. This adds a seed that should work on Windows, Linux and OS X and discards the first three random numbers to get better results on early rolls.
Code:function onInit() ActionsManager.roll = roll_override; --ActionsManager.onDiceLanded = onDiceLanded_override; actionDrop_old = ActionsManager.actionDrop; ActionsManager.actionDrop = actionDrop_override registerOptions_dice() math.randomseed( tonumber(tostring(os.time()):reverse():sub(1,6)) ) math.random() math.random () math.random () end
-
December 2nd, 2020, 02:55 #15
- Join Date
- Aug 2019
- Posts
- 2,025
I would love to upload a modified extension file, but I cannot find out what kind of ZIP files FGU expects? Neither Windows Sendto nor 7z ZIP Deflate seem to work.
-
December 2nd, 2020, 06:01 #16
Windows Send To - but dont include the parent folder - just the contents.
-
December 2nd, 2020, 08:47 #17
- Join Date
- Aug 2019
- Posts
- 2,025
Of course, stupid me included the folder. Thank you for the hint!
Here is the modified extension.
Removed by request.Last edited by Weissrolf; February 15th, 2021 at 07:48.
-
December 2nd, 2020, 16:28 #18
- Join Date
- Nov 2020
- Location
- Iowa
- Posts
- 26
This may explain the issue with math.randomseed used within LUA: https://stackoverflow.com/questions/35455489/difference-between-math-random-and-math-randomseed-in-lua
-
December 3rd, 2020, 18:27 #19
- Join Date
- Aug 2019
- Posts
- 2,025
Curiously Instant Dice turns off /die chat command animation in Classic, but not in Unity.
-
December 3rd, 2020, 23:22 #20
- Join Date
- Jan 2018
- Posts
- 12
Thx for your work Weissrolf :-)
It is quite cool that the animation is off for hidden rolls in the dice tower too.
Cheers Drantos
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks