๐ŸงMSquared Character Configuration

NOTE: This page refers to features that are only available in v27 onwards

There are a few differences from native unreal in how we set up the character that the player uses.

How we define the character

The main classes

We use a Pawn and PlayerController, same as native Unreal, but also define a MorpheusPawnActor, which handles the replication. For more details on this, see Replication.

Like in native Unreal, these can be controlled via the GameMode.

Further customization of the character can be done via :

Pawn Sets

If you want to further configure which pawn is used by a particular role, you can use pawn sets. If you add Pawn Lod Level Set to the Role Configuration Overrides, it will allow you to select a pawn set for the specific role.

The Pawn set defines how the character looks in a number of circumstances.

The main fields to consider:

  • OverrideAuthPawnClass - if one is provided, this will change the pawn used when in the given role/pawn set, when you are the auth client. Otherwise the DefaultPawnClass in the game mode will be used.

  • LOD Levels - this ties in to MSquared's rendering system, and how it supports >1000 player events. A limited number of nearby characters are represented as complete characters (Actor render targets), and ones in the distance are represented by The Animated Crowd

    • For now, the only recommended class to change would be the LOD 0 Override Actor Class - this will control what actor is used to represent the nearby other players (if left as None, it will also use the DefaultPawnClass from the game mode).

Avatar Scheme Sets

NOTE: This flow is planned to be deprecated in favour of using MML Avatars, or the Avatar System

These are what control the default visuals for your character. We have a number of scheme sets, that can be set for a role from the roles table. If you add AvatarSchemeSet, to the RoleConfigurationOverrides, and specify some entries in the Avatar Scheme Sets list, characters will be randomly created using those definitions:

Gameplay changes/additional functionality

Our default character and controller have some gameplay related additions:

Gait Speed

Instead of defining a single MaxWalkSpeed which controls the grounded move speed, we split the speed into three modes: Walk, Jog and Sprint. This gives us easy out-the-box movement speed control, e.g. starting in Jog, but pressing Shift to enter Sprint mode, or pressing Ctrl to enter Walk mode.

This is controlled via the J_CharacterMovementComponent, on the BP Character.

If you want to customize this speed per role, you can do so in the roles table, by adding Gait Speeds to the RoleConfigurationOverrides. Otherwise, it will use the

Jump Count

Like with native Unreal, the jump count can be controlled via the Jump Max Count field on the character (e.g. setting it to 2 will allow you to double-jump, setting it to 0 will disable jumping).

We also add the Character.JumpMaxCount live config value. This defaults to -1, but if set to a value >= 0, it will override the value in the character, allowing for live enabling/modifying the number of jumps.

Last updated