How do I make Consumable items? - Catman-232/Homebrewery GitHub Wiki
-
First things first, go into the mod's own HomebreweryFiles > Template folder and Copy the Template_ConsumableItem folder
-
Paste the item folder into HomebreweryFiles > Consumable
Rename the folder to something smart like'your username'_Consumable_'name of the thing'
Yeah, I know the other items aren't named "something smart", I'm not finished with them yet! -
Inside the folder you will see icon.png and param.txt
icon.png is a 32x32px sprite you can use to represent the item however you like.
param.txt contains the details the game needs in order to define the item and what it contextually does.
{
"_itemName": "This text is the Consumable's display name",
"_itemDescription": "This text goes in the space beneath the Consumable's name",
"extra": "",
"food": 2
}
Edit the text within the speech marks ("") to change the text the item displays in-game.
"_itemName": "Very Cool Consumable",
"_itemDescription": "This Consumable is Very Cool!",
"extra" is an optional property that serves the purpose of enabling effects upon consumption. You can use more than one by separating the keywords with commas! (but no spaces) I have to mostly code these manually, so here is the list of the keywords and their effects.
"extra": "cold,spicy",
"food" is an optional property that sets how much of your food capacity the item takes up when you eat it, any custom consumable without this property set has it defaulted to 2. Your capacity is 5 and it drains back to 0 at a rate of about 1 per 60 seconds. If you think this is silly or inconvenient and want to bypass it entirely, there is a config option BypassFoodCapacity
which will allow you to always eat Homebrewery consumables.
"food": 2
There isn't really any limit to what number you can make the food property, but if it was above 5, you'd probably never be able to eat the item. You can also use a negative value to make an item that empties your capacity, but it can't go below 0.
And here we are: