Library Of Ruina

Library Of Ruina

180 ratings
Dice Roll Fix
   
Award
Favorite
Favorited
Unfavorite
Tags: Fix
File Size
Posted
Updated
1.002 MB
20 Apr, 2022 @ 1:34pm
20 Apr, 2022 @ 1:38pm
2 Change Notes ( view )

Subscribe to download
Dice Roll Fix

Description
Patches the awful vanilla dice roll implementation to be magnitudes more efficient.
Only has a notable performance impact on dice rolls with extremely large ranges or clashes with an extremely large number of dice.
Also prevents softlocks due to absurdly wide-ranged rolls.


A roll with a maximum value of exactly 2147483647 will overflow, but you probably shouldn't be using a value that large. Also vanilla rolls will break if the result is one higher than that anyways.

MakeDiceResult's tuneLevel still does nothing with this patch, although it already does nothing in vanilla. If tuneLevel does not equal 0, this patch will defer to vanilla logic just in case something else patches tuneLevel back in.

Thanks to Invidia for making the thumbnail.
7 Comments
uGuardian  [author] 13 Oct, 2023 @ 1:16pm 
As amusing as it would be, and as much as I'd love to like, be hired to make optimization fixes and such, this mod is so tiny that there's realistically nothing I could even claim took work. Basically I'm just short circuiting a badly designed deprecated system and directly doing the end result instead.
CatMik 30 Sep, 2023 @ 3:17am 
They should pay you for the rights to use this and patch it into the game.
uGuardian  [author] 22 Jun, 2022 @ 5:46pm 
Yup, that's exactly what it does.
Rice Shower 22 Jun, 2022 @ 1:07am 
So this mod changes nothing but makes the game smoother from a player perspective?
Poom36yu 7 Jun, 2022 @ 10:18am 
good mod
uGuardian  [author] 21 Apr, 2022 @ 10:24am 
It uses a nearly identical algorithm without the horrific completely pointless intermediary steps that eat a ton of memory and take magnitudes more processor cycles.
Araders 21 Apr, 2022 @ 1:39am 
So does the modification purely optimize the dice rolls or does it fix the algorithm itself?