Properties that all items can have - Catman-232/Homebrewery GitHub Wiki

This page was up to date as of version 4.6.40
An item's param.txthb file is a JSON formatted set of properties that HB will try to parse into data. You do not need to have every single property in a file, as any you don't have will be given its default value, which is displayed in each code block below.

The file starts with a left brace: {, property names go in speech marks with a colon afterwards: "property": , values go after the colon and will have a comma after them: 10, or "stringvalue", unless it is the last one in the file: 10 or "stringvalue", and finally the file ends with a right brace }


_colorAdjustParams

"_colorAdjustParams": {
  "_hue": 0.0,
  "_saturation": 1.0,
  "_brightness": 0.0,
  "_contrast": 1.0
},

Float (decimal places allowed) x 4
Technically this is a nested object called a ColorAdjustShader_Profile, which is comprised of four decimal values. They are the same properties that Dyes have in their equivalent property, since it is the same Class. These values are only used if the item is not dyable, the game applies these values like a Dye. Should note that this is only for equippable item textures and doesn't include icons, which is what trinkets, consumables, and trade items are.

This isn't that useful to us, Kiseff uses them in order to reuse textures with the shaders recolouring them based on the values. We have to supply individual textures per item anyway though so you might as well just recolour the PNG and probably get better results from that.

Valid value ranges:

  • Hue: -360 to 360
  • Saturation: 0 to 2
  • Brightness: -1 to 1
  • Contrast: 0 to 2

_itemName

"_itemName": "HB_ITEM",

String
Altering this value after first setting it is inadvisable as it is a very important part of how the game loads, stores and syncs items. It is inconvenient to update an item's name due to how the game caches all items by their display name. This also applies to the name of the folder the param.txt is within.


_itemDescription

"_itemDescription": "",

String
You cannot use speechmarks in text strings unless you use a backslash to "escape" them e.g. \"
You can use the newline control char \n but be wary that the item tooltips only expand so far down.


sortindex

"sortindex": 0,

Integer (no decimal place allowed)\

This controls the sorting of your content pack's items in the shop, best seen in its respective shop page but it also sorts in "All Items" and "Small Mods". Content packs and items are sorted alphabetically, including for when items share an sort index value. Negative values are accepted, look below for two examples of how the sorting is done:
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
0 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9
Practically no limit on how big the value can. You can just set it to like 1000 without having 1-999 and be fine, heavy advised that type of sorting by generalising categories into value ranges.


dropitemtime

"dropitemtime": -1,

Float (decimal places allowed)
Defines an override to the length of time an itemdrop of this item will persist for in the world, the default value of -1 tells Homebrewery to not alter the vanilla value. The game counts very strangely for this timer, for an itemdrop to last for about an hour, a value of 11700 should be about right.


secretitem

"secretitem": false,

Boolean (true or false, no speechmarks)
Setting this to true will prevent Homebrewery from listing the item in your content pack's shop page, which would generally make it impossible to ever get the item unless you know of alternative means to acquire it. This is best used if you're using Homebrewery as a creator tool, such as for CustomQuests or MapLoader.


_destroyOnDrop

"_destroyOnDrop": false,

Boolean (true or false, no speechmarks)
Setting this to true will cause the item to poof into a cloud of dust when you drop the item from your inventory, including a line of text in the UI mentioning the item disappearing.

⚠️ **GitHub.com Fallback** ⚠️