Hook reference
Every hook delivered through the hook bus, generated from the SDK. Subscribe with Context.Hooks.Subscribe<T> in a system's OnInit (see the hooks guide for the subscription model). Game-typed payloads arrive as object, so cast them in the handler.
Strategy
AliveSquaddiesChanged
The count of alive squaddies changed (e.g. one was lost).
- Context:
AliveSquaddiesChangedContext - Source: event (
Squaddies.OnAliveSquaddiesChanged)
| Field | Type | Description |
|---|---|---|
AliveCount | int | The number of squaddies still alive. |
BlackMarketItemAdded
An item was added to the Black Market.
- Context:
BlackMarketItemAddedContext - Source: postfix (
BlackMarket.AddItem)
| Field | Type | Description |
|---|---|---|
Item | BaseItem | The item added. |
BlackMarketRestocked
The Black Market restocked its inventory.
- Context:
BlackMarketRestockedContext - Source: postfix (
BlackMarket.Restock)
ConversationVarChanged
A campaign conversation variable changed.
- Context:
ConversationVarChangedContext - Source: event (
StrategyState.OnConversationVarChanged)
| Field | Type | Description |
|---|---|---|
Name | string | The variable name. |
OldValue | int | The previous value. |
NewValue | int | The new value. |
FactionStatusChanged
A story faction's status changed (allied / hostile / neutral, etc.).
- Context:
FactionStatusChangedContext - Source: event (
StoryFaction.OnStatusChanged)
| Field | Type | Description |
|---|---|---|
Faction | StoryFaction | The faction. |
OldStatus | StoryFactionStatus | The previous status. |
NewStatus | StoryFactionStatus | The new status. |
FactionTrustChanged
A story faction's trust value changed.
- Context:
FactionTrustChangedContext - Source: event (
StoryFaction.OnTrustChanged)
| Field | Type | Description |
|---|---|---|
Faction | StoryFaction | The faction. |
OldTrust | int | The previous trust value. |
NewTrust | int | The new trust value. |
FactionUpgradeUnlocked
A story faction unlocked a ship upgrade.
- Context:
FactionUpgradeUnlockedContext - Source: event (
StoryFaction.OnUpgradeUnlocked)
| Field | Type | Description |
|---|---|---|
Faction | StoryFaction | The faction. |
Upgrade | ShipUpgradeTemplate | The unlocked upgrade. |
LeaderDismissed
A leader was dismissed from the roster.
- Context:
LeaderDismissedContext - Source: postfix (
Roster.TryDismissLeader)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The dismissed leader. |
LeaderHired
A leader was hired into the roster.
- Context:
LeaderHiredContext - Source: postfix (
Roster.HireLeader)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The hired leader. |
LeaderPerkAdded
A leader gained a perk (levelled up).
- Context:
LeaderPerkAddedContext - Source: postfix (
BaseUnitLeader.AddPerk)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The leader. |
Perk | PerkTemplate | The perk gained. |
LeaderPermadeath
A leader permanently died.
- Context:
LeaderPermadeathContext - Source: postfix (
Roster.OnPermanentDeath)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The leader that died. |
OperationFinished
A strategic operation concluded.
- Context:
OperationFinishedContext - Source: postfix (
OperationsManager.OnOperationFinished)
| Field | Type | Description |
|---|---|---|
Operation | Operation | The operation that finished. |
OperationStarted
A strategic operation began.
- Context:
OperationStartedContext - Source: postfix (
Operation.StartOperation)
| Field | Type | Description |
|---|---|---|
Operation | Operation | The operation that started. |
Mission | Mission | The first mission of the operation. |
Tactical
AITurn
An AI faction gained control for the turn.
- Context:
AITurnContext - Source: event (
TacticalManager.OnAITurn)
| Field | Type | Description |
|---|---|---|
Faction | int | The faction identifier taking the turn. |
ActiveActorChanged
The active actor changed (turn passed to a new actor).
- Context:
ActiveActorChangedContext - Source: event (
TacticalManager.OnActiveActorChanged)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The new active actor. |
ActorActed
An actor finished acting.
- Context:
ActorActedContext - Source: event (
TacticalManager.OnActorActed)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor that acted. |
ActorStateChanged
An actor's state changed (idle / moving / dead, etc.).
- Context:
ActorStateChangedContext - Source: event (
TacticalManager.OnActorStateChanged)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |
OldState | ActorState | The previous state. |
NewState | ActorState | The new state. |
ArmorChanged
An entity's armour changed.
- Context:
ArmorChangedContext - Source: event (
TacticalManager.OnArmorChanged)
| Field | Type | Description |
|---|---|---|
Entity | Entity | The entity. |
Durability | float | The armour durability remaining. |
Armor | int | The armour value. |
AnimationMs | int | The bar animation duration in milliseconds. |
AttackMissed
An attack missed its target.
- Context:
AttackMissedContext - Source: event (
TacticalManager.OnAttackMissed)
| Field | Type | Description |
|---|---|---|
Target | Entity | The intended target. |
Attacker | Entity | The attacker. |
Skill | Skill | The skill used. |
AttackTileStarted
A tile-targeted attack began.
- Context:
AttackTileStartedContext - Source: event (
TacticalManager.OnAttackTileStart)
| Field | Type | Description |
|---|---|---|
Attacker | Actor | The attacker. |
Skill | Skill | The skill used. |
Tile | Tile | The targeted tile. |
DurationSeconds | float | The attack's duration in seconds. |
BleedingOut
A leader entered the bleeding-out state.
- Context:
BleedingOutContext - Source: event (
TacticalManager.OnBleedingOut)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The leader. |
RemainingRounds | int | Rounds remaining before death. |
DamageReceived
An entity received damage.
- Context:
DamageReceivedContext - Source: event (
TacticalManager.OnDamageReceived)
| Field | Type | Description |
|---|---|---|
Victim | Entity | The entity that took the damage. |
Source | Entity | The entity that dealt it, or null. |
Skill | Skill | The skill that dealt it, or null. |
Damage | DamageInfo | The damage detail. |
Discovered
A hidden entity was discovered.
- Context:
DiscoveredContext - Source: event (
TacticalManager.OnDiscovered)
| Field | Type | Description |
|---|---|---|
Entity | Entity | The discovered entity. |
Discoverer | Actor | The actor that discovered it. |
ElementDied
A sub-element of an entity was destroyed (e.g. a vehicle part).
- Context:
ElementDiedContext - Source: event (
TacticalManager.OnElementDeath)
| Field | Type | Description |
|---|---|---|
Entity | Entity | The owning entity. |
Element | Element | The destroyed element. |
Attacker | Entity | The attacker, or null. |
Damage | DamageInfo | The damage detail. |
ElementMalfunction
A sub-element malfunctioned.
- Context:
ElementMalfunctionContext - Source: event (
TacticalManager.OnElementMalfunction)
| Field | Type | Description |
|---|---|---|
Element | Element | The element. |
Skill | Skill | The skill involved, or null. |
EntityDied
An entity died.
- Context:
EntityDiedContext - Source: event (
TacticalManager.OnDeath)
| Field | Type | Description |
|---|---|---|
Victim | Entity | The entity that died. |
Killer | Entity | The entity credited with the kill, or null. |
EntitySpawned
An entity was spawned into the mission.
- Context:
EntitySpawnedContext - Source: event (
TacticalManager.OnEntitySpawned)
| Field | Type | Description |
|---|---|---|
Entity | Entity | The spawned entity. |
HiddenToPlayer
An actor became hidden from the player.
- Context:
HiddenToPlayerContext - Source: event (
TacticalManager.OnHiddenToPlayer)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |
HitpointsChanged
An entity's hitpoints changed.
- Context:
HitpointsChangedContext - Source: event (
TacticalManager.OnHitpointsChanged)
| Field | Type | Description |
|---|---|---|
Entity | Entity | The entity. |
Percent | float | The new hitpoints as a fraction (0..1). |
AnimationMs | int | The bar animation duration in milliseconds. |
MissionFinished
A tactical mission concluded.
- Context:
MissionFinishedContext - Source: event (
TacticalManager.OnFinished)
MissionStarted
A tactical mission loaded and is ready.
- Context:
MissionStartedContext - Source: synthetic (raised by Jiangyu)
MoraleStateChanged
An actor's morale state changed.
- Context:
MoraleStateChangedContext - Source: event (
TacticalManager.OnMoraleStateChanged)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |
State | MoraleState | The new morale state. |
MovementFinished
An actor finished moving.
- Context:
MovementFinishedContext - Source: event (
TacticalManager.OnMovementFinished)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |
Tile | Tile | The destination tile. |
MovementStarted
An actor started moving.
- Context:
MovementStartedContext - Source: event (
TacticalManager.OnMovement)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The moving actor. |
FromTile | Tile | The tile moved from. |
ToTile | Tile | The tile moved to. |
MovementAction | MovementAction | The movement action. |
Container | Entity | The carrying entity, or null. |
ObjectiveStateChanged
A mission objective changed state (e.g. completed or failed).
- Context:
ObjectiveStateChangedContext - Source: event (
TacticalManager.OnObjectiveStateChanged)
| Field | Type | Description |
|---|---|---|
Objective | Objective | The objective. |
OldState | ObjectiveState | The previous state. |
NewState | ObjectiveState | The new state. |
OffmapAbilityCanceled
An offmap ability was cancelled.
- Context:
OffmapAbilityCanceledContext - Source: event (
TacticalManager.OnOffmapAbilityCanceled)
| Field | Type | Description |
|---|---|---|
Ability | OffmapAbilityTemplate | The ability template. |
OffmapAbilityUsed
An offmap ability was used.
- Context:
OffmapAbilityUsedContext - Source: event (
TacticalManager.OnOffmapAbilityUsed)
| Field | Type | Description |
|---|---|---|
Ability | OffmapAbilityTemplate | The ability template. |
Tile | Tile | The targeted tile. |
PlayerTurn
The player gained control for the turn.
- Context:
PlayerTurnContext - Source: event (
TacticalManager.OnPlayerTurn)
RoundStarted
A new tactical round began.
- Context:
RoundStartedContext - Source: event (
TacticalManager.OnRoundStart)
| Field | Type | Description |
|---|---|---|
Round | int | The round number that just started. |
SkillAdded
A skill was granted to an actor.
- Context:
SkillAddedContext - Source: event (
TacticalManager.OnSkillAdded)
| Field | Type | Description |
|---|---|---|
Receiver | Actor | The actor that received the skill. |
Skill | Skill | The skill granted. |
Source | Actor | The granting actor, or null. |
Success | bool | Whether the grant succeeded. |
SkillCompleted
A skill finished executing.
- Context:
SkillCompletedContext - Source: event (
TacticalManager.OnAfterSkillUse)
| Field | Type | Description |
|---|---|---|
Skill | Skill | The skill. |
SkillUsed
An actor used a skill.
- Context:
SkillUsedContext - Source: event (
TacticalManager.OnSkillUse)
| Field | Type | Description |
|---|---|---|
User | Actor | The actor that used the skill. |
Skill | Skill | The skill used. |
Tile | Tile | The targeted tile. |
Stabilized
A bleeding leader was stabilised.
- Context:
StabilizedContext - Source: event (
TacticalManager.OnStabilized)
| Field | Type | Description |
|---|---|---|
Leader | BaseUnitLeader | The stabilised leader. |
Savior | Actor | The actor that stabilised them. |
Suppressed
An actor became suppressed.
- Context:
SuppressedContext - Source: event (
TacticalManager.OnSuppressed)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The suppressed actor. |
SuppressionApplied
Suppression was applied to an actor with a specific amount.
- Context:
SuppressionAppliedContext - Source: event (
TacticalManager.OnSuppressionApplied)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |
Change | float | The suppression change applied. |
Suppressor | Entity | The source entity, or null. |
TurnEnded
An actor's turn concluded.
- Context:
TurnEndedContext - Source: event (
TacticalManager.OnTurnEnd)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor whose turn ended. |
TurnStarted
An actor's turn began.
- Context:
TurnStartedContext - Source: event (
TacticalManager.OnTurnStart)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor whose turn started. |
VisibleToPlayer
An actor became visible to the player.
- Context:
VisibleToPlayerContext - Source: event (
TacticalManager.OnVisibleToPlayer)
| Field | Type | Description |
|---|---|---|
Actor | Actor | The actor. |