Skill Recovery Journal (GAMMA)
A minor edit of Chuckleberry Finn’s Skill Recovery Journal Mod ( https://steamcommunity.com/sharedfiles/filedetails/?id=2503622437 ) for my personal server that uses a Gamma distribution to make XP regain semi-random, with the property that it will trend lower at higher levels.
For example:
A level 10 skill has a 99% chance to regain >53% XP and a 50% chance to regain >76% XP
A level 5 skill has a 99% chance to regain >71% XP and a 50% chance to regain >88% XP
A level 3 skill has a 99% chance to regain >79% XP and a 50% chance to regain >93% XP
A level 1 skill has a 99% chance to regain >88% XP and a 50% chance to regain >98% XP
The idea being to balance the desire for a challenging game of consequence against the inconvenience of having to start all over after a minor mistake.
The base mod has a SandBoxVars variable for a scaling factor, but this is linear. Through the Gamma Distribution, the base functionality of the mod is augmented with RNG and diminishing XP losses with repeat deaths.
The scaling factor in the SandBoxVars still has the same effect, just combined with this new scaling.
Full credit for the base mod goes to Chuckleberry Finn, and I extend my thanks to the LuaSF library on GitHub ( https://github.com/HubertRonald/LuaSF ) which provided the Gamma function, as well as the randomlua module ( https://github.com/linux-man/randomlua ) which provided a mersenne twister for PRNG in place of math.random which Zomboid didn’t like for some reason.
I am not a Lua coder, and make no promises that this mod-of-a-mod will be kept up-to-date.
Workshop ID: 2734189587
Mod ID: SkillRecoveryJournalGamma