Mounts

Saddle Table

There are two tables that are ultimately responsible differentiating one mount from another, they are: SaddlesTable and MountMovementRatesTable , everything that differentiates a mount from a regular pet is stored in those tables.

In the SaddleTable we have a list of all saddles in the game (including DLC saddles) as well as a specific type of pet that can equip that saddle, and parameters it provides.

Row Name - is an ItemID of a saddle as specified in the ItemTable

Target Character - reference to the parent blueprint class of a ridable animal. In this case BP_NPC_Mounts_Horse is a parent class for all color variation horses.

Rider Endurance Damage Modifier - when rider takes damage it’s converted into endurance damage, this parameter controls the % of damage being mitigated.

In case of a horse rider the mitigation is set to 0 making shooting a rider a viable option when attempting to attack a mounted opponent.

Mount Endurance Damage Modifier - same as previous parameter, but this one is applied to the mount.

This parameter is what makes mounts “tankier” as they will be able to sustain more damage before dismounting a player.

The important part to remember here is that a single attack can damage both a rider and a mount dealing double endurance damage. This was made to create a hit and run style combat for mounts, just like in real life: a stationary rider is a dead rider.

Walk, Run and Sprint Speeds - these are the maximum speed that mount can have in that movement mode

Ex: for horse saddle it could be:

  • Walk: 1-249

  • Run: 250-749

  • Sprint: 750-1200

Inside creature blueprint you can find Walk and Run Speed stats. These are not related in any way to riding, only when creatures are walking on their own as monsters or pet. The image above shows Walking and Running Speed of a horse when we aren’t riding it.

Sprint Endurance Drain - how much endurance is drained when sprinting.

This parameter as well as Mount Endurance Damage Modifier are visible to players from the inventory screen of their mount.

Endurance Regeneration - a rate at which endurance will be regenerated when mount is not sprinting and didn’t receive damage over a period of time.

Acceleration profile - is a reference to an entry inside MountMovementRatesTable

Having these parameters set up will not automatically make a pet mountable.
The last part to be done is to have a creature, inside Monster table, to have above 0 Endurance .
Having this will enable the saddle slot on that mount.

MountMovementRates Table

This table is responsible mount movement, specifically: acceleration profiles and turning rates of a mount.

Each acceleration profile needs to have 3 different entries for Walk , Run and Sprint .

Ex: Acceleration Profile ID of a saddle is Horse_Fast , for it to work it requires 3 entries to be present in the MountMovementRates Table:

  • Horse_Fast_Walk

  • Horse_Fast_Run

  • Horse_Fast_Sprint

In order to read this table you need to be aware of 2 movement modes: Current and Target .

Current Movement Mode depends on the current speed of a mount. For a horse to switch Current Movement Mode from Walking to Running it needs for it’s current speed to pass a threshold specified in a saddles table.

The Target Movement Mode is based on the input provided.

When I press W on my keyboard the Target Movement Mode becomes Run .

When I press S , it becomes Stationary .

When I press Shift - Sprint .

Following this concept, the left most parameter of the table is the Current Movement Mode (Horse_Fast_Walk).

AccelToStationary/Walking/Running/Sprinting parameters indicate acceleration to a Target Movement Mode .

Ex: From stationary position when I press W my Target Movement Mode switches to Run .

My Current Speed goes from 0 to 1 which switches Current Movement Mode to Walk , and, as a result, mount will be referring to AccelToRun value at the Horse_Fast_Walk row for acceleration:

That is until my Current Speed hits a threshold between Walk and Run (250), at that point my Current Movement Mode will change to Run (Horse_Fast_Run), but my Target Movement Mode will stay they same, even though I’ll be using different value to accelerate:

When Current and Target Movement Modes are the same, a mount will continue to accelerate until it reaches a threshold to the next mode, but it will not cross it. So in this case our horse will go from 250 to 750 @700 acceleration.

LeanTurnRateAccel - this parameter controls how fast a mount is committing to a turn or simply how fast it will turn it’s head when doing a lean turn. Generally speaking, keeping values for Walk and Run the same seem to work just fine, but it needs to be lowered for the Sprint to make it feel realistic (it’s difficult to change movement direction at high speed). Lowering this value will make mount feel unresponsive (this is the case for bigger animals like rhino and elephant), but setting it too high will make turning very difficult.

