Guide Tutorial! Tips on Converting Hairstyles to be Non-Replacing Additions Using Content Patcher

emphyrea

Greenhorn
So, I was struggling with having multiple hair mods. I wanted them all. Initially, I tried Get Glam, but it was too buggy to work with many hairs, even after attempting conversions. I wanted so, so many cute styles at once but what I found was many were just either A) outdated xnb files, or B) would attempt to replace the same hair asset, so they would fight each other.

For some reason I never knew until recently that with the 1.5 update, you no longer have to replace hair, you can add them on without replacing ANY assets, and, I also in turn discovered that this can be done with content patcher! And, most importantly that this is so incredibly easy.

Mod Requirements:
  • Content Patcher --this will load your hair mods for you :)
  • SMAPI --to get Content Patcher to work.
The Tools I Use: (Use these or anything that does the same, this is just what I used.)
  • Notepad ++ --This allows you to edit .json files while keeping the format.
  • Aseprite --allows you to make or edit sprites, I prefer this to any other program since with a transparent background it also has 16x16 tiling which makes it so much easier to work with. This tiling is also super important for making assets for any pixelated games in general!
  • XNB-Mod-Toolkit -- Necessary only if you are converting XNB files to be Content Patcher compatible. This tool converts your XNB files to .png files. (this one I use in particular also gives .yaml files. You can just delete those when you get them, they are not used for this.)
  • 7-Zip and/or Winrar --both are free software (yes, even Winrar) that allows you to unzip .zip or .rar files as a proper folder. Most mods for any game tends to be zipped so I recommend these software not just for Stardew Mods but for others as well.
Converting Hairs
Step 1: Download your hair and unzip the file.

I'd recommend to put your downloaded hair mod in some random folder that you will use just for conversions, so you don't have to keep looking for the one you just downloaded. Most, if not all, files you download will be zipped. Follow the directions below if you don't know how to unzip a file.

To unzip:
Right click your zipped file. For Winrar: Look until you see the words Extract here, and click. For 7-Zip: Look until you see the word 7-Zip, and hover over this option until another menu shows up. On this menu there should be the words Extract Here. Click this. (I tend to use Extract here instead of other options simply because I find it simple.)

7zip.png
winrar.png

Step 2: Open your now Unzipped folder. What do you see?
Look in your newly unzipped folder. Inside you should see the following:
-A folder inside the folder. Usually named "assets." I will be referring to this folder as the assets folder.
-A content.json file
-A manifest.json file

Look inside the assets folder. Do you see a .png or an XNB file?

If an XNB file, you will have to follow this extra step before you continue, and that is converting it into a .png to be able to be used with content patcher with ease. If using the XNB-Mod-Toolkit, follow the directions inside.

If an .png file, continue to the next step!


Step 3: Open your .png file in Aseprite and the content.json file in Notepad ++. Begin editing the content.json.
- To open a file in Notepad ++, right click the file and click "Edit in Notepad++".
- We will open the .png in Aseprite because it is easier to count tiles this way. This will be used for the edits we will need to make in the content.json file.

In the content.json file, many times you will something along the lines of the following code:
{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/hairstyles",
"FromFile": "assets/hairstyles.png"
}
]
}

Everything in Red is what we will be changing.

Important
: assets is the assets folder, if you have a different name, then replace this with the exact name of your assets folder. hairstyles.png is an example name of the .png in the assets folder. This can also be any name so long as it matches the name of the actual .png. ex) if your .png inside your assets folder is named "MyHair," and the assets folder is named "hair" then the code should read "hair/MyHair.png".

What this code means: Computer, Load hairstyles.png into/as this file named "hairstyles" in the game. To do this, go to the assets folder and get the hairstyles.png file, and put it into Characters > Farmer > hairstyles. (because it is being loaded as the hairstyles file, which is the actual file holding all of the game's vanilla hairs for the farmer, it in turn replaces that file with your hairstyles.png. That is what this code does and that is what we want to change, since we don't want to actually replace the vanilla assets.)

