Skip to content

TargetStyle

Edits Template.AbilityTargetStyle (how the ability picks its primary target). Same in-place/replace semantics as ToHitCalc. Field-less styles (X2AbilityTarget_Self, X2AbilityTarget_Path, ...) are valid Class values for swapping the style.

Config key: TargetStyle. Edit struct: TargetStyleEdit.

Dispatch order

The first editor that accepts a class handles it, so a class is matched by the earliest entry below that it derives from.

X2AbilityTarget_MovingMelee → X2AbilityTarget_Single → X2AbilityTarget_Cursor → any other class

Shared fields

Available on every TargetStyleEdit entry, whatever its Class.

No editable fields.

Classes

Class-specific fields are documented on each page below. A class with no dedicated editor still accepts every field in Shared fields.

Game class Own fields Editor extends
X2AbilityTarget_Cursor 4 X2AbilityTargetStyleEditor_Base
X2AbilityTarget_MovingMelee 1 X2AbilityTargetStyleEditor_Single
X2AbilityTarget_Single 5 X2AbilityTargetStyleEditor_Base