Skip to content

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 出现多行不是自动重复数据,也不能去重。

当前 corpus:

text
physical rows                    = 22521
logical groups across files      = 18501
files with repeated group IDs    = 353

stage30105.btl 示例:

text
35 physical rows
7 logical groups: 1,2,3,4,6,7,8

3. Unit 引用

Unit +0x22 是 signed int16 ArmyAIConfig group ID:

text
0        -> NotApplicable / 无 ArmyAIConfig
positive -> 按 BehaviorGroupId lookup

当前全量 Unit:

text
0 reference             = 117695
positive reference      = 9817
negative reference      = 0
positive missing group  = 14

原版 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

不得把第三方旧列名直接升级为正式字段名。

主要证据:

text
reconstruction/src/WC4.Runtime.BattleData/BtlScheduleRecords.cs
reports/route4_identity_reference_contract.md
reports/route4_special_value_inventory.csv