Personalities

From wiki
Jump to: navigation, search

In Staxel, *.personality files are ysed to specify a set of animations that are to be used define how an entity should animate. This includes information on;

  • A person or animal's walk, run and idle animations.
  • A person or animal's swimming animation.
  • The Body Type that this personality works for.

These are needed for every non-tile entity in the game, from Chickens to Villagers

Creating a *.personality file

Creating a personality file is actually fairly easy. This is because, the file only contains references to animation names that should have already been created.

First of all, you must have a working Body Type. This is needed to define the base of the personality. Once you have that, or using the ones made for the game already, create a new *.personality and place the following inside;

{
  "code" : "staxel.personality.feminine",
  "bodyType" : [ "staxel.bodyType.HumanoidMale", "staxel.bodyType.HumanoidFemale" ],
  "avatarCompatible" : true,
  "walk" : [ "femalewalk" ],
  "run" : [ "femalerun" ],
  "idle" : [ "femaleidle" ],
  "swim" : [ "swim" ],
  "swimIdle" : [ "swimidle" ],
  "wave" : [ "staxel.animation.Waving" ]
}

First of all, there is a property meant to uniquely identify this personality. "code" is to be unique from every other file. Best way to do this is to make it the path to your file, but replace / with .. Secondly, "bodyType" is the list of bodyTypes you want this personality to work for. In most cases, the two listed above should work, however you may need to create your own in order to have more animations. "avatarCompatible" is basically a toggle for the main menu. If this is true, then this personality will show up in the avatar creator.

After those properties come a list of animation names. These properties all reference their respective Bone Animation that were chosen inside the Body Type. The inputs to all of these are the animation's name. So for example with "walk" the animation's name was "femalewalk". Each property is then self explanatory.

With that you have a personality, in which Entities, and maybe the player, can use.


Config Options

"code"

Valid options (String): A unique string which personality this object is.

Default Value: No default value is specified. Always need to provide your own.


A string containing the unique identifier of the Personality. Used by Villager Designs and other similar files.

"avatarCompatible"

Valid options (Bool): True or False.

Default Value: If not specified, will be false.


This decides whether or not the player can select this personality for their characters.


"bodyType"

Valid options (List of Strings): A list of strings which point to a Body Type code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of Body Types that this personality can work for.


"idle"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player is completely stopped.


"swim"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player moving in water.


"swimIdle"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player is completely stopped in water.


"run"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player is moving fast.


"walk"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player is moving slowly.


"wave"

Valid options (List of Strings): A list of strings which point to a Bone Animation#"timelines" code each.

Default Value: No default value is specified. Always need to provide your own.


This is a list of names of animations that can be used when the player is waving.