All skills
thedivergentai avatar

/godot-ability-system

@9d6e91e

Expert patterns for RPG/action ability systems including cooldown strategies, combo systems, ability chaining, skill trees with prerequisites, upgrade paths, and resource management. Use when implementing unlockable abilities, character progression, or complex skill systems. Trigger keywords: PlayerAbility, AbilityManager, cooldown, SkillTree, SkillNode, prerequisites, can_use, execute, ComboSystem, ability_chain, global_cooldown, charge_system, upgrade_path.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-ability-system

This session only. Nothing lands on disk.

referenceselite-ability-patterns.md

≈711 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Elite Ability Patterns (load on demand)

MANDATORY when implementing combos, charge abilities, skill trees, status DoTs, or networked casts beyond Golden Path scripts. Do not paste these into SKILL.md or scenes from memory.

Cooldown strategies

Strategy When Notes
Per-ability Default Independent timers per ability_id — see ability_manager.gd
Global cooldown (GCD) Anti-spam hotbars 0.5–1.5s shared lock after any cast
Shared family cooldown Hearthstone-style summons One timer blocks all abilities in a tag group
Charge recharge Mobility spells charge_ability.gd — tick in _physics_process

Status effects — duplicate trap

CAUTION: Applying a status template without duplicate(true) mutates the shared .tres for every character. Always append effect_template.duplicate(true) in status_effect_manager.gd.

Tick process_tick on the physics step via the manager's _physics_process, not _process, so DoT timing stays deterministic under frame spikes.

Cooldown persistence (save/load)

WHY absolute end timestamps: Saving raw remaining_time floats lets players roll back the clock or reload to wipe cooldowns.

# Save: ability_id -> unix_time_when_cooldown_ends
data[ability_id] = Time.get_unix_time_from_system() + remaining

# Load:
remaining = max(0.0, data[ability_id] - Time.get_unix_time_from_system())

Animation lock

Gate can_use while is_casting or attack animations play. Wire AnimationPlayer.animation_started/finished to flip is_casting — interrupting mid-cast without on_cancel() refunds causes desync.

Combo chains

combo_tracker.gd — windowed sequences; finisher abilities stay normal AbilityResource entries granted only via combo_triggered signal.

Skill tree architecture

  • Progression data: skill_node.gd + skill_tree_manager.gd — duplicate templates per player save.
  • Combat casts: Scene-scoped ability_manager.gd on the caster — skill tree grants Resources; never get_node("/root/AbilityManager") for combat.
  • Design-time graphs: @tool GraphEdit visualizer for prerequisite auditing (optional editor script).

Networking

ability_caster_network.gd — client predicts VFX/audio immediately; server validates costs and emits confirm/cancel RPCs. Server wins on mismatch.

Object pooling policy

GDScript refcounting makes pools optional for light VFX. Do pool when profiler shows allocation spikes from high-frequency projectiles/AoE spawn/despawn.

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    No security issues were detected. The skill provides standard, well-structured patterns for RPG ability systems in Godot, adhering to best practices such as scene-scoped managers, physics-frame timing for cooldowns, and resource duplication to prevent state contamination.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    4/4 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-ability-system