自定义 Processor 管线 Custom Processor Pipelines
原生 C++ · 项目设置 · 下一个 World 生效Native C++ · Project Settings · next-world composition
它能做什么 What This Feature Does
Processor 管线让游戏模块或其他插件把原生 UMassProcessor 插入 MassBattle 的既定节点之间、替换内置实现,或停用某个节点,而不需要修改 MassBattleSubsystem。每个 World 初始化时解析一次项目设置与代码注册的补丁;新的组成在下一个 World 或 PIE 会话生效。
The processor pipeline lets a game module or another plugin insert a native UMassProcessor between MassBattle's established nodes, replace a stock implementation, or disable a node without editing MassBattleSubsystem. Each world resolves project settings and code-registered patches once during initialization; the new composition applies to the next world or PIE session.
你操作的是稳定节点 ID,不是数组下标。插入可以锚定内置节点或更早插入的节点;替换保留目标 ID 与调度;停用留下一个仍可被其他补丁锚定的 tombstone。
You address stable node IDs rather than array indices. Insertion can anchor to a stock node or a node inserted earlier; replacement retains the target ID and schedule; disable leaves a tombstone that later patches can still use as an anchor.
插入 Insert
用 InsertBefore 或 InsertAfter 加入自己的原生 Processor,并为它提供一个全新的稳定 ID。Add your native processor with InsertBefore or InsertAfter, giving it a new stable ID.
替换 Replace
用 Replace 接管一个内置节点。原节点 ID、位置与 Subtick 保留,内置运行时实例不会创建。Take over a stock node with Replace. Its ID, position and Subtick remain, and the stock runtime instance is not constructed.
停用 Disable
用 Disable 阻止节点创建实例。可选节点可以保持停用;必需节点最终必须有启用的实现。Use Disable to prevent a node from being instantiated. Optional nodes may remain disabled; required nodes must end with an enabled implementation.
没有运行中热替换。修改设置不会重组已经存在的 World。保存配置后启动新的 World 或 PIE 会话;代码注册也必须在任何 World 解析管线之前完成。
There is no live hot replacement. Editing settings does not recompose an existing world. Save the configuration and start a new world or PIE session; code registration must also finish before any world resolves its pipeline.
写一个最小原生 Processor Write a Minimal Native Processor
下面是一个最小可运行外壳:UMyTargetingProcessor 查询携带 FAttack 的实体,并以 Verbose 日志报告候选数量。把计数替换成你的索敌逻辑与 fragment 写入即可;这个类已经满足管线对原生 Processor 的构造契约。
Here is a minimal runnable shell: UMyTargetingProcessor queries entities carrying FAttack and reports the candidate count through Verbose logging. Replace the count with your target selection and fragment writes; the class already satisfies the pipeline's native processor construction contract.
先在游戏模块的 .Build.cs 中加入 MassBattle 与 MassEntity 依赖。保留模块已有的其他依赖。
Add MassBattle and MassEntity to your game module's .Build.cs dependencies first. Keep the module's existing dependencies.
PublicDependencyModuleNames.Add("MassBattle");
PublicDependencyModuleNames.Add("MassEntity");MyTargetingProcessor.h
#pragma once
#include "CoreMinimal.h"
#include "MassProcessor.h"
#include "MassEntityQuery.h"
#include "MyTargetingProcessor.generated.h"
UCLASS()
class MYGAME_API UMyTargetingProcessor : public UMassProcessor
{
GENERATED_BODY()
public:
UMyTargetingProcessor();
protected:
virtual void ConfigureQueries(const TSharedRef<FMassEntityManager>& EntityManager) override;
virtual void Execute(FMassEntityManager& EntityManager, FMassExecutionContext& Context) override;
private:
FMassEntityQuery EntityQuery;
};MyTargetingProcessor.cpp
#include "MyTargetingProcessor.h"
#include "Fragments/Attack.h"
#include "MassExecutionContext.h"
UMyTargetingProcessor::UMyTargetingProcessor()
{
bAutoRegisterWithProcessingPhases = false;
bRequiresGameThreadExecution = true;
ExecutionFlags = (int32)(EProcessorExecutionFlags::Standalone | EProcessorExecutionFlags::Server | EProcessorExecutionFlags::Client);
}
void UMyTargetingProcessor::ConfigureQueries(const TSharedRef<FMassEntityManager>& EntityManager)
{
EntityQuery.Initialize(EntityManager);
EntityQuery.AddRequirement<FAttack>(EMassFragmentAccess::ReadOnly);
EntityQuery.RegisterWithProcessor(*this);
}
void UMyTargetingProcessor::Execute(FMassEntityManager&, FMassExecutionContext& Context)
{
int32 CandidateCount = 0;
EntityQuery.ForEachEntityChunk(Context, [&CandidateCount](FMassExecutionContext& ChunkContext)
{
CandidateCount += ChunkContext.GetNumEntities();
});
UE_LOG(LogTemp, Verbose, TEXT("MyTargetingProcessor candidates: %d"), CandidateCount);
}bAutoRegisterWithProcessingPhases=false防止 Processor 再进入引擎的自动 phase 注册;MassBattle 会按解析后的管线拥有并调度它。bAutoRegisterWithProcessingPhases=falseprevents a second registration with the engine's automatic processing phases; MassBattle owns and dispatches the processor through the resolved pipeline.bRequiresGameThreadExecution=true与Standalone | Server | Client是必需契约,缺少任一项都会在验证中报告问题。bRequiresGameThreadExecution=trueandStandalone | Server | Clientare required contracts; validation reports an issue if any of them is missing.ConfigureQueries先初始化 query,再添加需求并调用RegisterWithProcessor。Execute使用同一个 query 遍历实体;示例日志只在 Verbose 日志级别开启时显示。ConfigureQueriesinitializes the query, adds requirements and callsRegisterWithProcessor.Executetraverses entities with that same query; the example message appears only when Verbose logging is enabled.
在项目设置中插入 Insert Through Project Settings
打开 Project Settings → MassBattle → Processor Pipeline,展开 Processor Patches 并添加一行。下表用一条 InsertAfter Sim.Behavior 补丁说明每个字段;它把 MyTargetingProcessor 放成 Sim.MyGame.Targeting。
Open Project Settings → MassBattle → Processor Pipeline, expand Processor Patches and add a row. The table explains every field through an InsertAfter Sim.Behavior patch that places MyTargetingProcessor at Sim.MyGame.Targeting.
| 字段Field | 示例值Example | 含义Meaning |
|---|---|---|
Enabled | 开On | 是否应用这一行。关闭只保留配置而不执行补丁,不等同于 Operation=Disable。Whether this row is applied. Off retains the row without applying it; this is not the same as Operation=Disable. |
Source ID | Project | 补丁的确定性命名空间。项目设置通常使用 Project;代码注册应使用唯一的模块命名空间,例如 MyGame。The patch's deterministic namespace. Project settings normally use Project; code registration should use a unique module namespace such as MyGame. |
Patch ID | Targeting.InsertAfterBehavior | 在该 SourceId 内唯一,并且每个启用的补丁都必须填写。它也用于同优先级补丁的确定性排序与诊断。Unique within its SourceId and required for every enabled patch. It also supports deterministic ordering and diagnostics when priorities match. |
Operation | InsertAfter | 对目标执行的编辑:InsertBefore、InsertAfter、Replace 或 Disable。The edit applied to the target: InsertBefore, InsertAfter, Replace or Disable. |
Target ID | Sim.Behavior | 内置稳定节点 ID,或更早插入节点的 NewNodeId。目标必须在轮到这条补丁组成时已经存在。A stable stock node ID, or the NewNodeId of an earlier insertion. The target must exist when this patch is composed. |
New Node ID | Sim.MyGame.Targeting | 仅插入操作必填。ID 必须在全部内置、已插入及停用 tombstone 节点中唯一;后续补丁可以用它作为锚点。替换始终保留 TargetId。Required for insertion only. The ID must be unique across stock, inserted and disabled-tombstone nodes; later patches can use it as an anchor. Replacement always retains TargetId. |
Processor Class | MyTargetingProcessor | 插入与替换使用的原生、非抽象 UMassProcessor 类;Disable 不需要。该字段是软类引用,类的默认对象仍须满足上一节的构造契约。The native, non-abstract UMassProcessor class used by insertion and replacement; unused by Disable. This is a soft class field, and the class default object must still satisfy the construction contract above. |
Priority | 0 | 默认 0,数值小的补丁先组成。优先级相同再按 SourceId、PatchId 的字典序排列。Defaults to 0; lower values compose first. Ties are then ordered lexically by SourceId and PatchId. |
Subtick | Inherit From Target | 插入默认继承目标的 Subtick,也可选择一个明确的 Subtick。替换与停用不能覆盖;Render 与 Network 只允许 Subtick3。Insertion inherits the target Subtick by default, or may select one explicit Subtick. Replacement and disable cannot override it; Render and Network permit only Subtick3. |
这条示例让新节点紧随 Sim.Behavior,留在模拟 stage 0,并继承 Subtick1。它在下一个 World 初始化时生效。
This example places the new node immediately after Sim.Behavior, keeps it in simulation stage 0 and inherits Subtick1. It takes effect when the next world initializes.
ID 是组成契约。SourceId + PatchId 标识一条补丁,NewNodeId 标识一个可再次被寻址的节点。重复或留空会让排序、锚点与诊断变得不明确,因此验证会拒绝;即使节点已经停用,它的 tombstone ID 仍占用这个名字。
IDs are the composition contract. SourceId + PatchId identifies a patch, while NewNodeId identifies a node that can be addressed again. Duplicates or missing values make ordering, anchors and diagnostics ambiguous, so validation rejects them; even a disabled node's tombstone continues to occupy its ID.
替换内置实现 Replace a Stock Implementation
要接管行为处理器,把一行的关键字段设为下面的值。PatchId 仍必填;NewNodeId 不用于替换。
To take over the behavior processor, set the row's key fields as follows. PatchId is still required; NewNodeId is not used for replacement.
| 字段Field | 值Value |
|---|---|
Operation | Replace |
Target ID | Sim.Behavior |
Processor Class | MyBehaviorProcessor |
Subtick | Inherit From Target |
- 内置
Sim.Behavior运行时实例不会构造,改由MyBehaviorProcessor实例承担这个节点。The stockSim.Behaviorruntime instance is not constructed; aMyBehaviorProcessorinstance owns the node instead. - 替换保留
Sim.Behavior这个 ID、所在 stage、顺序位置与 Subtick,因此其他补丁仍可锚定Sim.Behavior。Replacement retains theSim.BehaviorID, stage, position and Subtick, so other patches can still anchor toSim.Behavior. - 同一节点只能有一条替换声明;第二次替换会产生
ConflictingReplacement,不会按先后顺序静默覆盖。A node accepts only one replacement claim; a second replacement producesConflictingReplacementrather than silently overriding the first.
这里的“调度”指节点,不指替换类内部怎么遍历实体。Replace 只更换占用节点的类,并保留节点的 ID、stage、顺序位置与 Subtick。替换类内部是一次遍历还是多趟、有没有运行期开关,属于它自己的实现细节;管线不读取也不校验。
“Schedule” here is the node, not how the replacement traverses entities. Replace only swaps the class that owns the node and retains its ID, stage, position and Subtick. Whether that class walks entities once or in several passes, and any runtime switches it exposes, are its own implementation details; the pipeline neither reads nor validates them.
必须继承内置类的节点 Nodes Requiring a Stock Base Class
下列节点的替换类必须继承当前选中的内置类,否则得到 InvalidReplacementType。Sim.Move 的基类随定点数设置变化。
Replacement classes for the following nodes must derive from the selected stock class or validation reports InvalidReplacementType. The Sim.Move base class follows the fixed-point setting.
| 节点Node | 替换类必须继承Required Replacement Base | 补充约束Additional Constraint |
|---|---|---|
Sim.Move | UMassBattleAgentMoveProcessorUMassBattleAgentMoveProcessorFP | 使用当前定点数设置选中的那一类;Sim.Move 仍必须位于 Sim.Physics 之前。Use the class selected by the current fixed-point setting; Sim.Move must still precede Sim.Physics. |
Sim.Physics | UMassBattlePhysicsProcessor | 保留 Sim.Physics 的调度位置与 Subtick2。Retain the Sim.Physics schedule and Subtick2. |
Sim.Host | UMassBattleHostMonoProcessor | Host 接受子类替换,但不接受在它之前或之后插入;它的最终 stage 是独占的。Host accepts subclass replacement but no insertion before or after it; its final stage is exclusive. |
Network.Capture | UMassBattleNetworkProcessor | 保留 Network lane 与 Subtick3;自定义捕获状态仍需完整的快照与恢复支持。Retain the Network lane and Subtick3; custom captured state still needs complete snapshot and restore support. |
停用节点与必需节点 Disable Nodes and Required Nodes
例如把 Operation 设为 Disable、TargetId 设为 Sim.Loot,即可停用掉落处理器;此操作不需要 ProcessorClass 或 NewNodeId。停用节点不会创建运行时实例,但会留下 tombstone 锚点,其他插入补丁仍可使用这个 ID。
For example, set Operation to Disable and TargetId to Sim.Loot to disable the loot processor; this operation needs neither ProcessorClass nor NewNodeId. A disabled node creates no runtime instance but leaves a tombstone anchor that other insertion patches can still address.
可选节点可以在最终结果中保持停用。必需节点 Sim.Move、Sim.Physics、Sim.Host、Render.Agent、Network.Capture 必须在所有补丁应用完后仍然启用。
Optional nodes may remain disabled in the final result. The required nodes Sim.Move, Sim.Physics, Sim.Host, Render.Agent and Network.Capture must remain enabled after all patches have been applied.
验证检查的是最终状态。先停用、后用 Replace 提供实现会重新启用该节点,因此可以满足必需节点要求;如果必需节点在最后仍为停用,则得到 RequiredNodeDisabled,下一个 World 不会实例化这条无效管线。
Validation checks the final state. Disabling first and then supplying an implementation with Replace re-enables the node, so it can satisfy a required slot. If a required node is still disabled at the end, validation reports RequiredNodeDisabled, and the next world does not instantiate the invalid pipeline.
可用 ID、Subtick 与保护规则 Available IDs, Subticks and Protection Rules
下表列出可作为补丁目标的内置 ID。插入选择 Inherit From Target 时复制目标的 Subtick mask;替换保留原 mask。Sim.Move 跨 Subtick1 | Subtick2,而 Sim.Physics 使用 Subtick2。
The table lists the stock IDs available as patch targets. An insertion using Inherit From Target copies the target's Subtick mask; replacement retains it. Sim.Move spans Subtick1 | Subtick2, while Sim.Physics uses Subtick2.
| 节点 IDNode ID | 默认 SubtickDefault Subtick | 适用扩展Intended Use | 必需与保护说明Required and Protected Notes |
|---|---|---|---|
Sim.Trace | Subtick0 | 在感知与追踪前后加入游戏候选筛选或结果处理。Add game-specific candidate filtering or result handling around perception and tracing. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Behavior | Subtick1 | 加入决策、索敌或行为结果的后处理。Add decisions, targeting or behavior-result post-processing. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Projectile | Subtick1 | 扩展弹体规则,或处理 Behavior 阶段已解析的新实体。Extend projectile rules or process new entities resolved after the Behavior stage. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Debuff | Subtick1 | 加入自定义减益规则或其前后处理。Add custom debuff rules or adjacent processing. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Reaction | Subtick1 | 扩展受击、死亡或其他反应结果。Extend hit, death or other reaction outcomes. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Loot | Subtick3 | 扩展掉落规则与掉落实体处理。Extend loot rules and loot-entity processing. | 可选;允许插入与替换。Optional; insertion and replacement allowed. |
Sim.Move | Subtick1 | Subtick2 | 替换移动实现,或在移动与物理之间加入有意图的处理。Replace movement or add intentional processing around movement and physics. | 必需;替换必须继承选中的 Move 类,且最终顺序必须在 Physics 前。Required; replacement must derive from the selected Move class and remain before Physics. |
Sim.Physics | Subtick2 | 替换物理实现,或在相邻位置加入物理相关处理。Replace the physics implementation or add related processing at an adjacent position. | 必需;替换必须继承 UMassBattlePhysicsProcessor。Required; replacement must derive from UMassBattlePhysicsProcessor. |
Sim.Host | Subtick3 | 以子类替换宿主对象处理实现。Replace the host-object processing implementation with a subclass. | 必需且受保护;不允许插入,最终模拟 stage 独占。Required and protected; no insertion, and its final simulation stage is exclusive. |
Render.Fx | Subtick3 | 扩展特效表现数据的分组与更新。Extend grouping and updates for visual-effect presentation data. | 可选;Render lane 仅允许 Subtick3。Optional; the Render lane permits only Subtick3. |
Render.Agent | Subtick3 | 替换或扩展单位渲染数据处理。Replace or extend agent render-data processing. | 必需;Render lane 仅允许 Subtick3。Required; the Render lane permits only Subtick3. |
Network.Capture | Subtick3 | 以子类扩展帧末哈希、快照与网络捕获。Extend end-of-frame hash, snapshot and network capture with a subclass. | 必需;替换必须继承 UMassBattleNetworkProcessor,Network lane 仅允许 Subtick3。Required; replacement must derive from UMassBattleNetworkProcessor, and the Network lane permits only Subtick3. |
GridUpdate 是固定的 pre-frame 入口,不参与补丁组成,也不是可配置的 TargetId。不要用插入、替换或停用来改变它。
GridUpdate is a fixed pre-frame entry. It does not participate in patch composition and is not a configurable TargetId; do not try to insert, replace or disable it through this feature.
按生成边界选择锚点 Choose an Anchor Around the Spawn Boundary
模拟 stage 退出时会应用该阶段的延迟命令并解析待生成实体,然后才进入下一阶段。因此,InsertAfter Sim.Behavior 与 InsertBefore Sim.Projectile 虽然都继承 Subtick1,却位于生成边界的两侧。
When a simulation stage exits, its deferred commands are applied and pending spawns are resolved before the next stage begins. Consequently, InsertAfter Sim.Behavior and InsertBefore Sim.Projectile both inherit Subtick1, but they sit on opposite sides of the spawn boundary.
阶段 0:Sim.Trace → Sim.Behavior → Sim.MyGame.Targeting(InsertAfter)
── 生成边界:应用延迟命令并解析 stage 0 的待生成实体 ──
阶段 1:Sim.MyGame.PostSpawnTargeting(InsertBefore)→ Sim.ProjectileStage 0: Sim.Trace → Sim.Behavior → Sim.MyGame.Targeting (InsertAfter)
---- Spawn boundary: apply deferred commands and resolve stage-0 pending spawns ----
Stage 1: Sim.MyGame.PostSpawnTargeting (InsertBefore) → Sim.Projectile| 选择Choice | 执行位置Where It Runs | 什么时候选它When To Choose It |
|---|---|---|
InsertAfter Sim.Behavior | 仍在模拟 stage 0,紧跟 Behavior,位于本阶段生成解析之前。Still in simulation stage 0, immediately after Behavior and before that stage's spawn resolution. | 需要直接消费 Behavior 本阶段写出的状态,或为其后续生成补充输入。You need to consume state written by Behavior in this stage or supplement inputs for subsequent spawning. |
InsertBefore Sim.Projectile | 进入模拟 stage 1,已经越过 stage 0 的生成边界。In simulation stage 1, after the stage-0 spawn boundary. | 需要查询 Behavior 在这一帧生成、且符合你 query 的实体。You need to query entities spawned by Behavior this frame that match your query. |
如果自定义 Processor 必须看见 Behavior 当帧生成的新实体,就把锚点放到 Sim.Projectile 之前,并为它使用另一个唯一的 NewNodeId;留在 Behavior 之后的插入点不会跨过这次生成解析。
If a custom processor must see new entities spawned by Behavior that frame, anchor it before Sim.Projectile with another unique NewNodeId; an insertion left after Behavior does not cross that spawn resolution.
从 StartupModule 注册 Register from StartupModule
项目设置适合由项目共享的组成;原生模块需要随代码携带补丁时,在 StartupModule 注册同一种 FMassBattleProcessorPatch。下面注册与项目设置示例等价的插入,并在模块关闭时按来源注销。
Project settings suit project-shared composition. When a native module must carry its patches with its code, register the same FMassBattleProcessorPatch shape from StartupModule. This example registers the insertion shown above and unregisters its source during module shutdown.
#include "Processors/MassBattleProcessorPipeline.h"
#include "MyTargetingProcessor.h"
void FMyGameModule::StartupModule()
{
FMassBattleProcessorPatch Patch;
Patch.SourceId = TEXT("MyGame");
Patch.PatchId = TEXT("Targeting.InsertAfterBehavior");
Patch.Operation = EMassBattleProcessorPatchOp::InsertAfter;
Patch.TargetId = TEXT("Sim.Behavior");
Patch.NewNodeId = TEXT("Sim.MyGame.Targeting");
Patch.ProcessorClass = UMyTargetingProcessor::StaticClass();
FMassBattleProcessorRegistry::RegisterCodePatch(Patch);
}
void FMyGameModule::ShutdownModule()
{
FMassBattleProcessorRegistry::UnregisterSource(TEXT("MyGame"));
}ProcessorClass 虽然声明为软类字段,但直接赋 UMyTargetingProcessor::StaticClass() 是有效用法。所有注册必须在任何 World 解析管线之前完成;已经存在拥有解析管线的活动 World 时,注册或注销都会被拒绝,不能用它做热替换。
Although ProcessorClass is declared as a soft class field, assigning UMyTargetingProcessor::StaticClass() directly is valid. All registration must finish before any world resolves its pipeline; registration or unregistration is rejected while an active world owns a resolved pipeline, so this cannot be used as hot replacement.
Registry 保存的是补丁描述,不是 Processor 实例或 World 对象。每个新 World 根据这些描述解析并创建自己的实例;UnregisterSource(TEXT("MyGame")) 只移除这个来源命名空间下的描述。
The registry stores patch descriptors, not processor instances or world objects. Each new world resolves those descriptors and creates its own instances; UnregisterSource(TEXT("MyGame")) removes only descriptors in that source namespace.
验证与检查 Validation and Inspection
设置页与控制台都解析“下一个 World”的管线。先让 Validation Status 变为有效,再检查顺序与 Subtick;无效管线会在 World 初始化时被拒绝。
Both the settings page and the console resolve the pipeline for the next world. Make Validation Status valid first, then inspect order and Subticks; an invalid pipeline is rejected when a world initializes.
设置页 The Settings Page
| 字段Field | 你能检查什么What You Can Inspect |
|---|---|
Validation Status | 有效状态,或每条问题的说明、稳定 issue code、来源、补丁 ID 与节点 ID。The valid state, or each issue's explanation, stable issue code, source, patch ID and node ID. |
Resolved Pipeline | 下一个 World 的节点顺序、lane、stage、Subtick mask、生成边界、停用 tombstone 与替换来源。The next world's node order, lanes, stages, Subtick masks, spawn boundaries, disabled tombstones and replacement sources. |
Manifest Hash | 规范化解析 manifest 的哈希,可用于比较最终节点、类、顺序与 Subtick 组成是否一致。A hash of the canonical resolved manifest, useful for comparing final node, class, order and Subtick composition. |
预览与 World 初始化使用同一个 resolver,并包含项目补丁和代码补丁;预览只生成检查文本与哈希,绝不修改活动 World。
The preview and world initialization use the same resolver and include both project and code patches. Preview only produces inspection text and a hash; it never modifies an active world.
控制台命令 Console Commands
在编辑器控制台执行命令,并在 Output Log 阅读结果。MassBattle.Pipeline.Validate 报告有效状态与结构化问题;MassBattle.Pipeline.Dump 输出规范化管线、manifest hash 以及同样的问题列表。
Run these commands in the editor console and read the Output Log. MassBattle.Pipeline.Validate reports validity and structured issues; MassBattle.Pipeline.Dump prints the canonical pipeline, manifest hash and the same issue list.
MassBattle.Pipeline.Validate
MassBattle.Pipeline.Dump常见稳定 issue code Common Stable Issue Codes
| 代码Code | 原因与处理Cause and Action |
|---|---|
UnknownTarget | 目标 ID 不存在,或目标插入尚未按 Priority 组成。核对 ID 与补丁顺序。The target ID does not exist, or its insertion has not composed yet at this Priority. Check the ID and patch order. |
MissingPatchId | 启用的补丁没有 PatchId;为每行填写稳定 ID。An enabled patch has no PatchId; give every row a stable ID. |
DuplicatePatchId | 同一 SourceId 下重复使用 PatchId;让每一对来源与补丁 ID 唯一。A PatchId repeats within one SourceId; make every source-and-patch pair unique. |
MissingNewNodeId | 插入没有提供 NewNodeId;填写新的稳定节点 ID。An insertion has no NewNodeId; provide a new stable node ID. |
DuplicateNewNodeId | 新节点 ID 已被内置、插入或 tombstone 节点占用;换一个全局唯一 ID。The new node ID is already occupied by a stock, inserted or tombstone node; choose a globally unique ID. |
ConflictingReplacement | 同一节点出现第二条替换声明;合并实现或移除多余替换。A node has a second replacement claim; combine the implementations or remove the extra replacement. |
RequiredNodeDisabled | 必需节点在最终结果中仍停用;重新启用它,或用有效的 Replace 提供实现。A required node remains disabled in the final result; re-enable it or supply an implementation with a valid Replace. |
AutoRegistrationEnabled | Processor 仍会自动注册到 stock Mass phase graph;在构造函数中设置 bAutoRegisterWithProcessingPhases=false。The processor still auto-registers with the stock Mass phase graph; set bAutoRegisterWithProcessingPhases=false in its constructor. |
GameThreadRequired | 类默认对象没有要求游戏线程执行;设置 bRequiresGameThreadExecution=true。The class default object does not require game-thread execution; set bRequiresGameThreadExecution=true. |
ExecutionFlagsMissing | 执行标志不完整;同时启用 Standalone、Server 与 Client。Execution flags are incomplete; enable Standalone, Server and Client together. |
NonNativeClass | 选择的类不是原生类;改用原生、非抽象的 UMassProcessor,Blueprint 类不受支持。The selected class is not native; use a native, non-abstract UMassProcessor. Blueprint classes are unsupported. |
InvalidReplacementType | Move、Physics、Host 或 Network.Capture 的替换类没有继承所需内置类;修正基类。A Move, Physics, Host or Network.Capture replacement does not derive from its required stock class; correct the base class. |
ProtectedInsertion | 试图在受保护节点旁插入,例如 Sim.Host;改用允许的锚点,Host 仅支持子类替换。An insertion targets a protected node such as Sim.Host; use an allowed anchor. Host supports only subclass replacement. |
边界与确定性责任 Boundaries and Determinism Responsibilities
- 不能创建新 stage。补丁在既定 lane、stage 与生成边界内改变节点组成,不把 Processor 路由到 stock Mass phase graph。No new stages. Patches change node composition within the established lanes, stages and spawn boundaries; they do not route processors into the stock Mass phase graph.
- 不能运行中热替换。设置与代码注册只决定下一个 World 的组成,活动 World 不会被重建。No runtime hot replacement. Settings and code registration determine the next world's composition; an active world is not rebuilt.
- 不能使用 Blueprint Processor 类。插入与替换只接受原生、非抽象
UMassProcessor类,并须满足游戏线程与执行标志要求。No Blueprint processor classes. Insertion and replacement accept only native, non-abstractUMassProcessorclasses that satisfy the game-thread and execution-flag requirements. - 自定义跨帧 fragment 状态不会自动进入网络状态。你仍须为这些类型提供 snapshot、hash 与 restore 支持;注册 Processor 本身不会序列化新 fragment。Custom cross-frame fragment state does not automatically join network state. You must still provide snapshot, hash and restore support for those types; registering a processor does not serialize new fragments.
- 相同 manifest 不证明自定义代码确定。它只能说明最终组成记录一致;自定义逻辑仍须保证输入、迭代顺序、随机与跨帧状态在各 peer 上确定。Matching manifests do not prove custom code is deterministic. They show that final composition records match; custom logic must still keep inputs, iteration order, randomness and cross-frame state deterministic across peers.
有效的解析结果与相同 manifest 只是组成检查,不代表你的 Processor 已通过 PIE、快照恢复或联机验证。发布前请针对自己的游戏逻辑执行这些测试。
A valid resolution and matching manifests are composition checks, not evidence that your processor has passed PIE, snapshot-recovery or networked validation. Run those tests against your own game logic before release.