Learn more about the different battle systems and how battles are added to your game.
ORK Framework includes 4 different types of battle systems – Turn Based, Active Time, Real Time and Phase battles. Each battle system comes with their own battle modes and various settings to tailor the system to your needs.
You aren’t limited to use one of the battle systems in your game, you can define which system is used for each individual battle – and if needed, even switch between the battle systems in a running battle.
You want to switch a hectic real time battle to a relaxed turn based battle? Use the Change Battle Type step in an event.
The battle system is the core of an RPG’s gameplay – ORK Framework’s 4 battle systems all come with various settings to build the system you want. Beside the settings of the different battle systems, you can also define other settings across the framework to be used only in selected battle systems.
Also, the battle events used to animate the different battle actions (e.g. using an ability or item) can be defined for each battle system individually. This way you’re able to adjust the actions to each battle system you’re using.
Turn Based Battles
Turn based battles are a classical and well loved battle concept in RPGs. Each combatant has their turn to perform actions in – enough time to decide what to do and plan their actions.
There are 3 different battle modes available in turn based battles – Classic, Active and Multi Turns.
Learn more about turn based battles in this how-to.
Active Time Battles
In Active Time battles each combatant has a timebar that is filled over time. A combatant can perform actions once the timebar is full (or reached a defined value).
Learn more about active time battles in this how-to.
Real Time Battles
In Real Time battles there is no turn order or timebar that needs filling – actions can be performed at all times.
Learn more about real time battles in this how-to.
Phase battles are similar to turn based battles – but each faction has their own phase to select and perform actions in.
Learn more about phase battles in this how-to.
Grid battles are not another stand alone battle system – they’re available for all 4 battle systems in ORK Framework!
Learn more about grid battles in this how-to.
Bringing battles into your game
Battles can be added to your scenes in different ways – depending the situation or style of your game.
The Battle component is the most used way for adding battles to a game. When a Battle component is used, the battle is refered to as an arena battle.
Battle components allow placing battles at defined positions in your scene. In this battles, the Battle Spots defined in Battle System > Battle Spots are used to place the combatants participating in battle. Optionally, the battle spots can be overridden in the Battle component to place them by hand to better suit the situation.
You can also override the default battle start/end events (e.g. to use a different battle start event for boss battles) and group advantages for individual battles.
Combatant Spawners will spawn the defined combatants in the scene. You can either use Combatant Spawners to spawn combatants at defined positions or within an area by using triggers (colliders). The combatants can optionally respawn after a defined amount of time and be remembered (position, stats) when the player leaves the scene.
The spawned combatants can use the Move AI to move around on their own, e.g. enemis can hunt the player based on the settings of their move AI. When using Combatant Spawners, battles will take place where the player came into contact with an enemy combatant based in the enemy’s Auto Start Battle Settings. The battle uses an automatically generated game object with a Battle component, i.e. this will also be an arena battle.
Optionally, Combatant Spawners can also define a game object with a Battle component to be used for the battles (e.g. to override battle start/end events) or use the nearest Battle game object to have the battle take place at defind positions (see this gameplay tutorial for an example).
Random Battle Areas
If you want random encounters in your game, use a Random Battle Area component. The area in which random battles can happen is defined through a trigger (collider) – when the player moves within the area, random battles can happen.
You can define minimum and maximum distances between battles as well as the random encounter chance. Additionally, the random encounter rate is influenced by the Random Battle Factor, which can be changed through various things (e.g. equipment, status effects and a setting changable in option menus in-game).
Optionally, Random Battle Areas can also define a game object with a Battle component to be used for the battles (e.g. to override battle start/end events) or use the nearest Battle game object to have the battle take place at defind positions (see this gameplay tutorial for an example).
Real Time Battle Areas
The Real Time Battle Area component is used to create a whole area for fighting real time battles. You can either limit the area by using a trigger (collider), or use the whole scene for the real time battles.
Real Time Battle Areas don’t use battle spots or battle start/end events.
Using the event system
Battles can be started in the event system by using the Start Battle step. This requires the used game object to either be a combatant (e.g. added through an Add Combatant component or being spawned by a Combatant Spawner) or have a Battle component attached and set up correctly.
The event starting the battle will continue after the battle ended.
The event system is used for multiple things in battles. Most of the time you’ll use it to animate the actions that are performed in battle (e.g. using an ability) through Battle Events, but they’re also used to animate the start and end of battles when fighting in arena battles (i.e. using a Battle component).
Battle events are used to animate actions in battles. You’ll use them for everything, from using an ability or item to defending, escaping or changing members. Even the death of a combatant is animated using battle events.
In battle events, there are predefined actors to be used for the event steps – they include the user of the action (e.g. the combatant that performs the ability), the targets and other groups.
Animating actions can be separated into multiple battle events. E.g. you can split animating a basic attack into one event running to the enemy, one event playing the attack animation and doing damage, and one event running back to the battle position of the combatant. This allows reusing battle events and saving time – instead of having to set up everything for each single action.
Battle Start Events
Battle start events are used when an arena battle (i.e. using a Battle component) is started. You can use them to animate a battle intro (e.g. camera changes, screen flashes, etc.) and spawn/place the enemies for battle.
The battle start events also allow implementing systems like fighting in special battle arena scenes – see this gameplay tutorial for an example.
Battle End Events
Battle endevents are used when an arena battle (i.e. using a Battle component) ends. You can use them to animate a battle end (e.g. camera changes, screen flashes, etc.) and collect the battle gains.
The battle end events also allow implementing systems like fighting in special battle arena scenes – see this gameplay tutorial for an example.
Phase Change Events
Phase change events are used at the start and end of a faction’s phase in Phase battles. They use all members of the faction which’s phase it is as the Faction Members actor.
The Start Phase Event and End Phase Event of each faction is defined in the individual faction’s settings (Combatants > Factions in the ORK Framework editor).