13. Action battles
In short: Action battles are fought live. The player swings a sword, rolls, guards, parries, aims a gun or casts a spell, and the enemies do the same, all on the party, classes, abilities, items and statuses you already built for the other modes. Use it for a sword game, a shooter, or a hybrid. The fight happens where the party stands (in a bounded arena or in the open), alone or in co-op.
13.1 Basics
13.1.1 What an action battle is
An encounter is an action battle when its Battle Mode is Action (Battle.Mode.Action). Nothing else about the encounter changes: enemies, levels, rewards, loot and story effects are the same fields as in any other encounter. Start it like any battle: a story effect that starts an encounter, or an Encounter Trigger with its Action Encounter set (walk in and the battle starts where the party stands).
Every action battle is framed one of two ways (a rule of its rules profile):
| Framing | What the player sees | How it ends |
|---|---|---|
| Bounded (default) | A combat area with a banner and a ring on the ground, then a results screen | The enemies fall, the party falls, or every party member stays outside the area for a few seconds (fled) |
| Open | No results screen: loot appears as toasts and the world carries on | The enemies fall, the party falls, or the party gets far enough from every enemy for long enough (fled) |
Bounded fits arenas, bosses and set pieces. Open fits roaming enemies in a living world. Victory and defeat use the same objectives as every other mode. Defeat shows the game over screen, and Retry puts everyone back where they stood. There is no saving during a battle, as in every mode.
13.1.2 Three presets
All numbers of the mode are one settings section, Action Battle, and also a section of every rules profile. Three presets set every number to a starting point (Apply Preset on the section, or one of the shipped rules profiles):
| Preset | Profile | Feel |
|---|---|---|
| Melee | DA_Rules_Action_Melee | Cooldown abilities, guard and parry, 0.3 s of i-frames on a dodge |
| Shooter | DA_Rules_Action_Shooter | Cooldown abilities, no guard or parry, a short roll, strong aim assist, long lock-on |
| Hybrid | DA_Rules_Action_Hybrid | A gauge that hits fill and abilities spend (no cooldowns), guard and parry |
The Game Foundation can also start a project as an action game: the presets Action: Swords and Action: Shooter (Studio → Foundation) turn the Action mode on, write the matching preset into the Action Battle rules and make Action the mode new battles start with. See Game foundation and archetypes.
13.1.3 Your first action battle
- In RPG Saga Studio, open World → New Action Battle.
- Pick a preset, a bounded area (with its radius) or an open fight, the enemies, and optionally a weapon per class.
- Press Simulate. The real-time AI plays quick headless battles on both sides and tells you how fair the fight is (Easy, Fair, Hard, Very hard).
- Press Create. The wizard makes the Action encounter, plus a small rules profile if the framing or the area differs from the preset. It can place an Encounter Trigger in front of the camera.
- Play. The example map
/RPGSagaEngine/Examples/Maps/L_RSE_ActionArenahas a Melee, a Shooter and a Hybrid encounter.
If a character has no weapon, everyone punches: link an Action Weapon from the character's equipment, or set a Default Weapon in the rules.
13.1.4 Default controls
All keys are remappable in Project Settings → Action Battle (Presentation) → Input, or give your project its own Input Mapping Context.
| Action | Keyboard and mouse | Gamepad |
|---|---|---|
| Light attack / fire | Left mouse | Right trigger |
| Heavy attack | F | Right shoulder |
| Aim | Right mouse | Left trigger |
| Guard | Q | Left shoulder |
| Parry | E | Top face button |
| Dodge | Space | Right face button |
| Lock on | Middle mouse | Right stick click |
| Next / previous target | Mouse wheel | D-pad right / left |
| Switch character | Tab | D-pad up |
| Reload | R | Left face button |
| Party orders | G, then 1 to 5 |
13.2 How it works
Encounter (Battle Mode = Action) starts where the party stands
-> URSEActionBattleSubsystem::StartEncounterBattle spawns the director
-> ARSEActionBattleDirector builds a URSEActionBattle (RSECore) and binds each character
-> input -> URSEActionControlsComponent -> FRSEActionCommand -> URSEActionBattle::ExecuteCommand
-> the battle steps at a fixed rate (Step Seconds): phases, stamina, poise, cooldowns, projectiles
-> hits are claimed by the presentation (animation windows, traces, projectile actors); the host validates every claim
-> events -> URSEActionCombatComponent plays montages, effects and hit reactions; the HUD follows
The simulation is separate from the picture. URSEActionBattle in RSECore advances in fixed steps (StepSeconds, 1/30 s by default), so a seed replays exactly and the battle can run headless in the simulator and in tests. The presentation in RSE moves characters, plays animation, claims hits and draws the HUD.
Every action has phases. Windup (telegraphed), Active (it can hit now), Recovery. Dodges have i-frames. Guarding reduces damage and drains stamina, and a block that runs out of stamina is a guard break. A parry is a timed guard that staggers a melee attacker. Poise absorbs hits until the unit staggers.
Hits are claimed, then checked. The character's attack opens a hit window (from an RSE Action Hit Window animation notify state, or from the action's own timing). The presentation claims what the attack touches. The battle accepts a claim only if the action exists, it is inside the active window (plus a latency tolerance), within reach (plus a tolerance), and only once per victim. This is the same check that keeps co-op honest.
Abilities in real time. Every ability you already have works at once. Without its own Action rules, an ability gets derived rules from its other data: self abilities stay on the caster, allies are healed or buffed directly, enemies within a tile or so are melee, enemy areas become areas (tiles times meters per tile), everything else is a projectile. Damage, element, statuses, shields, reactions and costs remain the ability's shared data, so the same effects resolve in every mode. Statuses run on a per-unit clock (Seconds Per Turn is "one turn").
Ability pacing is one big choice (Ability Pacing in the rules): Cooldown (each ability has a cooldown), Gauge (hits dealt, hits taken and parries fill segments, abilities spend them) or Resource Only (MP and similar, no cooldowns).
13.3 Key classes and assets
| Class / asset | Module | Role |
|---|---|---|
URSEActionBattle | RSECore | The rules and state of one battle: units, phases, stamina, poise, cooldowns, projectiles, claims |
FRSEActionCommand | RSECore | One decision (attack, ability, dodge, guard, ...) as plain data |
URSEActionRules | RSECore | Rules (Project Settings → Action Battle), a rules-profile section |
URSEActionWeaponData | RSECore | Data asset: a weapon with combos, fire modes, block and parry permissions |
URSEActionComboData | RSECore | Data asset: a chain of combo steps (power, windup, windows, hitbox, montage section) |
FRSEAbilityActionRules | RSECore | Per-ability real-time rules (ActionRules on an ability) |
URSEActionAIRules | RSECore | Real-time AI numbers (Project Settings → Action AI) |
URSEActionAIController | RSECore | The real-time AI for enemies and companions nobody plays |
URSEActionBattleSubsystem | RSE | World subsystem: starts action battles, finds the active director |
ARSEActionBattleDirector | RSE | The presenter of one battle (Blueprintable, not placeable): flow, hits, HUD, camera |
URSEActionCombatComponent | RSE | "RSE Action Combat": what a character does in an action battle |
URSEActionControlsComponent | RSE | "RSE Action Controls": the player's input, lock-on, party orders, switching character |
ARSEActionCameraRig | RSE | The action camera (combat, aim and lock-on profiles) |
ARSEActionProjectileActor | RSE | The projectile actor (Blueprintable) |
URSEAnimNotifyState_ActionHitWindow | RSE | Animation notify state that opens a hit window |
URSEActionPresentationSettings | RSE | Presentation settings (Project Settings → Action Battle (Presentation)) |
URSEActionHUDWidget | RSE | The action HUD |
The shipped weapons live in /RPGSagaEngine/Data/Action: Sword, Dagger, Greatsword, Rifle, Pistol, Shotgun, Bow, Staff and Gunblade. Make your own by duplicating one. The Studio never edits the shipped ones.
13.4 Settings
| Where | What |
|---|---|
| Project Settings → RPG Saga Engine → Action Battle | Every rule of the mode: time step, stamina, dodge, guard, parry, poise, ability pacing and gauge, framing, movement, targeting and aim assist, input buffer, items, derived ability rules, network tolerances, simulator. Also a rules-profile section. |
| … → Action AI | Think rate, positioning, reactions, stamina habits, party orders. Also a rules-profile section. |
| … → Action Battle (Presentation) | Encounter flow, hits, weapon visuals, feel (hit-stop, shake, afterimages), camera profiles, targeting, input, HUD. |
| … → Features → Action Combat | Switches the whole mode off. Action encounters then refuse to start. |
| … → Battle → Default Encounter Mode | The mode new battles start with in the wizards. |
Defaults worth knowing (Action Battle rules):
| Setting | Default |
|---|---|
| Step Seconds | 1/30 s |
| Seconds Per Turn | 5 s |
| Stamina Max / regen | 100 / 35 per second (after a 0.8 s delay) |
| Dodge | 25 stamina, 0.5 s, 0.3 s of invulnerability |
| Block Damage Multiplier | 0.25, Block Angle 140 degrees |
| Parry Window | 0.2 s |
| Poise Max | 100 |
| Framing | Bounded, Bounded Area Radius 25 m, Leave Area Seconds 3 |
| Lock On Range | 20 m |
| Input Buffer Seconds | 0.15 s |
Every number is validated (URSEActionRules::Validate). See Appendix B for the full list.
13.5 Blueprint usage
13.5.1 Start an action battle from a script
- Event (Box Trigger overlap, or a dialog effect) → Get RSE Action Battle Subsystem.
- Start Encounter Battle (Encounter = a Battle Mode = Action encounter, Enemy Actors = the enemies standing in the level, Source = Self).
- Branch on the returned Boolean.
For no-script setups, place an Encounter Trigger and set its Action Encounter. The trigger's validation warns if a Tactics or ATB director is also set, or if the encounter's mode is not Action.
13.5.2 Ask what is going on
- On the subsystem: Is Battle Active, Get Active Director.
- On a character's RSE Action Combat component: Find Action Combat (static, from an actor), Is In Action Battle, Get Unit Id, Get Director, Is Hit Window Open, Get Muzzle Location, Get Character Mesh.
- On the player's RSE Action Controls component: Find Action Controls (from a player controller), Is Action Input Active, Get Controlled Unit, Get Lock Target, Get Soft Target, Is Aiming, Is Guarding, Get Selectable Abilities, Get Selected Ability.
13.5.3 Drive the controls yourself (custom input, touch, scripted scenes)
- Press Input (Input = Light Attack, Heavy Attack, Aim, Guard, Parry, Dodge, Lock On, Next Target, Previous Target and so on, Pressed = true or false).
- Add Look (Yaw Degrees, Pitch Degrees), Toggle Lock On, Lock On Unit, Switch Target.
- Issue Party Order (Order = Free, Follow, Attack My Target, Hold Position, Defend Me), Cycle Party Order, Switch Character.
13.5.4 React to what happens
Bind On Action Event on the RSE Action Combat component (one battle event about this character: it acts, it is hit, it guards...), On Hit Claimed (a hit of this character's attack was claimed), or On Battle Event on the director. A Blueprint character that wants to play its own animations turns Play Action Anims off and plays montages from On Action Event.
13.5.5 Add hit windows to your animations
In a montage or animation, add an RSE Action Hit Window notify state across the frames where the weapon is dangerous. Without it, hits come at the action's timing, which still works but ignores the animation.
13.6 C++ usage
Start a battle and read a character's combat state:
if (URSEActionBattleSubsystem* Action = URSEActionBattleSubsystem::Get(this)) // via the world
{
Action->StartEncounterBattle(Encounter, EnemyActors, /*Source*/ this);
}
if (URSEActionCombatComponent* Combat = URSEActionCombatComponent::FindActionCombat(Character))
{
if (Combat->IsInActionBattle() && Combat->IsHitWindowOpen())
{
// A custom effect while the weapon is dangerous.
}
}
Feed input to a custom pawn without the stock input mapping:
if (URSEActionControlsComponent* Controls = URSEActionControlsComponent::FindActionControls(PlayerController))
{
Controls->PressInput(ERSEActionInput::Dodge, true);
Controls->PressInput(ERSEActionInput::Dodge, false);
}
Extension points:
- A Blueprint or C++ child of
ARSEActionBattleDirector(set in Action Battle (Presentation) → Flow → Director Class) adds its own reactions to the stock presenter. - A child of
ARSEActionProjectileActor(Hits → Projectile Class) gives projectiles their own mesh, trail and impact. - An ability can use custom logic classes as in every mode (see Abilities and statuses).
- Subclass
URSEWeaponPresentationBasedata (an action weapon's Weapon Presentation) to change how a weapon looks when it swings or fires (see Weapons).
13.7 Advanced
13.7.1 Weapons and combos
A weapon is a RSE Action Weapon Data asset, linked from an equipment item (Action Weapon on the item). Units without one use the rules' Default Weapon; units with neither fight with their basic attack and derived rules.
A weapon has:
- a Light Combo and a Heavy Combo (
URSEActionComboData): chains of Steps. Each step names an ability, a Power Multiplier, Windup, Active Time and Recovery, a Combo Window (pressing Attack inside it chains the next step; pressing a little early is buffered), a Cancel Window Start (dodge or guard may cancel from there), Stamina Cost, Poise Damage, an optional own Hitbox and a Montage Section name. A combo can Loop; - Fire Modes for ranged weapons: delivery (hitscan or projectile), ability, fire interval, burst count, automatic, pellets per shot (shotguns), base spread, spread per shot, recoil, magazine size, reload time, an Ammo Item, range with falloff, projectile speed, radius, gravity and pierce. The Light input fires when a weapon has no light combo, and the Heavy input likewise;
- Can Block and Can Parry permissions, and an optional Block Damage Multiplier override;
- a Weapon Presentation (soft reference), and a Melee Hitbox.
13.7.2 Per-ability real-time rules
On an ability, Action Rules → Override lets you set the delivery (melee, projectile, hitscan, area, direct, self), the hitbox, windup, active time, recovery, cancel window, cooldown, stamina, gauge cost, poise damage, reach, projectile speed, radius, gravity, homing and pierce. Leave it off and the derived rules from the rules asset's Derived Ability Rules apply (melee range 2.2 m, windup 0.35 s, recovery 0.45 s, a cooldown from a base plus the resource cost).
13.7.3 The AI
Enemies, and companions nobody plays, are driven by URSEActionAIController: one real-time AI with the same intelligence dial (0 to 1) as the other modes. It thinks on a throttled cadence (0.6 s at intelligence 0 down to 0.25 s at 1, staggered across units), scores options with the shared utility brain plus real-time terms (travel time, windup to interrupt, stamina reserve), samples where to stand (rings, distance, danger, flanking, cover, line of sight, retreat, the combat area), and has a reactive layer that answers telegraphs and incoming projectiles with a parry, a block or a well-timed dodge. The reaction chance runs from 5 percent at intelligence 0 to 90 percent at 1, and reaction time and timing error follow it. Combat roles act in real time: tanks intercept and guard, snipers keep their range, controllers disable first, supports heal and buff, berserkers press. See Enemy AI and adaptive difficulty.
13.7.4 Party orders
Companions follow live orders: Free, Follow, Attack My Target, Hold Position, Defend Me. The order wheel opens on G (or keys 1 to 5). Switch Character hands control to another member, and the one left behind is driven by the AI with its order. Orders go through the command bus, so Co-op Rules → Companion Orders decides who may order whom.
13.7.5 Camera and feel
The camera has three profiles (Combat Camera, Aim Camera, Lock On Camera) with a collision probe and a trauma shake, blended over Camera Blend Seconds. Feel settings give hit-stop (their own time only, never the world's, so co-op is safe), shake on hits dealt, taken and heavy, dodge afterimages, bursts for hit, block and parry, a muzzle flash and a shot color. See Camera and battle presentation.
13.7.6 Finishers
A kill or stagger by a player can play a finisher, a paired animation between attacker and victim from the Animation & FX Library's paired clips. Players choose Off, Sometimes or Always in Options → Finishers. It never changes who wins and is skipped when no pair fits. See Character visuals and animation.
13.7.7 Co-op
The host runs the battle. Guests see it live and claim the hits of their own character. Hit claims are validated by the host (the action, the active window plus a latency tolerance, the reach plus a tolerance, once per victim). The tolerances, the position history length and the mirror rate are rules (Network section of Action Battle), and a guest's predicted dodge is smoothed rather than snapped (Dodge Reconcile settings). Action encounters stay live in co-op; they are never converted to turn-based. See Co-op and online.
13.7.8 Make a sword game or a shooter
A sword game:
- Foundation preset Action: Swords.
- Give each class a weapon: duplicate Sword, Dagger or Greatsword, tune the combo steps, link it from an equipment item.
- Build an animation style in the Animation & FX Library, apply it to your characters, then run Dress My Abilities so combo, dodge, block and parry clips fill the action animation slots.
- New Action Battle: Melee, bounded area, enemies, Simulate until it reads Fair, Create.
- Tune the feel: parry window, dodge i-frames, poise, stamina.
A shooter:
- Foundation preset Action: Shooter.
- Choose Rifle, Pistol, Shotgun or Bow. Set Ammo Item on the fire modes for a limited reserve.
- Put cover in your level (the simulator scatters its own from Sim Cover Count).
- New Action Battle: Shooter, an open fight for roaming enemies, Simulate.
- Tune aim assist, lock-on range and HUD layout.
A game that mixes both uses the Hybrid preset.
13.7.9 Performance notes
The component adds no Tick outside a hit window, a dodge or a hit-stop. The AI thinks on a throttle and a stagger, so a big crowd never decides on the same step. Lower Position Directions and Position Rings in Action AI on weak hardware.
13.8 Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The battle does not start | Features → Action Combat is off, or the trigger's Action Encounter is empty | Turn the feature on, set the encounter |
| The trigger reports an error | A Tactics or ATB director is set as well, or the encounter's mode is not Action | Clear the director, set Battle Mode to Action |
| Everyone punches | The unit has no weapon | Link an Action Weapon from its equipment, or set Default Weapon in the rules |
| No animations, but hits land | There are no action clips | Build a style and run Dress My Abilities |
| Hits feel ignored by the animation | No RSE Action Hit Window notify state | Add the notify state to the montage |
| Fights are too easy or too hard | Enemy levels or the AI floor | Simulate in the Studio, then adjust levels or the AI floor in Action AI |
| Shots start at the wrong place | No Muzzle socket | Add a socket named like Muzzle Socket on the mesh, or change the property on the component |
| The player cannot guard | The weapon forbids it, or guard is off | Check Can Block on the weapon and Guard Enabled in the rules |
13.9 See also
- Battle fundamentals for encounters, rewards and the simulator.
- Abilities and statuses for the shared ability data.
- Weapons and Camera and battle presentation.
- Enemy AI and adaptive difficulty and Co-op and online.
- Product pages in
docs/product/:action-combat.md,weapons.md,coop.md.