This extension provides a framework for implementing game mechanics. It's inspired by Unreal Engine's Gameplay Ability System.
- Installation
- Class overview
- Tutorial (coming soon)
- Clone this repository somewhere into your project files
- Update
ability_system.gdextensionwith the path to thebinfolder in your project, if necessary - Open or restart Godot
- Copy the
binfolder, theassetsfolder (for the icons), and theability_system.gdextensionfile somewhere into your project - Update
ability_system.gdextensionwith the path to thebinfolder and theassetsfolder in your project, if necessary - Open or restart Godot
Follow the regular installation steps first.
- Restart your editor
- Make sure
AbilitySystem.csis copied somewhere into your project - In Godot's menu bar, click:
Project→Tools→Ability System→Generate C# Bindings - Build your project
This node can be added as a child to give its parent access to abilities, tags, attributes, etc.
An ability defines an action or skill that can be granted to any node that has a child AbilitySystem.
- Restore health
- Do an attack
- Find an object
An ability event defines the state of an Ability after activation. This class controls the ability's Effects.
Attributes are a numerical value representing some in-game property.
- Health
- Hunger
- Intelligence
An effect defines what happens in-game when an Ability is activated.
This is where the bulk of your custom game logic will go. It has access to the AbilitySystem so an effect can read tags, modify the scene tree, or really anything else.
- For an attack spell ability, the effects could be...
- Decrease the mana attribute
- Play a cool spell animation
- Decrease health of any enemies in the surrounding area
- For an object finding ability, the effects could be...
- Locate the object within the world
- Move character to the object
- Play pick up animation
AttributeEffect- modifies anAttributeTagEffect- adds or removesTags fromAbilitySystemWaitEffect- arbitrarily delaysAbilityEventTryActivateAbilityEffect- attempts to activate anAbilityon theAbilitySystemLoopEffect- runs all the previous effects again
Tags are names that classify and describe the state of an AbilitySystem node. They can be used together with abilities to create super dynamic states.
spells/is_castingspells/has_cast_recentlyis_sleepy
These classes are mainly used for debugging purposes. They are Control nodes that can be added to your scene. Each of them export an AbilitySystem property and will be reactive to changes on that AbilitySystem. They work both in-editor and in-game.
A container for the other viewer nodes. Displays Tags, Attributes, AbilityEvents, and Abilitys when provided an AbilitySystem.
Displays Tags when provided an AbilitySystem.
Displays Attributes and their values when provided an AbilitySystem.
Displays AbilityEvents when provided an AbilitySystem.
Displays Abilitys when provided an AbilitySystem.