Skip to content

Animations ​

The animation library holds the animations of the game, sorted into animation packs, one for each entity type: one set for humanoid, another for monster, humanoid_female and so on. Entity Assets > Animations lists the packs (entity types) and edits the animation map of the selected one, which says which animation plays for walking, running, blocking, dying and the rest.

The animations are files under res://src/data/animations/:

text
animations/
  humanoid/                         an animation pack (one for each entity type)
    animation_map.tres              which animation plays for what (made for you)
    core/                           a section
      movement/walk/                a category and a subcategory
        walk_f.res  walk_b.res ...  the animations
      combat_system/dodge/
      death/   interact/
    weapon_animations/              the weapon section: one folder for each Weapon Profile
      one_hand/                     a weapon profile
        attack/  stance/  block/    its clips by role
      unarmed/
    ability_animations/             another section
      casting/  spell_cast/  special_attack/
    social/
      emotes/  actions/  random/talk/
    status_effects/
  humanoid_female/                  another animation pack

The demo has humanoid, humanoid_male and humanoid_female.

Words used here ​

WordWhat it means
Animation packThe whole set of animations of one entity type: a folder under src/data/animations/
Parent packThe pack another pack inherits from (see Parents)
SectionOne of the folders of a pack (the table below)
Weapon profileOne way of fighting (One Hand, Bow, Unarmed ...), with a folder in the weapon section of every pack. See Weapon Profiles

Sections ​

The sections are fixed; you fill their folders. The folders of the weapon section are made by the weapon profiles.

SectionCategoriesWhat it is for
coremovement, combat system, death, interactWhat every entity needs: idles, walk and run in eight directions, crouch, sprint, strafe, turn, jump, fall, landing, swim (also up and down), fly; dodge and hit; death; using an object
weapon_animationsone folder for each weapon profileWhat a weapon does: its attacks, its combat idle (stance), its block, putting it away and drawing it, and for a ranged weapon its aim and reload
ability_animationscasting, special attack, spell castWhat an ability plays: the wind-up of a cast, the release of a spell, a special attack. (An ability that uses the weapon in hand plays the weapon section.)
socialactions, emotes, randomEmotes (picked at random), small actions with a start, a loop and an end, and idle behaviour such as talking
status_effectsone folder for each effectWhat an entity does while it is stunned, frozen, feared and so on: a start, a loop and an end animation

The way the folders are arranged in a category is one of four patterns: flat (animations in the folder), categorized (subfolders, each a kind of animation), flat categorized (subfolders that each hold several animations, one picked at random), and three phase (a start, a loop and an end).

Packs made before the weapon section

A pack from before weapon profiles has the old folders ability_animations/weapon, aim and reload, the combat idle, block, sheathe and unsheathe in core/combat_system, and lists of them in the animation map. They keep working. Weapon Profiles has three buttons that move them into the profile folders.

Parents ​

A pack can inherit from another. A humanoid_female that has no jump animation uses the one from humanoid. Choose the Parent Pack on the pack; every animation it does not have of its own is taken from the parent, and the parent's parent after that. This lets one base set serve many body types, and each one overrides only what is different. The weapon section works the same way: a pack with no attack clips in one_hand plays the parent's.

The editor ​

ControlWhat it does
The listThe packs. Select one to edit its map
Settings > Create New PackMakes a pack: its folders (including the folders of every weapon profile) and its animation_map.tres. You can pick a parent
Settings > Validate All AnimationsChecks every pack and tells how many have problems
Settings > Build Animation LibraryBuilds the Godot AnimationLibrary of one pack, to look at or to use in your own animation tree
Parent PackThe pack this one inherits from, or none
The mapOne drop-down for each animation: pick the file that plays. The groups are Movement (idles, walk, crouch walk, run, sprint, strafe, turn, crouch turn, jump, fall, landing, swim, fly: each fly animation that is empty plays the swimming one, see Flying), Combat System (dodge and hit, and the old combat idle, block, sheathe and unsheathe lists while a map still has something in them), Death and Interact Object

An animation left empty falls back to the parent's. Opening the tab also makes the folders of the weapon profiles in every pack that lacks them.

Trigger animations ​

A trigger tag with Has an animation adds a list to every pack. They are in the Triggers section of the map (above the others), one block for each trigger:

  • The clips are files in the folder core/combat_system/triggers/ of the pack (put them there like any animation). Tick the clips a trigger plays; one is picked at random each time.
  • A trigger that depends on the weapon has a list for unarmed and one for each weapon profile of the project. The creature plays the list of the weapon it holds, else the unarmed one, else the trigger's own list.
  • A creature with no clip for a trigger plays the clip of the trigger it falls back to (Parry uses Dodge), and then nothing.
  • A pack without a list for a trigger takes it from its parent.

The animations of triggers are stored in the map by the slot name of the trigger (parry, parry/one_hand): renaming a trigger's slot makes the maps lose their lists.

Where animations are chosen ​

  • The Animation type of an NPC, character or class is a pack from this library.
  • A weapon class or an NPC picks a weapon profile: the attack, stance, block, aim and reload clips of the weapon.
  • An ability picks the animation it plays: a casting or special attack from the ability section, or the weapon in hand.
  • A status effect can play a looping animation while it lasts.

See also ​