
godot-turn-system
Expert blueprint for turn-based combat with turn order, action points, phase management, and timeline systems for strategy/RPG games. Covers speed-based initiative, interrupts, and simultaneous turns. Use when implementing turn-based combat OR tactical systems. Keywords turn-based, initiative, action points, phase, round, turn order, combat.
- Installs
- 357
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-turn-system- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-turn-system automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
NEVER Do (Expert Anti-Patterns)
Order & Determinism
-
NEVER recalculate turn order every action; strictly sort once per round or ONLY when a speed-relevant stat changes to prevent O(n log n) lag.
-
NEVER use random tie-breaking for initiative; strictly use a secondary static attribute (Agility, ID, or persistent "luck") for deterministic replays.
-
NEVER modify an active turn-order queue while iterating it; strictly iterate over a
duplicate()or apply queue modifications after the loop. -
NEVER broadcast global turn state changes using immediate
call_group(); strictly usecall_group_flags(SceneTree.GROUP_CALL_DEFERRED, ...)to prevent frame spikes when notifying hundreds of units. -
NEVER rely on the Node hierarchy as the source of truth; strictly use a Dictionary board state for logical grid coordinates.
Logic & Action Economy
- NEVER deduct Action Points (AP) before validation; strictly call
can_perform_action(cost)before applyingcurrent_ap -= costto prevent exploits. - NEVER hardcode phase transitions (
if phase == 0); strictly use an enum + match or a dedicated State Machine for Draw/Main/End phases. - NEVER emit "Turn Ended" before internal cleanup; strictly reset AP and tick status effects BEFORE signaling the next turn.
- NEVER use exact floating-point equality (
==) for AP checks; strictly use>=oris_equal_approx()for robust comparisons.
Tactical Grid & UI
- NEVER use generic
AStar2Dfor tile grids; strictly useAStarGrid2Dfor 10x faster pathfinding and native diagonal handling. - NEVER forget to call
update()onAStarGrid2Dafter changing obstacle states; if you toggleset_point_solid(), the grid MUST refresh before the next query. - NEVER lock the main thread with
whileloops for input; strictly use the await keyword or signals to yield execution back to the Tree. - NEVER handle turn decisions with
is_action_pressed(); strictly useis_action_just_pressed()for discrete, frame-locked menu input. - NEVER skip turn timeouts in networked games; strictly implement a server-side timer with a default "pass" action to prevent griefing. See Networked Turn Timeout golden path below.
Decision Tree — Pick a Turn Model
| Need | Choose | MANDATORY script |
|---|---|---|
| Discrete rounds (chess / tactics / card phases) | Round + initiative queue + AP phases | turn_system_patterns.gd |
| Continuous gauges (FF-style ATB) | Per-actor gauge fill in _process | active_time_battle.gd |
| Timeline / CTB with interrupts & prediction | Event timeline + predictive UI | timeline_turn_manager.gd |
Do NOT invent a fourth model inline. Read the matching script before coding.
Expert Components (scripts/)
- turn_system_patterns.gd — Match-based phase machines, UndoRedo,
AStarGrid2Dboard helpers. - active_time_battle.gd — ATB gauges, pause-on-ready, async action handoff.
- timeline_turn_manager.gd — Timeline / CTB with interrupts and pre-visualization.
- turn_predictor.gd — Simulate ATB gauges for timeline UI preview.
- combat_stats_resource.gd — Deterministic damage preview Resource for hover UI.
TurnManager Autoload — Interface Contract Only
Keep the Autoload thin. Do not paste full queue math here — implement in the script chosen above.
# turn_manager.gd (AutoLoad) — contract only
extends Node
signal turn_started(combatant: Node)
signal turn_ended(combatant: Node)
signal round_ended
signal turn_timed_out(combatant: Node) # multiplayer: server default-pass
func start_combat(participants: Array[Node]) -> void: pass
func end_turn() -> void: pass
func request_pass(combatant: Node) -> void: pass # default action on timeout
Networked Turn Timeout (Golden Path)
Referenced from NEVER: server owns the clock; clients never decide "pass."
- On
turn_started, server starts a one-shotTimer/SceneTreeTimer(authoritative). - On timeout: server calls
request_pass(current)(or auto-end-turn), then emitsturn_timed_out. - Clients only render the countdown; never mutate the turn queue locally.
- Pair with godot-multiplayer-networking for host-auth RPC.
Action Points (Contract)
func can_perform_action(cost: int) -> bool:
return current_action_points >= cost
func perform_action(cost: int) -> bool:
if not can_perform_action(cost):
return false
current_action_points -= cost
return true
Phases: prefer enum Phase { DRAW, MAIN, END } + match, or route to godot-state-machine-advanced. Full ATB / timeline math lives in the MANDATORY scripts — do not duplicate Elite snippets here.
Deep recipes (on demand)
LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in
scripts/— never delete, only move.
| Topic | Reference |
|---|---|
| ATB / prediction / previews | elite-turn-patterns.md |
Reference
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.
Official Documentation
- Idle and Physics Processing — When turn ticks belong in
_processvs_physics_processvs pure event steps. - Using signals — Turn-start / turn-end / unit-acted events without polling gauges.
- Resources — Initiative/speed stats as Resources for sim and UI prediction.
- Singletons (Autoload) — TurnManager ownership boundaries.
- GDScript basics —
awaitsequencing for multi-phase turns. - Object — Signal connect flags for turn bus listeners.
- SceneTree — Pausing gameplay while menus resolve turn choices.
- Timer — Optional realtime turn clocks without busy loops.
- Tween — Animating ATB gauges and turn handoff juice.
- AnimationPlayer — Action animations that must finish before the next turn.
- MultiplayerAPI — Authoritative turn order in networked matches.
- JSON — Deterministic turn replay / seed logs for balance labs.
Related Skills
Prerequisites
- godot-project-foundations — Scene and Autoload placement for TurnManager.
- godot-signal-architecture — Turn bus contracts (signals up, commands down).
- godot-resource-data-patterns — Speed/initiative Resources shared with combat/UI.
- godot-autoload-architecture — Lifecycle of a global turn orchestrator.
Complements
- godot-state-machine-advanced — Per-unit states nested under turn phases.
- godot-combat-system — Actions resolved inside a granted turn.
- godot-rpg-stats — Speed/AGI feeding ATB gauges.
- godot-ability-system — Cooldowns measured in turns, not wall-clock only.
- godot-tweening — Gauge fill and handoff presentation.
- godot-multiplayer-networking — Host-auth turn order and lockstep.
Downstream / consumers
- godot-genre-action-rpg — ATB/turn hybrids in ARPG/JRPG-adjacent combat.
- godot-genre-card-game — Card turns and priority windows.
- godot-genre-rts — Discrete orders in strategy loops.
- godot-monte-carlo-balancer — Simulate turn matrices for speed/action fairness.
Master
- godot-master — Library router and mirrored module entry for turn systems.
FAQ
What does the godot-turn-system skill do?
Expert blueprint for turn-based combat with turn order, action points, phase management, and timeline systems for strategy/RPG games. Covers speed-based initiative, interrupts, and simultaneous turns. Use when implementing turn-based combat OR tactical systems. Keywords turn-based, initiative, action points, phase, round, turn order, combat.
How do I install godot-turn-system?
Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-turn-system in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-turn-system/ (personal) or .claude/skills/godot-turn-system/ (project).
Which AI agents can use godot-turn-system?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-turn-system safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains godot-turn-system?
It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 357 recorded installs.
More from thedivergentai/game-dev-agentic-skills
godot-master
thedivergentai/game-dev-agentic-skills
Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.
godot-shaders-basics
thedivergentai/game-dev-agentic-skills
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.
godot-2d-animation
thedivergentai/game-dev-agentic-skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
godot-ui-theming
thedivergentai/game-dev-agentic-skills
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.
godot-gdscript-mastery
thedivergentai/game-dev-agentic-skills
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.
godot-particles
thedivergentai/game-dev-agentic-skills
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available