Tutorials/Riding Setup: Difference between revisions

(Created page. Is already outdated, but thought I should make the basic page regardless just so that it is there and ready to be edited.)
 
(updated riding setup page for 1.8)
 
(One intermediate revision by one other user not shown)
Line 21: Line 21:
In the <code>species</code> file of the Pokémon (or by species additions) you must add riding behaviours.
In the <code>species</code> file of the Pokémon (or by species additions) you must add riding behaviours.


=== Example from Arcanine (one seat) ===
=== Example from Arcanine ===


  "riding": {
  "riding": {
Line 27: Line 27:
       "<abbr title="The type of movement in that category. LAND is for moving on ground, AIR is for moving in air, and LIQUID is for moving in liquids">LAND</abbr>": {
       "<abbr title="The type of movement in that category. LAND is for moving on ground, AIR is for moving in air, and LIQUID is for moving in liquids">LAND</abbr>": {
         "<abbr title="The movement style in that category. This is very important as it chooses which ride style the Pokémon will use; for example, if it hovers above the ground like Minecraft creative flight, or flies like a bird">key</abbr>": "cobblemon:land/horse",
         "<abbr title="The movement style in that category. This is very important as it chooses which ride style the Pokémon will use; for example, if it hovers above the ground like Minecraft creative flight, or flies like a bird">key</abbr>": "cobblemon:land/horse",
         "<abbr title="See 'Extra Notes' below">rideSounds</abbr>": [],
         "<abbr title="The sound that plays when riding. See 'Extra Notes' below for more information.">rideSounds</abbr>": [],
         "<abbr title="Similar to a Pokémon's base stats, but for riding. each stat does something different for each ride style.">stats</abbr>": {
         "<abbr title="Similar to a Pokémon's base stats, but for riding. Each stat does something different for each ride style.">stats</abbr>": {
           "ACCELERATION": "70-90",
           "<abbr title="How fast the Pokémon can reach the maximum speed.">ACCELERATION</abbr>": "<abbr title="A range of values for the stat written as min-max. Should be kept in range of 0-100.">70-90</abbr>",
           "JUMP": "45-65",
           "<abbr title="How high the Pokémon can jump. For air style mounts, this has other effects, such as gliding effectiveness for Bird style mounts.">JUMP</abbr>": "45-65",
           "SKILL": "40-80",
           "<abbr title="How fast the Pokémon can turn. For Hover style mounts, this affects the rate of deceleration.">SKILL</abbr>": "40-80",
           "SPEED": "45-70",
           "<abbr title="The maximum speed the Pokémon can reach.">SPEED</abbr>": "45-70",
           "STAMINA": "35-80"
           "<abbr title="The length of time the Pokémon may be ridden in its specific style, such as sprinting duration for Land mounts.">STAMINA</abbr>": "35-80"
         }
         }
       }
       }  
     },
     },
     "<abbr title="How many seats a Pokémon will have, along with their global offset. You should add as many global seat offsets as you have seat locators on your model">seats</abbr>": [
     "<abbr title="How many seats a Pokémon will have, along with their locator. See 'Extra Notes' below for more information.">seats</abbr>": [
        {
      {
        "offset": {
        "<abbr title="The seat locator on your model.">locator</abbr>": "seat_1"
          "x": 0.0,
      }
          "y": 0.0,
    ]
          "z": 0.0
  }
        },
 
        "poseOffsets": [
=== Extra Notes===
          {
==== rideSounds====
            "offset": {
The sounds and the configuration of the volume of the sounds. Mainly used for air mounts.
              "x": 1.8626451e-09,
              "y": -1.2779657,
              "z": 0.059787232
            },
            "poseTypes": [
              "STAND"
            ]
          },
          {
            "offset": {
              "x": 0.01673784,
              "y": -1.3045704,
              "z": 0.06801101
            },
            "poseTypes": [
              "WALK"
            ]
          },
          {
            "offset": {
              "x": -0.008335706,
              "y": -1.3077765,
              "z": 0.15360254
            },
            "poseTypes": [
              "HOVER"
            ]
          },
          {
            "offset": {
              "x": -0.008335706,
              "y": -1.3077765,
              "z": 0.15360254
            },
            "poseTypes": [
              "FLY"
            ]
          },
          {
            "offset": {
              "x": 1.8626451e-09,
              "y": -1.2779657,
              "z": 0.059787232
            },
            "poseTypes": [
              "FLOAT"
            ]
          },
          {
            "offset": {
              "x": 0.01673784,
              "y": -1.3045704,
              "z": 0.06801101
            },
            "poseTypes": [
              "SWIM"
            ]
          },
          {
            "offset": {
              "x": -0.008335706,
              "y": -1.3077765,
              "z": 0.15360254
            },
            "poseTypes": [
              "GLIDE"
            ]
          }
        ]
      }
    ]
  }
=== Extra Notes ===
==== rideSounds ====
The sounds and the configuration of the volume of the sounds. Only used for flying mounts.
An example of the configurations (Dragapult example):
An example of the configurations (Dragapult example):
       "rideSounds": [
       "rideSounds": [
           {
           {
             "<abbr title="If sound muffling is enabled or not">muffleEnabled</abbr>": true,
             "<abbr title="Whether sound muffling is enabled or not">muffleEnabled</abbr>": true,
             "<abbr title="A molang expression of the pitch of the sound">pitchExpr</abbr>": "math.max(1.0 ,0.2 + math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2))",
             "<abbr title="A molang expression of the pitch of the sound">pitchExpr</abbr>": "math.max(1.0 ,0.2 + math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2))",
             "<abbr title="If the ride sounds play for players that currently aren't riding the Pokémon">playForNonPassengers</abbr>": true,
             "<abbr title="Whether the ride sounds should play for players that currently aren't riding the Pokémon or not">playForNonPassengers</abbr>": true,
             "<abbr title"The sound that plays whilst riding. Loop sounds have 4 different options: leather, plumage, chitin and wind, and all are listed as "cobblemon:ride.loop.[option]"">soundLocation</abbr>": "cobblemon:ride.loop.wind",
             "<abbr title="The sound that plays whilst riding. Loop sounds have 4 different options: leather, plumage, chitin and wind, all are listed as cobblemon:ride.loop.[option]">soundLocation</abbr>": "cobblemon:ride.loop.wind",
             "<abbr title="A molang expression for the volume of the sound">volumeExpr</abbr>": "math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2)"
             "<abbr title="A molang expression for the volume of the sound">volumeExpr</abbr>": "math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2)"
           }
           }
         ]
         ]


==== seats ====
==== seats====
How many seats a Pokémon will have, along with their global offset. You should add as many global seat offsets as you have seat locators on your model
How many seats a Pokémon will have, along with their locator. You should list as many seat locators as you have on your model.


