Charges¶
Edits the template's AbilityCharges. With Class omitted, the existing charges object is edited in place (no-op if the ability has none). With Class set, the existing object is edited in place when it is already exactly that class; otherwise it is replaced by a new instance - any field you do not Set then takes the class's default value. RemoveCharges=true removes the charges object entirely.
Config key: Charges. Edit struct: ChargesEdit.
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.
X2AbilityCharges_CocoonSpawnChryssalid → X2AbilityCharges_GremlinHeal → X2AbilityCharges_RevivalProtocol → X2AbilityCharges_ScanningProtocol → X2AbilityCharges_StasisLance → any other class
Shared fields¶
Available on every ChargesEdit entry, whatever its Class.
| Config field | Type | Requires | Game field | Description |
|---|---|---|---|---|
InitialCharges |
int |
SetInitialCharges=true |
InitialCharges |
Charges the ability starts a mission with. |
BonusCharges |
array<BonusChargeEdit> |
BonusChargesMode (EChargesBonusMode) |
BonusCharges |
Extra charges granted when the unit has another ability, keyed by AbilityName. This is how Restoration adds charges to the medikit heal. |
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 |
|---|---|---|
X2AbilityCharges_CocoonSpawnChryssalid |
— | X2AbilityChargesEditor |
X2AbilityCharges_GremlinHeal |
1 | X2AbilityChargesEditor |
X2AbilityCharges_RevivalProtocol |
— | X2AbilityChargesEditor |
X2AbilityCharges_ScanningProtocol |
— | X2AbilityChargesEditor |
X2AbilityCharges_StasisLance |
— | X2AbilityChargesEditor |