Notice: Wrestling Empire is now using Steam Workshop for official mod support. This page is going to remain accessible, but it's likely the content is not going to be kept up to date.
LuckBasedRNG
.dll library that give access to multiple random functions based on luck.
Last updated | a week ago |
Total downloads | 2928 |
Total rating | 3 |
Categories | Libraries |
Dependency string | GeckVolantMarin-LuckBasedRNG-1.0.0 |
Dependants | 2 other packages depend on this package |
README
Geck Volant Marin : Luck Based RNG
This is a simple yet complete and balanced .dll library that adds random functions based on luck.
What is luck?
Luck is a double value that enchance probabilies.
Positive luck effect:
- Increase the chances of getting a big number when using
getRandomNumber_InRange()
- Increase the chances of returning
true
when usinggetRandomBool_FromFraction()
- Increase the small weights and decrease the big weights of every elements of a weights array when using
generateNewWeights()
- Have higher chances of generating a rare outcome when using
getRandomThings_FromArray<Type>()
Negative luck effect:
- Increase the chances of getting a small number when using
getRandomNumber_InRange()
- Increase the chances of returning
false
when usinggetRandomBool_FromFraction()
- Increase the big weights and decrease the small weights of every elements of a weights array when using
generateNewWeights()
- Have higher chances of generating a common outcome when using
getRandomThings_FromArray<Type>()
Neutral luck:
- Don't change anything and generate as if there was no luck.
Available functions and methods:
void GeckVolantMarin.RNG.setSeed(int seed)
void GeckVolantMarin.RNG.reSeed()
double GeckVolantMarin.RNG.getRandomNumber_InRange(double min, double max, double luck = 0.0d)
bool GeckVolantMarin.RNG.getRandomBool_FromFraction(double numerator, double denominator = 1.0d, double luck = 0.0d)
double GeckVolantMarin.RNG.getTotalWeight_FromArray(double[] weights)
void GeckVolantMarin.RNG.generateNewWeights(ref double[] weights, double luck = 0.0d)
Type GeckVolantMarin.RNG.getRandomThings_FromArray<Type>(Type[] array, double[] weights, double luck = 0.0d)
Source code
The source code is available in the plugin folder, in SourceCode.zip.
Thanks To:
- The modding community
- ILSpy developers (For unpacking the code base game)
- AssetStudio developers (For unpacking the assets of the base game)
Credits
@Heartslot