A Pokémon with one seat:
A Pokémon with one seat:
"seats": {
    "seats": [
        {
      {
         "offset": {
         "locator": "seat_1"
          "x": 0.0,
      }
          "y": 0.0,
    ]
          "z": 0.0
        }
}


A Pokémon with two seats:
A Pokémon with two seats:
"seats": {
    "seats": [
        {
       {
        "offset": {
         "locator": "seat_1"
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        {
        "offset": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        }
}
 
==== poseOffsets ====
The seat offsets for a certain pose. This can be left unused, or can be automatically calculated with the /calculateseatpositions command.
 
=== Example from Dragapult (Land, Water and Air) ===
 
"riding": {
    "behaviours": {
       "AIR": {
        "speed": "Math.clamp(q.entity.velocity.horizontal_magnitude + 0.33, 0, 1)",
        "key": "cobblemon:air/jet",
        "rideSounds": [
          {
            "muffleEnabled": true,
            "pitchExpr": "math.max(1.0 ,0.2 + math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2))",
            "playForNonPassengers": true,
            "soundLocation": "cobblemon:ride.loop.wind",
            "volumeExpr": "math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2)"
          }
        ],
         "gravity": "q.gravity * (0.1 + (q.passenger_count - 1) * 0.1)",
        "jumpVector": [
          0,
          "0.3*q.jump_strength/50",
          0
        ],
        "stats": {
          "ACCELERATION": "60-85",
          "JUMP": "45-80",
          "SKILL": "55-70",
          "SPEED": "55-90",
          "STAMINA": "25-35"
        }
       },
       },
      "LAND": {
        "key": "cobblemon:land/horse",
        "rideSounds": [],
        "canJump": false,
        "canSprint": false,
        "stats": {
          "ACCELERATION": "10-40",
          "JUMP": "10-40",
          "SKILL": "80-100",
          "SPEED": "10-40",
          "STAMINA": "10-40"
        }
      },
      "LIQUID": {
        "key": "cobblemon:liquid/dolphin",
        "rideSounds": [],
        "stats": {
          "ACCELERATION": "60-85",
          "JUMP": "40-55",
          "SKILL": "55-70",
          "SPEED": "50-65",
          "STAMINA": "25-35"
        }
      }
    },
    "seats": [
       {
       {
         "offset": {
         "locator": "seat_2"
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "poseOffsets": [
          {
            "offset": {
              "x": 0.0,
              "y": -1.79316,
              "z": 0.7641932
            },
            "poseTypes": [
              "STAND"
            ]
          },
          {
            "offset": {
              "x": 0.0,
              "y": -2.0687745,
              "z": 0.5822059
            },
            "poseTypes": [
              "WALK"
            ]
          },
          {
            "offset": {
              "x": 0.0,
              "y": -1.79316,
              "z": 0.7641932
            },
            "poseTypes": [
              "HOVER"
            ]
          },
          {
            "offset": {
              "x": -0.07185971,
              "y": -0.93452233,
              "z": -0.2551939
            },
            "poseTypes": [
              "FLY"
            ]
          },
          {
            "offset": {
              "x": 0.0,
              "y": -2.0687745,
              "z": 0.5822059
            },
            "poseTypes": [
              "FLOAT"
            ]
          },
          {
            "offset": {
              "x": 0.35303587,
              "y": -1.1183715,
              "z": -0.25105122
            },
            "poseTypes": [
              "SWIM"
            ]
          },
          {
            "offset": {
              "x": -0.016359132,
              "y": -2.2029357,
              "z": 0.8644739
            },
            "poseTypes": [
              "GLIDE"
            ]
          }
        ]
       }
       }
     ]
     ]
  }


=== Available Ride Keys ===
===Available Ride Keys ===
<b>For more in-depth information, see [https://wiki.cobblemon.com/index.php/Pok%C3%A9mon/Riding#Riding_Styles Riding Styles]</b>
<b>For more in-depth information, see [https://wiki.cobblemon.com/index.php/Pok%C3%A9mon/Riding#Riding_Styles Riding Styles]</b>


LAND<br>
LAND<br>
<code>land/horse</code><br>
<code>land/horse</code> (also known as standard)<br>


AIR<br>
AIR<br>
Line 320: Line 95:
<code>liquid/dolphin</code><br>
<code>liquid/dolphin</code><br>


To make your Pokémon unable to jump, you can add a <code>["canJump": false]</code> line. To make it unable to sprint, you add a <code>["canSprint": false]</code> line, as shown below (Dragapult example):
To make your Pokémon unable to jump, you can add a <code>"canJump": false</code> line. To make it unable to sprint, you add a <code>"canSprint": false</code> line, as shown below (Dragapult example):
     "LAND": {
     "LAND": {
         "key": "cobblemon:land/horse",
         "key": "cobblemon:land/horse",
Line 335: Line 110:
       }
       }


== Step 3: Animations ==
==Step 3: Animations ==


<b>Small Note: Ride animations are optional and not required for riding to work.</b>
<b>Small Note: Ride animations are optional and not required for riding to work.</b>
Line 342: Line 117:


Overlays play on top of the ride animation, allowing dynamic movement using molang.
Overlays play on top of the ride animation, allowing dynamic movement using molang.
They use the varables feature of Blockbench. To make a slider, copy this text and replace yaw_change with whatever you want your slider to control
They use the variables feature of Blockbench. To make a variable slider, copy this text and replace yaw_change with whatever you want your slider to control.


<code><abbr title="query. this should be left as is">q</abbr>.<abbr title="this should be left as is">r</abbr>.<abbr title="left and right movement. 1 is moving right, -1 is moving left">yaw_change</abbr> = slider('yaw_change', 0.02, -1.0, 1.0)</code>
<code><abbr title="q means query. This should be left as is">q</abbr>.<abbr title="This should be left as is">r</abbr>.<abbr title="Left and right movement. 1 is moving right, -1 is moving left">yaw_change</abbr> = slider('yaw_change', 0.02, -1.0, 1.0)</code>


<code><abbr title="up and down movement. 1 is moving up, -1 is moving down">pitch_change</abbr></code>
<code><abbr title="up and down movement. 1 is moving up, -1 is moving down">pitch_change</abbr></code>
<code><abbr title="jump up and down movement, 1 is upwards motion, and -1 is downwards">velocity_y</abbr></code>
<code><abbr title="jump up and down movement, 1 is upwards motion, and -1 is downwards">velocity_y</abbr></code>
<code><abbr title="air diving motion. 0 is no dive, 1 is diving at full velocity.">dive</abbr></code>
<code><abbr title="air diving motion. 0 is no dive, 1 is diving at full velocity.">dive</abbr></code>
For example, to make the slider affect yaw, you need to add <code>q.r.yaw_change</code> to a keyframe. If you would put <code>q.r.yaw_change(0)*7</code> in a rotation keyframe, it will cause the part to rotate 7 degrees left or right, depending on the value of yaw_change on the slider.


Land rides usually use:
Land rides usually use:
Line 360: Line 139:
<code>ride_air_dive</code>
<code>ride_air_dive</code>


Water rides usually use:
Liquid rides usually use:
<code>ride_water_swim</code>
<code>ride_water_swim</code>


== POSER ==
====Posers====
The poser is how you set up the ride animations. You need to add a condition animation in the <code>"animations": []"</code> bracket  with the condition <code>q.is_ridden</code>. This will cause the animation to only play whilst riding (Charizard's ride run overlay).
The poser is how you set up the ride animations. You need to add a condition animation in the <code>"animations": []</code> bracket  with the condition <code>q.is_ridden</code>. This will cause the animation to only play whilst riding (Charizard's ride run overlay).
       {
       {
           "condition": "q.is_ridden",
           "condition": "q.is_ridden",
Line 370: Line 149:
         }
         }


When adding a run to a Pokémon, you need to add a <code>q.is_sprinting</code> condition to your run pose and a <code>!q.is_sprinting</code> anticondition to your walk pose. To make a jump, you need to add a <code>q.in_air</code> condition to your jump pose and a </code>!q.in_air to your grounded poses, so run, walk and idle. (Wyrdeer poser example)
When adding a run to a Pokémon, you need to add a <code>q.is_sprinting</code> condition to your run pose and a <code>!q.is_sprinting</code> anticondition to your walk pose. To make a jump, you need to add a <code>q.in_air</code> condition to your jump pose and a <code>!q.in_air</code> to your grounded poses, so run, walk and idle. (Wyrdeer poser example)


     "in-air": {
     "in-air": {

Latest revision as of 11:10, 15 September 2026

Preface

This tutorial will teach you how to add custom ride Pokémon to Cobblemon. The process is relatively simple to accomplish, but it is recommended to have the minimum basic knowledge of Blockbench's controls and the ability to read json's.

Step 1: Adding a Locator

To allow the player to sit on the Pokémon, you need to add a locator (which is shown visually like an anchor) named seat_1 to your model. If you want to add multiple seats to your Pokémon, you can add more locators named seat_2, seat_3, and so on. you can find the "Add Locator" tool in the Blockbench toolbar customization. The model should be placed in assets/cobblemon/bedrock/pokemon/models/[folder named after your Pokémon] as a [pokemon].geo.json file.

One seat (Charizard model example)

One Seat Locator Example.png One Seat Viewport Example.png

Two Seats (Dewgong model example)

Two Seat Locator Example.png Two Seat Viewport Example.png

Six Seats (Camerupt model example)

Six Seat Locator Example.png Six Seat Viewport Example.png


Step 2: Adding Ride Data

In the species file of the Pokémon (or by species additions) you must add riding behaviours.

Example from Arcanine

"riding": {
   "behaviours": {
     "LAND": {
       "key": "cobblemon:land/horse",
       "rideSounds": [],
       "stats": {
         "ACCELERATION": "70-90",
         "JUMP": "45-65",
         "SKILL": "40-80",
         "SPEED": "45-70",
         "STAMINA": "35-80"
       }
     } 
   },
   "seats": [
      {
        "locator": "seat_1"
      }
    ]
  }

Extra Notes

rideSounds

The sounds and the configuration of the volume of the sounds. Mainly used for air mounts. An example of the configurations (Dragapult example):

      "rideSounds": [
         {
           "muffleEnabled": true,
           "pitchExpr": "math.max(1.0 ,0.2 + math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2))",
           "playForNonPassengers": true,
           "soundLocation": "cobblemon:ride.loop.wind",
           "volumeExpr": "math.pow(math.min(q.ride_velocity() / 1.5, 1.0),2)"
         }
       ]

seats

How many seats a Pokémon will have, along with their locator. You should list as many seat locators as you have on your model.

A Pokémon with one seat:

   "seats": [
     {
       "locator": "seat_1"
     }
   ]

A Pokémon with two seats:

   "seats": [
     {
       "locator": "seat_1"
     },
     {
       "locator": "seat_2"
     }
   ]

Available Ride Keys

For more in-depth information, see Riding Styles

LAND
land/horse (also known as standard)

AIR
air/bird
air/jet
air/hover (also known as ufo)
air/rocket

LIQUID
liquid/boat
liquid/submarine
liquid/dolphin

To make your Pokémon unable to jump, you can add a "canJump": false line. To make it unable to sprint, you add a "canSprint": false line, as shown below (Dragapult example):

    "LAND": {
       "key": "cobblemon:land/horse",
       "rideSounds": [],
       "canJump": false,
       "canSprint": false,
       "stats": {
         "ACCELERATION": "10-40",
         "JUMP": "10-40",
         "SKILL": "80-100",
         "SPEED": "10-40",
         "STAMINA": "10-40"
       }
     }

Step 3: Animations

Small Note: Ride animations are optional and not required for riding to work.

Ride Pokémon have additional animations, mainly overlays, jumps and run animations.

Overlays play on top of the ride animation, allowing dynamic movement using molang. They use the variables feature of Blockbench. To make a variable slider, copy this text and replace yaw_change with whatever you want your slider to control.

q.r.yaw_change = slider('yaw_change', 0.02, -1.0, 1.0)

pitch_change velocity_y dive


For example, to make the slider affect yaw, you need to add q.r.yaw_change to a keyframe. If you would put q.r.yaw_change(0)*7 in a rotation keyframe, it will cause the part to rotate 7 degrees left or right, depending on the value of yaw_change on the slider.


Land rides usually use: ride_ground_run ride_ground_walk ride_jump

Air rides usually use: ride_air_fly air_glide ride_air_dive

Liquid rides usually use: ride_water_swim

Posers

The poser is how you set up the ride animations. You need to add a condition animation in the "animations": [] bracket with the condition q.is_ridden. This will cause the animation to only play whilst riding (Charizard's ride run overlay).

      {
         "condition": "q.is_ridden",
         "animation": "q.bedrock('charizard', 'ride_ground_run')"
       }

When adding a run to a Pokémon, you need to add a q.is_sprinting condition to your run pose and a !q.is_sprinting anticondition to your walk pose. To make a jump, you need to add a q.in_air condition to your jump pose and a !q.in_air to your grounded poses, so run, walk and idle. (Wyrdeer poser example)

    "in-air": {
       "poseTypes": ["STAND", "WALK"],
       "isBattle": false,
       "condition": "q.in_air && q.is_ridden",
       "animations": ["q.look('head')", "q.bedrock('wyrdeer', 'ride_jump')"],
       "transformTicks": 2,
       "transformToTicks": 2
     },
     "walk": {
       "poseName": "walk",
       "poseTypes": ["WALK"],
       "isBattle": false,
       "condition": "!q.in_air && !q.is_sprinting",
       "animations": [
         "q.look('head')",
         "q.bedrock('wyrdeer', 'ground_walk')",
       {
         "condition": "q.is_ridden",
         "animation": "q.bedrock('wyrdeer', 'ride_ground_run')"
       }
       ],
       "quirks": [
         "q.bedrock_quirk('wyrdeer', 'blink')"
       ],
       "transformTicks": 10
     },
     "run": {
       "poseName": "run",
       "poseTypes": ["STAND","WALK"],
       "isBattle": false,
       "condition": "!q.in_air && q.is_sprinting",
       "animations": [
         "q.look('head')",
         "q.bedrock('wyrdeer', 'ground_run')",
       {
         "condition": "q.is_ridden",
         "animation": "q.bedrock('wyrdeer', 'ride_ground_run')"
       }
       ],
       "quirks": [
         "q.bedrock_quirk('wyrdeer', 'blink')"
       ],
       "transformTicks": 10
     }