For my example, we will say my .png is still named hairstyles. First, we change the target "hairstyles" to something else. It could be anything. I will call it "Tutorialhairs" for this tutorial. I will also add a comma after the "}" after the whole "Fromfile" line to tell the computer to continue after that code onto the next, which we will be adding next.

{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
]
}

Everything in light blue is changes that I have made.

We now will add the most important part, the code telling the game (through content patcher) to add on the hairs within the .png file we have as new entries on top of the vanilla ones, along with how to tell where these hairs are on the picture and how to add them.

The new code is placed after the comma we added:


{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
},
}

]
}
Now this can look confusing, but it is actually pretty simple.
I will explain to you what each of these parts mean:

The code is telling content patcher to go and edit the hair data of the game and add the following entries as new entries in the list of hairs, along with the sprites and additional information such as if the hair has unique right and left sides or not, or if the hair should change to a different hairstyle when wearing a hat, etc.

"123456" --any unique key/number that will be the number assigned to this one individual hair. You want this to be unique and different for each entry. This number goes up to Int32 and cannot go beyond. I used 123456 as a placeholder.

After this number, there is "Tutorialhairs/0/0/false/-1/false". Each of these words/numbers is an entry meaning something specific. I will be referring to these with numbers starting with 0 representing the very first entry.
0 - the filename of the file we are adding to Character/Farmer, in this example I used "Tutorialhairs" as the target file so in turn I have to have Tutorialhairs as the filename.
1 - the x-coordinate of one of the hair sprites from left to right by tiles, always starting with 0. (think graphs)
2 - the y-coordinate of one of the hair sprites from top to bottom, always starting with 0.
3 - true or false. If this hair sprite in particular has a unique left vs right sprite or not. True = yes, there is a unique left and right sprite, False = mirror the side sprite to be the same for either side
4 - Either the unique ID (the unique key) of the hair to use to change the hairstyle to when wearing a hat, or -1 to keep the same hair but just behind the hat.
5 - true or false. If this hair sprite is a bald style or not. True = yes, it is a bald style. False = No, it is not a bald style.

For 1 and 2, we will need the .png in Aseprite for easy counting of tiles. Below is a picture using an example of hairs and how each tile location is counted, along with how each of those individual hairs would be read written replacing the 0/0 in the format above for each one.

aseprite.png
To add each individual hair, we need a new line within Entries. If I were to add each of these 16 hairs in the picture, the code would be something like this.
{
"Format": "1.11.0",
"Changes":
[
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
"123457": "Tutorialhairs/1/0/false/-1/false",
"123458": "Tutorialhairs/2/0/false/-1/false",
"123459": "Tutorialhairs/3/0/false/-1/false",
"123460": "Tutorialhairs/4/0/false/-1/false",
"123461": "Tutorialhairs/5/0/false/-1/false",
"123462": "Tutorialhairs/6/0/false/-1/false",
"123463": "Tutorialhairs/7/0/false/-1/false",
"123464": "Tutorialhairs/0/6/false/-1/false",
"123465": "Tutorialhairs/1/6/false/-1/false",
"123466": "Tutorialhairs/2/6/false/-1/false",
"123467": "Tutorialhairs/3/6/false/-1/false",
"123468": "Tutorialhairs/4/6/false/-1/false",
"123469": "Tutorialhairs/5/6/false/-1/false",
"123470": "Tutorialhairs/6/6/false/-1/false",
"123471": "Tutorialhairs/7/6/false/-1/false",
},
}
]
}

This is really all the coding and work needed to make the conversion! Now just place the entire folder into your mods folder, and if everything is done correctly, your hairs should be added in the game as additional hairs!

You are free to use this example code above for your own use, just change the file names and unique keys for your purposes! This can also be used to make your own hairs, just use your own .png file and instead copy a manifest file and edit it in that case for appropriate mod credit.
 
