In this tutorial we’ll set up the base battle grid settings.
This tutorial is the start of a mini-series covering grid battles.
Battle grids add a tactical feature to your battles, making placement on the grid, movement and use ranges an essential part of the player’s handling of a battle.
We’ll set up
- general battle system settings
- default use range
- updating battle range templates (for grid line of sight checks)
- battle grid settings
This tutorial is based on the ORK 4 Unity Quickstart 3D tutorials and using a phase battle system, but can be used in any project and with any battle system.
Please download the following prefabs for your grid cells and line renderer highlights and import them into your project:
The final result of this tutorial series will look like this:
General Battle System Settings #
We’ll handle some general battle system settings.
Navigate to Battles > Battle System and select General Settings.
Range Settings #
Since our battles on grids can span larger areas of a scene, it’s best to not use any range limits.
Battle Range #
- Use Battle Range
Disable
AI Range #
- Use AI Range
Disable
Move AI Range #
- Use Move AI Range
Disable
Battle Actions #
Next, we’ll set a default use range.
Since we’re using battle grids, we want our actions to be limited by grid distance. The default battle range tempaltes of a project already contain setup for different ranges (including grid setup).
Default Use Range #
The default use range will be used by all abilities and items. Each ability or item can override this with a custom setup, which we’ll use in some abilities (e.g. magic spells).
Click on Add Range in the Default Use Range settings.
- Range Type
Select: Template - Template
Select: Range 1
This’ll allow targets in a grid distance of 1, i.e. only neighboring cells.
The Use In settings allow us to limit the use range to defined battle systems or the field. We’ll use this to only use the use range in grid battles.
- Grid Battles
Select: Yes
Updating Battle Range Templates #
We’ll update the default battle range templates (which are already set up for use in grids) and add line of sight checks.
Navigate to Battles > Battle Range Templates – the setup will be the same for each template, we’ll change Range 2, Range 3, Range 4 and Range 5.
Grid Shape > Line of Sight #
The line of sight should be blocked by blocked cells, i.e. cells that can’t be moved on.
We don’t block the line of sight by combatants.
- Use Line of Sight
Enable - LOS Blocked Cells
Enable - LOS Allied Combatants
Disable - LOS Enemy Combatants
Disable
Don’t forget to repeat this setup for Range 2 to 5.
We’ll use the range templates later when we update our abilities.
Battle Grid Settings #
It’s time to focus on the actual battle grid setup.
Navigate to Battles > Battle Grid Settings.
Base Settings #
We’ll use Square grids.
- Grid Type
Select: Square - Cell Size
Set to: 2
A cell has a size of 2 world units, which matches the size of our tiles. - Cell Offset
Set to: X=0.1, Y=0.1
The Raycast Settings are used to find cells based on the cursor position. Our ground is on the Default layer, so we’ll use that.
- Layer Mask
Select only the Default layer.
First select Nothing, then select Default.
Cell Selection #
These settings handle how cells can be selected in any cell selection, e.g. for placing combatants, selecting the cell to move to or for cell-based target selections.
Input Key Settings #
We’ll use input keys to select cells, i.e. we can navigate the grid with vertical/horizontal input.
- Use Input Keys
Enable - Use Axis (Vertical Axis)
Enable - Axis Key (Vertical Axis)
Select: Vertical Menu - Use Axis (Horizontal Axis)
Enable - Axis Key (Horizontal Axis)
Select: Horizontal Menu
Mouse/Touch Control #
We’ll also allow selecting cells using the mouse cursor.
- Input Type
Select: Mouse
The default setup uses the left mouse button with a single click, which is already correct for us.
- Hover Select
Enable - UI Blocks Selection
Enable
E.g. having the cursor over the battle menu prevents selecting cells via hover select. - Cursor Move Only
Enable
Hover select is only used when the mouse is moved.
Audio Settings #
Cell selections should make some noise, just like menu selections.
- Select Audio
Select: switch37 - Accept Audio
Select: switch38 - Cancel Audio
Select: switch34 - Fail Audio
Select: interface6 - Fail Volume
Set to: 0.4
The audio clip is a bit loud, so we’ll reduce the volume it’ll be played with.
Orientation Selection #
These settings are used for selecting the grid orientation of a combatant.
We don’t need to change anything here, the default settings are fine as they are:
- Only Neighbour Cells
Enable
The orientation will only allow selecting the 4 cells directly neighbouring to the combatant’s cell. - Rotate On Selection
Enable
The combatant will rotate to the selected cell while selecting the orientation.
Combatant Placement #
These settings handle the player’s grid placement we’re using in the battle start schematic (using the Player Grid Placement node).
- Select Battle Group
Enable
The grid placement will select the combatants that are part of the battle group. - Use Whole Group
Enable
All members of the player group will be available. - Use Selection
Enable
We’ll use the combatant selection we’ve set up. - Combatant Selection
Select: Default - Place On Selection
Enable
The prefab of the combatant we’re placing will be spawned while placing, i.e. it’ll show up on the cell we select. - Allow Cancel
Enable - Select Orientation
Enable
After placing a combatant, the player has to select the orientation of the combatant. - Camera Control Target
Enable
The camera control will target the selected cell.
Move Command #
These settings handle the grid movement – we’ll set this up in a separate tutorial.
Target Cell Selection #
These settings are used for abilities and items that target cells instead of combatants.
Cell selection targeting can be used when an ability uses the None target range.
- Allow Cancel
Enable - Camera Control Target
Enable
The camera control will target the selected cell.
Save Changes #
And that’s it for the overall battle grid setup.
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
The next part of the grid mini-series will set up grid highlights.

