ORK Framework Logo - RPG Editor for Unity
  • ORK 4 BETA
  • Features
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

ORK 4 Documentation

  • Getting Started
    • Welcome
    • First Steps (Unity)
  • Features
    • The Status System
    • Schematics
    • Schematic Nodes
    • Dialogue Importer
    • Variables
    • Selected Data
  • Components
    • Battle Components
    • Combatant Components
    • Control Components
    • Cursor Prefab Components
    • Game Starters
    • Interactable Components
    • Move AI Components
    • Scene Setup Components
  • Editor
    • The ORK 4 Editor
    • Sections & Sub-Sections
    • Node Editor
    • Schematic Editor
    • Asset Sources
    • Unity Overlay Toolbar
  • Section: System
    • System Settings
    • Languages
    • Organizer Types
    • Game States & Conditions
    • General Condition Templates
    • Object Pools
    • Prefab Savers
    • Scene Connections
  • Section: Controls
    • Game Controls
    • Interaction Settings
    • Player Controls
    • Camera Controls
    • Input Keys
    • Control Maps
    • Camera Positions
    • Battle Camera
  • Section: Gameplay
    • Game Settings
    • Formulas
    • Difficulties
    • Shortcut Slots & Settings
    • Custom Settings & Global Custom Settings
    • Global Machines
    • Machine Templates
  • Section: Status
    • Status Values
    • Status Effects
    • Attack Modifiers
    • Defence Modifiers
    • Abilities & Ability Developments
    • Status Developments
    • Research Trees
    • Damage Types
    • Status Bonuses & Templates
    • Status Condition Templates
  • Section: Inventory
    • Inventory Settings
    • Inventory Containers
    • Currencies
    • Items
    • AI Rulesets
    • Crafting Recipes
    • Equipment Slots & Slot Set Templates
    • Equipment & Available Equipment Templates
    • Shops
    • Loot
  • Section: Combatants
    • Combatants
    • Combatant Groups
    • Class Slots
    • Classes
    • Factions & Faction Benefits
    • Animations
    • Move AIs
    • Formations
    • Action Combos
  • Section: Battles
    • Battle Systems
    • Turn Based Battles
    • Active Time Battles
    • Real Time Battles
    • Phase Battles
    • Battle Spots
    • Battle AIs
    • Battle Actions Settings
    • Special Commands Settings
    • Target Settings
    • Target Selection Templates
    • Battle Range Templates
    • Battle Grid Settings
    • Battle Grid Highlights
    • Battle Grid Cell Types
    • Battle Grid Formations
  • Section: Content
    • Content Types
    • Music
    • Sound Templates
    • Areas
    • Teleports
    • Quests & Quest Tasks
    • Logs & Log Texts
    • Object Contents
  • Section: UI
    • UI Settings
    • UI Layers
    • UI Layouts
    • UI Boxes
    • HUDs
    • Notifications
    • Cursor Settings
  • Section: Menus
    • Start Menu
    • Save Game Settings
    • Option Categories
    • Menu Screens
    • Menu Requirements
    • Battle Menus
    • Loot Dialogues
    • Item Collection
    • Combatant Selections
    • Quantity Selections
    • Shop Layouts
  • Section: Texts
    • Text Settings
    • Formatting Settings
    • Flying Texts
    • Use Cost Display
    • Status Preview Display
    • Bonus Display
    • Status Change Display
    • Console Settings & Console Types
    • Text Codes
  • Sections: Editor
    • Editor Settings
    • Backups
    • Variables
    • Plugins
  • Scripting
    • Access Handler
    • Custom Nodes
    • Custom Save Data
    • Custom Component Save Data

