17 Combatants Part 1: General Settings

In this tutorial we’ll set up the general settings for all combatants and combatant types.

We’re finally at the part of the status system setup where all we did so far will come together. Combatants are the centerpiece of the status system, they combine status values, status development, abilities, inventory and all the rest and build an entity that’ll use all of those features.

Learn more about combatants and their general settings in this documentation.

General Settings #

For now, we’ll start with the default setup of many settings of our combatants. All combatants will use them, unless they replace them with custom setups or add to them (e.g. additional loot or battle AIs).

Navigate to Combatants > Combatants > General Settings.

Status Settings #

We’ll set up level ups to fully recover a combatant – this’ll make our battles a bit easier.

Level Up Settings > Base Level Up #

  • Full Recovery
    Enable this setting.

Attacks & Abilities #

We’ll define the default base attack and counter attack of all combatants. Except for a few combatants, we’ll keep this default setup for our combatants, only a few will replace it with the Drain ability.

Also, keep in mind that Bows override the base/counter attack of the wearer with the Shoot ability – that doesn’t affect our setup here, though.

Default Base Attack #

  • Ability
    Select Attack.

Default Counter Attack #

  • Ability
    Select Attack.

Inventory & Equipment #

We’ll set up default loot, available equipment and steal settings.

Default Loot Settings #

  • Loot Origin
    Select Loot.

Click on Add Loot.

  • Loot
    Select Gold.

Click on Add Loot.

  • Loot
    Select Magic Crystal 3%.

Default Available Equipment #

  • Available Equipment
    Select All.
    This’ll have by default all equipment slots and all equipment available to combatants.
    We’ll only override this for player combatants with their own equipment setup we did earlier.

Default Steal Settings #

This allows us to set up a fix item and currency quantity to steal from a combatant. If no steal settings are defined, a random item from the combatant’s inventory is stolen. We’ll set up our enemies without really anything in their inventory (since we don’t need it for our setup, but it’s possible to do if you want), so we’ll set up fixed items to steal.

Similar to loot, steal setups are defined for level ranges – and also similar to loot, we’ll by default steal a Potion (level 1-25) or High Potion (level 26-50).

The default setup will be overridden by player combatants (so that enemies can steal a random item), and some enemies will also replace it with different stealable items.

Click on Add Steal Level Range.

  • Minimum Level
    Set to 1.
  • Maximum Level
    Set to 25.
  • Steal Item
    Enable this setting.
  • Fix Item
    Enable this setting.
  • From Inventory
    Disable this setting.
  • Type
    Select Item.
  • Item
    Select Potion.
  • Steal Once
    Enable this setting.

Copy the Steal 0 settings and change the following settings.

  • Minimum Level
    Set to 26.
  • Maximum Level
    Set to 50.
  • Item
    Select High Potion.

Battle Settings #

We’ll set up how battles are started by spawned enemies in the field, the default battle AI and take a look at the general AI settings of combatants.

Auto Start Battles #

These settings are used to start battles when the player comes near enemy combatants that are spawned in the field (e.g. via Combatant Spawner components).

The default setup should already work for most setups.

  • Only Leader
    Enable this setting.
    Battles will only start when enemies come near the player itself (i.e. the leader of the player group).
    If you spawn other group members in the field, you could disable this to allow them starting battles.

The Start on Range settings handle at which range between player and enemy the battle will start.

  • Auto Start Battles
    Enable this setting.
  • Range
    Select Value > Value.
    Set the value to 2.
    This’ll start battles when the player comes within 2 world units of an enemy.

Default Battle AI #

Our default setup will be used for most of our enemy combatants – they’ll use battle AIs in this order:

  • provoked > selects target with Provoke effect
  • random ability 25% > uses a random ability
  • base attack > uses the base attack
  • do nothing > does nothing

Some combatants will add to it (e.g. supporters adding Heal <50% HP), some will replace it and use the setup with a higher percent random ability chance.

Click on Add Battle AI.

  • Battle AI
    Select Provoked.

You don’t really need to bother with the other settings – for our use case, the default setup is correct, i.e. 100% chance, no conditions and using First Useable mode.

Click on Add Battle AI.

  • Battle AI
    Select Random Ability 25%.

Click on Add Battle AI.

  • Battle AI
    Select Base Attack.

Click on Add Battle AI.

  • Battle AI
    Select Do Nothing.

Default AI Settings #

These settings handle basic AI handling of combatants – e.g. how targets are selected when battle AIs didn’t find a target. E.g. in our setup, battle AIs only have a found target if either an ally is below 50% health or an enemy has the Provoke effect applied.

The default setup in a new project doesn’t do anything special, so a random target out of the available targets would be used in this case. I’d leave it at that, as it brings a bit of randomness into battles.

Feel free to change it however – e.g. attacking the nearest or last target:

  • Nearest Target
    Enable this setting.
  • Attack Last Target
    Enable this setting.

Animations & Movement #

We don’t touch this settings now – this will be handled by other tutorial series that’ll use our status system to set up a 2D or 3D game with different variations in animation system, movement, etc.

For now, just take a quick look at the settings here, this is where you’ll define:

  • the combatant’s animation system (e.g. legacy or Mecanim animations)
  • the combatant’s animations
  • using auto movement animations (i.e. ORK handles it based on a combatant’s move speed)
  • move AI
  • finding ground (if that’s relevant for your game)
  • sound assignments

The settings here are, as the rest, the default settings for all combatants – each combatant can naturally override them with a custom setup, e.g. maybe you’ll have some combatants using a different animation system than the default setup.

Combatant Types #

Next, we’ll set up some combatant types to organize our combatants (and for potential later bestiary use).

We’ll only set up some basic classifications based on their overall role in battle:

  • tanks
  • physical attackers
  • magical attackers
  • supporters
  • bosses

Navigate to Combatants > Combatant Types, we’ll change the Default type and add additional types.

0: Tanks #

  • Name
    Set to Tank.
  • Description
    Set to Specialize in taking damage..

1: Physical Attackers #

  • Name
    Set to Physical Attackers.
  • Description
    Set to Specialize in attacking with physical attacks..

2: Magical Attackers #

  • Name
    Set to Magical Attackers.
  • Description
    Set to Specialize in attacking with magical attacks..

3: Supporters #

  • Name
    Set to Supporters.
  • Description
    Set to Specialize in supporting their allies..

4: Bosses #

  • Name
    Set to Supporters.
  • Description
    Set to Specialize in being bosses..

Save Changes #

And that’s it for the combatant general settings and combatant types setup.

Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Next, we’ll set up the player combatants.