Last edited:

emphyrea

Greenhorn
View attachment 6173
I need help what did I do wrong??
You likely made a mistake with closing lines. ex) matching { and }, [ and ], etc. Usually that's the issue. Check that for each open { or [ that there is a coinciding ending } or ]. I have also checked my code i posted and realized I made that mistake too :)! So if you directly copied my code, I have fixed it. Sorry about that !
 

Tinybillow

Tiller
So, I was struggling with having multiple hair mods. I wanted them all. Initially, I tried Get Glam, but it was too buggy to work with many hairs, even after attempting conversions. I wanted so, so many cute styles at once but what I found was many were just either A) outdated xnb files, or B) would attempt to replace the same hair asset, so they would fight each other.

For some reason I never knew until recently that with the 1.5 update, you no longer have to replace hair, you can add them on without replacing ANY assets, and, I also in turn discovered that this can be done with content patcher! And, most importantly that this is so incredibly easy.

Mod Requirements:
  • Content Patcher --this will load your hair mods for you :)
  • SMAPI --to get Content Patcher to work.
The Tools I Use: (Use these or anything that does the same, this is just what I used.)
  • Notepad ++ --This allows you to edit .json files while keeping the format.
  • Aseprite --allows you to make or edit sprites, I prefer this to any other program since with a transparent background it also has 16x16 tiling which makes it so much easier to work with. This tiling is also super important for making assets for any pixelated games in general!
  • XNB-Mod-Toolkit -- Necessary only if you are converting XNB files to be Content Patcher compatible. This tool converts your XNB files to .png files. (this one I use in particular also gives .yaml files. You can just delete those when you get them, they are not used for this.)
  • 7-Zip and/or Winrar --both are free software (yes, even Winrar) that allows you to unzip .zip or .rar files as a proper folder. Most mods for any game tends to be zipped so I recommend these software not just for Stardew Mods but for others as well.
Converting Hairs
Step 1: Download your hair and unzip the file.

I'd recommend to put your downloaded hair mod in some random folder that you will use just for conversions, so you don't have to keep looking for the one you just downloaded. Most, if not all, files you download will be zipped. Follow the directions below if you don't know how to unzip a file.

To unzip:
Right click your zipped file. For Winrar: Look until you see the words Extract here, and click. For 7-Zip: Look until you see the word 7-Zip, and hover over this option until another menu shows up. On this menu there should be the words Extract Here. Click this. (I tend to use Extract here instead of other options simply because I find it simple.)


Step 2: Open your now Unzipped folder. What do you see?
Look in your newly unzipped folder. Inside you should see the following:
-A folder inside the folder. Usually named "assets." I will be referring to this folder as the assets folder.
-A content.json file
-A manifest.json file

Look inside the assets folder. Do you see a .png or an XNB file?

If an XNB file, you will have to follow this extra step before you continue, and that is converting it into a .png to be able to be used with content patcher with ease. If using the XNB-Mod-Toolkit, follow the directions inside.

If an .png file, continue to the next step!


Step 3: Open your .png file in Aseprite and the content.json file in Notepad ++. Begin editing the content.json.
- To open a file in Notepad ++, right click the file and click "Edit in Notepad++".
- We will open the .png in Aseprite because it is easier to count tiles this way. This will be used for the edits we will need to make in the content.json file.

In the content.json file, many times you will something along the lines of the following code:
{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/hairstyles",
"FromFile": "assets/hairstyles.png"
}
]
}

Everything in Red is what we will be changing.

Important
: assets is the assets folder, if you have a different name, then replace this with the exact name of your assets folder. hairstyles.png is an example name of the .png in the assets folder. This can also be any name so long as it matches the name of the actual .png. ex) if your .png inside your assets folder is named "MyHair," and the assets folder is named "hair" then the code should read "hair/MyHair.png".

