How do I make a Dye? - Catman-232/Homebrewery GitHub Wiki

This guide could be considered out of date and needs a bit of a rewrite!

  1. First things first, go into Homebrewery's own HomebreweryFiles > Template folder and Copy the Template_DyeItem folder
    HomebreweryFiles Template folder

  2. Paste the template item folder into HomebreweryFiles > Dye
    HomebreweryFiles Dye folder, highlighting the placed template item folder

    Rename the folder to something you can recognise and don't change it again!
    Renaming the folder

  3. Inside the folder you will see icon.png and param.txt
    Inside the Dye folder
    icon.png is a 32x32px sprite you can use to represent the item however you like, feel free to edit the spray can sprite made by Remedy (puckuchu) if you want!

    param.txt contains the details the game needs in order to define the item and what it contextually does, so in this case the Dye's Hue, saturation, brightness and contrast adjustments.

{
  "_dyeParams": {
    "_hue": 0.0,
    "_saturation": 1.0,
    "_brightness": 0.0,
    "_contrast": 1.0
  },
  "_itemName": "This text is the Dye's display name",
  "_itemDescription": "This text goes in the space beneath the Dye's name"
}

Edit the text within the speech marks ("") to change the text the item displays in-game.

"_itemName": "Very Cool Dye",
"_itemDescription": "This Dye is very Cool!"

Now for the fun part...

With the default settings, many dyeable pieces of gear will have this kind of green colouring.
Chestpiece that is bright green
This is because the "_hue" setting is a Hue Shift effect which uses green as the default point, this is important to know for gear textures mostly.

Speak to Skrit, around the back of Sally's shop, and get the "TEST Dye" to help with visualising what the settings actually do to gear.
The item TEST Dye
While you have this dye applied, you can press the following keys to shift the values of the dye:
(These hotkeys work as long as no UI is currently open)
- (dash) - nudges the "_hue" setting by +1, starts at 0, and after passing 360 it loops back around to -360.
Shift + - (dash) - as above but nudges the "_hue" setting by +15.
= (equals) - nudges the "_saturation" setting by 0.1, starts at 1, and after passing 2 it loops back around to 0.
[ (left bracket) - nudges the "_brightness" setting by 0.1, starts at 0, and after passing 1 it loops back around to -1.
] (right bracket) - nudges the "_contrast" setting by 0.1, starts at 1, and after passing 2 it loops back around to 0.

The mod will log the current values in the console output for convenience.
Here's the same piece of gear from above but with "_hue" set to 180.
The chestpiece with the dye's Hue set to 180

Here's "_saturation" set to 2, and then 0
The chestpiece with the dye's Saturation set to 2
The chestpiece with the dye's Saturation set to 0

Here's "_brightness" set to 0.5, and then -0.5
The chestpiece with the dye's Brightness set to 0.5
The chestpiece with the dye's Brightness set to -0.5

Here's "_contrast" set to 1.8, and then 0.2
The chestpiece with the dye's Contrast set to 1.8
The chestpiece with the dye's Contrast set to 0.2

Whatever values you want the dye to use, put them into the item's param.txt
Just keep them within the ranges:
Hue: -360 to 360
Saturation: 0 to 2
Brightness: -1 to 1
Contrast: 0 to 2

"_dyeParams": {
  "_hue": 240.0,
  "_saturation": 1.1,
  "_brightness": -0.2,
  "_contrast": 1.1
}

And hopefully it will look the way you expect it to when you use it!
The chestpiece in a red coloured dye