Target Selection

The target selection settings define how targets can be selected.

The target selection settings are set up in Battles > Target Settings.

There are 2 ways of target selection:

  • Action Based
    The target is selected after selecting an action (e.g. via battle menu, control maps or shortcut slots).
    This is handled by the Target Selection settings (see below), e.g. using a target menu or input keys.
  • Selected Targets
    A combatant has marked/selected targets and automatically uses actions on them.
    This is handled by the Group/Individual Targets (see below).

You don’t need to use a target selection, though – e.g. you can also set up your abilities and items to automatically target combatants (Auto Target Conditions) or use a None target range to use raycast targeting or Damager Dealer/Zone components for damaging whatever was hit by a sword, projectile, etc.

Target Selection #

Defines the base target selections, i.e. target menu, target change keys and mouse/touch target selection (via raycasting).

Target Menu #

Defines if a target selection menu is used.

The used UI box is defined by the battle menu that’s currently used by a combatant.

You can also automatically selected a target if only a single target is available for selection.

Target Change Keys #

Define input keys that can be used to switch between available targets.

These keys are used during the target selection (e.g. when the target menu would be displayed, even when not using a target menu).

Directional Selection #

Use directional keys (up, down, left, right, or horizontal and vertical axes) to select targets based on screen-space directions from the current target (e.g. pressing up selects the nearest target above the current one, in screen space).

If no target is selected, the selection is done based on the screen center.

Target Highlight #

The target selection can highlight the currently selected combatant.

Cursor #

Optionally use a prefab as a cursor on the combatant.

Highlight Game Object #

Optionally change the color of the combatant’s game object.

Supports different color fading options, e.g. blinking or a single flash.

Highlight HUD #

Optionally change the color of the combatant’s HUDs (when they’re set up to allow using it).

Supports different color fading options, e.g. blinking or a single flash.

Mouse/Touch Control #

Allow selecting targets by clicking or touching on their game objects.

This’ll use a raycast from the clicked screen position into the scene. The raycast uses defined layers and maximum distance – i.e. make sure your layer setup is correct, e.g. having combatants on their own layer and only checking that layer (and others that should block target selection).

Group/Individual Targets #

Group/individual targets allow combatants to have selected/marked targets and automatically use actions on them instead of prompting a target selection.

There are 2 different access ranges for those targets:

  • Group Targets
    Group targets are available to all combatants of a group.
  • Individual Targets
    Individual targets are only available to the combatant who selected them.

You can add as many different setups for group and individual targets as you want. Each one can be set up to use different targets (e.g. allies or enemies) and be limited to be used by certain abilities or items.

E.g. a combatant can have 1 enemy and 1 ally selected, using attacks on the enemy and supportive actions on the ally.

Group/individual targets can e.g. be used by battle menus, control maps and shortcut HUDs.

Battle AIs can use them as found targets using a Use Combatant node. They can also change the group/individual targets using a Change Selected Target node.

Settings #

Define some basics for which targets can be selected.

Range #

Limit targets to be within a defined range or the battle range.

Targets #

Define which targets can be selected, e.g. enemies, allies or both, or alive/dead combatants, etc.

Target selection can also be limited to targets currently visible by the camera.

Useable In #

The target selection can be limited to only be available in defined battle systems.

Input Settings #

Like the regular target selection for an action, you can use input keys, directional selection and mouse/touch controls to select targets.

Raycast Targeting #

Optionally select targets via constant raycasting each frame.

Combatants hit by the raycast will be selected as the target.

Line Of Sight #

Optionally check if any other objects are between user and available targets.

This uses a raycast on a defined layer mask – make sure your layer setup in Unity is correct.

Taret Cursor #

Optionally show a cursor prefab on the selected combatant’s game object.

Auto Attack #

Optionally use auto attacks on the selected target.

This is only used if the battle system and combatant are set up to use auto attacks.

Auto attacks are periodically used attacks that don’t impact a combatant’s turn or timebar.

Ability Use #

Optionally limit using abilities on targets to defined abilities and ability types.

Item Use #

Optionally limit using items on targets to defined items and item types.

Target Conditions #

A target can depend on valid conditions, e.g. combatant status or variable conditions.

If the conditions aren’t met, the combatant can’t be targeted.

Target Dialogues #

Optional use target information or confirmation dialogues.

Target Information Dialogue #

Displays status changes that will happen to the user and targets of an ability or item. This is displayed during the target selection and is only an information display and can’t be interacted with.

Uses the Target Information Layout to define which information is displayed (and how).

You can set up multiple dialogues, e.g. displaying different content on parts of the screen.

Target Confirmation Dialogue #

Displays a target confirmation dialogue showing status changes that will happen to the user and targets of an ability or item. This is displayed after selecting a target for an action to confirm if the action should be used on the target. You can still cancel out of the dialogue and return to the target selection.

Uses the Target Information Layout to define which information is displayed (and how).

Target Information Layout #

Defines how status change information on the user and targets of an ability or item will be displayed. This is used by the Target Information Dialogue and Target Confirmation Dialogue and can optionally be overridden there.

The layout offers a variety of text codes to include content information about the status changes. You can also use a HUD as templates to create a more complex layout, e.g. including value bars with the changes highlighted.

The individual text codes for the changes are replaced with their own defined text, e.g. hit chance, critical chance, status value changes and status effect changes. The texts for the changes also use text codes to include their own content information, e.g. name of a status value and change value.