TargetLeanTurnRate - this value controls the lean turn angle, the higher the value the smaller the turning radius is making the mount more nimble. Naturally, the higher the speed the lower this value gets.

SteepTurnRate - this controls the turn rate for the steep turn, but it should be balanced differently: the faster the speed the higher the turn rate gets. This is what allows the horse to “drift” and, in order to do so it needs to have a high current speed.

Creating a Saddle

As far as the ItemTable goes, there are a few parameters that are unique to saddles that should be mentioned

ItemClass should be set to (/Game/Systems/Inventory/BPGameItem_Saddle.BPGameItem_Saddle_C).

VisualObject should be set to (/Game/Systems/Inventory/BPMountInventoryItemSaddle.BPMountInventoryItemSaddle_C)

VisualSkeletalmesh should have a reference to that saddle’s skeletal mesh.

EquipLocation should be set to 14 (that number is reserved for saddles only).

SecondModifier should be set to Saddle

ForthModifier should be set to either Defense , Maneuverability or Speed (depending on a type of a saddle)

Gamepad input

Inside the BP_Mounts blueprint you’ll find universal settings for the gamepad input.

The values here are specified for the right side of the joystick and are mirrored on the left side.

Max Forward Angle - the range between 0 and 10 is specified in degrees, it’s an area of joystick movement that will count as forward. The reason for the range is quite simple: it’s to prevent players accidentally sliding their thumb slightly and ending up turning instead of going forward.

Max Lean Turn Angle - is between 10 and 89 degrees, area of joystick movement that will count as a lean turn.

Max Steep Turn Angle - is between 89 and 180 degrees, area of joystick movement that will count as a steep turn.

Steep turn is only available for the horse, other mounts like: rhinos, camels, elephants and mammoths cannot perform steep turn.

Min Steer Back Angle - this controls steering when moving backwards and separates it from turning

Min Straight Back Angle - mimicks Max Forward Angle but for the back movement.

Steep Turn Accel Rate Factor - the rate at which mount will start accelerating (or in this case - decelerating) when entering steep turn

Time Before Releasing Joystick - this is a safeguard to prevent a millisecond input registration when moving the joystick from the right-hand side to the left-hand side.

Mounted Combat

Mounted Camera

Movement camera

Camera set up is incredibly important to create a sense of speed and transition from one Movement Mode to another.

Firstly, the camera is slightly offset to one side to make experience a bit more cinematic and avoid reticle pointing directly at the character model.

The camera starts moving backwards the faster the horse goes with most obvious transition being from Running to Sprinting , the reason for that is to eliminate a feeling of lag when pressing Sprint button. The lag was caused by players not seeing immediate boost in speed after pressing sprint button due to acceleration slowly ramping it up, with camera movement - they get an immediate reaction to their input and it makes controls feel much more responsive.

Another reason is tactical: when travelling at the sprinting speed players need to be more aware of their environment as performing a lean turn becomes much slower and harder.

Weapons like lances and bows have their unique camera presets when aiming.

Those are the different camera modes you can switch to and from by changing your current speed. However, using different camera presets for weapons is a bit different

Weapons camera

In order to set a weapon to use a specific camera preset, you need to use the anim notify state BP_CameraModeNotifyState, and set the CameraMode variable to specify which row from CamSwitchModes_Table to use during that time frame

Mounted Weapons

Every weapon type in the game has it’s own blueprint with a set of parameters that need to adjusted to make weapon usable on a mount.

Get Specific Collision function is called from the animation montage to retrieve base weapon collision box.

In order to retrieve the correct value a new entry needs to be added to Switch_On_Name box called “ Mounted ” and a return node should have FoundCollision box checked and collision valued filled.

This is not a mandatory step as the correct collision box values can be specified in animation montage, however, it allows for much more consistent results when using different weapons. A great example of that are 1h mace, 1h sword and 1h axe. All 3 weapon types are using the exact same attack animation and collision boxes are overwritten with the exact same values, but the hit boxes vary dramatically.

