Build an RPG or JRPG in FXGL — define character stats (ATK, DEF, HP, MP, SPD, XP/level), implement an experience and leveling system with stat growth, create a turn-based battle scene that transitions from overworld exploration, build an equipment system that modifies effective stats, implement status effects (poison, stun, burn) that persist across turns, define abilities with MP cost and target types, trigger encounters on NPC contact or random steps, display a battle menu (Attack/Skill/Item/Run), show loot and XP rewards on victory, and save the full party state with SaveLoadService. Use this skill when building a classic RPG, JRPG, turn-based adventure, or any game with stats, leveling, and structured battle sequences.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Build an RPG or JRPG in FXGL — define character stats (ATK, DEF, HP, MP, SPD, XP/level), implement an experience and leveling system with stat growth, create a turn-based battle scene that transitions from overworld exploration, build an equipment system that modifies effective stats, implement status effects (poison, stun, burn) that persist across turns, define abilities with MP cost and target types, trigger encounters on NPC contact or random steps, display a battle menu (Attack/Skill/Item/Run), show loot and XP rewards on victory, and save the full party state with SaveLoadService. Use this skill when building a classic RPG, JRPG, turn-based adventure, or any game with stats, leveling, and structured battle sequences.
triggers
["RPG","JRPG","turn-based battle","stats","ATK DEF HP MP","leveling","XP experience","equipment","status effect","ability","random encounter","battle scene","party system","overworld"]
BattleSubScene over the overworld — use getSceneService().pushSubScene() not
setLevelFromMap(). The overworld should resume exactly where it was after the battle ends.
turnOrder must be rebuilt after enemy deaths — removing a dead enemy from turnOrder
while iterating throws ConcurrentModificationException. Use removeIf between turns.
Minimum damage of 1 — always Math.max(1, damage) after subtracting defense. Zero
or negative damage from heavy armor frustrates players and stalls fights.
Status effect icons in HUD — display small icons for active status effects per character
in the battle HUD. Players need to see that poison is ticking.
gainXP may level up multiple times in one call — the while loop handles this. Don't
use if instead of while or the player could lose XP from defeating high-XP enemies.
Encounter rate on steps — check isPlayerMoving() not onUpdate(tpf) for step counting.
Ticking encounter rate every frame at 60fps = 60× faster encounter rate than expected.
Battle scene must be pausable — on ALT+TAB or window minimize, the battle should pause.
Wrap all runOnce timers in a paused check or use getGameController().pauseEngine().