ORK 4 Tutorials

  • ORK 4 Unity Quickstart Tutorials (3D)
    • ORK 4 Unity Quickstart 3D
    • 01 Initial ORK Setup
    • 02 Player Setup
    • 03 Music & Scenes
    • 04 UI System Setup
    • 05 UI Boxes
    • 06 Flying Texts
    • 07 Status Values
    • 08 Status Effects
    • 09 First Abilities
    • 10 Fighter Setup
    • 11 First Enemies & Battle AI
    • 12 Battle System Setup
    • 13 Animating Battle Start and End
    • 14 Random Battles
    • 15 Animating Actions
    • 16 Player Battle HUD
    • 17 Elemental Attacks
    • 18 Animating More Actions
    • 19 Inventory & Loot
    • 20 Equipment
    • 21 Loot, Start Equipment & Viewers
    • 22 Magic Abilities
    • 23 Caster Setup
    • 24 More Enemies
    • 25 Start Menu & Save Games
    • 26 Menu Screens
    • 27 Interactions
    • 28 Item Collectors
    • Quickstart Extended
  • Battle Tutorials
    • Adding Active Time Battles
    • Adding Phase Battles
    • Hit & Miss
    • Critical Hits
    • Cast Time
    • Grid 01: Battle Grid Setup
    • Grid 02: Highlights
    • Grid 03: Cell Types
    • Grid 04: Move Command
    • Grid 05: Scene Grid Setup
    • Grid 06: Battle Ready
    • Grid 07 Use & Affect Ranges
    • Grid 08: Better Camera Control
  • Gameplay Tutorials
    • Multiple Interaction Controllers
    • Player Group Spawn & Follow
    • Spawn Hunting Enemies
    • Gamepad Controls (Unity Input System)
    • Combined Inputs
    • Quests 01: Menu Screen
    • Quests 02: Hunting
    • Quests 03: Collect Potion Materials
    • Quests 04: Collect Equipment Materials
    • Quests 05: Quest Mark HUDs
    • Crafting 01: Menu Screen
    • Crafting 02: Materials & Recipes
    • Crafting 03: Getting Materials
    • Crafting 04: Proficiency & Critical Outcome
    • Shop
    • Inventory Containers
  • Schematics Tutorials
    • UI Animation Schematics
    • Flying Text Animation Schematics
    • HUD Conditional Schematics
  • UI Tutorials
    • Unity UI: Initial Setup
    • Unity UI: Status Value UI Setup
    • Unity UI: Status Effect UI Setup
    • Unity UI: Shortcut UI Setup
    • Unity UI: Dragging Notification
    • Unity UI: Interaction HUD
    • Unity UI: Shortcut HUD
    • Unity UI: Turn Order HUD
    • Unity UI: Cast Time HUD
    • Unity UI: Quest HUD
    • Unity UI: Tooltip HUD
    • Unity UI: Move Range HUD

ORK 4 Extensions

  • Plugins
    • Save Game Compression Plugin
  • Schematic Nodes
    • Footstepper Nodes (Unity)
  • Scripts
    • A* Pathfinding Movement Component (Unity)
    • PolyNav 2D Movement Component (Unity)
    • Cinemachine Camera Control Type (Unity)
    • Rewired Input Key (Unity)
    • Unity Legacy Input Key (Unity)
    • Core GameKit Wrapper (Unity)
    • Pool Boss Wrapper (Unity)
View Categories
  • Guide
  • ORK 4
  • ORK 4 Tutorials
  • Battle Tutorials

Grid 01: Battle Grid Setup

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:

Download Grid Cell Prefabs

The final result of this tutorial series will look like this:

https://orkframework.com/wp-content/uploads/ork4_tutorials_gameplay__battle_grid_full_demo.mp4

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.

Table of Contents
  • General Battle System Settings
    • Range Settings
      • Battle Range
      • AI Range
      • Move AI Range
  • Battle Actions
    • Default Use Range
  • Updating Battle Range Templates
    • Grid Shape > Line of Sight
  • Battle Grid Settings
    • Base Settings
    • Cell Selection
      • Input Key Settings
      • Mouse/Touch Control
      • Audio Settings
    • Orientation Selection
    • Combatant Placement
    • Move Command
    • Target Cell Selection
  • Save Changes
Sitemap
  • ORK 4 BETA
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (73)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (156)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!