Difference between revisions of "Body Type"
DeamonHunter (Talk | contribs) (Initial commit.) |
(No difference)
|
Revision as of 05:14, 31 May 2017
In Staxel, *.bodytype files are used to specify how something should move, and the various properties surrounding this.
Contents
Creating a *.bodytype file
A *.bodytype file mostly contains properties which specify certain characteristics of how it should move, though it does contain references to Bone Animations. The following is a basic file that is used for Staxel's player models.
{ "code" : "staxel.bodyType.HumanoidFemale", "shoulderHeight" : 1.34375, "bodyHeight" : 2.125, "bodyRadius" : 0.65625, "riserRadius" : 0.46875, "riserHeight" : 1.140625, "tposeEmote" : "tpose", "boneAnimations" : "avatar", "centerBias" : { "x" : 0.0, "y" : 0.0, "z" : -0.5 }, "layers" : [ "Torso", "Head", "Shoulder_Right", "UpperArm_Right", "LowerArm_Right", "Hand_Right", "Item_Right", "Shoulder_Left", "UpperArm_Left", "LowerArm_Left", "Hand_Left", "Item_Left", "Thigh_Right", "UpperLeg_Right", "LowerLeg_Right", "Thigh_Left", "UpperLeg_Left", "LowerLeg_Left" ] }
These properties are explained below. With a file like this, it can then be used in a species file to define how they move.
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.
"shoulderHeight"
Valid options (Float): A decimal number. A value of 1 is a single block high
Default Value: No default value is specified. Always need to provide your own.
This defines how high the shoulders are in the model. This is for things such as camera position etc.
"bodyHeight"
Valid options (Float): A decimal number. A value of 1 is a single block high
Default Value: No default value is specified. Always need to provide your own.
This defines the total height of the model from the centre. This is for things such as collision with objects and other players.
"bodyRadius"
Valid options (Float): A decimal number. A value of 1 is a single block high
Default Value: No default value is specified. Always need to provide your own.
This defines the total radius of the model from the centre. This essentially allows the model to have a capsule collision box. This is for things such as collision with objects and other players.
"riserHeight"
Valid options (Float): A decimal number. A value of 1 is a single block high
Default Value: No default value is specified. Always need to provide your own.
This defines the total height of the riser collision. The riser defines the collision with moving up and down objects like stairs. (Possible wrong.)
"riserRadius"
Valid options (Float): A decimal number. A value of 1 is a single block high
Default Value: No default value is specified. Always need to provide your own.
This defines the total radius of the rise. The riser defines the collision with moving up and down objects like stairs. (Possible wrong.)
"boneAnimations"
Valid options (String): Any valid string that leads to an Bone Animation.
Default Value: No default value is specified. Always need to provide your own.
This provides the actual animation data to the body type. These animations are used to move models for things that implement Body Type.
"tposeEmote"
Valid options (String): Any valid string that leads to an Bone Animation's timelines code. This timeline must be present in the specified Bone Animation
Default Value: No default value is specified. Always need to provide your own.
This provides the default animation that the body type should use when no other information is avaliable. In most cases this is the "T-Pose" animation.
"centerBias"
Valid options (Vector3): {"x": 0.0, "y": 0.0, "z":0.0}
Default Value: No default value is specified. Always need to provide your own.
This provides the information of how much should the model be off centre compared to the body type. Most commonly this is used to make sure the model lines up with the animations.
"layers"
Valid options (List of strings): A list of names for the layers to be used.
Default Value: No default value is specified. Always need to provide your own.
This is a list of all layer names the animation has, or therefore any implementing model should have.