What this code means: Computer, Load hairstyles.png into/as this file named "hairstyles" in the game. To do this, go to the assets folder and get the hairstyles.png file, and put it into Characters > Farmer > hairstyles. (because it is being loaded as the hairstyles file, which is the actual file holding all of the game's vanilla hairs for the farmer, it in turn replaces that file with your hairstyles.png. That is what this code does and that is what we want to change, since we don't want to actually replace the vanilla assets.)

For my example, we will say my .png is still named hairstyles. First, we change the target "hairstyles" to something else. It could be anything. I will call it "Tutorialhairs" for this tutorial. I will also add a comma after the "}" after the whole "Fromfile" line to tell the computer to continue after that code onto the next, which we will be adding next.

{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
]
}

Everything in light blue is changes that I have made.

We now will add the most important part, the code telling the game (through content patcher) to add on the hairs within the .png file we have as new entries on top of the vanilla ones, along with how to tell where these hairs are on the picture and how to add them.

The new code is placed after the comma we added:


{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
},
}

]
}
Now this can look confusing, but it is actually pretty simple.
I will explain to you what each of these parts mean:

The code is telling content patcher to go and edit the hair data of the game and add the following entries as new entries in the list of hairs, along with the sprites and additional information such as if the hair has unique right and left sides or not, or if the hair should change to a different hairstyle when wearing a hat, etc.

"123456" --any unique key/number that will be the number assigned to this one individual hair. You want this to be unique and different for each entry. This number goes up to Int32 and cannot go beyond. I used 123456 as a placeholder.

After this number, there is "Tutorialhairs/0/0/false/-1/false". Each of these words/numbers is an entry meaning something specific. I will be referring to these with numbers starting with 0 representing the very first entry.
0 - the filename of the file we are adding to Character/Farmer, in this example I used "Tutorialhairs" as the target file so in turn I have to have Tutorialhairs as the filename.
1 - the x-coordinate of one of the hair sprites from left to right by tiles, always starting with 0. (think graphs)
2 - the y-coordinate of one of the hair sprites from top to bottom, always starting with 0.
3 - true or false. If this hair sprite in particular has a unique left vs right sprite or not. True = yes, there is a unique left and right sprite, False = mirror the side sprite to be the same for either side
4 - Either the unique ID (the unique key) of the hair to use to change the hairstyle to when wearing a hat, or -1 to keep the same hair but just behind the hat.
5 - true or false. If this hair sprite is a bald style or not. True = yes, it is a bald style. False = No, it is not a bald style.

For 1 and 2, we will need the .png in Aseprite for easy counting of tiles. Below is a picture using an example of hairs and how each tile location is counted, along with how each of those individual hairs would be read written replacing the 0/0 in the format above for each one.

To add each individual hair, we need a new line within Entries. If I were to add each of these 16 hairs in the picture, the code would be something like this.
{
"Format": "1.11.0",
"Changes":
[
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
"123457": "Tutorialhairs/1/0/false/-1/false",
"123458": "Tutorialhairs/2/0/false/-1/false",
"123459": "Tutorialhairs/3/0/false/-1/false",
"123460": "Tutorialhairs/4/0/false/-1/false",
"123461": "Tutorialhairs/5/0/false/-1/false",
"123462": "Tutorialhairs/6/0/false/-1/false",
"123463": "Tutorialhairs/7/0/false/-1/false",
"123464": "Tutorialhairs/0/6/false/-1/false",
"123465": "Tutorialhairs/1/6/false/-1/false",
"123466": "Tutorialhairs/2/6/false/-1/false",
"123467": "Tutorialhairs/3/6/false/-1/false",
"123468": "Tutorialhairs/4/6/false/-1/false",
"123469": "Tutorialhairs/5/6/false/-1/false",
"123470": "Tutorialhairs/6/6/false/-1/false",
"123471": "Tutorialhairs/7/6/false/-1/false",
},
}
]
}

