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.)
 
mNo edit summary
 
Line 363: Line 363:
<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).
       {
       {

Latest revision as of 11:53, 24 July 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 (one seat)

"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": [
       {
       "offset": {
         "x": 0.0,
         "y": 0.0,
         "z": 0.0
       },
       "poseOffsets": [
         {
           "offset": {
             "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):

      "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 global offset. You should add as many global seat offsets as you have seat locators on your model

A Pokémon with one seat:

"seats": {
       {
       "offset": {
         "x": 0.0,
         "y": 0.0,
         "z": 0.0
       }
}

A Pokémon with two seats:

"seats": {
       {
       "offset": {
         "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": {
         "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

For more in-depth information, see Riding Styles

LAND
land/horse

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 varables feature of Blockbench. To make a 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

Land rides usually use: ride_ground_run ride_ground_walk ride_jump

Air rides usually use: ride_air_fly air_glide ride_air_dive

Water 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
     }