Project Zomboid

Project Zomboid

29 ratings
Inventory Tetris (Beta 5) - Custom Configuration Guide
By Lily
A small tutorial on how to create custom configuration patches for Notloc's Inventory Tetris mod.
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Notloc's Inventory Tetris mod is a complete overhaul to the game's inventory system - and while it uses a formula to generate the parameters of external modded items on the fly, the results may not always work as intended.

This guide will briefly teach you how to make custom configuration patches, being able to edit an item's:
  • Grid size: How big an item is in the tetris inventory.
  • Stack size: How many copies of the same item can be merged.
  • Container size: The size of a grid inside a container.
Getting Started
In order to access Inventory Tetris' editor, you can either use DETOX's Inventory Tetris - Edit Container Size mod, or enable debug mode.

You can enable debug the mode simply by accessing Project Zomboid's properties on Steam, and adding the line "-debug" to the launch options.

Editing an item's Grid Size & Stack Size
When right clicking an object in game, an option labelled "Edit Item Data" will appear. Clicking it opens a popup where you can set the stack size (1 for non stackables; recommended for containers and anything with a condition bar / food). Below is the item with its grid size. Clicking and dragging the white square allows you to stretch the item to the desired size. Once done just click the "OK" button to apply.

Editing an item's Container Size
Much alike, containers are edited by right-clicking the item while their storage is open, this will replace the "Edit Item Data" button with "Edit Container Data".



From here you can change:
  • The size and distribution of the container's grid / sub-grids.
    Sub-grids can be utilized to limit the max size of items that can be put in a container, as well as compartmentalize and organize the storage. Be wary that each sub-grid must be searched separately if "Container Searching" is enabled in the mod's settings.


  • What type of items are allowed in a container.
    The container will reject items pertaining the ticked category even if they fit in size and weight. An use case for this would be to imitate relative space; for example it wouldn't make sense to fit a crowbar inside a seed bag, but if seeds take 1x1 it also wouldn't make sense to only be able to fit 3 types of seed within the space of the crowbar, so instead you can make the container larger and restrict all item types that aren't seeds.


  • Whether the container inherits the "Organized" trait.
    When a container is organized, when using quick move items will always stack when possible or otherwise take the first available slot of the grid.




When you have finished editing the item, click the "Accept" button and move on to the next.
Finalizing & Exporting
Once you're done editing all the items you want to be included by your mod, open the menu to edit a container's data again, but this time press on the "Export" button. Doing so will create a "TetrisDataPack.lua" file under:
C:\Users\Your User Here\Zomboid\Lua
And that's it! This is the resulting script file you'll want to include in your mod's media folder, placed under:
/media/lua/client/InventoryTetris/
Please be mindful to rename this file something unique so that it does not overwrite other exports. For example you may append your mod's name or the target mod ID to it such as "TetrisDataPack_modid.lua".

To flush out your current edits from your cache, simply delete the "InventoryTetris_ContainerData.json" and "InventoryTetris_ItemData.json" files from the LUA folder.




11 Comments
aether 1 Feb @ 3:13am 
can't seem to get the item grid changes to work, only containers
Q 22 Jan @ 12:11am 
i also don't see "edit Item data" when using your mod alone (w/o-debug enabled). IDK if its a current version issue or what. IDK how to troubleshoot it to give you more information
Q 21 Jan @ 12:57am 
trying to edit stack size and resize some of the bag spaces and i can only use the edit container tools, nothing for items.

plz help
FA113N 17 Dec, 2024 @ 7:34pm 
How would one put this on a dedicated server once a grid is decided on, i spent hours adjusting things for my group and am unsure of the next step
Kras 18 Aug, 2024 @ 1:23pm 
For some reason the changes made to item stack values only apply when I'm using Debug Mode.
The moment I play the game without it the items revert back to the original values. Am I missing a step to apply those permanently?
suzinistherealjuno 1 Aug, 2024 @ 6:43pm 
when i look at the item data it says a bunch of shit not having to do with how much space the item takes up!!!! help!!!!!!
Hololhin 21 Jun, 2024 @ 8:48am 
how delete items in trash-can ?
Notloc 6 Jun, 2024 @ 4:08pm 
Thanks for writing this!
󠀡 8 Mar, 2024 @ 7:07am 
Thanks for the guide :luv:
Clam Chowderメ 28 Nov, 2023 @ 2:04pm 
does this work for dedicated server?