Mods / Player Inventory lib

Draft

Set to published to be listed. A draft mod is still visible to everyone via direct link
Tags:
Library
Authors:
VSCustodian, Maltiez
Side:
Both
Created:
Apr 11th at 4:21 PM
Last modified:
May 9th at 5:59 PM
Downloads:
7191
Latest release (for Vintage Story 1.22.0-pre.1 - 1.22.2, potentially outdated):
playerinventorylib_0.0.10.zip  1-click install

Requires: Overhaul lib

 

Empty your player inventory (backpack, hotbar, clothes and armor) before installing or uninstalling the mod.

The library will keep inventory content that was on player before installing, and it will be back after, but other mods can affect this mechanism.


Documentation will come later.

Replaces character and backpack inventories with its own implementation.

Reworks related GUI dialogs.

Creative inventory now opens with 'Shift + E', survival with 'E' (can be rebound in settings). Was a consequence of splitting single GUI dialog into two.

Adds JSON and C# ways of adding new slots to character inventory.

Reworks how backpacks are handled and synced.

Reworks how clothes define in which slot they go (there is compatibility layer that automatically patches all wearable items to use this mechanism).

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.0.10 playerinventorylib
1.22.0-pre.1 - 1.22.2
3353 May 9th at 5:59 PM playerinventorylib_0.0.10.zip 1-click install

Added experimental crafting grid inventory updates cooldown

0.0.9 playerinventorylib
1.22.0-pre.1 - 1.22.2
920 May 3rd at 3:38 PM playerinventorylib_0.0.9.zip 1-click install

Adjusted character dialog size and set its size explicitly, so other mods can use it

0.0.8 playerinventorylib
1.22.0-pre.1 - 1.22.1
604 Apr 30th at 6:54 PM playerinventorylib_0.0.8.zip 1-click install

Added safeguard against crush "Supplied slot is not part of this inventory", it is still logged into debug log.

0.0.7 playerinventorylib
1.22.0-pre.1 - 1.22.0
985 Apr 25th at 3:44 PM playerinventorylib_0.0.7.zip 1-click install

Fixed bug resulted in backpack slots accepting stick frame accessories and vice versa

0.0.6 playerinventorylib
1.22.0-pre.1 - 1.22.0
78 Apr 25th at 12:27 PM playerinventorylib_0.0.6.zip 1-click install

Fixed crash on player's death

0.0.5 playerinventorylib
1.22.0-pre.1 - 1.22.0
300 Apr 24th at 4:55 AM playerinventorylib_0.0.5.zip 1-click install

Adjusted code for adding slot tags to wearables, should cover some edge cases where clothes category specified in behavior and not item attributes.

0.0.4 playerinventorylib
1.22.0-pre.1 - 1.22.0
264 Apr 23rd at 3:37 PM playerinventorylib_0.0.4.zip 1-click install

Reworked networking code, hopefully fixed bugs with inventory contents not updating on client side in some cases.

0.0.3 playerinventorylib
1.22.0-pre.1 - 1.22.0
92 Apr 23rd at 1:23 PM playerinventorylib_0.0.3.zip 1-click install

Crash fix

0.0.2 playerinventorylib
1.22.0-pre.1 - 1.22.0
329 Apr 23rd at 8:59 AM playerinventorylib_0.0.2.zip 1-click install

Fixes and tweaks

0.0.1 playerinventorylib
1.22.0-pre.1 - 1.22.0
129 Apr 22nd at 11:37 AM playerinventorylib_0.0.1.zip 1-click install

Implemented half of the planned functionality

0.0.0 playerinventorylib
1.22.0-pre.1 - 1.22.0-rc.8
137 Apr 11th at 4:22 PM Empty playerinventorylib_0.0.0.zip 1-click install

9 Comments (oldest first | newest first) (threaded | flat)

JustaKobold, Jul 14th at 7:53 PM

seems to have an issue with reachable creative tabs, but that mod doesnt work half the time anyways so ill be removing it just wanted to post the incompatability. 

Nosh, Jun 16th at 4:09 PM

As of 0.0.8, seems to have issues with CarryOn. It's possible that it's just me, but it kept throwing errors trying to fetch Config while loading into a world.

frihu, May 10th at 10:59 AM

Don't know if this is this mod or cape mod, but can you add compatibility? I can't wear a cape from heraldry capes mod, it doesn't highlight any item slot.

Maltiez [currently restricted], May 9th at 5:52 PM

crafting grid lag is caused by large number of recipes, also I dont think debounce is possible with current vanilla networking

Autocitizen, May 9th at 4:01 PM

i did a huge server update so im sorry if its compelety unrelated but i believe the source was with this mod from my own findings, when i added this alongside of updates for already existing mods i added yours with the bunch as i saw you updated. Im currently getting a new issue people started reporting this morning when dragging items in the crafting recipe bar its starting to hitch some peoplse cpus/ram hard. Some report going from 140fps to 30, im no coder but i did feed logs into ai pro mode and shot back and forth what could be the issue and this is what it said to me. Again i dont mean to say i know whats going on just thought id share a slight issue thats propped up.

Spoiler

