外观
Behavior / ArmyAIConfig Record
状态:Authoritative Reference v1
1. 物理结构
Behavior section 每条固定:
text
0x10 = 16 bytes当前 raw view:
text
+0x00 int32 BehaviorGroupId
+0x04 int32 Raw04
+0x08 int32 Raw08
+0x0C int32 Raw0C只有首个 int32 的逻辑身份已经达到完整命名标准;后三个字段当前仍保持 raw。
2. 一条磁盘记录不等于一个 ArmyAIConfig
原版 FUN_004BBB24:
text
read BehaviorGroupId
-> group not present: create ArmyAIConfig logical group
-> copy current 0x10 physical row into that group因此应区分:
text
BehaviorRecordRow = 一条 16-byte 磁盘行
BehaviorGroup = 按首 int32 聚合的逻辑 ArmyAIConfig同一个 group ID 出现多行不是自动重复数据,也不能去重。
当前最新 1.30.0 Behavior corpus:
text
physical rows = 23337
logical groups across files = 19207
files with repeated group IDs = 367stage30105.btl 示例:
text
35 physical rows
7 logical groups: 1,2,3,4,6,7,83. Unit 引用
Unit +0x22 是 signed int16 ArmyAIConfig group ID:
text
0 -> NotApplicable / 无 ArmyAIConfig
positive -> 按 BehaviorGroupId lookup当前最新 1.30.0 Unit -> Behavior 引用全量统计:
text
0 reference = 123744
positive reference = 10190
negative reference = 0
positive resolved group = 10178
positive missing group = 12原版 FUN_004BB7B4 对缺失 group 返回空,不把 BTL 作为物理损坏硬失败。
另外,没有被初始 Unit 引用的 BehaviorGroup 也不能删除,因为 Event、Reinforcement 或后续 runtime 状态仍可能消费它。
4. +0x04/+0x08/+0x0C
当前项目没有足够证据给这三个 int32 一个跨所有 Behavior row 稳定的最终业务名称。
所以正式状态:
text
physical scalar = Confirmed
row copied into ArmyAIConfig = Confirmed
complete per-field semantics = Unknown
writer = NoGo不得把第三方旧列名直接升级为正式字段名。
4.1 ArmyAIConfig consumer-scoped 解码
虽然物理字段继续保持 Raw,原版 ArmyAIConfig executor 已允许在该 consumer 作用域内解释部分组合:
text
Raw04 = consumer-scoped action selector
Raw08 = consumer-scoped activation counter;仅当等于 runtime Unit+0x134 schedule counter 时执行
Raw0C = consumer-scoped action value
action 0 -> runtime Unit+0x13C fallback main behavior
action 1 -> runtime Unit+0x140 LandSeaTransitionRestriction
action 2 -> runtime Unit+0x144 primary scripted target TileId
action 3 -> set runtime Unit+0x138 priority/value
action 4 -> add runtime Unit+0x138 priority/value
action 5 -> set runtime Unit+0x154 behavior radius/range
action 6 -> add runtime Unit+0x154 behavior radius/range这不是对三个物理字段的跨所有 row 全局重命名,也不开放 writer。尤其 action 1 不是“AI subtype”:它动态写入单位级海陆转换限制,0 不加方向禁令、1 禁止海→陆、2 禁止陆→海;同一字段也被玩家移动使用的 common path engine 消费。
Android 1.28 原版 corpus 的 action0 main-behavior assignment 观察值恰为 0..4。当前安全机制表:
| Value | 当前安全机制描述 | 解释性标签 | 状态 |
|---|---|---|---|
0 | hold + ordinary move + global strategy + current attack supplement | 常规综合型 A | FunctionConfirmed / official name Unknown |
1 | ordinary move + global strategy + current attack supplement;无初始 hold | 无初始留守的推进型 | FunctionConfirmed / official name Unknown |
2 | 与 0 共用主要 group;0x4000 strategic landing 只接受与当前格 hex distance 1 的候选,正分数使用更宽的 quarter-band finalization | 分步战略推进型 / Stepwise Strategic Advance | Confirmed mechanism / Characterized label / official name Unknown |
3 | local tactical target / staging / scripted target/path fallback | 局部战术/脚本驱动型 | FunctionConfirmed / official name Unknown |
4 | 0x5000 radius-6 enemy-pressure / friendly-support positioning | 压力/支援站位型 | FunctionConfirmed / official name Unknown |
Mode2 的精确正分数 finalization,令进入 behavior-specific 分支前的战略分数为 S:
text
q = floor(S / 4)
score2 = q + RNG(S - q)
score2 in [q, S-1] // S > 0对照 mode0:
text
h = floor(S / 2)
score0 = h + RNG(h) // confirmed safe domain S >= 2Mode2 的 supportScale=15 不是它自身执行支援站位的证据。该常数由执行 0x5000 的 mode4 单位在评价附近 mode2 友军时消费;mode2 自身不进入 0x5000。
1.28 corpus 还观察到 222 条 mode2 assignment / 63 BTL,且至少 33 个逻辑组随后切换到 mode0/1。因此“分步战略推进型”只作为当前项目解释性标签,不是原版正式 enum 名。
完整的 dispatcher、0x1000~0x8000 候选组、mode2 一格战略落脚、精确 RNG 公式、mode3/4 差异和阶段性 authoring 画像见 Fallback AI 主行为 0~4。
完整 Route7 authority:
text
reconstruction/docs/route7_behavior_mode2_characterization_v1_report.md
reports/route7_ai_behavior_mode2_corpus_v1.json主要物理/身份证据:
text
reconstruction/src/WC4.Runtime.BattleData/BtlScheduleRecords.cs
reports/route4_identity_reference_contract.md
reports/route4_special_value_inventory.csv