-
Notifications
You must be signed in to change notification settings - Fork 17
Creating a Hairstyle Content Pack
A content pack for Fashion Sense (FS) allows mod authors to create hairstyles with the following benefits:
- Can be larger than 16x32 pixels
- Can be animated
- Can override the player's hair color
Fashion Sense content packs are compatible with other FS packs, meaning you can have as many Fashion Sense hairstyles as you'd like!
-
Create a parent folder with the content pack's name.
-
Create and fill in
manifest.json
as a content pack. -
Create a
Hairs
folder, add it under the content pack's main folder. -
Create a sub-folder under
Hairs
with the name of the hairstylea. The name of the folder(s) under
Hairs
do not matter. -
Create a
hair.json
under the created sub-folder, using the required fields found here. -
Create a
hair.png
under the same sub-folder.a. The image size doesn't matter, so long as it is under 16384x16384 pixels (though smaller files are preferred to reduce memory usage).
A Fashion Sense content pack consists of the following structure:
[FS] Example Pack
├── manifest.json
│
└── Hairs
├── LongHair
│ ├── hair.json
│ └── hair.png
│
├── ShortHairWithCurl
│ ├── hair.json
│ └── hair.png
│
└── ShortHairWithFleas
├── hair.json
└── hair.png
If this is your first time creating a content pack, it may be useful to read the Stardew Valley Wiki for creating a content pack.
The first step to making your content pack is to create a top level folder with the name of your content pack. For example: [FS] Example Pack
.
After that, you'll want to create the manifest.json
file under that folder. Detailed instructions can be found on the Stardew Valley Wiki. Additionally, you can check out the example manifest.json as a reference.
For example:
[FS] Example Pack
└── manifest.json
It is important to note that the manifest.json
file must contain the following for it to be a content pack by Fashion Sense:
"ContentPackFor": {
"UniqueID": "PeacefulEnd.FashionSense",
"MinimumVersion": "USE.LATEST.VERSION"
}
Note: Replace "MinimumVersion": "USE.LATEST.VERSION"
with the latest version number of Fashion Sense found here.
You will first need to create a Hairs
folder underneath your main content pack folder.
After creating the Hairs
folder you'll want to create a sub-folder for every hairstyle you want to add, like so:
.
└── Hairs
├── LongHair
│
├── ShortHairWithCurl
│
└── ShortHairWithFleas
You can also have sub-folders under the Hairs
folder for organizing, like so:
.
└── Hairs
├── Short Hair
│ ├── ShortHairWithCurl
│ └── ShortHairWithFleas
│
└── Long Hair
└── LongHair
To add a hairstyle to your content pack, the framework requires a hair.json
under each sub-folder of Hairs
.
For example:
.
└── Hairs
├── LongHair
│ ├── hair.json
│ └── hair.png
│
├── ShortHairWithCurl
│ ├── hair.json
│ └── hair.png
│
└── ShortHairWithFleas
├── hair.json
└── hair.png
The file hair.json
determines how the hairstyle is to be applied and allows the usage of certain conditions for animation.
An overview of the required properties for hair.json
:
Property | Description | Default | |
---|---|---|---|
Name |
Required | Name of the hairstyle, which can contain spaces. | N/A |
Format |
Recommended | The format version to use, which should be set to Fashion Sense's current version. | "1.0.0" |
BackHair |
Optional 1 | Specifies how the hairstyle will look while the player is facing backwards. See this page for more details. |
null |
RightHair |
Optional 1 | Specifies how the hairstyle will look while the player is facing right. See this page for more details. |
null |
FrontHair |
Optional 1 | Specifies how the hairstyle will look while the player is facing forward. See this page for more details. |
null |
LeftHair |
Optional 1 | Specifies how the hairstyle will look while the player is facing left. See this page for more details. |
null |
-
At least one
HairModel
(FrontHair, BackHair, etc.) must be given for the hairstyle to be valid.a. Note that
HairModel
have their own required properties, as can be seen here.
This is a simple hair.json
, which adds a static (non-animated) hairstyle that only applies while the player is facing forward.
{
"Name": "Short Hair With Curl (Static)",
"FrontHair": {
"StartingPosition": {
"X": 0,
"Y": 0
},
"HeadPosition": {
"X": 0,
"Y": 0
},
"HairSize": {
"Width": 16,
"Length": 16
}
}
The StartingPosition
property is used to determine where the starting point is (top-left most pixel for the HairModel
).
The HeadPosition
property is used to tell the framework where the player's head would be in relation to the hairstyle. See the Short Hair With Fleas for another example.
Note: It is important to know that each HairModel added (FrontHair, BackHair, etc.) must have a StartingPosition
, HeadPosition
and HairSize
, as the framework uses those properties to display the hairstyle.
The corresponding hair.png
The layout requirements for hair.png
is fairly relaxed, as the framework utilizes StartingPosition
, HeadPosition
and HairSize
to determine where the hairstyle sprites are located.
See the example pack for references on how to create your hairstyles.
This is an animated hair.json
, which adds a hairstyle with an idle animation and only applies while the player is facing forward.
{
"Name": "Short Hair With Curl",
"FrontHair": {
"StartingPosition": {
"X": 0,
"Y": 0
},
"HeadPosition": {
"X": 0,
"Y": 0
},
"HairSize": {
"Width": 16,
"Length": 16
},
"IdleAnimation": [
{
"Frame": 0,
"Duration": 5000
},
{
"Frame": 1,
"Duration": 250
},
{
"Frame": 2,
"Duration": 250
},
{
"Frame": 3,
"Duration": 250
},
{
"Frame": 4,
"Duration": 250
}
]
}
}
You can see IdleAnimation
was specified with 4 frames. As the name implies, IdleAnimation
only play while the player is not moving.
To play an animation only while the player is moving, you would instead utilize MovementAnimation
. For more details see the animations page.
Conditions
can also be used to determine which frames are played. See the conditions page for more details.
The corresponding hair.png
The layout requirements for animated hair.png
is fairly relaxed, as it only requires the following condition(s):
- For HairModel with animation, each frame of the hairstyle should be placed next to each other horizontally (as seen in the example above).
See the example pack for references on how to create your hairstyles.
If you're looking for examples, see the examples page.