Action Battle System
Advanced real-time action combat AI system for RPGJS. The AI controller manages behavior only. All stats, HP, SP, skills, items, classes, and states are configured with the standard RPGJS API. Combat happens in real time directly on the map: there is no separate battle scene. Players and enemies keep moving on the same map while they fight.Features
- Adventure combat by default: three-hit player combo, charged attack, and dodge invulnerability
- Reuses the standard RPGJS HUD and graphic-bound entity components
- Impact visual preset with particles, animated combat typography, and camera shake
- State machine AI with
Idle,Alert,Combat,Flee, andStunned - Multiple enemy types:
Aggressive,Defensive,Ranged,Tank,Berserker - Attack patterns:
Melee,Combo,Charged,Zone,DashAttack - Skill support with standard RPGJS skills
- Dodge and counter-attack behaviors
- Group behavior and waypoint patrols
- Knockback driven by weapon configuration
- Hook system with
onBeforeHitandonAfterHit
Installation
Enable the module
Register the module on the server:provideActionBattle from @rpgjs/action-battle/client, used to configure client-side visuals and UI. See Recommended composable DX.
Quick Start
EventDefinition.
The returned object only describes the event behavior. Placement data such as id, x, and y
still belongs to the outer maps[].events wrapper.
How a fight starts
There is no explicit call to start a fight. An event with aBattleAi engages
the players (or other entities) selected by its targets option when they come
within its visionRange, and players attack with the action control.
See Factions and targets
and Player combat.
Next steps
- Player combat: combo, charged attack, dash, guard, Studio skills, shortcuts and knockback.
- Skills and weapons: skill and weapon actions, projectiles, attack profiles and thrown items.
- Enemies and AI: enemy types, attack patterns, AI configuration, behaviors and debugging.
- Solo and multiplayer: factions, targets, PvP, teams and MMORPG mode.
- Customization: composable configuration, visuals, UI, extension points, stats and sounds.