Mass Battle Frameworkv1.20.0

教程 Tutorials

HANDS-ON

面板操作 · 命令层 · 自动化配方Panel walkthroughs · command layer · automation recipes

教程按"你要完成什么"组织,不按类组织。每一篇都从打开哪个面板开始,到你能在游戏里看见结果为止;每个按钮旁边给出它背后的命令 id,所以同一篇教程对人有效、对 AI 同样有效。

Tutorials are organised by what you want to finish, not by class. Each one starts at the panel to open and ends where you can see the result in game; every button is paired with the command id behind it, so one tutorial serves a human and an agent alike.

从哪里开始 Where to Start

按手上要做的事选一条,不用从头读。三条路最终都会汇到下面的手册页与API 参考。从旧版本升级不在教程里,见更新日志。

Pick the path that matches what you have in hand; nothing has to be read in order. All three converge on the walkthroughs below and on the API reference. Upgrading an old project is not here — see the changelog.

一、先让它跑起来1. Get it running first

插件自带示例关卡(Content/Demo:HordeSurvival 单机与联机、WarSimulator 大规模对战、RTS 指挥),打开就能看到单位在打。想动资产之前先看工具与命令教程:每个面板怎么用、命令层怎么调。The plugin ships demo levels (Content/Demo: HordeSurvival single-player and networked, WarSimulator for large battles, RTS for command play) — open one and units are already fighting. Before touching assets, read the tooling tutorials: how each panel works and how the command layer is driven.

二、想改一个单位2. Change a unit

单位的全部行为参数集中在一份Agent Config 数据资产里:感知、索敌、移动、攻击、受击、死亡、掉落、动画与表现。改完按制作与烘焙重新生成运行时资产。A unit's whole behaviour lives in one Agent Config DataAsset: perception, targeting, movement, attack, hit, death, loot, animation and looks. After editing, regenerate the runtime assets per Authoring & Baking.

三、想理解它为什么这样设计3. Understand why it is built this way

先看架构的四张交互图(每帧模拟流程、渲染路径、网络锁步、模块依赖),再按你关心的域读下面的概念页。设计取舍的讨论在博客里。Start with the four interactive diagrams in Architecture (per-frame simulation flow, rendering path, network lockstep, module dependencies), then read the concept page for the domain you care about. The trade-off discussions live in the blog.

已有教程 Available Tutorials

工具与命令层 Tooling and the Command Layer

全套面板的操作路径:网格与动画准备、图集 sprite、多部件装配、槽位图集、维护工具组;后半篇讲命令层——人怎么在控制台调、AI 怎么读结果、三段可以直接照抄的自动化配方。The full panel walkthrough: mesh and animation prep, atlas sprites, multi-part assembly, slot atlas, the maintenance tools; the second half is the command layer — how a human calls it from the console, how an agent reads the result, and three automation recipes you can copy.

自定义 Processor 管线 Custom Processor Pipelines

用一个最小原生 Processor 走通插入、替换与停用:项目设置逐字段示例、稳定节点 ID 与 Subtick、生成边界、StartupModule 注册,以及验证命令和确定性边界。Build a minimal native processor, then insert, replace and disable pipeline nodes: every Project Settings field, stable node IDs and Subticks, spawn boundaries, StartupModule registration, validation commands and determinism limits.

从空资产到能烘 From an empty asset to a bake

网格源、动画集合、移动曲线、跳跃相位、预览、Save 与 Apply 的先后顺序,以及每一步该检查什么。Mesh source, animation sets, locomotion curve, jump phases, preview, Save versus Apply — the order, and what to check at each step.

命令层与 AI 用法 The command layer for agents

控制台入口、结构化结果的判读方式、试运行与确认策略、批量动作的进度与取消。The console entry points, how to read a structured result, dry-run and confirmation behaviour, progress and cancel for bulk actions.

制作与烘焙 Authoring & Baking

三条烘焙管线各自产出什么、装配模板怎么搭、烘完之后要接什么。What each of the three bake pipelines produces, how a unit assembly template is put together, and what to wire up after a bake.

概念与指南 Concept Pages and Guides

五页,每页跟完一条链路:从单位到画在屏幕上、从输入到两端一致、从功能名到源码位置。它们是"读"的部分,不是"点"的部分;升级旧项目在更新日志里。

Five pages, each following one chain: from a unit to pixels on screen, from input to two peers agreeing, from a feature name to its source. These are for reading, not for clicking; upgrading an old project lives in the changelog.

架构Architecture

四张交互式架构图:每帧模拟流程、渲染路径、网络锁步、模块依赖,节点可点击跳转。Four interactive diagrams: the per-frame simulation flow, the rendering path, network lockstep and module dependencies. Clickable nodes.

渲染管线Render Pipeline

单位在运行时怎么被画出来:一个部件一个 emitter、一个版本一个单网格 renderer、逐材质槽独立材质;你在面板里的每个操作对应产物里的什么,以及两级变换与父子层级的两条硬边界。How a unit is actually drawn: one emitter per part, one single-mesh renderer per version, per-slot materials — what each panel action turns into in the generated asset, plus the two transform levels and the two hard parenting boundaries.

运动模型Movement Model

运动模型图解:移速构成、可选交通规则(车道/侧让/绕行/贴墙)、RVO2 避障与 PBD 碰撞各能做出什么效果,附配置速查表。The movement model in diagrams: what the speed chain, the optional traffic rules (lanes / side-step / flank / wall-slide), RVO2 avoidance and PBD collision each produce, with a configuration quick-reference table.

网络同步Network Sync

确定性锁步使用指南:K 缓冲、失步检测与恢复、快照系统,以及照着 HordeSurvival 联机演示图从零接入的完整蓝图流程。原理入门与可交互的时间线演示见博客文章《确定性锁步:只传走法,不传棋盘》。The deterministic-lockstep usage guide: the K-buffer, desync detection & recovery, the snapshot system, plus the full Blueprint walkthrough wired after the HordeSurvival networked demo map. For the primer and the hands-on timeline, see the blog post Deterministic Lockstep: Send the Moves, Not the Board.

功能与源码对照Features Mapped to Source

二十一组功能的实现位置:每组对应哪些类型、哪几个文件、哪个关键 API。查"这件事到底在哪做的"用它,不看营销文案。Where each of the twenty-one feature groups is implemented: the types, the files and the key API. Use it to answer "where does this actually happen", not as a sales page.

按任务找 Find by Task

你想做You Want To去哪Go To
让一个单位用另一套动画Give a unit a different animation set动画集合Animation sets · Agent Config
调移动手感:什么时候走、什么时候跑Tune locomotion: when it walks, when it runs移动曲线Locomotion curve · 运动模型Movement model
把多个材质槽压成一张图集Fold several material slots into one atlasMerge Mat Slots(材质槽图集)Merge Mat Slots
让炮塔跟着目标转Make a turret track a target瞄准片段Aim fragment · 升级说明Upgrade notes
让 AI 批量处理一批资产Have an agent process a batch of assets命令层Command layer