MassBattleEnums.h
Source/MassBattle/Public/MassBattleEnums.h
概述 Overview
MassBattle 的集中枚举定义文件,含 47 个 UENUM(BlueprintType) 枚举与一个内联转换函数。按用途可分为:行为类(EBehaviorChoice / EBehaviorState / ESwitchToBehavior / EAttackState / EMoveState 等)、移动/寻路类(ENavMode / ECustomPathMode / EGroundSource / EAvoidanceMode)、事件状态类(E*EventState 系列,供事件回调携带状态)、实体类型与标志(EEMainType / EHostEntityType / EBattleFlags)、表现类(ERepresentationMode / EAnimState / EVATBakeMode)、伤害/投射物类(EDmgType 定义于 Fragments/Damage.h,此处为 EProjectileMoveMode / EProjectileDamageMode / ELootState 等)。EBattleFlags 是最核心的枚举——128 个实体标志位,经模块启动注册映射到 MassAPI 的 EEntityFlags 双 64 位掩码。
The centralized enum definition file of MassBattle, holding 47 UENUM(BlueprintType) enums plus one inline conversion function. Grouped by purpose: behavior (EBehaviorChoice / EBehaviorState / ESwitchToBehavior / EAttackState / EMoveState, etc.), movement/navigation (ENavMode / ECustomPathMode / EGroundSource / EAvoidanceMode), event states (the E*EventState family, carried by event callbacks), entity types and flags (EEMainType / EHostEntityType / EBattleFlags), representation (ERepresentationMode / EAnimState / EVATBakeMode), damage/projectile (EProjectileMoveMode / EProjectileDamageMode / ELootState, etc.). EBattleFlags is the most central enum — 128 entity flag bits registered at module startup onto MassAPI's EEntityFlags dual 64-bit bitmasks.
EValidityBranches UENUM
有效性分支枚举,用于表示「有效 / 无效」两种结果。
Validity branch enum representing a valid / invalid outcome.
| 值 Value | 说明 Description |
|---|---|
Valid | 有效。Valid. |
Invalid | 无效。Invalid. |
EAgentControlMode UENUM
Agent 的控制模式:由 AI 驱动还是由玩家驱动。
Agent control mode: AI-driven or player-driven.
| 值 Value | 说明 Description |
|---|---|
AI | AI 控制。AI-controlled. |
PlayerDriven | 玩家驱动。Player-driven. |
EAgentInitMode UENUM
MassBattleAgentComponent 的初始化模式,控制组件何时、以何种方式生成其 Mass 实体。
Agent initialization mode for MassBattleAgentComponent — controls when and how the component spawns its Mass entity.
| 值 Value | 说明 Description |
|---|---|
Auto | 在 BeginPlay 自动生成实体。Automatically spawns the entity in BeginPlay. |
Manual | 手动调用初始化函数生成实体。对象池复用的 actor 也用 Manual。Manually calls the initialization function to spawn the entity. Pool-reused actors also use Manual. |
ESortMode UENUM
排序模式,用于结果列表的排序方式(近远、随机、不排序)。
Sort mode for result lists (near/far, random, or unsorted).
| 值 Value | 说明 Description |
|---|---|
None | 不排序。Do not sort. |
NearToFar | 从近到远。From near to far. |
FarToNear | 从远到近。From far to near. |
Randomize | 乱序。Random order. |
ESpawnOrigin UENUM
生成位置来源:在自身位置还是攻击目标位置。
Spawn origin: at its own position or at the attack target's position.
| 值 Value | 说明 Description |
|---|---|
AtSelf | 在自身位置。At its own position. |
AtTarget | 在攻击目标位置。At the attack target's position. |
EPlaySoundOrigin UENUM
音效播放来源:2D 无空间音效或 3D 空间音效。
Sound play origin: 2D non-spatial or 3D spatial sound.
| 值 Value | 说明 Description |
|---|---|
PlaySound2D | 不使用空间音效。Do not use spatial sound. |
PlaySound3D | 使用空间音效。Use spatial sound. |
EPlaySoundOrigin_Attack UENUM
攻击音效播放来源,比 EPlaySoundOrigin 多一个「在攻击目标位置播放 3D 音效」选项。
Attack sound origin; adds an "at the attack target's position" option over EPlaySoundOrigin.
| 值 Value | 说明 Description |
|---|---|
PlaySound2D | 不使用空间音效。Do not use spatial sound. |
PlaySound3D_AtSelf | 在自身位置播放空间音效。Spatial sound at its own position. |
PlaySound3D_AtTarget | 在攻击目标位置播放空间音效。Spatial sound at the attack target's position. |
EInitialRotation UENUM
生成时的初始朝向:面朝玩家 0 或使用自定义旋转。
Initial rotation on spawn: face player 0 or use a custom rotation.
| 值 Value | 说明 Description |
|---|---|
FacePlayer | 生成时面朝玩家 0 的方向。Face the direction of player 0 when spawning. |
CustomRotation | 自定义旋转。Custom rotation. |
EBehaviorChoice UENUM
可选择的初始行为(配置注入用):出生、休眠、巡逻、空闲。配合内联函数 ToBehaviorState 转为 EBehaviorState。
Selectable initial behavior (config injection): appear, sleep, patrol, idle. Converted to EBehaviorState by the inline helper ToBehaviorState.
| 值 Value | 说明 Description |
|---|---|
Appear | 出生行为。Appear behavior. |
Sleep | 休眠行为。Sleep behavior. |
Patrol | 巡逻行为。Patrol behavior. |
Idle | 无激活行为。No active behavior. |
EBehaviorState UENUM
Agent 的完整行为状态集,由行为处理器驱动:空闲、出生、休眠、巡逻、追逐、攻击、支援。
Full agent behavior state set driven by the behavior processor: idle, appear, sleep, patrol, chase, attack, reinforce.
| 值 Value | 说明 Description |
|---|---|
Idle | 无激活行为。No active behavior. |
Appear | 出生行为。Appear behavior. |
Sleep | 休眠行为。Sleep behavior. |
Patrol | 巡逻行为。Patrol behavior. |
Chase | 追逐行为。Chase behavior. |
Attack | 攻击行为。Attack behavior. |
Reinforce | 支援行为。Reinforce behavior. |
方法 Methods
将 EBehaviorChoice 映射为对应的 EBehaviorState;Idle 以外的非法/未知输入一律落到 Idle。
Maps an EBehaviorChoice to the matching EBehaviorState; any unexpected input falls through to Idle.
Input
| 参数 Param | 类型 Type | 说明 Description |
|---|---|---|
Choice | EBehaviorChoice | 要转换的行为选择。The behavior choice to convert. |
Output
返回对应的 EBehaviorState;未知输入返回 Idle。无副作用。
Returns the matching EBehaviorState, or Idle for unknown input. No side effects.
EAttackState UENUM
攻击状态机的阶段:_FirstExec 后缀表示该阶段的进入帧,用于一次性进入逻辑。流程:Aim → PreCast(前摇)→ PostCast(后摇)→ Cooling → Completed。
Attack state-machine stages; the _FirstExec suffix marks the entry frame of a stage for one-shot entry logic. Flow: Aim → PreCast (wind-up) → PostCast (follow-through) → Cooling → Completed.
| 值 Value | 说明 Description |
|---|---|
Aim_FirstExec | 瞄准阶段进入帧。Aim stage entry frame. |
Aim | 瞄准阶段。Aim stage. |
PreCast_FirstExec | 前摇阶段进入帧。Wind-up stage entry frame. |
PreCast | 前摇阶段。Wind-up stage. |
PostCast | 后摇阶段(命中时刻)。Follow-through stage (hit moment). |
Cooling | 冷却阶段。Cooldown stage. |
Completed | 完成。Completed. |
ESwitchToBehavior UENUM
通用「下一步切换到什么行为」枚举,用于一次性行为切换。一次性切换后,自然优先级链(Sleep > Patrol,BehaviorProcessor 第 3/4 节)会根据各行为自身的 bEnable 接管。
Generic "what behavior should the agent switch to next" enum for one-shot behavior transitions. After the one-shot, the natural priority chain (Sleep > Patrol via BehaviorProcessor Sections 3/4) takes over based on each behavior's own bEnable.
| 值 Value | 说明 Description |
|---|---|
Idle | 结束当前行为并进入空闲。依据 FMove 设置原地停留或跟随流场漂移;若 Sleep / Patrol 启用,下一帧仍会自然进入。Stop the current behavior and become idle. Per FMove the agent either holds in place or drifts with the flow field; Sleep or Patrol still engage next frame if their bEnable is set. |
Sleep | 进入休眠——本次切换强制设置 SleepingFlag,覆盖 Patrol。需开启 Sleep.bEnable;若未启用,则回退到自然行为链(Patrol 或 Idle)。Enter sleep — sets SleepingFlag explicitly so it overrides Patrol on this transition. Requires Sleep.bEnable; with Sleep disabled the agent falls through to the natural chain (Patrol if enabled, otherwise Idle). |
Patrol | 进入巡逻——本次切换强制设置 PatrollingFlag,覆盖默认的 Sleep 优先级。需开启 Patrol.bEnable;若未启用则无效,由自然行为链接管。Enter patrol — sets PatrollingFlag explicitly so it overrides the natural Sleep priority. Requires Patrol.bEnable; with Patrol disabled this is a no-op and the natural chain takes over. |
Chase | 前往目标丢失时的最后位置(保存在 Moving.Goal 中)。到达后进入自然行为链(Sleep > Patrol > Idle)。适合丢失目标后短暂搜索的场景。Navigate once to the target's last known location (held in Moving.Goal at the moment chase ended). On arrival the natural priority chain takes over (Sleep > Patrol > Idle). Useful for search-after-loss behavior. |
Reinforce | 进入支援行为。Agent 没有自己的目标且启用 Reinforce.bEnable 时自然进入。Enter reinforce behavior. Natural entry occurs when the agent has no own target and Reinforce.bEnable is set. |
EMoveState UENUM
移动状态机:无目标、移动中、已到达、被推离返回。
Move state machine: no goal, moving, arrived, returning after being pushed away.
| 值 Value | 说明 Description |
|---|---|
None | 无移动目标,被动状态。No movement goal, passive. |
Moving | 正在向目标移动。Actively traveling toward the goal. |
Arrived | 已到达目标,保持位置。At goal, holding position. |
Returning | 曾到达目标,被推离,正在返回。Was at goal, pushed away, returning. |
ETraceMode UENUM
索敌模式:直接锁定玩家 0,或按特征做扇形索敌。
Targeting mode: lock onto player 0, or sector trace by traits.
| 值 Value | 说明 Description |
|---|---|
TargetIsPlayer_0 | 索敌目标为玩家 0。Targeting player 0. |
SectorTraceByTraits | 根据特征进行扇形索敌。Sector trace by traits. |
EPoolEventState UENUM
对象池事件状态:出池与入池。
Pool event states: spawn from pool and return to pool.
| 值 Value | 说明 Description |
|---|---|
PoolSpawn | 出池。Spawn from pool. |
PoolRecycle | 入池。Return to pool. |
ERepresentationMode UENUM
实体的表现模式:粒子 + VAT,或 Actor。
Entity representation mode: particle + VAT, or actor.
| 值 Value | 说明 Description |
|---|---|
Particle | 粒子 + VAT。Particle + VAT. |
Actor | Actor 表现。Actor representation. |
EAvoidanceMode UENUM
避障模式:RVO2(ORCA)互惠速度障碍、基于质量加权斥力场的避障,或两者的混合(Hybrid)。
Avoidance mode: RVO2 (ORCA) reciprocal velocity obstacles, a mass-weighted repulsive force field, or a hybrid of the two.
| 值 Value | 说明 Description |
|---|---|
RVO2 | 基于互惠速度障碍的合作避障。Reciprocal Velocity Obstacles — cooperative velocity-space avoidance. |
ForceField | 基于质量加权斥力场的避障,更重的 agent 推开更轻的。Mass-weighted repulsive force field — heavier agents push lighter ones. |
Hybrid | 混合模式:除战斗状态(追击/攻击/追击攻击/等待攻击)与正在避让障碍物的单位——两者均用 ORCA(精确追击穿人群;速度空间障碍约束可干净绕行窄缝)——外全部用 ForceField。移动、静止、全部归位者(远或近)在无障碍近邻期间用 ForceField:径向分离永不劫持期望速度,归位者永远不会被人群裹挟;压力场人群解耦也仅在 ForceField 路径生效。Hybrid: ForceField for everything except combat states (chase / attack / attack-chase / attack-wait) and agents currently avoiding obstacles — both ride ORCA (precise pursuit through crowds; velocity-space obstacle constraints thread tight gaps cleanly). Moving, idle and ALL returners (far or near) use ForceField while clear of obstacle neighbors — the radial separation never hijacks the desired velocity, so returners are never dragged along with the crowd flow; the pressure-field crowd decoupling also only applies on the ForceField paths. |
ECustomPathMode UENUM
自定义路径的循环方式:单程、循环、乒乓往返。
Custom path loop modes: one-way, looped, ping-pong.
| 值 Value | 说明 Description |
|---|---|
OneWay | 从起点走到终点后停止。Follow path from start to end, then stop. |
Looped | 从起点走到终点后回到起点重新开始。Follow path from start to end, then restart from start. |
PingPong | 从起点走到终点,然后反向走回起点,如此往复。Follow path from start to end, then reverse back to start, and repeat. |
EGroundSource UENUM
地面高度来源:始终射线检测、优先流场(失败回退射线)、严格流场(失败视为无地面/坠落)。
Ground height source: always raycast; flow field first with raycast fallback; or strict flow field (no ground on failure, i.e. falling).
| 值 Value | 说明 Description |
|---|---|
Raycast | 始终射线检测(最高质量,最昂贵)。Always raycast (highest quality, most expensive). |
FlowField | 优先尝试流场;失败时自动回退到射线检测(最佳平衡)。Try flow field first; automatically fall back to raycast on failure (best balance). |
FlowField_Strict | 尝试流场;失败则假设没有地面(坠落)。用于飞行单位或极端优化。Try flow field; on failure assume no ground (falling). For flying units or extreme optimization. |
事件状态枚举 Event State Enums
以下 E*EventState 系列枚举供事件回调数据(MassBattleStructs.h 中的 F*Data 结构)携带状态,由各行为/能力处理器在事件触发时写入。
The following E*EventState enums are carried by event callback payloads (the F*Data structs in MassBattleStructs.h) and written by behavior/capability processors when events fire.
EAppearEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Delay | 延时。Delay. |
Begin | 开始。Begin. |
End | 结束。End. |
ETraceEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Begin | 索敌开始。Trace begin. |
End_Reason_Succeed | 索敌成功结束。Trace ended with success. |
End_Reason_Fail | 索敌失败结束。Trace ended with failure. |
EMoveEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Moving | 开始向目标移动。Started moving toward the goal. |
Arrived | 已到达目标。Arrived at the goal. |
Returning | 被推离目标,正在返回。Pushed away from the goal, returning. |
ESleepEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Enter | 进入休眠状态。Entered sleep state. |
Exit | 退出休眠状态。Exited sleep state. |
EPatrolEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Enter | 进入巡逻状态。Entered patrol state. |
Exit | 退出巡逻状态。Exited patrol state. |
Patrolling | 移动至巡逻点。Moving to patrol point. |
Waiting | 在巡逻点等待。Waiting at patrol point. |
EReinforceMode UENUM
支援模式——bEnable 是总开关;Mode 选择开启后的行为路径。
Reinforce mode — bEnable is the master off switch; Mode selects which paths are active when enabled.
| 值 Value | 说明 Description |
|---|---|
ReportOnly | 只上报目标给指挥中心。Only report targets to the command center. |
ReinforceOnly | 只向共享目标支援。Only reinforce toward shared targets. |
Full | 即上报也支援。Both report and reinforce. |
EReinforceEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Enter | 进入支援状态。Entered reinforce state. |
Exit | 退出支援状态。Exited reinforce state. |
EChaseEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Enter | 进入追逐状态。Entered chase state. |
Exit | 退出追逐状态。Exited chase state. |
Chasing | 追逐目标中。Chasing the target. |
Reached | 已追到目标。Reached the chase target. |
EAttackEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Aiming | 瞄准中。Aiming. |
Begin | 攻击开始。Attack begin. |
Hit | 击中。Hit. |
Cooling | 冷却中。Cooldown. |
End_Reason_InvalidTarget | 攻击目标失效而结束。Ended: attack target invalid. |
End_Reason_NotInATKRange | 不在攻击范围内而结束。Ended: not in attack range. |
End_Reason_AimTimeout | 瞄准超时失败而结束。Ended: failed to aim within max time. |
End_Reason_Complete | 正常完成。Ended: complete. |
EHitEventState UENUM
| 值 Value | 说明 Description |
|---|---|
Begin | 受击开始。Hit begin. |
EDeathEventState UENUM
| 值 Value | 说明 Description |
|---|---|
OutOfHealth | 生命值归零。Health reached zero. |
OutOfLifeSpan | 寿命归零。Lifespan reached zero. |
SuicideAttack | 自杀攻击。Suicide attack. |
KillZ | 低于强制移除高度。Below kill Z. |
ActorDestroyed | 绑定 Actor 在实体存活期间被销毁(组件 EndPlay 补发 — KI-003)。Binding actor destroyed while the entity was still live (component EndPlay backfill — KI-003). |
EAnimState UENUM
动画状态机枚举,由动画处理器驱动,随 FAnimStateChangeData 事件暴露。
Animation state-machine enum driven by the animation processor, exposed via the FAnimStateChangeData event.
| 值 Value | 说明 Description |
|---|---|
Dirty | 脏状态(待重新计算)。Dirty (pending recompute). |
Idle | 空闲。Idle. |
Move | 移动。Move. |
BS_IdleMove | 空闲-移动混合空间。Blendspace idle-move. |
Appearing | 出生出现。Appearing. |
Sleeping | 休眠。Sleeping. |
Attacking | 攻击。Attacking. |
BeingHit | 受击。Being hit. |
Dying | 死亡。Dying. |
Falling | 坠落。Falling. |
Jumping | 跳跃。Jumping. |
Montage | 蒙太奇播放。Montage playback. |
投射物 / 战利品枚举 Projectile & Loot Enums
EProjectileMoveMode UENUM
| 值 Value | 说明 Description |
|---|---|
Static | 静态。Static. |
Interped | 插值运动。Interpolated. |
Ballistic | 抛物线。Ballistic. |
Tracking | 跟踪目标。Tracking. |
EProjectileDamageMode UENUM
| 值 Value | 说明 Description |
|---|---|
Point | 点伤害。Point. |
Radial | 球形范围伤害。Radial. |
Beam | 球扫(扫掠球体)。Beam (swept sphere). |
ELootMoveMode UENUM
| 值 Value | 说明 Description |
|---|---|
Ballistic | 抛物线生成运动。Ballistic spawn movement. |
Interped | 插值收集运动。Interpolated collection movement. |
ELootState UENUM
| 值 Value | 说明 Description |
|---|---|
Spawning | 抛物线生成阶段。Ballistic spawn phase. |
Ready | 准备被收集。Ready to be collected. |
BeingCollected | 飞向收集者。Flying to the gatherer. |
Collected | 成功收集。Successfully collected. |
Expired | 寿命过期。Lifespan expired. |
EMassAgentSyncMode UENUM
实体与 Actor/Component 之间的变换同步方向,由 Agent 表示层使用。
Transform sync direction between entity and actor/component, used by the agent representation layer.
| 值 Value | 说明 Description |
|---|---|
None | 不同步。No synchronization. |
EntityToActor | 实体驱动 Actor 变换(ControlAgent 模式)。Entity drives the Actor transform (ControlAgent mode). |
EntityToComponent | 实体驱动组件变换。Entity drives the Component transform. |
ComponentToEntity | 组件驱动实体变换(ControlCharacter 模式)。Component drives the Entity transform (ControlCharacter mode). |
EVATBakeMode UENUM
VAT(顶点动画纹理)烘焙模式:骨骼模式或顶点模式。
VAT (vertex animation texture) bake mode: bone mode or vertex mode.
| 值 Value | 说明 Description |
|---|---|
BoneMode | 骨骼模式。Bone mode. |
VertexMode | 顶点模式。Vertex mode. |
EBattleFlags UENUM
MassBattle 特有的实体标志定义。这些标志最终映射到 MassAPI 的 EEntityFlags(两个 int64 位掩码,共 128 个标志):0-63 存于 Flags(低位),64-127 存于 FlagsHigh(高位)。枚举值数量必须与 EEntityFlags 匹配。EBattleFlags_MAX 用于计数。命名条目在模块启动时经反射注册进 UMassAPIFlagSettings::FlagRegistry(FlagNN 占位条目跳过)。
MassBattle-specific entity flags. These ultimately map to MassAPI's EEntityFlags (two int64 bitmasks, 128 flags total): flags 0-63 are stored in Flags (low), flags 64-127 in FlagsHigh (high). The value count must match EEntityFlags. EBattleFlags_MAX is the counting sentinel. Named entries are registered into UMassAPIFlagSettings::FlagRegistry via reflection at module startup (the FlagNN placeholders are skipped).
命名标志(低位 0-63)Named flags, low bits 0-63
| 值 Value | 说明 Description |
|---|---|
Appearing | 出生出现中。Appearing. |
AppearAnim | 出生动画播放中。Appear animation playing. |
AppearDissolve | 出生溶解效果。Appear dissolve effect. |
Sleeping | 休眠中。Sleeping. |
Patrolling | 巡逻中。Patrolling. |
Attacking | 攻击中。Attacking. |
AttackAnim | 攻击动画播放中。Attack animation playing. |
Falling | 坠落中。Falling. |
FallAnim | 坠落动画播放中。Fall animation playing. |
BeingPushed | 被推挤中(避障)。Being pushed (avoidance). |
Launching | 被击退中。Launching (knockback). |
Chasing | 追逐中。Chasing. |
Approaching | 接近中。Approaching. |
BeingHit | 受击中。Being hit. |
HitAnim | 受击动画播放中。Hit animation playing. |
HitGlow | 受击发光效果。Hit glow effect. |
HitJiggle | 受击抖动效果。Hit jiggle effect. |
Dying | 死亡中。Dying. |
DeathAnim | 死亡动画播放中。Death animation playing. |
DeathDissolve | 死亡溶解效果。Death dissolve effect. |
Activated | 已激活。Activated. |
AI | AI 控制。AI-controlled. |
BurstFx | 爆发特效。Burst FX. |
AttachedFx | 附着特效。Attached FX. |
Rendering | 渲染中。Rendering. |
NotRendering | 不渲染。Not rendering. |
Agent | agent 实体。Agent entity. |
Obstacle | 障碍物实体。Obstacle entity. |
Projectile | 投射物实体。Projectile entity. |
Prop | 道具/静态物实体。Prop entity. |
Slowing | 减速 debuff 生效中。Slow debuff active. |
TemporalDamaging | 持续伤害 debuff 生效中。Temporal damage debuff active. |
RenderingWithParticle | 粒子表现。Rendering with particle. |
RenderingWithActor | Actor 表现。Rendering with actor. |
PauseAnimChange | 暂停动画切换。Pause animation change. |
PendingDestroy | 待销毁。Pending destroy. |
Loot | 战利品实体。Loot entity. |
AStarMovingTo | A* 寻路移动中。Moving via A* pathfinding. |
Selected | 已选中。Selected. |
BeingSelect | 正在被选中(瞬态)。Being selected (transient). |
Idle | 无优先级链行为拥有该 agent 时设置(非 Dying/Appearing/Sleeping/Patrolling/Attacking/Chasing/Returning 中的任何一个)。在 BehaviorProcessor 每 agent 循环末尾、第 1-7 节运行之后维护,读者看到的是当前帧的节后状态。并发的反应层(BeingHit/Falling/Launching 等)不参与判定——被击退的 agent 属于「空闲但在反应」。外部查询(蓝图、任务认领、AI 导演)请用 IdleFlag 判断「该 agent 是否空闲」;不要在 BehaviorProcessor 内部用它——第 3/4 节在本标志更新之前运行,同帧内是过期的,那些节必须直接检查各行为标志。Set when no priority-chain behavior owns the agent (none of Dying/Appearing/Sleeping/Patrolling/Attacking/Chasing/Returning is set). Maintained at the end of BehaviorProcessor's per-agent loop, AFTER Sections 1-7 have run, so readers see the post-section state for the current frame. Concurrent reaction layers (BeingHit, Falling, Launching, ...) are NOT considered — a knocked-back agent is "idle but reacting". Use IdleFlag for external "is this agent free?" queries (Blueprint, task claim, AI director). Do NOT use it inside the BehaviorProcessor section chain — sections 3/4 run BEFORE the flag is updated, so within the same frame it's stale; those sections must keep checking individual behavior flags directly. |
Returning | 被推离后返回中。Returning after being pushed away. |
BPTask_MoveTo | 用户可用标志:当某个 AgentsMoveTo 蓝图任务正在驱动该 Agent 移动时为 true,任务释放时清除。外部代码(BP、AI 导演、其他任务)通过它判断「该 Agent 当前是否被 MoveTo 任务接管」。任务内部锁定/挂起状态保存在 FMoving::bMoveToLocked / bMoveToSuspended,不放这里。User-facing flag: set while an AgentsMoveTo Blueprint task currently owns this agent's movement; cleared on task release. External code (BP, AI directors, other tasks) queries it to ask "is this agent currently being driven by a MoveTo task?". Internal task plumbing (lock + suspend state) lives on FMoving::bMoveToLocked / bMoveToSuspended, not here. |
BPTask_ChaseAttack | 用户可用标志:当某个 AgentsChaseAttack 蓝图任务正在驱动该 Agent 攻击指定目标时为 true,任务释放时清除。外部代码通过它判断「该 Agent 当前是否被 ChaseAttack 任务接管」。任务内部锁定/目标状态保存在 FTracing::ActiveChaseAttackTaskID / LockedTarget,不放这里。User-facing flag: set while an AgentsChaseAttack Blueprint task currently owns this agent's trace target; cleared on task release. External code queries it to ask "is this agent currently being driven by a ChaseAttack task?". Internal task plumbing (lock + pinned target) lives on FTracing::ActiveChaseAttackTaskID / LockedTarget, not here. |
Reinforcing | 支援中。Reinforcing. |
PlayerDriven | 玩家驱动。Player-driven. |
Flag46 … Flag63 | 未命名占位标志(低位剩余 18 个)。Unnamed placeholder flags (remaining 18 low bits). |
高位 64-127 High bits 64-127
Flag64 至 Flag127 全部为未命名占位标志(存于 FlagsHigh),保留给未来使用。它们与 Flag46-63 一样不进入 FlagRegistry。
Flag64 through Flag127 are all unnamed placeholders (stored in FlagsHigh), reserved for future use. Like Flag46-63, they are not registered into FlagRegistry.
EUObjectOptType UENUM
对 actor/object 执行的操作类型:生成、销毁、应用变换。
Operation type to perform on an actor/object: spawn, destroy, apply transform.
| 值 Value | 说明 Description |
|---|---|
Spawn | 生成新对象,Transform 用于初始位置/旋转/缩放。Spawn a new object. Transform is used for initial location/rotation/scale. |
Destroy | 销毁引用的对象,Transform 被忽略。Destroy the referenced object. Transform is ignored. |
Transform | 给引用的对象应用新变换。Apply a new transform to the referenced object. |
ESelectState UENUM
选中状态:瞬态的选中中、持久的已选中,以及「全部」通配(用于 DeselectAgents)。
Selection states: transient being-selected, persistent selected, and an "All" wildcard (for DeselectAgents).
| 值 Value | 说明 Description |
|---|---|
BeingSelect | 正在选中(瞬态)。Being selected (transient state). |
Selected | 已选中(持久态)。Fully selected (persistent state). |
All | 两种状态都匹配(用于 DeselectAgents)。Both states (for DeselectAgents). |
EInterpMode UENUM
合批特效的插值模式:GPU = Niagara Custom HLSL 外推;CPU = 每帧 VInterpTo。仅在 SubType != None 时生效,通过 EditConditionHides 隐藏。
Batched FX interpolation mode: GPU = Niagara Custom HLSL extrapolation; CPU = per-frame VInterpTo on CPU. Only applies when SubType != None; hidden otherwise via EditConditionHides.
| 值 Value | 说明 Description |
|---|---|
GPU | GPU Custom HLSL 外推——需要含 Custom HLSL 的 GPU 发射器。GPU Custom HLSL extrapolation — requires a GPU emitter with Custom HLSL. |
CPU | CPU 逐帧 VInterpTo/QInterpTo——兼容任意发射器类型。CPU per-frame VInterpTo/QInterpTo — works with any emitter type. |
EHostEntityType UENUM
标识宿主实体的类型用于池化。FxCPU 有独立池,避免池复用时 GPU/CPU 插值模式切换导致的原型变更。
Identifies the host entity type for pooling. FxCPU has its own pool to avoid archetype changes when switching between GPU/CPU interp modes at pool reuse.
| 值 Value | 说明 Description |
|---|---|
Actor | Actor 宿主。Actor host. |
Fx | 特效宿主。FX host. |
Sound | 音效宿主。Sound host. |
Projectile | 投射物宿主。Projectile host. |
Agent | agent 宿主。Agent host. |
Loot | 战利品宿主。Loot host. |
FxCPU | CPU 插值特效宿主的独立池。Separate pool for CPU-interp FX hosts. |
EEMainType UENUM
主要实体类型——存于 FMainType fragment,用于 O(1) 类型分发。
Primary entity type — stored in the FMainType fragment for O(1) type dispatch.
| 值 Value | 说明 Description |
|---|---|
Agent | agent。Agent. |
Projectile | 投射物。Projectile. |
Loot | 战利品。Loot. |
Obstacle | 障碍物。Obstacle. |
Debuff | debuff。Debuff. |
Host | 宿主。Host. |
FxEntity | 特效实体。FX entity. |
EAgentBehaviorState UENUM
agent 行为的简版状态枚举(对外暴露用)。
Compact agent behavior state enum (for external exposure).
| 值 Value | 说明 Description |
|---|---|
None | 无状态。None. |
Appearing | 出生出现中。Appearing. |
Sleeping | 休眠中。Sleeping. |
Patrolling | 巡逻中。Patrolling. |
Attacking | 攻击中。Attacking. |
Hit | 受击中。Hit. |
Dying | 死亡中。Dying. |
阵型相关枚举 Formation Enums
EFormationAssignmentMode UENUM
控制 Agent 如何分配到阵型槽位。
Controls how agents are assigned to formation slots.
| 值 Value | 说明 Description |
|---|---|
KeepFormation | 保持 Agent 的相对位置关系——左边的留在左边,前面的留在前面。Preserve agents' relative arrangement — agents on the left stay on the left, etc. |
ReformTheLine | 忽略当前排列——每个 Agent 移动到离自己最近的可用槽位。Ignore current arrangement — each agent moves to the nearest available slot. |
EAgentBoundMode UENUM
生成阵型时采样 Agent 边界半径的来源:FromCollider 用胶囊体碰撞体的 XY 投影边界圆半径;FromAvoidance 用避障椭圆的长轴(主/副轴较大值),即边界圆半径 × max(AvoidDistMult.X, AvoidDistMult.Y)。
Source for sampling an agent's bounding radius when generating formations: FromCollider uses the capsule collider's bounding-circle radius (XY-projected); FromAvoidance uses the avoidance ellipse's long axis (max of major/minor), i.e. bounding-circle radius scaled by max(AvoidDistMult.X, AvoidDistMult.Y).
| 值 Value | 说明 Description |
|---|---|
FromCollider | 来自碰撞体。From collider. |
FromAvoidance | 来自避障椭圆长轴。From avoidance ellipse long axis. |
EFormationSizingMode enum class
为已禁用的 Fixed 尺寸分支保留——不对蓝图公开(非 UENUM)。阵型尺寸目前仅 FitAgents(见 MassBattleFormationAlgorithms.cpp 的 bFormationFitAgentsOnly 常量);ComputeFitAgentsSlotTarget 仍接收该枚举,固定分支在有目标时不可达。要恢复模式选择,将该常量翻回 false 并重新公开结构体的 SizingMode 字段。
Retained for the disabled Fixed sizing branches — NOT Blueprint-exposed (not a UENUM). Formation sizing is FitAgents-only (see the bFormationFitAgentsOnly constant in MassBattleFormationAlgorithms.cpp); ComputeFitAgentsSlotTarget still takes the enum but the Fixed branch is unreachable while the constant is true. To restore mode selection, flip that constant back to false and re-expose the struct's SizingMode field.
| 值 Value | 说明 Description |
|---|---|
Fixed | 固定尺寸(当前禁用)。Fixed size (currently disabled). |
FitAgents | 按 Agent 数量适配尺寸(当前唯一模式)。Fit size to the agent count (the only active mode). |
补充说明 Notes
EReinforceMode(ReportOnly / ReinforceOnly / Full)定义于本文件的 EReinforceMode 段:bEnable 是总开关,Mode 选择开启后的行为路径——只上报目标给指挥中心、只向共享目标支援、或两者兼有。本文件还包含 EDmgType 之外的所有战斗枚举;EDmgType 定义于 Fragments/Damage.h。事件枚举的 ESpawnPositioningMode 定义于 MassBattleStructs.h(非本文件)。
EReinforceMode (ReportOnly / ReinforceOnly / Full) lives in this file: bEnable is the master off switch and Mode selects which paths are active when enabled — report targets to command center, reinforce toward shared targets, or both. This file holds all combat enums except EDmgType, which lives in Fragments/Damage.h. Note ESpawnPositioningMode is defined in MassBattleStructs.h, not here.