Skip to content

Creating an Accessory Content Pack

Floogen edited this page Jul 14, 2023 · 8 revisions
Requires FS v2.0+

A content pack for Fashion Sense (FS) allows mod authors to create accessories with the following benefits:

  • Can be larger than 16x32 pixels
  • Can be animated
  • Can override the player's accessory color

Fashion Sense content packs are compatible with other FS packs, meaning you can have as many Fashion Sense accessories as you'd like!

TL;DR Edition

  1. Create a parent folder with the content pack's name.

  2. Create and fill in manifest.json as a content pack.

  3. Create a Accessories folder, add it under the content pack's main folder.

  4. Create a sub-folder under Accessories with the name of the accessory

    a. The name of the folder(s) under Accessories do not matter.

  5. Create a accessory.json under the created sub-folder, using the required fields found here.

  6. Create a accessory.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).


Structure

A Fashion Sense content pack consists of the following structure:

[FS] Example Pack
├── manifest.json
│
└── Accessories
    ├── FlowingCape
    │   ├── accessory.json
    │   └── accessory.png
    │
    ├── FlowingScarf
    │   ├── accessory.json
    │   └── accessory.png
    │
    └── Priestess
        ├── accessory.json
        └── accessory.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.

 

First Steps

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.

 

Creating Accessories

The folder structure

You will first need to create a Accessories folder underneath your main content pack folder.

After creating the Accessories folder you'll want to create a sub-folder for every accessory you want to add, like so:

.
└── Accessories
    ├── FlowingCape
    │
    ├── FlowingScarf
    │
    └── Priestess

You can also have sub-folders under the Accessories folder for organizing, like so:

.
└── Accessories
    ├── Cloth
    │   ├── FlowingScarf
    │   └── FlowingCape
    │
    └── Headgear
        └── Priestess

 

Adding the accessory

To add a accessory to your content pack, the framework requires a accessory.json under each sub-folder of Accessories.

For example:

.
└── Accessories
    ├── FlowingCape
    │   ├── accessory.json
    │   └── accessory.png
    │
    ├── FlowingScarf
    │   ├── accessory.json
    │   └── accessory.png
    │
    └── Priestess
        ├── accessory.json
        └── accessory.png

The file accessory.json determines how the accessory is to be applied and allows the usage of certain conditions for animation.

An overview of the required properties for accessory.json:

Property Description Default
Name Required Name of the accessory, 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"
BackAccessory Optional 1 Specifies how the accessory will look while the player is facing backwards.
See this page for more details.
null
RightAccessory Optional 1 Specifies how the accessory will look while the player is facing right.
See this page for more details.
null
FrontAccessory Optional 1 Specifies how the accessory will look while the player is facing forward.
See this page for more details.
null
LeftAccessory Optional 1 Specifies how the accessory will look while the player is facing left.
See this page for more details.
null
  1. At least one AccessoryModel(FrontAccessory, BackAccessory, etc.) must be given for the accessory to be valid.

    a. Note that AccessoryModel have their own required properties, as can be seen here.

Basic JSON example

This is a simple accessory.json, which adds a static (non-animated) accessory that only applies while the player is facing forward.

{
  "Name": "Priestess",
  "DisableGrayscale": true,
  "DrawBeforeHair": true,
  "FrontAccessory": {
    "StartingPosition": {
      "X": 0,
      "Y": 0
    },
    "HeadPosition": {
      "X": 0,
      "Y": 8
    },
    "AccessorySize": {
      "Width": 16,
      "Length": 32
    }
}

The StartingPosition property is used to determine where the starting point is (top-left most pixel for the AccessoryModel).

The HeadPosition property is used to tell the framework where the player's head would be in relation to the accessory. See the Priestess for another example.

Note: It is important to know that each AccessoryModel added (FrontAccessory, BackAccessory, etc.) must have a StartingPosition, HeadPosition and AccessorySize, as the framework uses those properties to display the accessory.

Basic accessory example

The corresponding accessory.png

The layout requirements for accessory.png is fairly relaxed, as the framework utilizes StartingPosition, HeadPosition and AccessorySize to determine where the accessory sprites are located.

See the example pack for references on how to create your accessories.


Animated JSON example

This is an animated accessory.json, which adds a accessory with an idle animation and only applies while the player is facing forward.

{
  "Name": "Priestess",
  "FrontAccessory": {
    "DisableGrayscale": true,
    "DrawBeforeHair": true,
    "StartingPosition": {
      "X": 0,
      "Y": 0
    },
    "HeadPosition": {
      "X": 0,
      "Y": 8
    },
    "AccessorySize": {
      "Width": 16,
      "Length": 32
    },
    "UniformAnimation": [
      {
        "Frame": 0,
        "Duration": 150
      },
      {
        "Frame": 1,
        "Duration": 150
      },
      {
        "Frame": 2,
        "Duration": 150
      },
      {
        "Frame": 3,
        "Duration": 300
      },
      {
        "Frame": 4,
        "Duration": 150
      },
      {
        "Frame": 5,
        "Duration": 150
      },
      {
        "Frame": 6,
        "Duration": 150
      },
      {
        "Frame": 7,
        "Duration": 150
      },
      {
        "Frame": 8,
        "Duration": 150
      },
      {
        "Frame": 9,
        "Duration": 300
      }
    ]
  }
}

You can see UniformAnimation was specified with 10 frames. UniformAnimation only plays if IdleAnimation and MovementAnimation are not given.

To play an animation only while the player is moving, you would instead utilize MovementAnimation. For the opposite effect, you'd utilize IdleAnimation.

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.

Animated accessory example

The corresponding accessory.png

The layout requirements for animated accessory.png is fairly relaxed, as it only requires the following condition(s):

  • For AccessoryModel with animation, each frame of the accessory 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 accessories.

Next Step

If you're looking for examples, see the examples page.

Clone this wiki locally