Difference between revisions of "Body Type"
DeamonHunter (Talk | contribs) (Initial commit.) |
DeamonHunter (Talk | contribs) (→Config Options) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Modding]] | [[Category:Modding]] | ||
− | In Staxel, *.bodytype files are used to specify how something should move, and the various properties surrounding this. | + | In Staxel, *.bodytype files are used to specify how something should move, and the various properties surrounding this. In particular, these files specify how the animations should link up to the model, as well as specifying collision with other objects. |
Line 36: | Line 36: | ||
= Config Options = | = Config Options = | ||
== "code" == | == "code" == | ||
− | '''Valid options (String): <code>A unique string which | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A unique string which identifies what Body Type this is.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | + | This option is required to uniquely identify any Body Type. This string '''must''' be unique to all other codes, but does not have any other requirements. | |
− | == " | + | == "bodyHeight" == |
− | '''Valid options (Float): <code>A decimal number. A value of 1 is a single block high</code>''' | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block high.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This defines | + | 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): <code>A decimal number. A value of 1 is a single block | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block wide.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This defines the total | + | 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. |
− | == " | + | == "boneAnimations" == |
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>Any valid string that leads to an [[Bone Animation]].</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | This provides the actual animation data to the body type. These animations are used to move models for things that implement Body Type. |
− | == " | + | == "centerBias" == |
− | '''Valid options (Float): <code> | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Float|Float]]): <code>{ "x": 0, "y": 0, "z": 0 }</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | 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 ( | + | '''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of valid strings. These need to correspond to layers.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | This is a list of all layer names the animation has, or therefore any implementing model should have. |
− | == " | + | |
− | '''Valid options ( | + | == "riserHeight" == |
+ | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block high.</code>''' | ||
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | This defines the total height of the riser collision. The riser defines the collision with moving up and down objects like stairs. |
− | == " | + | == "riserRadius" == |
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block wide.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | This defines the total radius of the rise. The riser defines the collision with moving up and down objects like stairs. |
− | == " | + | |
− | '''Valid options ( | + | == "shoulderHeight" == |
+ | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block wide.</code>''' | ||
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This | + | This defines how high the shoulders are in the model. This is for things such as camera position etc. |
− | == " | + | |
− | '''Valid options ( | + | == "topHeadOffset" == |
+ | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number. A value of 1 is a single block wide.</code>''' | ||
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
− | This is | + | This is the offset of the head compared to the model. Used to position Expressions that Animals and NPC's play. |
+ | |||
+ | |||
+ | == "tposeEmote" == | ||
+ | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>Any valid string that leads to an Bone Animation's timelines code. This timeline must be present in the specified Bone Animation</code>''' | ||
+ | |||
+ | '''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. |
Latest revision as of 06:58, 3 October 2017
In Staxel, *.bodytype files are used to specify how something should move, and the various properties surrounding this. In particular, these files specify how the animations should link up to the model, as well as specifying collision with other objects.
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 identifies what Body Type this is.
Default Value: No default value is specified. Always need to provide your own.
This option is required to uniquely identify any Body Type. This string must be unique to all other codes, but does not have any other requirements.
"bodyHeight"
Valid options (Float): A positive 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 positive decimal number. A value of 1 is a single block wide.
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.
"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.
"centerBias"
Valid options (Vector 3 - Float): { "x": 0, "y": 0, "z": 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 valid strings. These need to correspond to layers.
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.
"riserHeight"
Valid options (Float): A positive 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.
"riserRadius"
Valid options (Float): A positive decimal number. A value of 1 is a single block wide.
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.
"shoulderHeight"
Valid options (Float): A positive decimal number. A value of 1 is a single block wide.
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.
"topHeadOffset"
Valid options (Float): A positive decimal number. A value of 1 is a single block wide.
Default Value: No default value is specified. Always need to provide your own.
This is the offset of the head compared to the model. Used to position Expressions that Animals and NPC's play.
"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.