Project Zomboid

Project Zomboid

Not enough ratings
Customize folders
By MrBounty
This is a guide to customize my mod QOL - Equipment tab for project zomboid.
   
Award
Favorite
Favorited
Unfavorite
Examples
Add a folder
In this example I will add a "Vest" folder for bulletproof vests.
First open the QOFET_FolderCategory.lua file.
It's in C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\2733680483\mods\QOF - Equipment tab\media\lua\client

Then I add the name of the new folder in a new variable:
local vestName = "Vest"
Note: getText is for translation so don't worry about it.

After add the name to the FolderIndex table, it manages the order of the folders.
I'm not going to insult you by explaining that it must go from 1 to the number of folders. Just note that the table for weapons and clothing are the same but do not follow each other.
FolderIndex[headName] = 1; FolderIndex[bodyName] = 2; FolderIndex[vestName] = 3; FolderIndex[undieName] = 4; FolderIndex[handName] = 5; FolderIndex[legName] = 6; FolderIndex[feetName] = 7; FolderIndex[bagName] = 8; FolderIndex[accName] = 9; FolderIndex[trinketName] = 10; FolderIndex[otherName] = 11;

Finally, add the item's bodyLocation to the folder. Here the vest uses TorsoExtra.
So we're going to change the line:
table.insert(CategoryBodyLocation[bodyName],"TorsoExtra");
To become:
table.insert(CategoryBodyLocation[vestName],"TorsoExtra");

and you done !