How to handle this:

  • The Workaround: Unfortunately, because this is an engine quirk magnified by playerinventorylib, your players with weaker CPUs will simply have to avoid using the drag-to-distribute feature in the crafting grid. They will need to stick to splitting stacks manually or placing them 1-by-1.

  • The Modding Solution: The only real fix would require the mod authors of playerinventorylib or the base game developers to add a "debounce" to the crafting grid (essentially making the game wait 0.5 seconds after a player finishes dragging before it calculates the recipe).

Jalex, Apr 23rd at 3:17 PM

I'll start playing and see if it happens again, thank you for the quick fix!

Maltiez [currently restricted], Apr 23rd at 1:08 PM

Report in discord with client-main and sever-main log files attached. Also what block and in what situations.

dhorbon, Apr 23rd at 12:59 PM

got similiar crash to Jalex, steps to reproduce: place a block
picking up works, just dropping works, but placing a block for some reason crashes

Jalex, Apr 23rd at 12:14 PM

Heya! Got a random crash, and the log says its from this Lib, dunno if its true but I'll post it here anyways
Thank you!

Crash Report
Game Version: v1.22.0 (Stable)
4/23/2026 2:06:47 PM: Critical error occurred
Loaded Mods: bradyrockyextraction@1.1.0, eternalstew@1.3.0, farmlandnutrientmanagement@1.3.3, firewoodplus@1.0.0, hangingvessels@1.1.1, interestingoregen@2.3.2, jsonpatcheslib@1.5.1, meapineapplestone@1.0.0, meapineappleturpentine@1.0.3, millwright@1.3.3, moretorchholders@1.0.1, overhaullib@2.0.4, primitivesurvival@5.0.5, sconce@1.0.5, spinningwheel@1.2.0, usefulshears@1.0.0, vintageengineering@0.5.4, game@1.22.0, vsimgui@1.2.2, walkingstick@3.0.0, wforests@1.0.0, wgroundlayers@1.0.3, woodveneer@22.0.1, attributerenderinglibrary@3.0.1, bettererprospecting@3.2.1, betterruins@0.6.0, bitzartuitweaks@0.4.5, bloodtrail@1.2.0, blushandbins@1.0.9, blushlibrary@1.0.4, bradyladder@1.2.0, butchering@1.13.1, carryon@1.14.0-rc.1, caveinfix@1.0.1, chunklod@1.1.0, configlib@1.11.1, dairyplus@1.0.4, danatweaks@4.0.0, electricalprogressivecore@3.0.0, expandedstomach@1.4.1, extrainfo@2.0.0, firepitsshowfuel@2.0.0-dev.1, foragersgamble@1.3.0, geologymap@1.1.0, hydrateordiedrate@2.4.3, infinitumpickupmod@1.2.9, insanitylib@2.0.1, juicyores@1.0.2, justvawts@0.2.1, koboldpack@1.1.3, krpgenchantment@1.4.0-rc.2, ksrealisticfarming@1.0.6, metalpots@1.7.2, morepiles@3.0.0, ndlmushroomgrowth@2.0.2, ndltreegrowth@2.0.1, nomusicinterruptionmod@1.0.0, opineuponpine@1.0.7, panningmachine@1.0.7, playerinventorylib@0.0.2, playermodellib@1.15.0, portcullis@1.22.0-rc.101, realsmoke@1.2.0, slowtox@5.0.0, statushudcont@4.3.1, stonebakeoven@1.2.1, storagetweaks@1.1.9, temporalityplus@0.0.21, toolsmithfork@1.2.20, vigor@0.6.1, creative@1.22.0, vsroofing@1.5.1, survival@1.22.0, waterfall@1.1.0, watersheds@6.0.5, wilderlandsadjustments@1.0.1, xlibfork@1.0.1, backpacks@0.1.0, blushandblacksmith@1.0.4, danacancook@2.0.0, electricalprogressivebasics@3.0.0, em@3.5.0, koboldrdx@1.4.0, mapper@0.5.1, obsidiancraft@1.6.1, scoopofjammod@1.2.0-rc.4, wearandtear@1.5.19-pre.1, windowstoragelib@1.1.3, wpanning@1.0.8, wtweaks@1.0.1, wwaymarkers@1.0.4, xskillsfork@1.0.5, ashes@1.4.0-pre.1, bricklayers@3.2.0, electricalprogressiveindustry@0.6.1, electricalprogressiveqol@3.0.0, veep@2.4.0, windowstorage@1.7.2, xskillsgilded@1.3.18, electricalprogressiveequipment@3.0.0
Involved Harmony IDs: PlayerInventoryLib:Transpilers
System.NullReferenceException: Object reference not set to an instance of an object.
at Vintagestory.Common.PlayerInventoryNetworkUtil.UpdateFromPacket_Patch1(PlayerInventoryNetworkUtil this, IWorldAccessor world, Packet_InventoryUpdate packet)
at Vintagestory.Client.NoObf.GeneralPacketHandler.HandleInventoryUpdate(Packet_Server packet) in VintagestoryLib\Client\Systems\GeneralPacketHandler.cs:line 376
at Vintagestory.Client.NoObf.ProcessPacketTask.Run() in VintagestoryLib\Client\Systems\ProcessPacketTask.cs:line 12
at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 817
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 173
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 741
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 685
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 112
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 354
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 131
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 95