Villager Designs
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 Designs, these are found in .characterdesign files and contains information for;
- The species, gender and personality of the villager
- The Hair style, eye type and the model of the villager
- Which hand is the dominant hand
As a note, this file does not specify all of villagers looks, particularly the villagers clothes, but it does specify the majority of the physical traits for a villager.
This page will mainly focus on Version 3. This is the latest version of the design file. Staxel is made with keeping backwards compatibility in mind, which includes keeping saves at least partially workable between updates.
Contents
Creating a *.characterdesign file
Creating a character design file is mostly collecting other files together into a singular file. This file is then used in a .villagernpc villager files. The file commonly looks like:
{ "code": "mods.modname.villager.design.charactername", "design": { "_version": 3, "Species": "staxel.species.Elf", "Gender": "female", "Personality": "staxel.personality.feminine", "LeftHanded": false, "Model": { "model": "staxel/characters/species/elf/Elf_Female.qb", "palette": "staxel.palette.skin.fair" }, "Hair": { "model": "staxel.accessories.hairstyles.female.long.curlyhairbands.CurlyYellowHairbands", "palette": "staxel.palette.blonde" }, "Eyes": { "model": "staxel.accessories.eyes.kawaiiEyelashes", "palette": "staxel.palette.blue" }, "revision": 0 } }
First thing to note is that most properties are actually included in "design". Keep that in mind when editing so that you do not run into issues. Most properties point towards the code of other files, such as many of the models pointing towards an [Accessory|Accessory's Code].
Keep revision at 0 unless you are updating characters inside of worlds. All other values are specified in the config options section. With all of this done, your villager has their look definied and you could
Config Options
"code"
Valid options (String): A unique string which design this object is.
Default Value: No default value is specified. Always need to provide your own.
A string containing the code of the design the blob will be referring to.
"design"
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;
"design": { "_version": 3, "Species": "staxel.species.Elf", "Gender": "female", "Personality": "staxel.personality.feminine", "LeftHanded": false, "Model": { "model": "staxel/characters/species/elf/Elf_Female.qb", "palette": "staxel.palette.skin.fair" }, "Hair": { "model": "staxel.accessories.hairstyles.female.long.curlyhairbands.CurlyYellowHairbands", "palette": "staxel.palette.blonde" }, "Eyes": { "model": "staxel.accessories.eyes.kawaiiEyelashes", "palette": "staxel.palette.blue" }, revision": 1 }
These properties are listed below.
"_version"
Valid options (Integer): An integer which corresponds to the version of the file. Currently Version 3 is the latest.
Default Value: If not specified, will default to 1. (Not recommended to skip. As it leads to an older version.)
This is the version number which specifies how the file should be interpreted. This is mainly to keep old worlds from crashing due to missing information. For example, version 1 had "Model"/"Hair"/"Eyes" be a singular string for model rather than the combined model and palette listed below. It's recommended to use the latest version when creating new files.
"LeftHanded"
Valid options (Bool): False or True.
Default Value: If not specified, will default to false.
This determines whether the villager uses tools in their right hand or their left. The default is the right hand.
"Gender"
Valid options (String): Either "Male" or "Female".
Default Value: No default value is specified. Always need to provide your own.
This is the gender of the villager. This is mainly used in order to apply the correct Body Type to the model specified.
"Model"/"Hair"/"Eyes"
All three of these properties contain two values which aim to specify what accessory/model is meant to be in this place. None of these options are normally changed during gameplay (As opposed to clothing which may be changed.) These properties look like;
"Eyes": { "model": "staxel.accessories.eyes.kawaiiEyelashes", "palette": "staxel.palette.blue" },
The properties inside of this can actually be omitted without trouble but this property (Model/Hair/Eyes) must exist.
"model"
Valid options (String): Either the code of an Accessory file or the path to a model file.
Default Value: If not specified, will default to no model.
This is the model to use for this section. The Accessory Code is the method that should be used for Eyes and Hair but the path should be used for models. (As these models generally don't have files associated with them.)
"palette"
Valid options (String): The code of an Pallete file.
Default Value: If not specified, will default to the default palette.
This is the colouring to use for this section.
"Personality"
Valid options (String): The code of an Personalty file.
Default Value: If not specified, will default to no personality.
This points to what animation personality will be used for this model.
"Species"
Valid options (String): The code of an Species file
Default Value: No default value is specified. Always need to provide your own.
This is the species of the villager. This is mainly used in order to apply the correct Body Type to the model specified.
"revision"
Valid options (Integer): The number determining what version the person is
Default Value: No default value is specified. Always need to provide your own.
This is used to differentiate different versions of the same character and is mainly responsible for making sure the client and server are running the same version of the character.