AddAggro | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId, InAggroValue: integer, InAggroReason: string | boolean | External call interface. Takes (SourceId, TargetId, Value, Reason). |
DecreaseAggroByReason | InSourceEntityId: FB1EntityId, InAggroReason: string, InValue: integer | - | Iterates all of the Source's entries and decreases matching Reason buckets by InValue. Called by external systems such as scripts (e.g. reduce anger-reason aggro on emotion release). Buckets that drop to <=0 are auto-removed; the Source itself is cleaned up when all entries are empty. |
DecreaseAggroByTargetReason | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId, InAggroReason: string, InValue: integer | - | Decreases the matching Reason bucket by InValue, limited to the Source-Target entry (narrowest scope). Buckets at <=0 are auto-removed; empty entries and then the Source are cleaned up. |
GetEntries | InSourceEntityId: FB1EntityId | FB2AggroEntry[] | Returns all of the Source's entries (for debugging/statistics). |
GetSetting | - | UB1AggroDataAsset | Common chase settings. Fetched via DA_GET on every call (not cached, to allow DA hot-reload). |
GetTopEntry | InSourceEntityId: FB1EntityId | FB2AggroEntry | Returns the Source's largest-total entry. Recomputes when the cache is invalid (hence non-const). Returns nullptr if none. Use this for single-shot calls. |
GetTopReason | InSourceEntityId: FB1EntityId | string | Returns the TopReason of the current chase-target entry. NAME_None if none. Since a Source can have multiple Targets, the single TopReason means the TopReason within the chase-target entry. |
GetTopTarget | InSourceEntityId: FB1EntityId | FB1EntityId | Returns the current chase target (= GetTopEntry().TargetEntityId). Invalid if none. |
HasActiveAggro | InSourceEntityId: FB1EntityId | boolean | Returns whether the Source holds at least one aggro entry (any Reason). Used for debug/statistics. |
HasActiveChaseAggro | InSourceEntityId: FB1EntityId | boolean | Returns whether the Source holds at least one entry whose TopReason is a chase-type (bAutoChase=true) Reason. Used by autonomy queries; entries with only instant-type (bAutoChase=false) Reasons do not block autonomy. |
HasHostileAggroTarget | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId | boolean | Returns whether the Source has at least one Hostile-disposition Reason bucket toward this Target. Since aggro also includes friendly reasons (e.g. calling someone to eat), use this (not IsAggroTargetOf) to decide whether they are currently fighting. Reason disposition is defined by EB1AggroDisposition in the Aggro table. |
IsAggroTargetOf | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId | boolean | Returns whether a specific Source has this Target as an aggro entry (self->target relation only). Used as a filter, e.g. 'do not tell the target I am chasing to move over' in MoveOver. |
NotifyChaseAbortedByUser | InSourceEntityId: FB1EntityId | - | Called when a Chase Action is canceled by user intent (B2InteractionHelper::IsUserCancelReason). Marks bUserAborted=true on all of that Source's entries so it will not restart chasing even if the aggro entry survives. Automatically reset to false when an entry is updated via AddAggro. |
NotifyChaseArrived | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId | - | Called when a Chase Action ends via OnFinish (normal arrival). Fires FireArrival on the (Source, Target) entry + marks bArrivalFired + clears the progress flag. Idempotent: ignored if re-called on an already-fired entry. OnCanceled/OnPaused paths are not arrivals, so they call only NotifyChaseFinished and skip the fire. |
NotifyChaseFinished | InSourceEntityId: FB1EntityId | - | Notification called when a Chase Action ends/cancels. Lowers the Source's chase-in-progress flag so it can re-chase on the next tick. |
OnEntityRemoved | InEntityId: FB1EntityId | - | On entity removal, cleans up both Source and Target directions (invoked by the EntityManager callback). |
RemoveAggro | InSourceEntityId: FB1EntityId | - | Force-clears all of the Source's Target aggro. Cleans up the Chase Action and restores autonomy. |
RemoveAggroForTarget | InSourceEntityId: FB1EntityId, InTargetEntityId: FB1EntityId | - | Clears only the Source's aggro toward a specific Target. |