---
title: 12 Battle System Setup
url: "https://orkframework.com/guide/ork4/ork4-tutorials/ork4-unity-quickstart-tutorials-3d/12-battle-system-setup-q3d/"
updated: "2026-08-03"
category: ORK 4 Unity Quickstart Tutorials (3D)
---

# 12 Battle System Setup

In this tutorial we’ll set up our battle system.

The battle system of this tutorial series will use *Turn Based* battles in *Classic* mode, i.e. all combatants select their actions at the start of a battle turn – after all have selected their actions, the actions are used in the order they where selected.

We’ll dive into multiple settings:

- battle menu
- battle system
- battle spots
- battle actions
- special commands
- target settings
- loot dialogues

Let’s get to it!

# Battle Menu

We’ll start with the[battle menu](https://orkframework.com/guide/ork4/ork4-documentation/section-menus/ork4-battle-menus/), the player will use it to select actions to perform in battle.

Battle menus are an optional feature, you can also use other ways to select actions, e.g. [control maps](https://orkframework.com/guide/ork4/ork4-documentation/section-controls/ork4-control-maps/) or shortcut HUDs.

We’ll only use a limited range of options for our battle menu – the base attack, abilities, items and the defend command.

Open the ORK editor and navigate to **Menus > Battle Menus**. We’ll change the *Default* battle menu.

## Base Settings

- **UI Box**
   Select: *Battle Menu*
- **Add Back Button**
   Select: *Last*
   The default back button (defined in **Texts > Text Settings**) will be added to sub-menus of the battle menu as the last option.

### Content Settings

We’ll show the combatant’s name as the title of the root menu, and additional information in sub-menus.

- **Show Title**
   *Enable*
- **Show Sub-Menu Title**
   *Enable*
   Sub-menus, e.g. target selection or selecting an item, will show a different title.
- **Text (Title Content)**
   Set to: *<name>*
- **Text (Sub-Menu Title Content)**
   Set to: *<name>: <contentname>*

### Options

- **Remember Selection**
   *Enable*
- **Select Last Target**
   *Enable*
- **Target Sort Type**
   Select: *Screen Position*
   This’ll sort targets based on their position on screen, from top left to bottom right corner.

## Layout Settings > Content Layout

The *Content Layout* settings control how the content of buttons in the battle menu is displayed. The default setup shows icon and name of content (e.g. abilities) and adds information content (e.g. item quantity, ability use costs) as additional content with the content ID *info*.

If you remember our initial UI setup, we already set up a button prefab that uses additional content with the content ID *info*, so we can stick with the default setup.

## User Highlight

Let’s also highlight the current combatant who’s selecting actions by blinking HUDs of the combatant (we’ll add the HUD later).

Click on *Add Highlight* to add a user highlight.

- **Highlight Type**
   Select: *Fade HUD Color*
- **Fade HUD**
   Select: *Blink*
- **Time**
   Select: *Value >Value*
   Set the value to: *0.5*
- **Start Color**
   Select a white color with about 3/4 full alpha value (*A=0.78* or *A=200*, depending on your color picker).
- **End Color**
   Select a white color with about half alpha value (*A=0.58* or *A=150*, depending on your color picker).

## Option 0

Now it’s time to add the battle menu options, i.e. which actions are available.

A default option is arleady added for us, let’s change it’s setup.

- **Type**
   Select: *Attack*
   This’ll use the combatant’s base attack.
- **Use Ability Information**
   *Enable*
   This’ll use the content information of the combatant’s base attack ability (including the icon) – this can be useful if combatants have different kind of attacks, e.g. an archer having a ‘Shoot’ attack.
   Otherwise we can define the content of the button.

## Option 1

Click on *Add Option* to add a new option.

- **Type**
   Select: *Ability*
- **Type Display**
   Select: *Type*
   This’ll list the ability content types available to the combatant directly in the base battle menu.
- **Sort By (Type Sorting)**
   Select: *Name* or *ID*
   This handles how the content types are sorted.
   *Name* sorts them by their name.
   *ID* sorts them by their index in the data list.
- **Sort By (List Sorting)**Select: *Name* or *ID*This handles how the abilities are sorted.

## Option 2

Click on *Add Option* to add a new option.

- **Type**
   Select: *Item*
- **Type Display**
   Select: *Combined*
   All items will be combined under a single button.
   You can use a sub menu to display content types, but we’ll not use that (*Sub Menu* setting).
- **Sort By (List Sorting)**
   Select: *Name* or *ID*
   This handles how the items are sorted.
- **Text (Button Content)**
   Set to: *Items*

## Option 3

Click on *Add Option* to add a new option.

- **Type**
   Select: *Defend*
   This’ll use the defend command (reduces damage received by 50% in the default setup).
- **Use Action Info**
   *Enable*
   The content information for special actions like defend, escape, etc. are defined in **Battles > Battle Actions**(we’ll get to that in this tutorial).

That’s it for the battle menu.

# Battle System

We’ll continue with setting up some general settings for the [battle system](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/ork4-battle-systems/).

Navigate to **Battles > Battle System** and select the *General Settings*.

## Base Settings

This is where you set up the *Default Battle System* and *Default Battle Menu* that’ll be used in the game.

A new project already has a standard setup of all 4 available battle systems added, so we can already make sure the battle system we want to use (*Turn Based*) is selected (which already is the case.

- **Default Battle System**
   Select: *Turn Based*
- **Default Battle Menu**
   Select: *Default*
- **Enemy Counter**
   Select: *Letters*
   In case multiple enemies of the same combatant are in a battle, they can be counted by adding numbers or letters to their names.
- **Play Damage Animation**
   *Disable*
   This handles if damage animations are played on combatants that are currently in action.
   We don’t use damage animations in this tutorial series, but it’s a good idea to have this enabled in your projects, since you usually don’t want damage animations to interrupt a combatant currently performing an action.
- **Play Victory Animation**
   *Enable*
   The winning combatants will automatically play the victory organizer type’s animation (set up in **Combatants >Animations > General Settings**).

## Battle End Settings

You can optionally split the experience by the number of player combatants, give experience to all group members even if they didn’t fight and other options.

We’ll stick with the default setup, i.e. all combatants fighting in battle will get the full experience.

## Range Settings

Some features can be limited to only be used by combatants that are within a defined range to the player.

This can be useful to e.g. improve performance in large scenes with many combatants – we don’t need it for our setup, as it either doesn’t use the features or battles taking place in a separate, small battle scene anyway.

You can disable using the ranges (but this isn’t really needed), i.e. those features are used without limitations.

# Turn Based

We’ll now set up the settings for our [turn based](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/turn-based-battles/) battle system. We already selected it as the default battle system (i.e. unless a battle defines using a different battle system, it’ll use the default system).

Navigate to **Battles > Battle System** and select the *Turn Based* battle system.

## Base Settings

The base settings handle the battle system type (which is already correct here), control blocks and battle start/end schematics (we’ll set them up next). You can also optionally use a different battle menu for the battle system.

We only need to change the *Control Block Settings* for now.

### Control Block Settings

The *Player Control Block* settings handle blocking the player control. We can already use the default setup for this, but let’s take look at some settings.

- **Block Player Control**
   Select: *Battle*
   The controls are blocked during the whole battle.
- **Allow In Turn**
   Select: *None*
   When blocking the controls during the whole battle, you can optionally enable controls during the player’s turn, e.g. to allow running around.
- **Block in Battle Menu**
   *Enable*
   This doesn’t really matter when blocking during the whole battle and not allowing controls in turn.
   This’d block the controls while the battle menu is open.
- **Transfer Player Control**
   This’ll transfer player controls to the player combatant that’s currently selecting actions – not needed when we block controls.

The *Camera Control Block* settings handle blocking the camera control. We’ll change this and allow camera control during battles.

- **Block Camera Control**Select: *None*
- **Block in Battle Menu**
   *Disable*

## Turn Based Settings

These settings handle the majority of the turn based related system.

### Battle Mode

Turn based battles can operate in 3 different modes – we’ll use the *Classic* mode, selecting actions at the start of a battle turn and performing the actions when all combatants finished selecting them.

- **Turn Based Mode**
   Select: *Classic*
- **Auto Start Turn**
   *Enable*
   All combatants start their new turn at the start of the battle turn instead of when they have their own turn to select actions in the battle order.
   E.g. our poison effect will happen at the start of a combatant’s turn, so all poison damage happens before the combatants select their actions, potentially killing some before they might be available as targets.
- **Auto End Turn**
   *Enable* this setting.
   A combatant’s turn will automatically end under defined conditions.
   The default setup will check if the combatant can still use their base attack, any ability or item. The turn will also end if the remaining actions per turn (see below) reached 0.
   We’ll stick with this default setup.

### Turn Order Settings

We’ll use the level of the combatants for the turn order, i.e. higher level will have their turn before lower level combatants. If two combatants have the same level, a secondary check will compare their *ATK* status value.

You can make this more complex by using a formula instead of a combatant’s level, status value or other defined values.

- **Turn Calculation**
   Select: *Combatant > Level*
- **Use Secondary Check**
   *Enable*
- **Secondary Calculation**
   Select: *Combatant > Status Value*
- **Status Value (Secondary Calculation)**
   Select: *ATK*

The rest of the turn based settings can be left to their default setup for our game.

## Action Settings

We’ll take a short look at the action settings, even though we don’t change anything here.

### Actions Per Turn

Turn based battles allow to use multiple *actions per turn* – we’ll stick with 1 action per turn (the default setup). If you want an action to not impact the available actions per turn, set it’s action cost to 0.

Individual abilities and items can optionally override the default action cost.

### Action Time Settings

Want to put a bit more pressure on the player? You can optionally limit the time available to select actions during a combatant’s turn using the *Action Time* settings.

We’re not using it, though. But you can, if you want. You can display a combatant’s action time via HUDs, e.g. as a value bar or text.

## Battle System Settings > Battle Options

We’ll set up to have defending executed before other actions – so even if the enemy would have their turn first, the player defending would be executed before them.

- **Defend First**
   *Enable*

That’s pretty much all we need to do for the turn based battle system.

# Battle Spots

Navigate to **Battles > Battle Spots**, we’ll adjust how our combatants are placed. You can learn more about battle spots in [this documentation](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/ork4-battle-spots/).

The position of battle spots is in local space of the battle arena (i.e. the object with the *Battle* component).

## Base Settings

- **Use Rotation**
   *Enable*
   Combatants being placed on battle spots will use the rotation of the spot, i.e. we’ll use the spots to handle player and enemy combatants looking into each other’s direction.
- **Place On Ground**
   *Enable*
   We’ll use raycasting to place the battle spots directly on the ground.
- **Layer Mask**
   Select only the *Default* layer.
   This is where the ground is on.

## Player Spots

There are already 3 battle spots set up for the player – but we’ll only need two. We’ll also adjust their position and rotation.

You can also add, move and remove player spots using the placement UI in the editor – the final spot placement will look like this:

[![](https://orkframework.com/wp-content/uploads/ork4_tutorials_unity_quickstart_3d__battle_spots_player.png)](https://orkframework.com/wp-content/uploads/ork4_tutorials_unity_quickstart_3d__battle_spots_player.png)

### Member 0

- **Spot Position**
   Set to: *X=-2, Y=10, Z=5*
- **Set Rotation**
   *Enable*
- **Rotation**
   Set to: *X=0, Y=180, Z=0*

### Member 1

- **Spot Position**
   Set to: *X=2, Y=10, Z=5*
- **Set Rotation**
   *Enable*
- **Rotation**
   Set to: *X=0, Y=180, Z=0*

### Member 2

Click on *Remove* to remove this spot.

## Ally Spots

We don’t have ally groups in our game, so you can ignore these settings.

Ally spots would only be used if you have at least 3 different factions in a battle, the player, the enemy and a faction allied to the player.

## Enemy Spots

We’ll set up 4 battle spots for enemies, 3 are already added – we only need to adjust the position, the default rotation (*X=0, Y=0, Z=0*) is already the correct one.

The final spot placement will look like this:

[![](https://orkframework.com/wp-content/uploads/ork4_tutorials_unity_quickstart_3d__battle_spots_enemy.png)](https://orkframework.com/wp-content/uploads/ork4_tutorials_unity_quickstart_3d__battle_spots_enemy.png)

### Member 0

- **Spot Position**
   Set to: *X=-1.5, Y=10, Z=-5*
- **Set Rotation**
   *Enable*We use the default rotation (*X/Y/Z=0*), so we don’t need to change the rotation value.

### Member 1

- **Spot Position**
   Set to: *X=1.5, Y=10, Z=-5*
- **Set Rotation**
   *Enable*

### Member 2

- **Spot Position**
   Set to: *X=-4.5, Y=10, Z=-5*
- **Set Rotation**
   *Enable*

### Member 3

Click on *Add Enemy Spot*.

- **Spot Position**
   Set to: *X=4.5, Y=10, Z=-5*
- **Set Rotation**
   *Enable*

# Battle Actions

Navigate to **Battles > Battle Actions**, we’ll set up action info notifications (showing actions used by combatants). You can learn more about battle actions settings in [this documentation](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/battle-actions-settings/).

## Action Info Notifications

These notifications use a UI box to show the action of a combatant. We’ll have them displayed at the combatant’s on-screen position.

Click on *Add Action Infos*.

- **Player/Ally/Enemy**
   *Enable*
   The action infos will be displayed for all factions – you can use this to set up separate info notifications for them.
- **UI Box**
   Select: *Action Info*
- **Visibility Time**
   Set to: *1.5*
- **Display At Combatant**
   *Enable*
   The UI box is displayed at the position of the combatant.
- **Update Info**
   *Enable*
   If the combatant already shows an info, it’s content will be updated.
- **Child Object**
   Select: *Path*
   We’ll define a path to a child object.
- **Find Child**
   Set to: *Cursor*
   Like the target highlight prefab, we’ll display the action info on a child object of the combatants.

We’ll change the text that’s displayed for the infos – the default is a longer version, adding user/target information. We just want the combatants to show the name of the action they’re using.

We’ll set this for the *Attack Info*, *Ability Info*, *Item Info*, *Defend Info*, *Escape Info* and *Counter Info*.

- **Default Content**
   Set to: *<name>*

You can disable using the rest of the infos, but you should at least disable the *Death Info* and *Do Nothing Info*.

- **Enable**
   *Disable*

All info texts already have a default setup that should be ok for this tutorial – feel free to change them to your liking.

# Special Commands

Navigate to **Battles > Special Commands**, we’ll take a quick look at the [special commands settings](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/special-commands-settings/) for our defend command.

## Defend

This defines the content information (name, description, etc.) and other settings for the defend command.

We’ll stick to the default settings – feel free to e.g. change the *Base Defend Rate* to a higher or lower value. The default setup will reduce damage by 50%.

# Target Settings

Navigate to **Battles > Target Settings**, this is where target selection related settings are made. You can learn more about target selection in [this documentation](https://orkframework.com/guide/ork4/ork4-documentation/section-battles/target-settings/).

## Target Selection

These settings handle how targets can be selected.

### Target Menu

- **Use Target Menu**
   *Enable*
   This’ll use the battle menu to select targets (default setup).

### Mouse/Touch Control

We want to be able to click on a combatant in the scene to select it as a target.

- **Layer Mask**
   Select only the *Combatants* layer.
   Select *Nothing* to deselect all layers first, followed by *Combatants*.
- **Input Type**
   Select: *Both*
   Allows using mouse and touch input.

We can keep the default setup (mouse button 0, finger count, 1, click count 1, mode *Start*).

## Highlight Settings > Target Highlight

We’ll use a cursor prefab spawned on the target’s object.

Click on *Add Highlight*.

- **Highlight Type**
   Select: *Prefab*
- **Prefab**
   Select: *Cursor*
- **On Child**
   Select: *Path*
   We’ll define a path to a child object.
- **Find Child**
   Set to: *Cursor*
   It’s a child object on all our combatant prefabs for where the cursor should display.
- **Local Space**
   *Enable*
- **Ignore Scale**
   *Enable*

# Loot Dialogues

Navigate to **Menus > Loot Dialogues**, this is where we’ll set up how the [loot dialogue](https://orkframework.com/guide/ork4/ork4-documentation/section-menus/loot-dialogues/) will look like.

The loot dialogue will be displayed at the end of the battle to notify the player of the received exp and loot, as well as status changes upon level up.

## Level Up Texts

These settings define the content of level up notifications.

We’ll keep the default settings, which’ll list the reached level, status value changes and learned abilities, etc.

## Loot Dialogue 0

The *Simple* loot dialogue is added by default, but we still need to set it up to display something.

- **Loot Dialogue Type**
   Select: *Simple*
   This will display a series of dialogues, showing the loot, experience and status changes of level ups.

You can use different loot dialogues for different battle outcomes, by default it’ll be used for all (which we’ll do).

### Loot Dialogue Settings

- **Show Battle Gains**
   *Enable*
   We’ll list the loot and experience the player gained.
- **Show Level Up Notification**
   *Enable*
   We’ll show status changes of a combatant’s level up.

### Battle Gain Notification

Can be used to list loot and experience. We’ll stick with the default text, but we need to select the UI box to display it.

- **UI Box**
   Select: *Blue Center*

### Level Up Notification

Handles the UI box and some other settings for level up notifications.

The actual content is defined in the *Level Up Texts* settings below.

- **UI Box**
   Select: *Blue Center*

# Save Changes

And that’s it!

Save the changes using the *Save Settings* button at the bottom of the editor.

 

Next, we’ll [set up the battle start and end schematics](https://orkframework.com/guide/ork4/ork4-tutorials/ork4-unity-quickstart-tutorials-3d/13-animating-battle-start-and-end-q3d/) to load into our battle scene and back.