This is really all the coding and work needed to make the conversion! Now just place the entire folder into your mods folder, and if everything is done correctly, your hairs should be added in the game as additional hairs!

You are free to use this example code above for your own use, just change the file names and unique keys for your purposes! This can also be used to make your own hairs, just use your own .png file and instead copy a manifest file and edit it in that case for appropriate mod credit.
I just wanna say, after dabbling around in a mod file, I saw this code like this, "Okay I have to learn this". Took a while for find this post but so thank you SOOOO much for explaining everything clearly. I actually understood the code I found in the mod I was looking at, the only thing couldn't figure out was what the last "false" was for and also the -1. (and also if hairs had a special extra side hair, it pushed the next number to 8 instead of 6) SO thank you so much.

What I REALLY wanted to ask is what hairstyles are shown in your screenshot. They are cute!
Ah, its Yuriyuri. I'm gonna link it in case anyone else had the same question: https://www.nexusmods.com/stardewvalley/mods/2393
 
Last edited:

Tinybillow

Tiller
Can someone help me? i really dont know what i did wrongView attachment 6994View attachment 6995
Do you have this at the top of your file?
Code:
{
"Format": "1.11.0",
Because that's missing. Also in your numbering, it goes to 8. It should not. It goes, 0-7, then repeat. You also skipped 01 on the first set. All your IDs on the left need to be unique. I see a bunch of 123471.

If I were you, I'd copy/paste the code above by the OP exactly as it is and just start with that, run the game and make sure it works and then add on. Good luck!
 

sun422

Greenhorn
So, I was struggling with having multiple hair mods. I wanted them all. Initially, I tried Get Glam, but it was too buggy to work with many hairs, even after attempting conversions. I wanted so, so many cute styles at once but what I found was many were just either A) outdated xnb files, or B) would attempt to replace the same hair asset, so they would fight each other.

For some reason I never knew until recently that with the 1.5 update, you no longer have to replace hair, you can add them on without replacing ANY assets, and, I also in turn discovered that this can be done with content patcher! And, most importantly that this is so incredibly easy.

Mod Requirements:
  • Content Patcher --this will load your hair mods for you :)
  • SMAPI --to get Content Patcher to work.
The Tools I Use: (Use these or anything that does the same, this is just what I used.)
  • Notepad ++ --This allows you to edit .json files while keeping the format.
  • Aseprite --allows you to make or edit sprites, I prefer this to any other program since with a transparent background it also has 16x16 tiling which makes it so much easier to work with. This tiling is also super important for making assets for any pixelated games in general!
  • XNB-Mod-Toolkit -- Necessary only if you are converting XNB files to be Content Patcher compatible. This tool converts your XNB files to .png files. (this one I use in particular also gives .yaml files. You can just delete those when you get them, they are not used for this.)
  • 7-Zip and/or Winrar --both are free software (yes, even Winrar) that allows you to unzip .zip or .rar files as a proper folder. Most mods for any game tends to be zipped so I recommend these software not just for Stardew Mods but for others as well.
Converting Hairs
Step 1: Download your hair and unzip the file.

I'd recommend to put your downloaded hair mod in some random folder that you will use just for conversions, so you don't have to keep looking for the one you just downloaded. Most, if not all, files you download will be zipped. Follow the directions below if you don't know how to unzip a file.

To unzip:
Right click your zipped file. For Winrar: Look until you see the words Extract here, and click. For 7-Zip: Look until you see the word 7-Zip, and hover over this option until another menu shows up. On this menu there should be the words Extract Here. Click this. (I tend to use Extract here instead of other options simply because I find it simple.)


Step 2: Open your now Unzipped folder. What do you see?
Look in your newly unzipped folder. Inside you should see the following:
-A folder inside the folder. Usually named "assets." I will be referring to this folder as the assets folder.
-A content.json file
-A manifest.json file

Look inside the assets folder. Do you see a .png or an XNB file?

