CloverPerformance
Performance patches for very high deadlines
About this mod Author’s original text
CloverPerformance
Performance patches for very high deadlines. This brings my Deadline 205 framerate from 3fps to 60+fps.
Source
How does it work?
CloverPerformance contains 4 separate patches to skip costly math operations when the numbers involved get extremely high. These patches can be toggled off individually in CloverPerformanceConfig.json in the mod's folder if they are causing other problems.
SkipRerollSaves
In high deadline runs you may often be restocking the store or rerolling phone options frequently. This patch skips saving in those situations since the save file can be very large.
CacheStrings
The Strings.Sanitize function is the major culprit in performance loss at higher deadlines. The intention of this function is to replace keys like [C_TICKET] with the clover ticket graphic. It also contains some keys like [DEBT_NEXT] that invoke methods like GameplayData.DebtGetExt which don't pose a problem with small debt numbers, but become extremely slow when debt gets high. These slow methods are called regardless of if the input string has the keys or not.
This patch will cache the results of Sanitize until a major update to gameplay data, such as depositing into the ATM, spending coins, or spending clover tickets. This patch is most likely to cause visual issues, but will not cause any gameplay changes even if the text is displayed wrong.
CacheBigIntegerMath
Some expensive methods like GameplayData.InterestEarnedHypotetically are called multiple times in a single frame. This patch will cause any calls of these methods to cache their results for a single frame. This can potentially cause some wrong calculations if I implemented it wrong. If there's any patch to disable if you're worried about gameplay errors, I'd recommend this one.
PatchStringsSanitize
This is a kind of complicated patch called a "transpiler" which edits the code inside the Strings.Sanitize method. This will cause the method to skip over some costly math in the case that it isn't required by the input string. There are a lot of limitations to what I could do with this patch, but it is a pretty big performance improvement on it's own.
Contact
You can message me on Discord @Ooseykins or on Twitter as @ooseykins or @Aetha_Azazie
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: