-
Notifications
You must be signed in to change notification settings - Fork 17
Creating a Shirt Content Pack
A content pack for Fashion Sense (FS) allows mod authors to create shirts with the following benefits:
- Can be larger than 16x32 pixels
- Can be animated
- Can override the player's shirt color
Fashion Sense content packs are compatible with other FS packs, meaning you can have as many Fashion Sense shirts 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
Shirts
folder, add it under the content pack's main folder. -
Create a sub-folder under
Shirts
with the name of the shirta. The name of the folder(s) under
Shirts
do not matter. -
Create a
shirt.json
under the created sub-folder, using the required fields found here. -
Create a
shirt.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
│
└── Shirts
├── Blinky
│ ├── shirt.json
│ └── shirt.png
│
├── ColorableSmiley
│ ├── shirt.json
│ └── shirt.png
│
└── MageRobe
├── shirt.json
└── shirt.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 Shirts
folder underneath your main content pack folder.
After creating the Shirts
folder you'll want to create a sub-folder for every shirt you want to add, like so:
.
└── Shirts
├── Blinky
│
├── ColorableSmiley
│
└── MageRobe
You can also have sub-folders under the Shirts
folder for organizing, like so:
.
└── Shirts
├── Animated or Colorable
│ ├── Blinky
│ └── ColorableSmiley
│
└── Prismatic
└── MageRobe
To add a shirt to your content pack, the framework requires a shirt.json
under each sub-folder of Shirts
.
For example:
.
└── Shirts
├── Blinky
│ ├── shirt.json
│ └── shirt.png
│
├── ColorableSmiley
│ ├── shirt.json
│ └── shirt.png
│
└── MageRobe
├── shirt.json
└── shirt.png
The file shirt.json
determines how the shirt is to be applied and allows the usage of certain conditions for animation.
An overview of the required properties for shirt.json
:
Property | Description | Default | |
---|---|---|---|
Name |
Required | Name of the shirt, 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" |
BackShirt |
Optional 1 | Specifies how the shirt will look while the player is facing backwards. See this page for more details. |
null |
RightShirt |
Optional 1 | Specifies how the shirt will look while the player is facing right. See this page for more details. |
null |
FrontShirt |
Optional 1 | Specifies how the shirt will look while the player is facing forward. See this page for more details. |
null |
LeftShirt |
Optional 1 | Specifies how the shirt will look while the player is facing left. See this page for more details. |
null |
-
At least one
ShirtModel
(FrontShirt, BackShirt, etc.) must be given for the shirt to be valid.a. Note that
ShirtModel
have their own required properties, as can be seen here.
This is a simple shirt.json
, which adds a static (non-animated) shirt that only applies while the player is facing forward.
{
"Name": "Colorable Smiley",
"FrontShirt": {
"ColorMasks": [
[ 254, 254, 254 ],
[ 198, 198, 198 ]
],
"StartingPosition": {
"X": 0,
"Y": 0
},
"BodyPosition": {
"X": 0,
"Y": 0
},
"ShirtSize": {
"Width": 8,
"Length": 8
}
}
}
The StartingPosition
property is used to determine where the starting point is (top-left most pixel for the ShirtModel
).
The BodyPosition
property is used to tell the framework where the player's head would be in relation to the shirt. See the Mage's Robe for another example.
Note: It is important to know that each ShirtModel added (FrontShirt, BackShirt, etc.) must have a StartingPosition
, BodyPosition
and ShirtSize
, as the framework uses those properties to display the shirt.
The corresponding shirt.png
The layout requirements for shirt.png
is fairly relaxed, as the framework utilizes StartingPosition
, BodyPosition
and ShirtSize
to determine where the shirt sprites are located.
See the example pack for references on how to create your shirts.
This is an animated shirt.json
, which adds a shirt with an idle animation and only applies while the player is facing forward.
{
"Name": "Blinky",
"FrontShirt": {
"DisableGrayscale": true,
"StartingPosition": {
"X": 0,
"Y": 0
},
"BodyPosition": {
"X": 0,
"Y": 0
},
"ShirtSize": {
"Width": 8,
"Length": 8
},
"UniformAnimation": [
{
"Frame": 0,
"Duration": 200
},
{
"Frame": 1,
"Duration": 200,
"Conditions": [
{
"Name": "IsElapsedTimeMultipleOf",
"Value": {
"RandomValue": [ 1000, 2500, 5000 ]
}
}
]
},
{
"Frame": 2,
"Duration": 200,
"Conditions": [
{
"Name": "DidPreviousFrameDisplay",
"Value": true
}
]
},
{
"Frame": 1,
"Duration": 200,
"Conditions": [
{
"Name": "DidPreviousFrameDisplay",
"Value": true
}
]
},
{
"Frame": 0,
"Duration": 2000,
"Conditions": [
{
"Name": "DidPreviousFrameDisplay",
"Value": true
}
]
}
]
},
"RightShirt": {
"DisableGrayscale": true,
"StartingPosition": {
"X": 0,
"Y": 8
},
"BodyPosition": {
"X": 0,
"Y": 0
},
"ShirtSize": {
"Width": 8,
"Length": 8
}
},
"LeftShirt": {
"DisableGrayscale": true,
"StartingPosition": {
"X": 0,
"Y": 16
},
"BodyPosition": {
"X": 0,
"Y": 0
},
"ShirtSize": {
"Width": 8,
"Length": 8
}
},
"BackShirt": {
"DisableGrayscale": true,
"StartingPosition": {
"X": 0,
"Y": 24
},
"BodyPosition": {
"X": 0,
"Y": 0
},
"ShirtSize": {
"Width": 8,
"Length": 8
}
}
}
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 shirt.png
The layout requirements for animated shirt.png
is fairly relaxed, as it only requires the following condition(s):
- For ShirtModel with animation, each frame of the shirt 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 shirts.
If you're looking for examples, see the examples page.