If an XNB file, you will have to follow this extra step before you continue, and that is converting it into a .png to be able to be used with content patcher with ease. If using the XNB-Mod-Toolkit, follow the directions inside.

If an .png file, continue to the next step!


Step 3: Open your .png file in Aseprite and the content.json file in Notepad ++. Begin editing the content.json.
- To open a file in Notepad ++, right click the file and click "Edit in Notepad++".
- We will open the .png in Aseprite because it is easier to count tiles this way. This will be used for the edits we will need to make in the content.json file.

In the content.json file, many times you will something along the lines of the following code:
{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/hairstyles",
"FromFile": "assets/hairstyles.png"
}
]
}

Everything in Red is what we will be changing.

Important
: assets is the assets folder, if you have a different name, then replace this with the exact name of your assets folder. hairstyles.png is an example name of the .png in the assets folder. This can also be any name so long as it matches the name of the actual .png. ex) if your .png inside your assets folder is named "MyHair," and the assets folder is named "hair" then the code should read "hair/MyHair.png".

What this code means: Computer, Load hairstyles.png into/as this file named "hairstyles" in the game. To do this, go to the assets folder and get the hairstyles.png file, and put it into Characters > Farmer > hairstyles. (because it is being loaded as the hairstyles file, which is the actual file holding all of the game's vanilla hairs for the farmer, it in turn replaces that file with your hairstyles.png. That is what this code does and that is what we want to change, since we don't want to actually replace the vanilla assets.)

For my example, we will say my .png is still named hairstyles. First, we change the target "hairstyles" to something else. It could be anything. I will call it "Tutorialhairs" for this tutorial. I will also add a comma after the "}" after the whole "Fromfile" line to tell the computer to continue after that code onto the next, which we will be adding next.

{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
]
}

Everything in light blue is changes that I have made.

We now will add the most important part, the code telling the game (through content patcher) to add on the hairs within the .png file we have as new entries on top of the vanilla ones, along with how to tell where these hairs are on the picture and how to add them.

The new code is placed after the comma we added:


{
"Format": "1.11.0",
"Changes": [
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
},
}

]
}
Now this can look confusing, but it is actually pretty simple.
I will explain to you what each of these parts mean:

The code is telling content patcher to go and edit the hair data of the game and add the following entries as new entries in the list of hairs, along with the sprites and additional information such as if the hair has unique right and left sides or not, or if the hair should change to a different hairstyle when wearing a hat, etc.

"123456" --any unique key/number that will be the number assigned to this one individual hair. You want this to be unique and different for each entry. This number goes up to Int32 and cannot go beyond. I used 123456 as a placeholder.

After this number, there is "Tutorialhairs/0/0/false/-1/false". Each of these words/numbers is an entry meaning something specific. I will be referring to these with numbers starting with 0 representing the very first entry.
0 - the filename of the file we are adding to Character/Farmer, in this example I used "Tutorialhairs" as the target file so in turn I have to have Tutorialhairs as the filename.
1 - the x-coordinate of one of the hair sprites from left to right by tiles, always starting with 0. (think graphs)
2 - the y-coordinate of one of the hair sprites from top to bottom, always starting with 0.
3 - true or false. If this hair sprite in particular has a unique left vs right sprite or not. True = yes, there is a unique left and right sprite, False = mirror the side sprite to be the same for either side
4 - Either the unique ID (the unique key) of the hair to use to change the hairstyle to when wearing a hat, or -1 to keep the same hair but just behind the hat.
5 - true or false. If this hair sprite is a bald style or not. True = yes, it is a bald style. False = No, it is not a bald style.

For 1 and 2, we will need the .png in Aseprite for easy counting of tiles. Below is a picture using an example of hairs and how each tile location is counted, along with how each of those individual hairs would be read written replacing the 0/0 in the format above for each one.

