
This gives you the architecture for RPG and action game ability systems with cooldown management, resource costs, and cast timing. It's opinionated about common mistakes: uses timers instead of _process for cooldowns, enforces global cooldown to prevent ability spam, saves cooldown end times as Unix timestamps to avoid clock exploits, and pushes you toward resource-based abilities instead of giant switch statements. The ability manager is decoupled so you can attach it to players, enemies, or turrets. Includes concrete examples like a fireball projectile ability and patterns for combo systems and skill trees. Good starting point if you're building character progression or unlockable abilities and want to avoid the usual timing bugs and state machine issues.
$ npx -y skills add thedivergentai/gd-agentic-skills --skill godot-ability-system --agent claude-codeInstalls into .claude/skills of the current project.
| Scope | Policy | Script |
|---|---|---|
| Per character / enemy / turret | Scene-scoped manager as child (default) | ability_manager.gd or composition ability_container.gd on the entity |
| Shared unlock / loadout catalog across scenes | Autoload catalog / progression only (ranks, unlock flags) — not live cast state | Thin Autoload data; casts still go through the entity manager |
| Global "cast any ability anywhere" Autoload | Avoid | Breaks encapsulation and multiplayer authority |
Resolved policy: Live cooldowns, GCD, and execute() run on a scene-scoped AbilityManager / AbilityContainer under the caster. Autoloads may store unlock ranks; they must not be the combat cast oracle. Skill-tree UI reads/writes progression data, then calls into the caster’s manager — never /root/AbilityManager.use_* for combat.
Sponsors