Commit 3841ac7e authored by cobaltcore's avatar cobaltcore
Browse files

Add a big-ass section about accessories and related features

parent 7e1c3f8c
......@@ -195,6 +195,114 @@ outfits/
Just like faces, outfits are part of the second layer of grouping, beneath a specific `pose`.
### Accessories
Sometimes, a character has things aside from their expressions that you may want to be able to toggle on or off. These are normally things like watches, glasses, wrist bands, ties etc. For this reason, we call these items accessories, since that's what they typically are.
Accessories are generally bound to a specific outfit in a specific pose, because they often times contain pixels from the base outfit they came from, making it hard or impossible to reuse them for other outfits as well.
Creating an accessory for a specific outfit is support by creating a folder inside the `outfits` directory and putting the actual outfit image as well as a sub-folder for the accessory inside it. The name of the folder which contains the accessory images determines the name of the accessory.
Such an accessory normally looks like this:
```
outfits/
└── <outfit_name>/
└── <accessory_name>/
└── on.png
└── off.png
└── <outfit_name>.png
```
As you can see, the accessory has two states `off` and `on`. These names are fixed, so you should name your files *exactly* like this when creating an accessory.
The `off` image is optional in case your outfit already contains the base `off` state, so in many cases you will only need to add the `on` variant.
#### Multi-State Accessories
So much for the basic accessory system. In some cases however, you want to do *more*. Specifically, we support multi-state accessories which can have more than one `on` state. There is still a singular `off` state, but you can add an underscore (`_`) and a name for the `on` state to any of the other images in the accessory folder, like so:
```
outfits/
└── <outfit_name>/
└── <accessory_name>/
└── on_<state_name_1>.png
└── on_<state_name_2>.png
└── off.png
└── <outfit_name>.png
```
In the game, this would then be referenced as the accessory name and the state name joined together with an underscore, such as `<accessory_name>_<state_name_1>`. For Sadie, as an example, you have the option of setting `hair_ponytail` or `hair_twintail`, both of which are states of the `hair` accessory.
#### Pose Level Accessories
Sometimes, you happen across a rare case where you *can* actually reuse a single accessory image across multiple outfits of the same pose. This can happen with extra assets for glasses, for example, which can just be overlaid anywhere.
To support such cases and to prevent you from having to painstakingly copy the same accessory to all of the outfits inside the same pose, we support pose-level accessories. These apply to all outfits in the same pose and are source from a single accessory folder, centralizing the assets needed for this accessory and making management of your files much easier.
To create a pose-level accessory, create a folder inside the outfits directory that begins with `acc_` (for `acc`essory), followed by the actual accessory name, like this:
```
outfits/
└── acc_<accessory_name>/
└── on.png
└── off.png
```
For Sadie, as an example, there exists an `acc_hair` accessory on the pose level which applies to all of her outfits in the given pose. Other than the location and name of the folder, the accessory behaves exactly the same as regular outfit-level accessories.
One feature that pose-level accessories have but outfit-level ones don't is the ability to selectively turn them off (or even just turn off a particular state) per outfit.
This is done via the character metadata in `character.yml` and looks like this:
```yaml
poses:
a:
facing: left
excludes:
<accessory_name>:
- <outfit_name_1>
- <outfit_name_2>
```
For Sadie, for example, you could disable her `hair` accessory entirely for the `casual` outfit and only her `ponytail` accessory state for the `uniform` outfit like so:
```yaml
poses:
a:
facing: left
excludes:
hair:
- casual
hair_ponytail:
- uniform
```
This is useful for accessories which apply to *most* outfits in a pose, but not all. In such cases you can turn the pose-level accessory off entirely if it doesn't fit for a particular outfit.
Instead of turning accessories off entirely, you also have the option of adding an accessory with the same name on the outfit level, which will then take precedence over the pose-level one.
For Sadie, as an example, you could override her pose-level `hair` accessory for the `uniform` outfit specifically like this:
```
outfits/
└── acc_hair/
└── on.png
└── off.png
└── uniform/
└── hair/
└── on.png
└── off.png
└── uniform.png
```
This would override this accessory in just this pose and it would "just work" inside the game, automatically switching between the pose-level and outfit-level accessory depending on the outfit of the character.
#### Layering Accessories
Yes I know this is getting long, but wait, there's more! Specifically, we have one more feature which could be useful for advanced users, which is setting the layer of the accessory.
Sometimes you have something like a different hairstyle that you want to use as an accessory. You *could* go ahead and painstakingly cut out all the parts where hair overlaps with the character etc, but that would make it very painful to reuse across various outfits which have slightly different outlines.
Instead, wouldn't it be nice if you could just layer the accessory *behind* the character instead of in front of it? That way, you could create a single hair accessory and just layer it behind the outfit and expressions, which would remove the need to mess around with cutting things out exactly.
Well, now you can! Any accessory -pose-level or outfit-level- can have a symbol and a number appended to it which will determine whether it shows up *behind* or *in front* of the outfit and expressions, and by how much. Incidentally, this also allows you to layer multiple accessories over each other, if you so desire.
By default, accessories are overlaid on top of everything else since that is the most common thing you may need to do when adding one. If you want to set the layer, you may add `-<number>` to set a layer *behind* the sprite (with bigger numbers being further back) or `+<number>` to set a layer *in front* of the sprite (with bigger numbers being further in front).
As an example, Sadie's hair is displayed behind her outfit and expressions by setting `acc_hair-1`.
You may select numbers between 0 and 9 (single-digit), so you can go up to 9 layers back and 9 layers in front, with 0 being the default layered right on top of the outfit and expression images.
### Registering your character
Now, at this point, if you were to add your assembled character folder to your scenario and load up the game, it would already display. However, there is one more step to making a complete character: Adding Metadata.
This means data that helps the game display your character correctly, e.g. scaling information, the proper display name, the color of their name and some other things.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment