Villager Outfits
Villagers in Staxel are fairly moddable, with many parts being able to be switched out, and new creations can add to the pool.
This page is about Villager Outfits, these are found in .characteroutfit files and contains information all the information needed to specify all the clothes a villager can wear.
As a note, this file does not specify all of villagers looks, particularly the villagers hair, species and eyes, but it does specify the clothes for a villager. For the other mentioned options, they are provided by Villager Designs.
Creating a *.characteroutfit file
Creating a character outfit file is mostly collecting other files together into a singular file. This file is then used in a .villagernpc villager files. This file is fairly simple in principle but can look like it is more complicated than it is. A common file will look like this.
{ "code": "staxel.village.outfit.Cecile", "outfit": { "0": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.coats.LabCoat", "palette": "staxel.palette.grey" }, "1": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.shorts.baseShorts", "palette": "staxel.palette.grey" }, "2": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.generic.cooking.TempBlueShoes", "palette": "staxel.palette.grey" }, "3": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.characters.accessories.glasses.BGlass", "palette": "staxel.palette.grey" }, "4": { "kind": "staxel.item.Null", "code": "", "accessory": "" } } }
In this file, the first property is the common code name. The second property, "outfit", contains a number of numbered properties. All of these numbered properties are what's known as item blobs. All of these properties are actually how you would represent a Spawned Items, and can be tested ingame by using the /give command.
But going back to the properties themselves, each number represents a slot of clothing for a player or villager. That is the "0" property is the first slot of a villager. The list of slots are;
Slot Number | Slot |
---|---|
0 | Shirts |
1 | Pants |
2 | Shoes |
3 | Accessory |
4 | Hat |
With that we can now focus on the content of each slot. Each slot can effectively take any type of item, however code in the game is based on the following two types of items;
No Item | Clothing Item - Accessory |
---|---|
"4": { "kind": "staxel.item.Null" } |
"1": { "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.shorts.baseShorts", "palette": "staxel.palette.grey" } |
These two items specify what should be used for no item, or a clothing piece. Fill out one of these two items for each slot number. Do note that you can skip a number altogether and it will just act as if there was no item in the first place.
Config Options
"code"
Valid options (String): A unique string which species what this object is.
Default Value: No default value is specified. Always need to provide your own.
A string containing the code of the item the blob will be referring to.
"outfit"
Unlike most other files, the majority of data is actually specified in this property rather than the overall file. This property will generally look like;
"outfit": { "0": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.coats.LabCoat", "palette": "staxel.palette.grey" }, "1": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.shorts.baseShorts", "palette": "staxel.palette.grey" }, "2": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.generic.cooking.TempBlueShoes", "palette": "staxel.palette.grey" }, "3": { "code": "", "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.characters.accessories.glasses.BGlass", "palette": "staxel.palette.grey" }, "4": { "kind": "staxel.item.Null", "code": "", "accessory": "" } }
Each one of these properties refer to a slot number which is referenced in this table.
Slot Number | Slot |
---|---|
0 | Shirts |
1 | Pants |
2 | Shoes |
3 | Accessory |
4 | Hat |
Each property contains a Spawned Item blob but in this case each property should follow one of the two following item types;
No Item | Clothing Item - Accessory |
---|---|
"4": { "kind": "staxel.item.Null" } |
"1": { "kind": "staxel.item.Clothing", "accessory": "staxel.accessories.shorts.baseShorts", "palette": "staxel.palette.grey" } |
Other items can be used, however the game may behave weirdly when those items are used. There has not been extensive testing in this case so do not expect it to work swimmingly.