Animation Overlay System

Introduction
GMS contains two types of overlay(layering) system. More information about how the overlay system works will be introduced in this article.
Stack based overlay system
This is a example of stack based overlay system, taken from Overlay_Mannequin
in provided project.
Sword Overlay
Making sword and shield locomotion by using OverlayStack method.
The following image is based on Unarmed MovementSet(Lyra's Unarmed Locomotion animations) and mixed with the animations of Paragon's Greystone to create a sword/shield locomotion.

The first layer is to play jog animation of the sword/shield on the upper body of the character only in non-idle anim nodes.

The second layer is to play the idle animation of the sword/shield on the upper body of the character only in idle anim nodes.

The following GIF shows the blending result:
Conditional Stack Overlays
We use OverlayStack to blend animations again, but this time we dynamically select animations for blending when specific conditions are met.
The following example is configured to play different anim sequences in different body parts only when grounded anim nodes is active and certain conditions are met.

The first layer is to play the Dance animation on the character's upper body when there's no any special conditions.

The second layer is to play the Injured animation on the character's left arms when character has "Injured" state.

The third player is to play the HandTied animation on the character's upperbody when character has "Handtied" state.

Then I set up two Triggers in the level, adding 10 seconds of Injured state and 5 seconds of Handtied state to the character respectively.

When the OverlayMode is set to "OverlayMode.Demo", the blending result is as follows:
You can see that if there are both Injured and Hantied states, Hantied animation will be played first (because it is the highest priority overlay in the Overlays array). When the Hantied state is gone, it will return to the Injured state. When the injured state is gone, dance animation will play on upperbody.
Video Reference
Pose based overlay system
Overview
The key to this overlay system is to use single-frame poses in different situations and blend them with the basic locomotion animations, while controlling the blending weights through animation curves.
If you have used the Advanced Locomotion System (ALS) before, you should be quite familiar with this. However, this functionality has been improved in the Generic Movement System (GMS).
Adding Curve Modifiers to Poses
GMS provides an animation modifier, AM_CreateLayeringCurves
, which helps you quickly create animation curves.
Curve Description

The non-Additive curves:
Determines how much of the Pose is adopted for that part of the body (like switches, e.g. LayerArmLeft=0 would not use the left arm Pose at all, LayerArmLeft=1 would be full adoption).
The Additive curves:
Determines how much of the current underneath locomotion is retained after a Pose has been layered on top of it (LayerArmLeftAdditive=1 means that the Pose completely covers the left hand movement, =0.5 means that half of the underneath movement will remain).
Example
This example comes from the movement definition in the providedproject: MS_Mannequin_ALS
.
Using Pose-Based Overlay anim layer setting
First, in your movement set settings, you should select “GMS Anim Layer Setting Overlay Pose Based.”

You can then add multiple Overlay Modes, which you should switch in your game based on different weapons.

Bow Overlay(Simple Type)
This layering uses a simple type.

When the Overlay Mode is set to Bow, it will be based on the Base Pose. In the Idle state, it blends the action from A_GMS_Bow_Poses at frame 0.15 with the current locomotion action. While moving, it blends the action from A_GMS_BowPoses at frame 0.183 with the current locomotion action.
Default overlay mode(no blending):
Bow overlay mode:
You achieve this result with just two single-frame poses, without needing an entire animation pack!
Layered Overlay Poses (Complex Type)
In addition to the simple version, you can also use the complex version, which employs LayeredPoseSetting. This setting looks for the first pose that matches the tag query based on the character's current tags and applies it.

Result:
Of course, you need to configure it more meaningfully, depending on your game.
Take archers for example: in certain situations, such as alert situations, the stance of the archer holding the bow will change dynamically.
If you wish to add multiple Overlay Modes, you can also choose not to use layered poses.
Creating a New Overlay Mode from Scratch
You can also check out this video to see how I created a new overlay mode from scratch (start watching from 3:05):
How to choose?
In most cases, you can mix the two methods, ie:
- You have multiple animation packs, but pack A has some animations that pack B doesn't have, and pack B has some animations that pack A doesn't have, at which point you can make up for the lack between by using stack based overlay.
- You could also have a high quality unarmed animation package that is more neutral, and then use the unarmed movementset in conjunction with a number of different OverlayModes to achieve different stances.
You could even:
- Use different overlay systems for different movement sets in one movement definition.
- External systems to influence the character's animation performance, such as applying the character different Buffs to add different GameplayTags and influence the animation;or applying the character different GameplayTags for being in different weather zones and having the character's animations react to the weather.
It is more preferable to use stacked overlays if you fulfil the following conditions:
- You have different animation packages from different authors, or you have a dedicated animator.
- You need to show the character's personality through different actions.
Pose stacks are preferred if you meet the following conditions:
- You have a higher quality neutral unarmed animation pack.
- You are short of budgets and focus more on functionality than personalisation.