If we look at the weapon meshes above it’s easy to see why: the sockets that collision boxes depend on are placed differently. To solve this issue we are adding the offset values per weapon type and only utilize it when the weapon is used in a context of a mount. Having these values properly set up will allow us to use the same collision values inside animation montage for all 3 weapon types without having to readjust each one individually.

Combo Type Mounted - communicates with DT_ComboRules table via E_WeaponComboType enumeration.

ItemSwapMounted - reference to animation for weapon swapping.

Can Use when Mounted - without this the item cannot be equipped when you are on a mount.

Can Use in Water if Mounted - selected weapons are forbidden to be used when in a water, should any exploits be found this value can be used to stop it.

Animations

Just like with regular attacks most Notifiers for mounted attacks are set up inside Animation Montages .

OverrideCollisionBoxFromWeapon is used sometimes to retrieve the correct collision offset from the weapon blueprint (although, it should be used a lot more as this is the intended way of doing this).

OverrideCollisionExtent is used quite a lot in order to expand the collision box of mounted attack.

Hit boxes for mounted attacks are massive, and they have to be as hitting anything on a run can be quite a challenge with weapon collision represented accurately.

This is not unique to Conan Exiles, a lot of other games are using some form of collision extension or an aim assist to make sure that weapons connect with intended target.

For weapons like lances, bows and spears - it’s not that big of an issue, however, any slashing attack can become troublesome.

Animation Montage

Slicing animation and setting up correct timing are no different from regular weapons, what is unique is Meta Data:

For mounted combat we should use BPMountedCombatMontageMetadata .

When a weapon is equipped the camera can be moved around freely with no restrictions:

However, when weapon is held or attack is performed we are artificially limiting character movement to avoid performing impossible attacks and control animation blending, in the image below is an example of a limit to how far character can attack on the right hand side using a sword, going any further will switch character from the right side to the left side:

Camera can also be limited, if needed, by using following parameters:

Combo Type connects the Animation Montage the DT_ComboTable .

Animation Blending

Currently, our animation system supports blending between two animations when doing mounted attacks and they are controlled with these parameters:

in case of a sword light attack we are blending between two animations or perform an attack on each side

Low Right Attack

High Right Attack

In this particular case, we are using Min Angle V and Max Angle V to indicate the range at which these animations should blend, beyond this range the blend will not occur and a respective animation (low or high) will be played instead.

This blend was incredibly helpful to resolve the light sword attacks issue that appeared as a result of a freeform attack functionality:

In order to attack opponents on the ground mounted players had to position their camera to look directly at the opponent in order for a weapon to strike at that location.

Needless to say it was causing players quite a lot of discomfort. Using blending range it was possible to clamp the amount of camera movement required to perform a low swing.

Snowplow

Snowplow is referring to a sphere at the bottom front part of the mount that applies damage and knockback effect to anything it touches.

The parameters of this sphere can be set up in MountTable

Its implementation can be found inside BasePlayerChar blueprint inside the Mounts graph. However, this will only end up calling the function ApplySnowplowKnockback that has to be defined for each mount that implements the interface, according to the needs of the mount (e.g. BP_NPC_Wildlife_Rhino or BP_NPC_Mounts_Horse).

For the HORSE, ApplySnowplowKnockback function contains implementation of the knockback and damage calculation.

There are two types of knockback:

  1. Light - enemies are pushed aside, no damage is dealt

  2. Heavy - enemies are sent flying and damage is increased based on a collision speed and mount’s strength attribute.

The selection between the two is based on the mount movement speed with heavy knockback available around a halfway between sprint min and max speed.

In order to prevent the target to get knocked multiple times over a small time window a buff is given to a target that makes it immune to knockback and damage from it for a short duration.

Another important thing to keep in mind is that certain enemies are immune to knockback due to their high knockback defense. Most of the time it works as one would expect - ramming into a frost giant while on a horse won’t even make it flinch, however, there are some exceptions to the rule.

Animation index

Mount-related animations are a bit scattered all over the place. Here is where to set them up: