Poser: Difference between revisions
m (Fix typo) |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{TOC|right}} | {{TOC|right}} | ||
== Preface == | == Preface == | ||
The | The <code>poser</code> JSON controls all the animations of a Pokémon just as the old [[Poser]] did. It contains the same information for when the Pokémon will perform certain animations, but has received many requested upgrades. Some of these upgrades include multi-bone look animations, support for move animations, and even selecting from a pool of animations for quirks. Functionality of the new Poser will always be maintained and should let addon creators have the same options as the [https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen1/SquirtleModel.kt hard-coded Kotlin Posers.] | ||
</br> | |||
== Poser Properties == | == Poser Properties == | ||
Before breaking down each section of the | Before breaking down each section of the Poser file, let's take a look at all its different properties and how to use them. This section includes all of the different functions of the poser, any configurable options for said function, and how to write each function. You will notice that the poser now includes something in the format of <code>q.<function></code>. These are molang functions which allow you to do many new things. The q stands for query and its just part of the standard format for these new functions. Some functions can even go inside of other functions. It's not terribly complicated once you read what each one does. They allow addon creators to do many things they couldn't before! | ||
</br> | |||
=== Rootbone === | |||
The <code>rootBone</code> property specifies what bone in the model will act as the root bone for generic animations not assigned in the poser such as the evolution animation. If the model was made following the standard bone format, then it should simply be the name of the Pokémon in lower case. Punctuation and capitalization matter! So make sure it matches the root bone of your model exactly. | |||
You are '''required''' to assign this root bone properly or else it will break the model in certain generic animations! These animations animate the root bone and do not reset it to its original position when it finishes. This can cause model displacement after evolutions. | |||
</br>Below is a breakdown of the simple rootBone property: | |||
"<abbr title="This property attempts to call the specified bone from the model to assign it as the root bone for generic animations.">rootBone</abbr>": "<abbr title="In this scenario, the charizard bone is being called. This charizard bone should contain all other bones so generic animations can move the entire model for whatever they animate.">charizard</abbr>", | |||
</br> | |||
=== Portraits and Profiles & Scale and Translation === | |||
Portrait and Profile are the poses that are used when rendering any Pokémon in a GUI or Menu. Portrait is used for the left hand party screen, or Party Overlay, and Profile is used for the Party Menu. The poser file assigns some <code>Scale</code> and <code>Translation</code> values to these poses which control the camera location for rendering the Pokémon. There is a dev tool that you can enable in the [[Config]] which allows you to use some customizable keys to move the camera around the Pokémon in these menus. This tool will print the Scale and Translation values when the associated hotkey is pressed. </br> | |||
<code>Scale</code> values control the amount of zoom for the Portrait or Profile. A value less than one should make it zoom out and a value greater than one will zoom in. Sometimes with larger models, the camera cannot render the whole Pokémon no matter how far you zoom out. The back side of the Pokémon may not be rendered. This means you need to increase the Translation z value.</br> | |||
<code>Translation</code> values control the location of the camera for the Portrait or Profile. Translation is a set of 3 values which represent xyz coordinates. You will mainly be changing the first 2 values, or the x and y axis values. X for left and right, and Y for up and down. The Z value is rarely used, but is important for really big models that are not being fully rendered in the menus. It often needs a negative Z value that is some multiple of 5.</br> | |||
Below is a short breakdown of the previously mentioned properties: | |||
"<abbr title="This property controls the size of the Pokémon in the party menu on the left side of the screen. (Tip: you can refresh your resource pack with F3 + T for quick edits.)">portraitScale</abbr>": 1.65, | |||
"<abbr title="This property controls the location of the Pokémon in the party menu on the left side of the screen. The first value moves it left or right, which is your x axis. The second value moves it up or down, which is your y axis. The third value seems to do nothing and can generally be ignored. (Tip: you can refresh your resource pack with F3 + T for quick edits.)">portraitTranslation</abbr>": [0, -0.6, 0], | |||
"<abbr title="These refer to the full body view of the Pokémon seen in GUI, but most notably the summary UI. (Tip: you can refresh your resource pack with F3 + T for quick edits.)">profileScale</abbr>": 1, | |||
"<abbr title="This property controls the location of the Pokémon seen in GUI, but most notably the summary UI. The first value moves it left or right, which is your x axis. The second value moves it up or down, which is your y axis. The third value seems to do nothing and can generally be ignored. (Tip: you can refresh your resource pack with F3 + T for quick | |||
edits.)">profileTranslation</abbr>": [0, 0.15, 0], | |||
</br> | |||
=== Poses & Animations === | === Poses & Animations === | ||
There's a handful of Pose types and Animation types that you can make animations for. <code>Poses</code> are the states a Pokémon is in, like idle or moving. Poses are for assigning animations like your ground idles, ground walks, water idles, etc. The <code>animation types</code> are the different events in battles that you can assign animations to for each Pokémon. | There's a handful of Pose types and Animation types that you can make animations for. <code>Poses</code> are the states a Pokémon is in, like idle or moving. Poses are for assigning animations like your ground idles, ground walks, water idles, etc. The <code>animation types</code> are the different events in battles that you can assign animations to for each Pokémon. | ||
For the sake of clarity, you should always refer to animations like faints, cries, or physicals as '''Named Animations'''. This is to help everyone distinguish them from the animations that are applied to poses. This distinction is important because you can assign both <code>animations</code> and <code>namedAnimations</code> to a pose. This is to allow you to assign different cries, faints, or attack animations to different poses like your floating or flying poses. This allows for water attack animations if you make the animation to support it. This process will be detailed later. Below is a list of currently available Named Animation types and Poses to choose from. </br> | |||
==== Animations ==== | ==== Animations & Named Animations ==== | ||
* '''faint''': <code>animation.<pokemon>.faint</code> - The animation that plays when a Pokémon faints. | * '''faint''': <code>animation.<pokemon>.faint</code> - The animation that plays when a Pokémon faints. | ||
* '''cry''': <code>animation.<pokemon>.cry</code> - The animation that plays when a Pokémon is called out or when it starts battle. | * '''cry''': <code>animation.<pokemon>.cry</code> - The animation that plays when a Pokémon is called out or when it starts battle. | ||
Line 18: | Line 47: | ||
* '''special''': <code>animation.<pokemon>.special</code> - The animation that plays when a Pokémon uses a special move in battle. | * '''special''': <code>animation.<pokemon>.special</code> - The animation that plays when a Pokémon uses a special move in battle. | ||
* '''status''': <code>animation.<pokemon>.status</code> - The animation that plays when a pokemon uses a status move in battle. | * '''status''': <code>animation.<pokemon>.status</code> - The animation that plays when a pokemon uses a status move in battle. | ||
* '''<battle_move>''': <code>animation.<pokemon>.<battle_move_name></code> - The animation that plays when a pokemon uses a specific move in battle. This animation property would assign a pokemon's animation to an '''existing''' action effect. Something like a custom flamethrower animation for Charizard or a Pokémon's signature move for example. | |||
</br> | </br> | ||
==== Poses ==== | ==== Poses ==== | ||
Line 34: | Line 64: | ||
* '''"SHOULDER_LEFT"''': <code>animation.<pokemon>.shoulder_left</code> - The animation that plays when the Pokémon is on the player's left shoulder. | * '''"SHOULDER_LEFT"''': <code>animation.<pokemon>.shoulder_left</code> - The animation that plays when the Pokémon is on the player's left shoulder. | ||
* '''"SHOULDER_RIGHT"''': <code>animation.<pokemon>.shoulder_right</code> - The animation that plays when the Pokémon is on the player's right shoulder. | * '''"SHOULDER_RIGHT"''': <code>animation.<pokemon>.shoulder_right</code> - The animation that plays when the Pokémon is on the player's right shoulder. | ||
</br> | |||
==== Basic Animation Calling Functions ==== | |||
Below are the 3 methods to call a <code>Pose</code> or <code>namedAnimation</code> animation. Each of them serve a purpose in layering animations on the Pokémon. <code>Pose</code> animations must always use <code>q.bedrock()</code> to serve as the base animation that can be overwritten by other animations when called. <code>NamedAnimations</code> can either use <code>q.bedrock_stateful()</code> to layer over the base animation or use <code>q.bedrock_primary()</code> to overwrite the base animation while it is playing. The default function used in each named animation type can be changed if your animation supports it. If you want the cry to overwrite rather than layer, then just be sure to animate it properly. | |||
</br> | |||
===== q.bedrock ===== | |||
The <code>q.bedrock()</code> function is the familiar animation calling format from the [[Old_Poser | old poser]] which got converted into a molang function. It's the same thing as before, just in a new look. You are still just listing your Pokémon and then the animation in the parenthesis. This function is mainly used to assign poses their animations. These animations are meant to be overwritten by Primary or Stateful animations whenever convenient.</br> | |||
Below is an example of the <code>q.bedrock</code> function assigning a walk animation to the <code>"WALK"</code> pose type: | |||
"walking": { | |||
"poseTypes": ["WALK"], | |||
"animations": [ | |||
"q.bedrock('blastoise', 'ground_walk')" | |||
] | |||
}, | |||
</br> | </br> | ||
==== q.bedrock_stateful ==== | ===== q.bedrock_stateful ===== | ||
The function <code>q.bedrock_stateful()</code> allows you to assign a stateful animation to an animation type. <code>Stateful animations</code> are meant to animate just a few bones of the Pokémon and get overlaid on the current pose. An example would be cries only animating the mouth or head of the Pokémon. A stateful animation won't take control of the whole model to play its animation. | The function <code>q.bedrock_stateful()</code> allows you to assign a stateful animation to an animation type. <code>Stateful animations</code> are meant to animate just a few bones of the Pokémon and get overlaid on the current pose. An example would be cries only animating the mouth or head of the Pokémon. A stateful animation won't take control of the whole model to play its animation. | ||
</br> | </br> | ||
Line 44: | Line 90: | ||
</br> | </br> | ||
==== q.bedrock_primary ==== | ===== q.bedrock_primary ===== | ||
The function <code>q.bedrock_primary()</code> allows you to assign a primary animation to an animation type. <code>Primary animations</code> are meant to take control of the entire model to play its animation and will clear any previous animations it was doing. An example would be a Pokémon's physical attack animation. When a Pokémon uses a physical move, it should clear the battle idle animation and play its physical animation instead. These animations often move the whole body and many of its limbs. When the physical animation is done, it returns control of the model to the battle idle after the physical animation has finished and should play a short transition animation in between. | The function <code>q.bedrock_primary()</code> allows you to assign a primary animation to an animation type. <code>Primary animations</code> are meant to take control of the entire model to play its animation and will clear any previous animations it was doing. An example would be a Pokémon's physical attack animation. When a Pokémon uses a physical move, it should clear the battle idle animation and play its physical animation instead. These animations often move the whole body and many of its limbs. When the physical animation is done, it returns control of the model to the battle idle after the physical animation has finished and should play a short transition animation in between. | ||
</br> | </br> | ||
<code>q.bedrock_primary</code> comes with a couple of extra properties and they should be written in the following order: | |||
# group: <code>'blastoise'</code> - The animation JSON that the game will search for the following animation. This should always be the name of a Pokémon. | |||
# animation: <code>'status'</code> - The animation the game will call from the previously mentioned animation JSON. Primary animations are usually your attack animations or faints, but you can assign it to other named animations if desired. | |||
# (optional) excluded labels: <code>'look'</code> - Exclusive labeled animations that wont get overwritten by this primary animation. The only reasonable use of excluded labels is to exclude the look animation from being overwritten. This is so they can keep looking at a target when using an animation. | |||
# curve: <code>'q.curve('symmetrical_wide')'</code> - The interpolation curve that this primary animation will use to transition to and from the pose it is written under. | |||
</br> | </br> | ||
Since Primary animations behave in a similar way to swapping poses, they can use special interpolation curve types via the <code>q.curve</code> property written within its sub properties. These provide different types of smoothness to the interpolation and will be explained in the next section. | |||
Below is an example of the 4 primary | </br> | ||
Below is an example of the 4 common primary animations in the poser: | |||
"faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", | "faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", | ||
"physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))", | "physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))", | ||
"special": "q.bedrock_primary('blastoise', 'special', q.curve('symmetrical_wide'))", | "special": "q.bedrock_primary('blastoise', 'special', q.curve('symmetrical_wide'))", | ||
"status": "q.bedrock_primary('blastoise', 'status', q.curve('symmetrical_wide'))" | "status": "q.bedrock_primary('blastoise', 'status', 'look', q.curve('symmetrical_wide'))" | ||
</br> | </br> | ||
==== q.curve ==== | ====== q.curve ====== | ||
The function <code>q.curve()</code> is a sub function for <code>q.bedrock_primary()</code> which allows the animation to interpolate back into the main pose. This allows the transition between animations to behave similarly to linear keyframes and smooth keyframes when animating. | The function <code>q.curve()</code> is a sub function for <code>q.bedrock_primary()</code> which allows the animation to interpolate back into the main pose. This allows the transition between animations to behave similarly to linear keyframes and smooth keyframes when animating. | ||
</br> | </br> | ||
Line 70: | Line 123: | ||
"faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", | "faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", | ||
"physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))", | "physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))", | ||
=== Conditions === | === Conditions === | ||
Line 106: | Line 131: | ||
* <code>"isBattle"</code>: The Pokémon must be in a battle. | * <code>"isBattle"</code>: The Pokémon must be in a battle. | ||
* <code>"isTouchingWater"</code>: The Pokémon must be touching water. Not necessarily underwater. | * <code>"isTouchingWater"</code>: The Pokémon must be touching water. Not necessarily underwater. | ||
* <code>" | * <code>"isInWaterOrRain"</code>: The Pokémon must be touching water or in rain. Again, not necessarily underwater. | ||
* <code>" | * <code>"isUnderWater"</code>: The Pokémon must be underwater. The red line on the hitbox must be below the surface. | ||
* <code>"isStandingOnRedSand"</code>: The Pokémon must be standing on red sand. | * <code>"isStandingOnRedSand"</code>: The Pokémon must be standing on red sand. | ||
* <code>"isStandingOnSand"</code>: The Pokémon must be standing on sand | * <code>"isStandingOnSand"</code>: The Pokémon must be standing on sand |
Latest revision as of 11:59, 12 December 2024
Preface
The poser
JSON controls all the animations of a Pokémon just as the old Poser did. It contains the same information for when the Pokémon will perform certain animations, but has received many requested upgrades. Some of these upgrades include multi-bone look animations, support for move animations, and even selecting from a pool of animations for quirks. Functionality of the new Poser will always be maintained and should let addon creators have the same options as the hard-coded Kotlin Posers.
Poser Properties
Before breaking down each section of the Poser file, let's take a look at all its different properties and how to use them. This section includes all of the different functions of the poser, any configurable options for said function, and how to write each function. You will notice that the poser now includes something in the format of q.<function>
. These are molang functions which allow you to do many new things. The q stands for query and its just part of the standard format for these new functions. Some functions can even go inside of other functions. It's not terribly complicated once you read what each one does. They allow addon creators to do many things they couldn't before!
Rootbone
The rootBone
property specifies what bone in the model will act as the root bone for generic animations not assigned in the poser such as the evolution animation. If the model was made following the standard bone format, then it should simply be the name of the Pokémon in lower case. Punctuation and capitalization matter! So make sure it matches the root bone of your model exactly.
You are required to assign this root bone properly or else it will break the model in certain generic animations! These animations animate the root bone and do not reset it to its original position when it finishes. This can cause model displacement after evolutions.
Below is a breakdown of the simple rootBone property:
"rootBone": "charizard",
Portraits and Profiles & Scale and Translation
Portrait and Profile are the poses that are used when rendering any Pokémon in a GUI or Menu. Portrait is used for the left hand party screen, or Party Overlay, and Profile is used for the Party Menu. The poser file assigns some Scale
and Translation
values to these poses which control the camera location for rendering the Pokémon. There is a dev tool that you can enable in the Config which allows you to use some customizable keys to move the camera around the Pokémon in these menus. This tool will print the Scale and Translation values when the associated hotkey is pressed.
Scale
values control the amount of zoom for the Portrait or Profile. A value less than one should make it zoom out and a value greater than one will zoom in. Sometimes with larger models, the camera cannot render the whole Pokémon no matter how far you zoom out. The back side of the Pokémon may not be rendered. This means you need to increase the Translation z value.
Translation
values control the location of the camera for the Portrait or Profile. Translation is a set of 3 values which represent xyz coordinates. You will mainly be changing the first 2 values, or the x and y axis values. X for left and right, and Y for up and down. The Z value is rarely used, but is important for really big models that are not being fully rendered in the menus. It often needs a negative Z value that is some multiple of 5.
Below is a short breakdown of the previously mentioned properties:
"portraitScale": 1.65, "portraitTranslation": [0, -0.6, 0], "profileScale": 1, "profileTranslation": [0, 0.15, 0],
Poses & Animations
There's a handful of Pose types and Animation types that you can make animations for. Poses
are the states a Pokémon is in, like idle or moving. Poses are for assigning animations like your ground idles, ground walks, water idles, etc. The animation types
are the different events in battles that you can assign animations to for each Pokémon.
For the sake of clarity, you should always refer to animations like faints, cries, or physicals as Named Animations. This is to help everyone distinguish them from the animations that are applied to poses. This distinction is important because you can assign both animations
and namedAnimations
to a pose. This is to allow you to assign different cries, faints, or attack animations to different poses like your floating or flying poses. This allows for water attack animations if you make the animation to support it. This process will be detailed later. Below is a list of currently available Named Animation types and Poses to choose from.
Animations & Named Animations
- faint:
animation.<pokemon>.faint
- The animation that plays when a Pokémon faints. - cry:
animation.<pokemon>.cry
- The animation that plays when a Pokémon is called out or when it starts battle. - recoil:
animation.<pokemon>.recoil
- The animation that plays when a Pokémon takes damage in battle. - physical:
animation.<pokemon>.physical
- The animation that plays when a Pokémon uses a physical move in battle. - special:
animation.<pokemon>.special
- The animation that plays when a Pokémon uses a special move in battle. - status:
animation.<pokemon>.status
- The animation that plays when a pokemon uses a status move in battle. - <battle_move>:
animation.<pokemon>.<battle_move_name>
- The animation that plays when a pokemon uses a specific move in battle. This animation property would assign a pokemon's animation to an existing action effect. Something like a custom flamethrower animation for Charizard or a Pokémon's signature move for example.
Poses
- "STAND":
animation.<pokemon>.ground_idle
- The animation that plays when a Pokémon is idle on land.- This pose type is also used for battle-idles:
animation.<pokemon>.battle_idle
- This pose type is also used for battle-idles:
- "PORTRAIT":
animation.<pokemon>.portrait
- The animation that plays in the Party Overlay, or left hand party GUI- This pose often uses the
ground_idle
instead of a dedicated animation.
- This pose often uses the
- "PROFILE":
animation.<pokemon>.profile
- The animation that plays in the Party Menu, or when you press M.- This pose often uses the
ground_idle
instead of a dedicated animation.
- This pose often uses the
- "WALK":
animation.<pokemon>.ground_walk
- The animation that plays when a Pokémon is moving on land - "HOVER":
animation.<pokemon>.air_idle
- The animation that plays when a Pokémon is idle in the air. - "FLY":
animation.<pokemon>.air_fly
- The animation that plays when a Pokémon is moving in the air. - "FLOAT":
animation.<pokemon>.water_idle
- The animation that plays when a Pokémon is idle in or on water. - "SWIM":
animation.<pokemon>.water_swim
- The animation that plays when a Pokémon is moving in or on water. - "SLEEP":
animation.<pokemon>.sleep
- The animation that plays when a Pokémon is asleep. Usually on land. - "SHOULDER_LEFT":
animation.<pokemon>.shoulder_left
- The animation that plays when the Pokémon is on the player's left shoulder. - "SHOULDER_RIGHT":
animation.<pokemon>.shoulder_right
- The animation that plays when the Pokémon is on the player's right shoulder.
Basic Animation Calling Functions
Below are the 3 methods to call a Pose
or namedAnimation
animation. Each of them serve a purpose in layering animations on the Pokémon. Pose
animations must always use q.bedrock()
to serve as the base animation that can be overwritten by other animations when called. NamedAnimations
can either use q.bedrock_stateful()
to layer over the base animation or use q.bedrock_primary()
to overwrite the base animation while it is playing. The default function used in each named animation type can be changed if your animation supports it. If you want the cry to overwrite rather than layer, then just be sure to animate it properly.
q.bedrock
The q.bedrock()
function is the familiar animation calling format from the old poser which got converted into a molang function. It's the same thing as before, just in a new look. You are still just listing your Pokémon and then the animation in the parenthesis. This function is mainly used to assign poses their animations. These animations are meant to be overwritten by Primary or Stateful animations whenever convenient.
Below is an example of the q.bedrock
function assigning a walk animation to the "WALK"
pose type:
"walking": { "poseTypes": ["WALK"], "animations": [ "q.bedrock('blastoise', 'ground_walk')" ] },
q.bedrock_stateful
The function q.bedrock_stateful()
allows you to assign a stateful animation to an animation type. Stateful animations
are meant to animate just a few bones of the Pokémon and get overlaid on the current pose. An example would be cries only animating the mouth or head of the Pokémon. A stateful animation won't take control of the whole model to play its animation.
Here is an example of the 2 stateful animations, cry and recoil, in the poser:
"cry": "q.bedrock_stateful('blastoise', 'cry')", "recoil": "q.bedrock_stateful('blastoise', 'recoil')",
q.bedrock_primary
The function q.bedrock_primary()
allows you to assign a primary animation to an animation type. Primary animations
are meant to take control of the entire model to play its animation and will clear any previous animations it was doing. An example would be a Pokémon's physical attack animation. When a Pokémon uses a physical move, it should clear the battle idle animation and play its physical animation instead. These animations often move the whole body and many of its limbs. When the physical animation is done, it returns control of the model to the battle idle after the physical animation has finished and should play a short transition animation in between.
q.bedrock_primary
comes with a couple of extra properties and they should be written in the following order:
- group:
'blastoise'
- The animation JSON that the game will search for the following animation. This should always be the name of a Pokémon. - animation:
'status'
- The animation the game will call from the previously mentioned animation JSON. Primary animations are usually your attack animations or faints, but you can assign it to other named animations if desired. - (optional) excluded labels:
'look'
- Exclusive labeled animations that wont get overwritten by this primary animation. The only reasonable use of excluded labels is to exclude the look animation from being overwritten. This is so they can keep looking at a target when using an animation. - curve:
'q.curve('symmetrical_wide')'
- The interpolation curve that this primary animation will use to transition to and from the pose it is written under.
Since Primary animations behave in a similar way to swapping poses, they can use special interpolation curve types via the q.curve
property written within its sub properties. These provide different types of smoothness to the interpolation and will be explained in the next section.
Below is an example of the 4 common primary animations in the poser:
"faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", "physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))", "special": "q.bedrock_primary('blastoise', 'special', q.curve('symmetrical_wide'))", "status": "q.bedrock_primary('blastoise', 'status', 'look', q.curve('symmetrical_wide'))"
q.curve
The function q.curve()
is a sub function for q.bedrock_primary()
which allows the animation to interpolate back into the main pose. This allows the transition between animations to behave similarly to linear keyframes and smooth keyframes when animating.
The q.curve function comes with 3 options for now which are:
one
: Does not interpolate at all. Just jumps from one animation to the next. Preferred for faint animations.symmetric
: Interpolates in a similar fashion to 2 smooth keyframes in blockbench. Not preferable, but is an option.symmetrical_wide
: Interpolates in a similar fashion to 2 smooth keyframes in blockbench, but with a wider margin. The preferred choice when transitioning from moves.
Below is an example of the 2 main q.curve types:
"faint": "q.bedrock_primary('blastoise', 'faint', q.curve('one'))", "physical": "q.bedrock_primary('blastoise', 'physical', q.curve('symmetrical_wide'))",
Conditions
You can expand the amount of animations a Pokémon can have and when they should be played by using conditions
. Conditions are what allow for battle animations despite the standing
and battle-idle
poses both using the "STAND"
pose type. Typically, if you want different animations using the same pose types, then you must set one pose's condition to true, and the other pose's matching condition to false. You can mix and match these conditions to make something like an animation that only plays in battle, if it is raining while the sun is setting.
List of Currently Implemented Conditions:
"isBattle"
: The Pokémon must be in a battle."isTouchingWater"
: The Pokémon must be touching water. Not necessarily underwater."isInWaterOrRain"
: The Pokémon must be touching water or in rain. Again, not necessarily underwater."isUnderWater"
: The Pokémon must be underwater. The red line on the hitbox must be below the surface."isStandingOnRedSand"
: The Pokémon must be standing on red sand."isStandingOnSand"
: The Pokémon must be standing on sand"isStandingOnSandOrRedSand"
: The Pokémon must be standing on either sand or red sand."isDusk"
: It must be "Dusk" time in the world, or roughly at sunset.
Below is an example of 2 poses using the "STAND"
pose type and Conditions
to separate the battle-idle animation from the ground idle animation:
- In these scenarios, you want one pose to have the condition set to true, and any other pose that shares the same pose type to have the condition set to false.
"battle-standing": { "poseTypes": ["STAND"], "isBattle": true, "animations": [ "q.bedrock('blastoise', 'battle_idle')" ] }, "standing": { "poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE"], "isBattle": false, "animations": [ "q.bedrock('blastoise', 'ground_idle')" ] },
Transformed Parts
This function allows you to transform parts of the model when the Pokémon is in a certain pose. You can change the location, rotation, and visibility of bones for each pose. This allows you to make some slight adjustments to an in-game animation without having to edit the animation itself. While there aren't many examples of this function, it's most common use is to hide model parts when a Pokémon is not in its battle idle. This is the case with Rillaboom and its drum.
A great use for location and rotation transformation is to adjust shoulder animations. You don't have to account for the model location on the player shoulder when making the animation. If it doesn't line up in the game, you can move the whole model using this function.
The visibility transformation allows you to hide a specific bone in the model when the Pokémon is currently in a pose. This can be used to hide certain bones if needed. This allows you to do things like making Rillaboom use its drum for its battle-idle. It also allows Typhlosion to have its flames ignited only during battle. Something to keep in mind is that if you want a bone to be visible only during battle, then you must set this bone as invisible for all other poses. This is why transformedParts
is written under every pose in the poser file breakdown.
Below is an example of all the transformed part properties being used. This is mostly a demonstration of your options when using this function. If this example was applied in game, Charizard's wings would be detached from its body, but only the left wing would be invisible. Realistically, you would never want to do something like that.
"transformedParts": [ { "part": "wing_right", "position": [10, 0, 0], "rotation": [0, 0, 0], "isVisible": true }, { "part": "wing_left", "position": [-10, 0, 0], "rotation": [0, 0, 0], "isVisible": false } ]
Look Animation(s)
The new Poser allows you to manipulate the look animation in a number of ways. Creators can now list multiple look animations where each one can define its own head bone and edit some of the properties of the look animation. Changing the properties allows you to manipulate the sight cone of the Pokémon if desired. This can help prevent some odd clipping or extend/shorten how far it can look up and down or left and right. Having multiple look animations allows for Pokémon with multiple heads to turn each head individually. You could even assign the torso and head bones to look at the same time while limiting the range for each. This can be helpful for Pokémon with little to no neck and they have to look with their body more than their head.
The q.look()
function is the format of this new look animation. When using this function, all the properties must be listed in a specific order and the name of the bone must be in single quotes. (the apostrophe key)
- Please refer to the image below to visualize pitch, yaw, and the origin.
- Pressing F3+B in game can show the hitboxes. That blue line shows where the pokemon is looking at and if its looking at nothing, it is centered at 0 pitch and yaw. You can call this the origin.
The properties of q.look
must be in the following order:
- With the exception of the bone name, these are also the default values for each property
- Bone name:
'head_ai'
- The name of the bone on the model which will perform the look animation - Pitch Multiplier -
1
- Multiplies the amount of pitch gained by this amount. Can use -1 to invert the pitch! - Yaw Multiplier -
1
- Multiplies the amount of yaw gained by this amount. Can use -1 to invert the yaw! - Max Pitch -
70
- How many degrees the Pokémon can look down from origin. - Min Pitch -
-45
- How many degrees the Pokémon can look up from origin. - Max Yaw -
45
- How many degrees the Pokémon can look right from origin. - Min Yaw -
-45
- How many degrees the Pokémon can look left from origin.
A look animation using the previously listed values would look something like this inside of the standing pose:
"standing": { "poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE"], "animations": [ "q.look('head_ai', 1, 1, 70, -45, 45, -45)", "q.bedrock('riolu', 'ground_idle')" ],
If you want to use the default values and keep it short, you can also write it like this:
"standing": { "poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE"], "animations": [ "q.look('head_ai')", "q.bedrock('riolu', 'ground_idle')" ],
If you want to list multiple head bones, you can write the q.look function multiple times:
"standing": { "poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE"], "animations": [ "q.look('head_ai')", "q.look('torso')", "q.bedrock('riolu', 'ground_idle')" ],
Quirks
Quirk animations are stateful animations (for now) that you can have play over the main animation for a pose. The new poser format introduced a shorthand method to writing in your quirk animations in the q.bedrock_quirk()
format. The old Poser method for quirks can be condensed into one line using this function. When using this function, all the properties must be listed in specific order, placed inside of single quotes (the apostrophe key) unless its a number, and separated by commas.
If your poser and animations are made just right, then you can have a single Pokémon running so many quirk animations at once. Remember that you can combine any of the following quirk examples if you have lots of animations like Blastoise.
The properties of q.bedrock_quirk
must be in the following order:
- Animation Group:
'blastoise'
- the name of the Pokémon - Animation Name(s):
'quirk_ground_idle'
- the name of the animation. Supports a pool of animations using theq.array
function - Minimum seconds between occurences:
20
- The decimal-friendly number of seconds that is the minimum between the quirk playing once and it playing a second time. - Maximum seconds between occurences:
60
- What do you think? - Loop times:
1
- The number of times the animation should play for the quirk
The previously listed properties would get written as a quirk like so:
"quirks": [ "q.bedrock_quirk('blastoise', 'quirk_ground_idle', 20, 60, 1)" ]
You don't need to include all the properties if you just want to use the default values of 8-30 seconds between quirks. You can write it like so to use the default values and keep it short:
"quirks": [ "q.bedrock_quirk('blastoise', 'blink')" ]
q.array
You can replace your animation name with the q.array()
function to have the quirk pick from a list of animations to play. This can be helpful if you have a lot of quirks that you want to play under one pose. You simply need to put the list of animations inside of the parenthesis, include each animation name inside of single quotes, and separate them with a comma.
- Example:
q.array('quirk_battle_idle', 'quirk_battle_idle2')
- These quirks are for Blastoise adjusting each of its cannons. Writing it this way lets Blastoise adjust only one cannon at a time, but it's a random cannon each time.
So if you were to make that into a quirk, it would look like this:
"quirks": [ "q.bedrock_quirk('blastoise', q.array('quirk_battle_idle', 'quirk_battle_idle2'), 30, 60, 1)" ]
Placeholder Animations
The new poser allows creators to use the placeholder animations which the JSON poser could not access before. These placeholder animations are based on the body type or limb features of the Pokémon. Each placeholder features a very simple animation that swings a limb back and forth. For now, you'll have to figure out how to configure these yourself lol
Here is a list of all the Placeholder animations:
"q.quadruped_walk()"
- A basic walk animation for Pokémon with 4 legs"q.biped_walk()"
- A basic walking animation for Pokémon who stand on 2 legs."q.bimanual_swing()"
- A basic arm swinging animation for Pokémon with 2 arms that usually stand on 2 legs."q.sine_wing_flap()"
- A basic wing flap animation for a pair of wings on a Pokémon.
Poser File Breakdown
Soon™
Poser File Example
Instead of making poser
files from scratch each time, you can use other custom Pokémon posers as a template. Just be aware of the animations each Pokémon has. Also be aware that not all Pokémon have a bone called head
.
Here is an example of a poser file for a custom riolu
that includes all currently implemented poses and their appropriate animations.
- Riolu obviously can't fly. This is just an example as no Pokémon can do everything currently.
- Blink animations are not applied to the sleep pose. This is because you don't blink when you sleep!
{ "portraitScale": 2.3, "portraitTranslation": [-0.1, 0.58, 0], "profileScale": 0.75, "profileTranslation": [0, 0.68, 0], "animations": { "faint": "q.bedrock_primary('riolu', 'faint', q.curve('one'))", "cry": "q.bedrock_stateful('riolu', 'cry')", "recoil": "q.bedrock_stateful('riolu', 'recoil')", "physical": "q.bedrock_primary('riolu', 'physical', q.curve('symmetrical_wide'))", "special": "q.bedrock_primary('riolu', 'special', q.curve('symmetrical_wide'))", "status": "q.bedrock_primary('riolu', 'status', q.curve('symmetrical_wide'))" }, "poses": { "battle-standing": { "poseTypes": ["STAND"], "isBattle": true, "animations": [ "q.look('head')", "q.bedrock('riolu', 'battle_idle')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "standing": { "poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE"], "isBattle": false, "animations": [ "q.look('head')", "q.bedrock('riolu', 'ground_idle')" ], "quirks": [ "q.bedrock_quirk('riolu', 'blink')" ] }, "walking": { "poseTypes": ["WALK"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'ground_walk')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "hover": { "poseTypes": ["HOVER"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'air_idle')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "fly": { "poseTypes": ["FLY"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'air_fly')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "float": { "poseTypes": ["FLOAT"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'water_idle')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "swim": { "poseTypes": ["SWIM"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'water_swim')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "sleep": { "poseTypes": ["SLEEP"], "animations": ["q.bedrock('riolu', 'sleep')"] }, "shoulder_left": { "poseTypes": ["SHOULDER_LEFT"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'shoulder_left')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] }, "shoulder_right": { "poseTypes": ["SHOULDER_RIGHT"], "animations": [ "q.look('head')", "q.bedrock('riolu', 'shoulder_right')" ], "quirks": ["q.bedrock_quirk('riolu', 'blink')"] } } }