To add each individual hair, we need a new line within Entries. If I were to add each of these 16 hairs in the picture, the code would be something like this.
{
"Format": "1.11.0",
"Changes":
[
{
"Action": "Load",
"Target": "Characters/Farmer/Tutorialhairs",
"Fromfile": "assets/hairstyles.png"
},
{
"Action": "EditData",
"Target": "Data/HairData",
"Entries": {
"123456": "Tutorialhairs/0/0/false/-1/false",
"123457": "Tutorialhairs/1/0/false/-1/false",
"123458": "Tutorialhairs/2/0/false/-1/false",
"123459": "Tutorialhairs/3/0/false/-1/false",
"123460": "Tutorialhairs/4/0/false/-1/false",
"123461": "Tutorialhairs/5/0/false/-1/false",
"123462": "Tutorialhairs/6/0/false/-1/false",
"123463": "Tutorialhairs/7/0/false/-1/false",
"123464": "Tutorialhairs/0/6/false/-1/false",
"123465": "Tutorialhairs/1/6/false/-1/false",
"123466": "Tutorialhairs/2/6/false/-1/false",
"123467": "Tutorialhairs/3/6/false/-1/false",
"123468": "Tutorialhairs/4/6/false/-1/false",
"123469": "Tutorialhairs/5/6/false/-1/false",
"123470": "Tutorialhairs/6/6/false/-1/false",
"123471": "Tutorialhairs/7/6/false/-1/false",
},
}
]
}

This is really all the coding and work needed to make the conversion! Now just place the entire folder into your mods folder, and if everything is done correctly, your hairs should be added in the game as additional hairs!

You are free to use this example code above for your own use, just change the file names and unique keys for your purposes! This can also be used to make your own hairs, just use your own .png file and instead copy a manifest file and edit it in that case for appropriate mod credit.
Hey, so I was wondering if you could help me with an issue I have. Basically, I have a mod that replaces hairs (Indie's Female Farmer Overhaul on Nexus), and a mod that also replaces hairs (Hachio's Hairs). I followed your guide to edit Hachio's Hairs but SMAPI keeps saying that they won't work because they're both trying to load Characters/Farmer/hairstyles. I tried editing Hachio's Hairs to load Characters/Farmer/hairstyles2 but the Female Farmer Overhaul mod also replaces that. I was wondering if there's anything I could do because I've been trying quite a bit lol and I just can't figure it out. This is the first mod I've ever edited and I've never made one so maybe that's it.
 

kenzhie

Greenhorn
hi i dont know if youre still replying to this thread but does this work with clothes as well? im trying to do it but idk anything about coding
help.PNG
 

NoneNoOne669

Newcomer
hi! i need some help. i followed the tutorial, and everything seems to work, there are no SMAPI errors, but the hairstyles won't load. i go to test it in game and they.... are supposed to be there, but instead my farmer is just bald. i tried it with 2 different hair mods, and both had the same result. did i do something wrong? i copy pasted the code from OP's post exactly as it is there, with only the needed changes. both tests were done separately, with no other mods installed except the hairs and content patcher. i know that Eemie's hairstyles is outdated, but Ace's hairs were working just fine, i just wanted them to not be a default replacement...
SharedScreenshot.jpg

SharedScreenshot1.jpg
 

RiceMP4

Greenhorn
hi! i need some help. i followed the tutorial, and everything seems to work, there are no SMAPI errors, but the hairstyles won't load. i go to test it in game and they.... are supposed to be there, but instead my farmer is just bald. i tried it with 2 different hair mods, and both had the same result. did i do something wrong? i copy pasted the code from OP's post exactly as it is there, with only the needed changes. both tests were done separately, with no other mods installed except the hairs and content patcher. i know that Eemie's hairstyles is outdated, but Ace's hairs were working just fine, i just wanted them to not be a default replacement...
View attachment 8184
View attachment 8185
I'm not quite sure, but maybe eemie's won't load, because the patch mode is an overlay? Maybe that helps!
 
Top