September
10
2016

Learn how to add grid battles in this short gameplay tutorial series.

This is the 8th part of the gameplay tutorial series focused on grid battles – you can find part 1 here. The other parts focused on turn based battles, this time we’ll look into phase battles.

Phase Battles

Phase battles are similar to turn based battles – but each faction has their own phase to select and perform actions in. You can learn more about phase battles in this how-to.

Since we never used grid battles before, we’ll also need to do some basic setup.

Phase Settings

Navigate to Battle System > Phase Battles and change the following settings.

  • Use Active Command
    Enable this setting.
  • Use Dynamic Combat
    Disable this setting.

The Phase Calculation settings define in which order the factions will have their phases.

  • Calculate Phase Order
    Enable this setting.
  • Phase Calculation
    Select Turn Calculation.
  • Sum Values
    Enable this setting.

The Combatant Order settings define in which order the combatants of a faction will have their turn. This is mostly for the AI controlled factions, the player can manually select the order in which combatants perform actions.

  • Calculate Order
    Enable this setting.
  • Order Calculation
    Select Turn Calculation.

Actions Settings

Like turn based battles, phase battles also use actions per turn to determine how many actions a combatant can perform in a turn. We’ll use the same setup as explained in the previous tutorial, i.e. allowing movement after actions.

Actions Per Turn

  • Value
    Set to 1.1.

Default Action Cost

  • Use Remaining
    Disable this setting.
  • Value Type
    Select Value.
  • Value
    Set to 1.

None Cost

  • Own None Cost
    Enable this setting.
  • Use Remaining
    Enable this setting.
  • Value Type
    Select Value.
  • Value
    Set to 0.

Grid Move Cost

  • Own None Cost
    Enable this setting.
  • Use Remaining
    Disable this setting.
  • Value Type
    Select Value.
  • Value
    Set to 0.

Player Combatant Selection

These settings handle how the player can select the combatant to perform the next actions.

  • Use Combatant Choice
    Enable this setting.
  • GUI Box
    Select Battle Menu.
  • Only Available
    Enable this setting.
  • Add End Phase
    Enable this setting.

Control Block Settings

To make use of the camera control target changes set up in the last tutorial, we’ll also only block the player controls during battle.

  • Block Player Control
    Select Battle.
  • Block in Battle Menu
    Enable this setting.

Default Start/End Events

  • Start Event
    Select gridBattleStart.
  • Victory Event
    Select gridVictoryBattleEnd.
  • Escape Event
    Select gridEscapeBattleEnd.
  • Defeat Event
    Select simpleDefeat.
  • Leave Arena Event
    Select gridEscapeBattleEnd.

Grid Settings

  • Turn End Orientation
    Enable this setting.

That’s it for the grid battle setup – click on Save Settings to save the changes.

Optional: Phase Change Events

In phase battles, you can use Phase Change Events at the start and end of a faction’s phase. These events can be used to e.g. show information about who’s phase is about to start or create custom systems for your phase battles.

We’ll create 3 simple events to let the player know who’s phase is beginning – one event for each faction. Navigate to Events and create a new  phase change event.

gameplay_22_grid_battles23

Show Dialogue

Add > UI > Dialogue > Show Dialogue

We’ll display who’s phase is starting with an automatically closing dialogue.

  • Dialogue Type
    Seelct Auto Close.
  • GUI Box
    Select Area Notification.
  • Text
    For the player faction’s event: Player Phase
    For the ally faction’s event: Ally Phase
    For the enemy faction’s event: Enemy Phase
  • Block Accept Button
    Enable this setting.
  • Close After (s)
    Set the Value Type to Value.
    Set Value to 3.
  • Wait
    Enable this setting.

That’s it for the phase change events – save them by clicking on Save Event As, e.g. as playerPhaseallyPhase and enemyPhase.

Factions

We need to set up the phase change events in the individual factions. Navigate to Combatants > Factions and change the following settings for the 3 factions.

  • Phase Start Event
    For the player faction: playerPhase
    For the ally faction: allyPhase
    For the enemy faction: enemyPhase

And that’s it for the phase battle setup – don’t forget to save the changes by clicking on Save Settings.

Scene Setup

Setting up a phase battle in a scene works just like setting up a turn based battle. When using the ORK scene wizard, use Create Object > Phase Battle instead of creating a turn based battle – or change the Battle Type of the Battle component to Phase.

gameplay_22_grid_battles24

You can either set up a completely new battle and battle grid, or just change one of the existing battles we’ve set up earlier.

The next grid battles tutorial will cover active time grid battles.