[SR2] Limit Adjuster

SR2 Limit Adjuster
version: rev 30

A semi-experimental limit adjuster for SR2, expands hardcoded limits and some other stuff
at it's current state it modifies several limits in-game to be unlimited*
it also supports extended dynamic saves/loading since some limits are also applied into the static save file (of course this can only be loaded and saved with this mod)

r30
  • added unlockables limit patching (if using DLC it requires Juiced Patch 9.0.5+, its effects with DLC installed is untested)
  • added checksum-based extended save support for unlockables
  • added checksum-based extended save support for crib weapon availability / weapon infos
  • kept vanilla save data as fallback for compatibility
  • added [SAVES] options to enable or disable the unlockables and weapon info save extensions
  • added WeaponStoreBucketLimit to raise the per-category weapon store / cache bucket size and stop weapons bleeding into other categories
  • improved save/load ordering so the extended save data is applied at the correct time instead of being overwritten by vanilla load paths
  • cleaned up and refactored the save extension code
  • changed [LIMITS] handling so 0 or -1 disables patching for that limit instead of forcing a minimum
  • count dlc_customization_items.xtbl along with customization_items.xtbl

r23
  • removed old testing functions and free xtbl mempool after opening items_3d.xtbl which otherwise would have caused a crash in some cases of bigger xtbls

r22
  • Added DynamicStringMempools
r19
  • Added DynamicMempools option under [EXPERIMENTAL]
  • count dlc_customization_items.xtbl in addition to customization_items.xtbl


It's VERY MUCH recommended to have Juiced installed as CrashDumps are super useful and we do warn over mempool usage there
Download and install Ultimate ASI Loader, dinput8.dll x32 suffices for SR2.
Drag and drop the mod's ASI into the game's directory or into a scripts folder in the same directory as the game.
ini is generated on game boot
You can verify if it's installed if there's a sr2_limitadjuster.txt in the games directory when you quit it.

IMPORTANT NOTES
  • As of now this doesn't modify saves, so owned customization related items the player can own is still 2048 and the maximum weapons you can have in the crib is ~64
  • there might still be issues to iron out, if you have a crash please post/send a .dmp and a .log file or if it's another issue post/send here or tag me in the Kobraworks/SRM discord and I will report back.

Testers:
- @Janson
- @Caboose


  • I'd like some way to implement on-demand memory expansion instead of failing for the mempool classes, might be a fever dream due to a lot of inlining even the own vft functions, as it's a confusing mess to keep track of all increased mempools (Implemented under DynamicMempools unsure if it's stable or good enough)
  • do something with the extended saves at the moment it does nothing
  • look into permanent meshes and why it causes add to entry crashes with invalid textures
  • do more in-game static arrays i guess

by unlimited it's still obviously limited by hardware/OS limits, so still 4GB limits apply and whatever the game takes up.
 

Attachments

Last edited:
Part of my testing was adding all GoTR weapons, as well as all unused SR1 weapons and drugs to the game and it didn't crash.
For the clothing items, I was able to add all of the NPC items from GoTR (hairs, ski mask, ronin jackets, etc) except for the misc items because I didnt feel like recreating the new slots.
Safe to say this works like a miracle. Proof below.

1780018112264.png
 
Part of my testing was adding all GoTR weapons, as well as all unused SR1 weapons and drugs to the game and it didn't crash.
For the clothing items, I was able to add all of the NPC items from GoTR (hairs, ski mask, ronin jackets, etc) except for the misc items because I didnt feel like recreating the new slots.
Safe to say this works like a miracle. Proof below.

View attachment 50079
This sounds amazing. Hopeful a mod doing this comes out soon.
 
This is really cool! M2M doesn't work with DLC yet, but I'll hold off development for a while until this is more fleshed out.

Part of my testing was adding all GoTR weapons, as well as all unused SR1 weapons and drugs to the game and it didn't crash.
For the clothing items, I was able to add all of the NPC items from GoTR (hairs, ski mask, ronin jackets, etc) except for the misc items because I didnt feel like recreating the new slots.
Safe to say this works like a miracle. Proof below.

View attachment 50079
Currently, while DLC clothing does appear for purchase alongside GotR, there are a few specific DLC items which crash my game when they try to load:

Undershirts: Unkut Camisole 1, Unkut Camisole 2
Overshirts: Women's Unkut Polo 9
Coats: Women's Unkut Hoodie
Pants: Women's Unkut Jeans
Wrist Left: Unkut Bracelet
Wrist Right: Unkut Bracelet
Pendants: Unkut Black, Unkut Logo, Unkut Pink, Unkut White

Each of these tend to be the last item(s) in their respective menus, with the exception of the Camisoles.

This is with default .ini settings.
 
Back
Top