UMassBattleAgentConfigDataAsset
Source/MassBattle/Public/DataAssets/MassBattleAgentConfigDataAsset.h
概述Overview
agent 单位的配置数据资产,派生自 UMassBattleDataAssetBase。以扁平 fragment 成员的形式承载一个原型的全部可调参数,面板按 Agent Properties / Agent Capabilities / Agent Behaviors / Agent Reactions / Agent Misc 五个分类组织。每个原型会有的 fragment 都能在这里看到:有配置价值的字段直接可编辑;纯运行时的字段作为 runtime fragment 存在,默认隐藏(bHideRuntimeFragments),打开即可查看但不应编辑。每个作者化片段另有自己的显隐开关,开关列表读起来就是这份资产的目录。Agent Creator 创建并烘焙本资产;烘焙记录在 BakeRecipe 里,下次打开 Creator 填入配置即可还原设置。
The configuration data asset of an agent unit, derived from UMassBattleDataAssetBase. It carries every tunable parameter of one archetype as flat fragment members, and the panel groups them into Agent Properties / Agent Capabilities / Agent Behaviors / Agent Reactions / Agent Misc. Every fragment a prototype can carry is visible here: fields with configuration value are editable directly, while runtime-only fields exist as runtime fragments that are hidden by default (bHideRuntimeFragments) — reveal them to inspect, never to edit. Each authored fragment also has its own visibility toggle, so the toggle list reads as a table of contents for the asset. The Agent Creator creates and bakes this asset; the bake's setup is recorded in BakeRecipe, and assigning the config in the Creator restores it.
动画配置见 Animation.h(AnimShared 里的动画槽表、移动曲线与 Jump State Machine),行为转移见 Behavior.h,攻击参数见 Attack.h;片段与曲线的作者面在 UMassBattleATTDataAsset 上。
Animation configuration lives on Animation.h (the slot table, locomotion curve and Jump State Machine inside AnimShared), behavior transitions on Behavior.h, and attack parameters on Attack.h; the author face for clips and curves is UMassBattleATTDataAsset.
继承Inheritance
类标记为 Blueprintable 与 BlueprintType;默认构造器给新配置写入人形怪物的基线取值。
The class is Blueprintable and BlueprintType; the default constructor seeds a new config with the humanoid-monster baseline.
Creator 配方结构体Creator Recipe Structs
这两个结构体只存在于编辑器构建,不随包发布。它们记录产出本配置的 Agent Creator 设置——不是烘焙输入本身:网格烘焙参数归 ATT,sprite 帧率归图集资产,配方刻意不镜像它们。
These two structs exist only in editor builds and never ship. They record the Agent Creator setup that produced this config — not the bake inputs themselves: mesh bake parameters belong to the ATT and sprite FPS to the atlas asset, so the recipe deliberately does not mirror them.
配方里的一条渲染带:屏幕尺寸阈值与该带的渲染模式。每条 ScreenSize 是下界——占屏大于等于它时使用本带,最后一条应为 0。
One render band in the recipe: a screen-size threshold and the band's render mode. Every ScreenSize is a lower bound — the band is used when the projected screen size is at or above it, and the last band should be 0.
成员变量Members
| 名称Name | 类型Type | 默认值 | 说明Description |
|---|---|---|---|
ScreenSize | float | 0.f | 本带开始生效的屏幕尺寸(0-1)。数值越大越近。Screen size (0-1) at which this band begins. Larger values are nearer. |
RenderMode | EVATRenderMode | BoneCS | 本带的渲染模式(见 MassBattleEnums.h 的 EVATRenderMode)。Render mode of this band (see EVATRenderMode in MassBattleEnums.h). |
产出本配置的 Creator 配方:重新打开 Creator、指向本资产即可不重填重烘。在 Creator 的 0.RenderProfile 分类里填入本配置即载入此块;每次成功烘焙回写。清单里有多份配置时,烘焙把配方与动画/配置字段写进每一份,一次重烘即可同步共用同一套美术资产的多个配置。
The Creator recipe that produced this config: reopen the Creator, point it at this asset and re-bake without retyping the setup. Assigning the config in the Creator's 0.RenderProfile category loads this block, and every successful bake writes it back. With several configs listed, the bake writes the recipe and the animation/config fields into every one, so a single re-bake updates several configs sharing one set of art assets.
成员变量Members
| 名称Name | 类型Type | 默认值 | 说明Description |
|---|---|---|---|
AssetName | FString | — | 所有生成资产共用的资产名。The asset name every generated asset is built from. |
SearchPath | FString | — | 扫描动画片段的内容路径。Content path scanned for clips. |
GeneratePath | FString | — | 生成资产的输出路径。Output path of the generated assets. |
bAdvanced | bool | false | 是否是 Advanced(装配复合)配方而不是单网格配方。Whether this is the Advanced (assembly composite) recipe instead of the single-mesh one. |
Bands | TArray<FMassBattleAgentBakeBand> | — | 作者填写的渲染带,由近到远。The authored render bands, near to far. |
MeshSource | TSoftObjectPtr<UMassBattleATTDataAsset> | — | 预填好的 ATT 网格源(Mesh Prep 面板)。The prepared ATT mesh source (Mesh Prep panel). |
SpriteSource | FSoftObjectPath | — | 预填好的 ATA sprite 源(Sprite Prep 面板);该资产类型仅存于编辑器,故以路径存储。The prepared ATA sprite source (Sprite Prep panel); stored as a path because that asset type is editor-only. |
AssemblyTemplate | TSoftObjectPtr<UBlueprint> | — | 只读的迁移快照:模板归网格源的 ATT 所有、以它为准;载入配方时给没有模板的 ATT 回填一份。从不手填。A read-only migration snapshot: the mesh source's ATT owns the template and is the authority; loading the recipe back-fills an ATT that has none. Never authored by hand. |
ActorClass | TSubclassOf<AActor> | — | Actor 档使用的 actor 类。The actor class used by Actor bands. |
公开方法Public Methods
默认构造器给新建的配置写入人形怪物基线,使一份空配置在填写之前就有可运行的值(具体取值与理由在实现侧)。由内容浏览器新建本资产时自动执行。
The default constructor seeds a freshly created config with the humanoid-monster baseline, so an empty config already has runnable values before anything is filled in (the concrete values live in the implementation). It runs automatically when the asset is created in the Content Browser.
Input
无参数。
No parameters.
Output
无返回值。副作用:写入基线字段。
No return value. Side effect: fills the baseline fields.
资产加载后的数据升级钩子:旧版本保存的配置在这里被迁移到当前字段形状,作者不需要手工转换。这一页不展开具体版本与字段,因为那些细节属于实现,不是配置接口。
The post-load upgrade hook: a config saved by an older version is migrated to the current field shapes here, with no manual conversion. This page does not enumerate the versions and fields, because those details belong to the implementation rather than the configuration surface.
Input
无参数。
No parameters.
Output
无返回值。副作用:按需迁移旧数据,并可能把资产标记为已修改。
No return value. Side effects: migrates old data as needed and may mark the asset dirty.
成员变量Members
Fragment Visibility 开关Fragment Visibility Toggles
全部是 bool,默认 true;它们通过 EditConditionHides 控制下方 fragment 成员在资产编辑器中的显隐。bHideRuntimeFragments 管的是另一类:默认 true,即所有 runtime fragment(纯运行时数据)默认不显示。
All are bool and default to true; through EditConditionHides they control whether the fragment members below appear in the asset editor. bHideRuntimeFragments governs a different class: it defaults to true, so every runtime fragment (runtime-only data) is hidden by default.
| 名称Name | 默认值 | 说明Description |
|---|---|---|
bHideRuntimeFragments | true | 隐藏 runtime fragment。为 false 时显示全部运行时成员(只可查看,不应编辑)。Hides runtime fragments. When false, every runtime member is shown (inspect only, never edit). |
bShowDebug | true | 显示 / 隐藏 Debug fragment。Show / hide the Debug fragment. |
bShowSubType | true | 显示 / 隐藏 SubType fragment。Show / hide the SubType fragment. |
bShowStyleType | true | 显示 / 隐藏 StyleType fragment。Show / hide the StyleType fragment. |
bShowScaling | true | 显示 / 隐藏 Scaling fragment。Show / hide the Scaling fragment. |
bShowCollider | true | 显示 / 隐藏 Collider fragment。Show / hide the Collider fragment. |
bShowPhysicsShared | true | 显示 / 隐藏 PhysicsShared fragment。Show / hide the PhysicsShared fragment. |
bShowHealth | true | 显示 / 隐藏 Health fragment。Show / hide the Health fragment. |
bShowController | true | 显示 / 隐藏 Controller fragment。Show / hide the Controller fragment. |
bShowEvent | true | 显示 / 隐藏 Event fragment。Show / hide the Event fragment. |
bShowParent | true | 显示 / 隐藏 Parent fragment。Show / hide the Parent fragment. |
bShowStatistics | true | 显示 / 隐藏 Statistics fragment。Show / hide the Statistics fragment. |
bShowQueryShared | true | 显示 / 隐藏 QueryShared fragment。Show / hide the QueryShared fragment. |
bShowCurveShared | true | 显示 / 隐藏 CurveShared fragment。Show / hide the CurveShared fragment. |
bShowRender | true | 显示 / 隐藏 Render fragment(Visualize)。Show / hide the Render fragment (Visualize). |
bShowLODShared | true | 显示 / 隐藏 LODShared fragment。Show / hide the LODShared fragment. |
bShowBoneShared | true | 显示 / 隐藏 BoneShared fragment。Show / hide the BoneShared fragment. |
bShowAnimShared | true | 显示 / 隐藏 AnimShared fragment。Show / hide the AnimShared fragment. |
bShowNotifyShared | true | 显示 / 隐藏 NotifyShared fragment。Show / hide the NotifyShared fragment. |
bShowTrace | true | 显示 / 隐藏 Trace fragment。Show / hide the Trace fragment. |
bShowMove | true | 显示 / 隐藏 Move fragment。Show / hide the Move fragment. |
bShowNavigation | true | 显示 / 隐藏 Navigation fragment。Show / hide the Navigation fragment. |
bShowAvoidance | true | 显示 / 隐藏 Avoidance fragment。Show / hide the Avoidance fragment. |
bShowTrafficShared | true | 显示 / 隐藏 TrafficShared fragment。Show / hide the TrafficShared fragment. |
bShowBehavior | true | 显示 / 隐藏 Behavior fragment。Jump 也由本开关一并显示(不设单独的 bShowJump)。Show / hide the Behavior fragment. Jump is shown by this same switch (there is no separate bShowJump). |
bShowAppear | true | 显示 / 隐藏 Appear fragment。Show / hide the Appear fragment. |
bShowSleep | true | 显示 / 隐藏 Sleep fragment。Show / hide the Sleep fragment. |
bShowPatrol | true | 显示 / 隐藏 Patrol fragment。Show / hide the Patrol fragment. |
bShowChase | true | 显示 / 隐藏 Chase fragment。Show / hide the Chase fragment. |
bShowAim | true | 显示 / 隐藏 Aim fragment。Show / hide the Aim fragment. |
bShowAttack | true | 显示 / 隐藏 Attack fragment。Show / hide the Attack fragment. |
bShowDamage | true | 显示 / 隐藏 Damage fragment。Show / hide the Damage fragment. |
bShowDebuff | true | 显示 / 隐藏 Debuff fragment。Show / hide the Debuff fragment. |
bShowReinforce | true | 显示 / 隐藏 Reinforce fragment。Show / hide the Reinforce fragment. |
bShowReturn | true | 显示 / 隐藏 Return fragment。Show / hide the Return fragment. |
bShowHit | true | 显示 / 隐藏 Hit fragment。Show / hide the Hit fragment. |
bShowDefence | true | 显示 / 隐藏 Defence fragment。Show / hide the Defence fragment. |
bShowHealthBar | true | 显示 / 隐藏 HealthBar fragment。Show / hide the HealthBar fragment. |
bShowTextPop | true | 显示 / 隐藏 TextPop fragment。Show / hide the TextPop fragment. |
bShowDeath | true | 显示 / 隐藏 Death fragment。Show / hide the Death fragment. |
bShowGather | true | 显示 / 隐藏 Gather fragment。Show / hide the Gather fragment. |
bShowSelect | true | 显示 / 隐藏 Select fragment。Show / hide the Select fragment. |
bShowExtraData | true | 显示 / 隐藏 ExtraData。Show / hide ExtraData. |
Agent Properties 属性与运行时状态 Identity, Physics &Runtime State
身份、碰撞、物理、血量、控制、事件、父子、统计、确定性与网络数据。VisibleAnywhere + bHideRuntimeFragments 的行是运行时片段,默认隐藏。
Identity, collider, physics, health, control, events, parent/child, statistics, determinism and networking. Rows marked VisibleAnywhere + bHideRuntimeFragments are runtime fragments, hidden by default.
| 名称Name | 类型Type | 可见性Visibility | 说明Description |
|---|---|---|---|
Agent | FAgentTag | runtime | 零字段原型标签,把实体标记为 Agent;模板构建时生成,非手工配置。Zero-field archetype tag marking the entity as an Agent; template-built, not authored. |
MainType | FMainType | runtime | 主类型判别字段,本资产固定为 Agent;生成时设定、此后不变。Primary type discriminator, fixed to Agent here; set at spawn and never changed afterwards. |
Debug | FAgentDebug | edit (bShowDebug) | 每 agent 调试绘制开关:总开关与逐层开关(碰撞 / 索敌 / 移动 / 寻路 / 避障 / 采集形状、LOD、行为、任务、ID 与选中态文本),以及筛选、最大数量、最大距离等开销控制。Per-agent debug draw switches: a master toggle plus per-layer toggles (collider / trace / move / nav / avoidance / gather shapes, LOD, behavior, task, ID and selection text), with filtering, max count and max distance cost controls. |
SubType | FSubType | edit (bShowSubType) | 子类型选择器 0-255;按值切换原型级子类型 tag,查询可过滤变体而不改实体构成。子体生成时可继承父级子类型。Subtype selector 0-255; swaps the per-archetype subtype tag so queries filter variants without touching entity composition. Children can inherit the parent's subtype at spawn. |
StyleType | FStyleType | edit (bShowStyleType) | 由 SubType 选中的渲染器内部的样式选择器:Index 决定由哪个 emitter / 网格渲染器显示该单位,SubIndex 决定该行的哪种变体。-1 表示出生时随机——只解一次并回写,各端因此一致。Style selector inside the renderer chosen by SubType: Index picks the emitter / mesh renderer and SubIndex the variant of that row. -1 means random at spawn — resolved once and written back, so all peers agree. |
Scaling | FScaling | edit (bShowScaling) | 统一渲染 / 物理缩放(默认 1),另含受击挤压拉伸的运行时变形乘数。Uniform render/physics scale (default 1), plus the runtime squash-and-stretch multiplier fed on hit. |
Locating | FLocating | runtime | 运行时世界位置:当前 Location、上一帧 PreLocation 与生成时记录的 InitialLocation(巡逻 / 回归的锚点)。Runtime world position: current Location, previous-frame PreLocation and the spawn-stamped InitialLocation (the patrol/return anchor). |
Rotating | FRotating | runtime | 运行时朝向:RotationQuat 为权威值,DesiredRotationQuat 是玩法设定的插值目标,PreRotationQuat 镜像上一帧供父子跨读。Runtime orientation: RotationQuat is authoritative, DesiredRotationQuat is the gameplay-set interpolation target, and PreRotationQuat mirrors last frame for parent/child cross-reads. |
Collider | FCollider | edit (bShowCollider) | 胶囊碰撞形状与空间网格 / PBD 注册:半径 / 高度 / 质量、网格注册模式、碰撞组与单向忽略标志、PBD 开关及压力场选项。RelativeRotation 是生成时的碰撞体偏移。Capsule collision shape and grid/PBD registration: radius / height / mass, grid register mode, collision group with one-directional ignores, PBD toggles and pressure-field options. RelativeRotation is a spawn-time collider offset. |
PhysicsShared | FPhysicsShared | edit (bShowPhysicsShared) | 原型级共享物理参数:碰撞倍率、采集盒额外范围、摩擦预算、空气阻力、单位对松弛系数与压力场施压 / 偏置。共享:相同取值去重为一份运行期可调实例。Per-archetype shared physics knobs: collider multiplier, extra gather extent, friction budgets, air drag, agent-pair relaxation and pressure-field deposit/bias. Identical values dedupe to one runtime-tweakable instance. |
Health | FHealth | edit (bShowHealth) | 血量:可配置的初始 Current / Maximum 与锁定开关。Current / Maximum 进快照同步。Hit points: authored initial Current / Maximum plus a lock flag. Current / Maximum are snapshot-synced. |
Controller | FAgentController | edit (bShowController) | 控制权归属:AI 与玩家驱动(玩家输入带下落时的空中控制);持有玩家槽位(-1 = AI);锁步网络 ID 用于 resync 重绑。Control ownership: AI vs player-driven (player input with CMC-style air control while falling); owning player slot (-1 = AI); the lockstep network id used for resync rebinding. |
Controlling | FAgentControlling | runtime | 上一 ControlMode 的运行时镜像,用于检测变化并同步玩家驱动标志。不要编辑。Runtime mirror of the previous ControlMode, used to detect changes and sync the player-driven flag. Do not edit. |
Event | FAgentEvent | edit (bShowEvent) | 事件分发开关板:总开关与逐事件开关(索敌 / 移动 / 出生 / 休眠 / 巡逻 / 追击 / 支援 / 攻击 / 受击 / 死亡 / 池化 / 统计 / 动画状态变化)。接收 Actor 在运行期设置——不要在数据资产里填写。Event dispatch board: a master toggle plus per-event toggles (trace / move / appear / sleep / patrol / chase / reinforce / attack / hit / death / pool / statistics / animation-state change). The receiver actor is set at runtime — do not fill it in the data asset. |
EventRT | FAgentEventRT | runtime | 事件接收者的运行时解析缓存。不要编辑。Resolved event-receiver runtime cache. Do not edit. |
Parent | FParent | edit (bShowParent) | 作者配置的子体生成,在出生时刻触发:每个生成项可把子体挂接到本 agent,继承事件接收者 / 伤害 / 减益 / 子类型 / 队伍,并按关系设置受击表现与索敌目标共享。运行时链接在 Parenting。Authored child spawns fired at the Appear moment: each entry can attach the child to this agent, inherit event receiver / damage / debuff / subtype / team, and set per-relation hit-reaction and trace-target sharing. Runtime links live in Parenting. |
Parenting | FParenting | runtime | 运行时父子链接与解算帧:父子树、挂载状态、回正计时、目标 / 反应共享,以及宿主发布的解算变换。Runtime parent/child link and resolved frame: the tree, mount state, recentre timers, target/reaction sharing, and the resolved transform the host publishes. |
Statistics | FStatistics | edit (bShowStatistics) | 计分板:累计伤害 / 击杀 / 得分与存活时长,可把战果转记给另一实体;另含玩家身份字段。Scoreboard: accumulated damage / kills / score and survival time, with an option to credit everything to another entity; also carries player identity. |
Determinism | FDeterminism | runtime | 运行时确定性身份:跨端稳定的 UniqueID 与由其一次性播种的每实体随机流(所有随机抽取都取自它,绝不重播种)。快照恢复。Runtime deterministic identity: a cross-peer UniqueID and the per-entity random stream seeded once from it (every random draw comes from it and it is never reseeded). Restored on snapshot. |
Networking | FNetworking | runtime | 每实体网络数据(仅展示):注册模板键、逐 tick 哈希,以及迟加入端重建 Actor 所需的视图身份。Per-entity networking data (exhibition only): the registered template key, the per-tick hash, and the view identity a late joiner needs to rebuild the actor. |
QueryShared | FQueryShared | edit (bShowQueryShared) | 作者化的查询合集(每 chunk 一份共享片段):索敌 / 伤害 / 拾取查询在同一个地方配置。留空 = 不过滤,匹配一切;这些值不再支持按 agent 单独覆盖。The authored query bundle (one shared fragment per chunk): trace / damage / loot queries configured in one place. Empty = no filter, matching everything; these values can no longer be overridden per agent. |
CurveShared | FCurveShared | edit (bShowCurveShared) | 驱动渲染反应的共享曲线集:出生 / 死亡溶解、受击辉光包络与受击挤压拉伸曲线。共享:跨原型按取值组合去重。The shared curve set driving render reactions: appear/death dissolve, hit-glow envelope and the hit squash/stretch profile. Shared: deduped by value tuple across archetypes. |
Agent Capabilities 能力 Render, Animation, Trace, Move &Avoidance
| 名称Name | 类型Type | 可见性Visibility | 说明Description |
|---|---|---|---|
Visualize | FVisualize | edit (bShowRender) | 视觉表现配置:粒子 / VAT 管线或 Actor 表现、网格变换偏移与插值参数。远距剔除由 LODShared 的 None 渲染档负责。Visual representation config: the particle/VAT pipeline or actor representation, mesh transform offset and interpolation parameters. Distance culling is LODShared's None render band. |
Visualizing | FVisualizing | runtime | 渲染运行时状态:渲染槽位、当前 LOD / 表现模式、逐帧插值变换、VAT 动画槽与材质特效通道。Rendering runtime state: render slots, current LOD/representation, per-frame interpolated transform, VAT animation slots and material FX channels. |
LODShared | FLODShared | edit (bShowLODShared) | 共享 LOD 配置:五条固定渲染管线档——哪一档用哪种表现与渲染模式。每档的 ScreenSize 是下界,最后一条应为 0。Shared LOD config: five fixed render-pipeline bands — which representation and render mode each band uses. Each band's ScreenSize is a lower bound, and the last band should be 0. |
BoneShared | FBoneShared | edit (bShowBoneShared) | 骨骼域能力:从源骨骼网格烘出的 socket 清单(只读,每次 Generate 重写),加上作者编写的布娃娃配置。体量大的刚体表与关节表住在 ATT 上,不在这里。The bone-domain capability: the socket inventory baked from the source mesh (read-only, rewritten on every Generate) plus the authored ragdoll configuration. The bulk body and joint tables live on the ATT, not here. |
AnimShared | FAnimShared | edit (bShowAnimShared) | 共享动画配置:融合速度、移动曲线(偏移、逐类片段引用、速度键)、Jump State Machine(三个相位片段及各自携带的时序)与动画槽表。烘焙出的布局表藏在 AnimData 内,只读。详见 Animation.h。Shared animation config: blend speed, the locomotion curve (offsets, per-kind clip refs, speed keys), the Jump State Machine (three phase clips with their own timing) and the animation slot table. The baked layout table is hidden inside AnimData and read-only. See Animation.h. |
NotifyShared | FNotifyShared | edit (bShowNotifyShared) | 作者化的 notify 反应表:每行要么由已烘片段的通知名字触发,要么由 agent 事件族 + 阶段触发。是否发出动画通知由事件配置逐 archetype 门控。The authored notify reaction table: each row fires either from a baked clip notify name or from an agent event family + stage. Whether animation notifies are emitted is gated per archetype on the event config. |
Animating | FAnimating | runtime | 每 agent 动画运行时:逐 LOD 混合状态、动画状态机、选中的片段槽(含出生抽到的移动 / 跳跃集合)、跳跃与蒙太奇状态、队伍染色与特效通道。Per-agent animation runtime: per-LOD blend state, the animation machine, selected clip slots (including the locomotion/jump sets drawn at spawn), jump and montage state, team tint and FX channels. |
Trace | FTrace | edit (bShowTrace) | 索敌配置:模式(按查询 / 锁定玩家)、扇形几何、排序、随机保留数量、冷却与性能闸门。候选过滤来自 QueryShared。Target acquisition: mode (by query / lock a player), sector geometry, sorting, random keep count, cooldown and performance gates. Candidate filtering comes from QueryShared. |
Tracing | FTracing | runtime | 运行时索敌状态:感知目标与逐 tick 目标快照、冷却、最后已知位置与任务锁定内部量。Runtime trace state: the perceived target and per-tick snapshot, cooldown, last-known location and task lock internals. |
TracingShared | FTracingShared | runtime | 共享的逐玩家索敌缓存:每个本地玩家序号一份句柄 / 位置 / 半径,另含玩家 0 的相机位置与 FOV。Shared per-player trace cache: handle / location / radius per local player index, plus player 0's camera location and FOV. |
Move | FMove | edit (bShowMove) | 移动配置:XY 速度 / 加减速、到达半径、速度乘数、Z 飞行与贴地、土狼时间、台阶高、重力、KillZ、偏航转向模式、地面倾角与侧倾。流场与 A* 的选择在 Navigation。Locomotion config: XY speed/accel/decel, acceptance radius, speed multipliers, Z flight and terrain following, coyote time, step height, gravity, KillZ, yaw turn modes, ground tilt and banking. Flow-field vs A* selection lives in Navigation. |
Moving | FMoving | runtime | 运行时移动镜像:当前 / 期望速度、输入向量、角速度、Goal 与 MoveState、击退 / 击飞累加器、飞行高度、计时器与任务锁缓存位。Runtime locomotion mirror: current/desired velocity, input vector, angular velocity, Goal and MoveState, knockback/launch accumulators, flying height, timers and task-lock cache bits. |
Navigation | FNavigation | edit (bShowNavigation) | 寻路配置:流场绑定(仅运行期设置)、空闲跟随流场开关及每 agent 的 A* 参数。不要在这里填写流场 actor——用运行期设置接口。Navigation config: flow-field binding (runtime-set only), idle flow-field following and per-agent A* knobs. Do not fill the flow-field actor here — use the runtime setter. |
Navigating | FNavigating | runtime | 运行时路径状态:路径点与指纹、刷新倒计时、当前索引、流场反应时间保持与路径补丁备忘。Runtime path state: path points and fingerprint, refresh countdown, current index, flow-field hold and path-patch memo. |
Avoidance | FAvoidance | edit (bShowAvoidance) | 局部避障配置:算法(ORCA / ForceField / Hybrid)、碰撞组与单向忽略、分离速度 / 上限 / 阻尼、RVO 邻居与视界参数、椭圆足迹;交通规则层开关。Local avoidance config: algorithm (ORCA / ForceField / Hybrid), collision group with one-directional ignores, separation speed/cap/damping, RVO neighbor and horizon parameters, elliptical footprint, and the traffic-rule layer switch. |
Avoiding | FAvoiding | runtime | 逐帧避障求解草稿:期望 / 当前 / 避让速度、RVO 视界、最大速度、避障半径与避障闸门。非作者配置。Per-frame avoidance solver scratch: desired/current/avoiding velocities, RVO horizons, max speed, avoid radius and the avoid gate. Not authored. |
TrafficShared | FTrafficShared | edit (bShowTrafficShared) | 原型级共享的交通规则层(叠加在 ORCA 之上):生死过滤、让行仲裁、战斗路权、侧向绕行、车道偏移、静止侧让、贴墙滑行与压力场转向,每条规则独立开关。Per-archetype shared traffic-rule layer on top of ORCA: living-vs-dying filtering, yield arbitration, combat right-of-way, flank threading, lane shift, idle side-step, wall slide and pressure-field steering, each with its own switch. |
Agent Behaviors 行为 Behavior, Aim, Attack &Locomotion Branches
| 名称Name | 类型Type | 可见性Visibility | 说明Description |
|---|---|---|---|
Behavior | FBehavior | edit (bShowBehavior) | 中央行为控制面板:九个一次性转移点(出生 / 出生结束 / 睡眠唤醒 / 巡逻回合结束 / 丢失目标 / 回归结束 / 跳跃落地 / 瞄准对准 / 瞄准超时)各选一个目标行为;之后自然优先级链(Sleep > Patrol)接管。详见 Behavior.h。Central behavior panel: nine one-shot transition points (birth / appear finish / sleep wake / patrol round end / target lost / return finish / jump land / aim aligned / aim timeout), each choosing a target behavior; the natural priority chain (Sleep > Patrol) then takes over. See Behavior.h. |
Behaving | FBehaving | runtime | 运行时行为决策:当前互斥行为、请求切换、消费标志,以及瞄准行为已流逝的秒数。Runtime behavior decisions: the active mutually-exclusive behavior, the requested switch, the consume flag and the seconds spent aiming. |
Appear | FAppear | edit (bShowAppear) | 出生表现时间线:延时后按动画时长或配置时长播放,可选溶解淡入;期间可生成 Actor / 特效 / 音效载荷。结束时触发 OnAppearFinish,子体生成也锚定此时刻。Spawn-appearance timeline: after a delay, play for the anim length or the authored duration with an optional dissolve-in; actor/FX/sound payloads spawn during it. Finishing fires OnAppearFinish, which also anchors child spawns. |
Appearing | FAppearing | runtime | 出生进度时钟:锁存位、已流逝时间、动画与溶解计时器。Appear-progress clocks: latch bits, elapsed time, animation and dissolve timers. |
Sleep | FSleep | edit (bShowSleep) | 休眠行为:与巡逻同时启用时自然优先级更高;可配置休眠中是否继续索敌、受击是否唤醒。Sleep behavior: higher natural priority than patrol when both are enabled; configures whether a sleeper keeps tracing and whether a hit wakes it. |
Patrol | FPatrol | edit (bShowPatrol) | 随机点巡逻:在围绕原点(初始生成点 / 上次巡逻终点 / 自定义)的半径范围内取点,行走到点、等待,循环;每轮结束触发 OnPatrolRoundEnd。Random-point patrol: pick points in a radius around an origin (initial spawn point / last patrol end / custom), walk, wait, repeat; each round end fires OnPatrolRoundEnd. |
Patrolling | FPatrolling | runtime | 运行时巡逻双相时钟:行走预算与到达后等待。Runtime two-phase patrol clock: walking budget and post-arrival wait. |
Chase | FChase | edit (bShowChase) | 追击行为:进入攻击目标的接受半径即结束;最大追击距离是实时放弃线(触发 OnLostTarget 但保留索敌目标,0 = 禁用);可让飞行单位追到目标高度。Pursuit behavior: ends within the attack target's acceptance radius; a max chase distance is a live give-up line (fires OnLostTarget but keeps the trace target; 0 disables); flyers can chase at target height. |
Chasing | FChasing | runtime | 运行时追击状态:面向当前目标的计时,以及该计时属于哪个目标。Runtime chase state: the face-target timer and which target it belongs to. |
Aim | FAim | edit (bShowAim) | 作者编写的瞄准关节:偏航一半(蒙版骨、对称限位、速度、加速度、静止角)与俯仰一半(蒙版骨、上下限、速度、加速度、静止角),外加瞄准窗口与两个到位容差——攻击门控读它们。瞄准关节是炮塔的指向,可以抬仰(例如射箭),与将来的看向 / 眼睛概念不同,后者不会使用本 fragment。烘焙出的骨下标在 BoneShared 上,运行时角度在 Aiming 里。The authored aim joint: a yaw half (mask bone, symmetric limit, speed, acceleration, rest) and a pitch half (mask bone, lower/upper bounds, speed, acceleration, rest), plus the aim window and the two on-target tolerances the attack gate reads. The aim joint is the turret's pointing direction and may be elevated (archery) — distinct from a future look/eyes concept, which will not use this fragment. The baked bone indices live on BoneShared; the runtime angles live in Aiming. |
Aiming | FAiming | runtime | 运行时瞄准状态:相对车体的当前偏航 / 俯仰角,以及两轴各自的角速度。进快照与哈希;不要编辑。Runtime aim state: the current yaw/pitch angle relative to the chassis and each axis's angular velocity. Snapshotted and hashed; do not edit. |
Attack | FAttack | edit (bShowAttack) | 攻击配置:进入门槛的射程(瞄准窗口与两个到位容差住在 Aim 上)、命中容差、回合时长、恒定的命中时刻、notify 动作、命中时刻载荷与冷却。详见 Attack.h。Attack config: the entry gate's range (the aim window and its tolerances live on Aim), hit tolerances, round duration, the fixed hit moment, notify actions, hit-moment payloads and cooldown. See Attack.h. |
Attacking | FAttacking | runtime | 运行时攻击状态机:前摇 → 后摇(命中) → 冷却 → 完成,含三个阶段计时器;对准不属于本回合的相位。Runtime attack machine: wind-up → follow-through (hit) → cooldown → completed, with three phase timers; alignment is not a phase of the round. |
Damage | FDamage | edit (bShowDamage) | 主伤害配置(按形状换算为点 / 球形 / 光束变体):伤害类型、固定 + 百分比伤害、暴击、半径(0 = 单体)、特征过滤、距离衰减与障碍遮挡排除。Master damage config (converted per shape into point / radial / beam variants): damage type, flat + percent damage, crit, radius (0 = single target), trait filter, distance falloff and obstacle exclusion. |
Debuff | FDebuff | edit (bShowDebuff) | 主减益配置(按形状拆分):击退发射、持续伤害与减速——三种效果可独立组合。Master debuff config (split per shape): knockback launch, damage over time and slow — three independently composable effects. |
Debuffing | FDebuffing | runtime | 运行时减益台账:持续伤害与减速的施加者列表及合并减速乘数。Runtime debuff ledger: the causers of temporal damage and slow, plus the combined slow multiplier. |
Reinforce | FReinforce | edit (bShowReinforce) | 经指挥中心的支援:上报索敌目标并查询共享目标;模式 仅上报 / 仅支援 / 两者;到达即停,超距或超时无进展即放弃并重新查询。Reinforcement through a command center: report traced targets and query shared ones; modes report-only / reinforce-only / both; stops on arrival and gives up on distance or a stuck timeout, then re-queries. |
Reinforcing | FReinforcing | runtime | 运行时支援状态:当前目标、进入闸与三路卡死检测。Runtime reinforce state: current target, the entry gate and three-way stuck detection. |
Return | FReturn | edit (bShowReturn) | 回归行为(链底,空闲时自动触发,绝不打断主动行为):被推离 Goal 后经随机延时走回,带占位准入、超时成功门控、摇摆破解与延迟失败重锚。Return behavior (chain bottom, auto-triggered while idle, never interrupting active behaviors): after being pushed off its Goal, walk back after a random delay, with occupancy admission, a timeout success gate, oscillation breaking and deferred fail re-anchoring. |
Returning | FReturning | runtime | 运行时回归状态:门控预算、占位探测、摇摆窗口、延迟重锚与跨帧完成信号。Runtime return state: gate budget, occupancy probes, oscillation window, deferred re-anchor and the cross-frame finish signal. |
Jump | FJump | edit (bShowBehavior) | 跳跃行为:一次主动垂直冲量(速度配置,滞空约为 2 × ZSpeed / |Gravity|),可附加前冲;可由片段 notify 或行为切换触发。进入要求接触地面且冷却就绪,落地切到 OnJumpFinish。与 Behavior 共用显隐开关。Jump behavior: a deliberate vertical impulse (authored as a speed; air time is about 2 × ZSpeed / |Gravity|) with an optional forward push; triggerable from a clip notify or a behavior switch. Entry requires ground contact and a ready cooldown, and landing switches to OnJumpFinish. Shares the Behavior visibility switch. |
Jumping | FJumping | runtime | 运行时跳跃时钟:剩余冷却与起跳以来经过的时间(防止永不落地)。Runtime jump clocks: remaining cooldown and time since takeoff (the guard against never landing). |
Agent Reactions 反应 Hit, Death, Gather &Select
| 名称Name | 类型Type | 可见性Visibility | 说明Description |
|---|---|---|---|
Hit | FHit | edit (bShowHit) | 受击反馈配置:受击辉光(带冷却)、受击动画(仅在原地静止时播放,带冷却)、挤压拉伸强度,以及每次受击的 Actor / 特效 / 音效生成。On-hit reaction config: hit glow (with cooldown), hit animation (only while stationary, with cooldown), squash/stretch strength, and actor/FX/sound spawns on each hit. |
BeingHit | FBeingHit | runtime | 运行时受击计时:辉光 / 挤压 / 动画时钟、血条显示计时与两个冷却。Runtime hit timers: glow / jiggle / animation clocks, the health-bar display timer and two cooldowns. |
Defence | FDefence | edit (bShowDefence) | 抗性配置:逐类型免疫比例、存活与死亡两态各自独立的击退免疫、减速免疫,以及被减速是否同时拉长攻击节奏。Resistance profile: per-type immunity ratios, separate knockback immunity while alive vs dead, slow immunity, and whether being slowed also lengthens the attack cadence. |
HealthBar | FHealthBar | edit (bShowHealthBar) | 血条可见性规则(不管血量本身):总开关、选中时显示(最高优先级)、满血 / 空血隐藏、超时隐藏、插值填充比例与端侧本地剔除距离。Health-bar visibility rules (not health itself): master switch, show-on-selected (highest priority), hide-on-full/empty, hide-after-seconds, interpolated fill ratio and a peer-local cull distance. |
TextPop | FTextPop | edit (bShowTextPop) | 飘字伤害数字:低于 / 高于伤害占比阈值时的颜色、文字缩放与端侧本地剔除距离。Floating damage numbers: colour below/above the damage-percentage thresholds, text scale and a peer-local cull distance. |
Death | FDeath | edit (bShowDeath) | 死亡序列配置:消失延迟与可选淡出、死亡动画、尸体存留时长(负值 = 永久)、网格注销、飞行单位坠落、延迟关闭碰撞、自杀处理、贴地对齐,以及死亡时的 Actor / 特效 / 音效 / 战利品生成。Death sequence config: despawn delay with optional fade, death anim, corpse lifespan (negative = forever), grid unregistration, falling corpse for flyers, delayed collision disable, suicide handling, ground alignment, and actor/FX/sound/loot spawns on death. |
Dying | FDying | runtime | 运行时死亡状态:过程时钟、溶解与动画计时、致死施害者与致命一击方向、碰撞关闭倒计时。Runtime death state: process clocks, dissolve and animation timers, the killing instigator and fatal hit direction, and the collision-disable countdown. |
Gather | FGather | edit (bShowGather) | 自动拾取(磁吸):一个柱体范围内、符合查询的战利品被收集,受并发收集上限约束,按检测冷却周期扫描。Auto-collect (magnet pickup): loot inside a cylinder that matches the query is collected, capped by a concurrent-collection limit and scanned on a detection cooldown. |
Gathering | FGathering | runtime | 运行时拾取状态:当前帧正在收集的实体。Runtime collection state: the entities currently being collected this frame. |
Select | FSelect | edit (bShowSelect) | 选择配置:总开关控制选择功能是否生效;进入正在选择 / 已选中触发配置的 Actor / 特效 / 音效生成。网络模式下这些生成是端侧本地视觉——模拟逻辑不得当作权威数据读取。Selection config: a master switch gates the select feature; entering being-selected/selected fires the configured actor/FX/sound spawns. In networked mode those spawns are peer-local visuals — simulation logic must never read them as authoritative. |
BeingSelect | FBeingSelect | runtime | 选择视觉的端侧本地宿主句柄,按选择态分列;不入快照,resync 后由本地登记表重建。Peer-local host handles for the select visuals, per select state; not snapshotted and repopulated from the local registry after a resync. |
Agent Misc 补充 Extra Data &Creator Recipe
| 名称Name | 类型Type | 可见性Visibility | 说明Description |
|---|---|---|---|
ExtraData | FMassBattleTemplate | edit (bShowExtraData) | 可编辑实体模板:挂在本配置上的额外原型配方(tag + 带初值的 fragment + 战斗旗标),供玩法构建辅助实体。An editable entity template: an extra archetype recipe attached to this config (tags + fragments with initial values + battle flags), used by gameplay to build auxiliary entities. |
BakeRecipe | FMassBattleAgentBakeRecipe | edit (editor only) | 产出本配置的 Agent Creator 配方,见上方的配方结构体。仅编辑器数据,不随包发布。The Agent Creator recipe that produced this config, described in the recipe structs above. Editor-only data that never ships. |
运行时片段Runtime Fragments
下列成员标记为 VisibleAnywhere + BlueprintReadOnly,并受 bHideRuntimeFragments(默认 true)门控:默认隐藏,需要排查时打开开关即可在 Details 中查看,但它们由运行时写入,编辑不会保留。它们同样覆盖每个原型会有的 fragment——纯运行时数据也有条目,而不是只存在于模板里。
The members below are VisibleAnywhere + BlueprintReadOnly and gated by bHideRuntimeFragments (default true): hidden by default; reveal the switch to inspect them when diagnosing, but they are written at runtime and edits do not persist. They also cover every fragment a prototype carries — even pure runtime data has an entry instead of existing only in a template.
| 片段Fragment | 类型Type | 说明Description |
|---|---|---|
Agent | FAgentTag | Agent 原型标签。The Agent archetype tag. |
MainType | FMainType | 主类型判别字段。Primary type discriminator. |
Locating | FLocating | 世界位置与上一帧位置。World position and previous-frame position. |
Rotating | FRotating | 朝向四元数与插值目标。Orientation quaternion and interpolation target. |
Controlling | FAgentControlling | 上一控制模式的镜像。Mirror of the previous control mode. |
EventRT | FAgentEventRT | 事件接收者的解析缓存。Resolved event-receiver cache. |
Parenting | FParenting | 父子链接、挂载与解算帧。Parent/child links, mount state and resolved frame. |
Determinism | FDeterminism | UniqueID 与每实体随机流。UniqueID and the per-entity random stream. |
Networking | FNetworking | 网络与视图恢复身份。Networking and view-recovery identity. |
Visualizing | FVisualizing | 渲染槽位、LOD 与特效通道。Render slots, LOD and FX channels. |
Animating | FAnimating | 动画状态机、选中槽与集合下标。Animation machine, selected slots and set indices. |
Tracing | FTracing | 感知目标、冷却与最后已知位置。Perceived target, cooldown and last-known location. |
TracingShared | FTracingShared | 逐玩家索敌缓存。Per-player trace cache. |
Moving | FMoving | 速度、Goal、MoveState 与任务锁。Velocity, Goal, MoveState and task locks. |
Navigating | FNavigating | 路径点、刷新与补丁备忘。Path points, refresh and patch memo. |
Avoiding | FAvoiding | 逐帧避障求解草稿。Per-frame avoidance solver scratch. |
Behaving | FBehaving | 当前行为、切换请求与瞄准计时。Active behavior, switch request and aim clock. |
Appearing | FAppearing | 出生进度时钟。Appear-progress clocks. |
Patrolling | FPatrolling | 行走与等待双相时钟。Walking and waiting clocks. |
Chasing | FChasing | 面向目标计时。Face-target timer. |
Aiming | FAiming | 当前偏航 / 俯仰角与角速度。Current yaw/pitch angles and angular velocity. |
Attacking | FAttacking | 攻击状态机与阶段计时。Attack machine and phase timers. |
Debuffing | FDebuffing | 持续伤害 / 减速施加者与合并乘数。Temporal-damage / slow causers and the combined multiplier. |
Reinforcing | FReinforcing | 支援目标、进入闸与卡死检测。Reinforce target, entry gate and stuck detection. |
Returning | FReturning | 回归门控、摇摆与完成信号。Return gate, oscillation and finish signal. |
Jumping | FJumping | 剩余冷却与滞空时间。Remaining cooldown and airborne time. |
BeingHit | FBeingHit | 受击反馈计时。Hit-reaction timers. |
Dying | FDying | 死亡过程、致死来源与碰撞倒计时。Death process, killing source and collision countdown. |
Gathering | FGathering | 当前帧正在收集的实体。Entities being collected this frame. |
BeingSelect | FBeingSelect | 选择视觉的本地宿主句柄。Local host handles for select visuals. |
管线角色Pipeline Role
制作期:Agent Creator 是本资产的主要作者入口——0.RenderProfile 选配置(可列多份)、资产名与生成路径,1.RenderBands 定渲染档,2.RenderSources 指网格 / sprite / Actor 源,3.GeneratedAssets 显示产物。Generate 把动画槽表、移动曲线、跳跃片段、骨骼 socket 清单与配方写进每份列出的配置。片段与曲线本身在 ATT 上作者化,配置只承载发布后的结果。
运行期:生成单位时,这些 fragment 被组装成实体的原始构成——配置片段随原型走,共享片段(PhysicsShared / CurveShared / LODShared / AnimShared / NotifyShared / TrafficShared / QueryShared)按取值去重成每个 archetype 一份,运行时片段则逐 agent 一份。打开 bHideRuntimeFragments 可以在编辑器里看到这些字段的初值与缓存快照,但它们由运行时写入,真正的来源永远是配置与烘焙产物。
网络:确定性相关的字段(UniqueID、随机流、位置 / 朝向快照、动画集合下标等)随快照同步;渲染与选择类状态是端侧本地的,模拟逻辑不得把它们当作权威。
Authoring: the Agent Creator is the main authoring entry for this asset — 0.RenderProfile picks the config(s), asset name and generate path, 1.RenderBands sets the render bands, 2.RenderSources points at the mesh / sprite / actor sources, and 3.GeneratedAssets shows the products. Generate writes the animation slot table, locomotion curve, jump clips, bone socket inventory and recipe into every listed config. Clips and curves themselves are authored on the ATT; the config carries the published result.
Runtime: when a unit spawns, these fragments become the entity's archetype composition — config fragments travel with the archetype, shared fragments (PhysicsShared / CurveShared / LODShared / AnimShared / NotifyShared / TrafficShared / QueryShared) dedupe by value into one per archetype, and runtime fragments exist one per agent. Turning bHideRuntimeFragments off shows these fields' initial values and cached snapshots in the editor, but they are written at runtime and the source of truth is always the config and the bake output.
Networking: determinism-relevant fields (UniqueID, random stream, position/orientation snapshots, animation set indices, …) travel in the snapshot; render and selection state is peer-local and simulation logic must not treat it as authoritative.