Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jame581/ability-system
Use when building character abilities — Resource-based abilities with cost/cooldown/cast, buffs/debuffs, stat modifiers, gameplay tags, and HUD binding
Passed 20 of 22 test cases with the skill, and 12 of 22 without it.
and 13 more in the full report
8 fixed12 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a GDScript Resource class script named Ability exporting name, resource cost, cooldown duration, and cast time with default values.
| Checked | Without skill | With skill |
|---|---|---|
| Exports cost with a default value of 0.0, cooldown of 1.0, and cast_time of 0.0 in Ability. | Missed | Passed |
The instructions your model reads when the skill loads.
Build a data-driven ability system from Godot-native parts: abilities are Resources, an AbilityComponent node owns and runs them, and effects/stats/tags compose on top. No third-party addon required.
Related skills: resource-pattern for the
Resourcedata containers, component-system for the component node pattern, event-bus for cross-system ability events, state-machine for caster states (e.g. casting/stunned), hud-system for cooldown UI.
An ability system in Godot 4.x is built from three collaborating layers:
Data layer — Ability (Resource): Each ability is a Resource subclass with exported fields (ability_name, cost, cooldown, cast_time) and two methods: can_activate(caster) -> bool to validate preconditions, and activate(caster) -> void to execute the effect. Storing abilities as Resources lets designers create and balance them in the Godot editor without touching code.
Behaviour layer — AbilityComponent (Node): A single node added to any entity that should use abilities. It holds the granted ability set, enforces cost/cooldown, and drives the Ability.activate() call. Four signals keep the rest of the game informed without coupling: ability_activated(ability), ability_failed(ability, reason), cooldown_started(ability, duration), and cooldown_finished(ability). Grant new abilities at runtime with grant(ability) and trigger them with try_activate(ability_name).
Effects layer — stat modifiers, buffs/debuffs, and gameplay tags: Abilities can read from and write to a caster's StatSet (a Resource that owns a dictionary of named StatModifier entries) to apply temporary or permanent stat changes. A GameplayTagContainer node (a child of the caster) gates activation — for example, a "stunned" tag can prevent any ability from firing. These three deep-dives are covered in the reference documents:
Core rule: Data in Resources, behavior in the component, communication via signals.
This separation means an Ability resource carries no Node references and can be safely duplicated, saved, and loaded as any other Godot Resource. The AbilityComponent owns runtime state (cooldown timers, active ability set), keeping Ability resources stateless and reusable across multiple casters simultaneously.
# ability.gd
class_name Ability
extends Resource
@export var ability_name: String
@export var cost: float = 0.0
@export var cooldown: float = 1.0
@export var cast_time: float = 0.0
test cases passed, vs 12 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.