人物/NPC/怪物动作系统:严格对齐暗黑 2 v1.13c #145
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
实现完整的 D2 动作集并在正确时刻按正确速度播放,判定绑定到动画帧事件而非计时器。
详细计划与实测 ground truth 见分支
feat/animation-system。范围(已决策)
NU WL RN A1 A2 SC GH DT DD TN TW,怪物NU WL RN A1 A2 SC GH DT DD(按 MonStats2 的m*位过滤)。全保真见 #143Weapons.txt读wclass/2handedwclass)tests/combat.test.ts的黄金摘要(承认为有意的行为变更)关键 Ground Truth(已实测,勿重复调研)
AnimData.D2
data\global\AnimData.D2,570,304 字节。另有EAnimData.D2。u32 recordCount+recordCount × 160 B。char[8] name(NUL 补齐) +u32 framesPerDirection(LE) +u32 animationSpeed(LE) +u8[144] frameEventFlags。3558×160 + 256×4 = 570,304= 文件大小。sum(大写名字符码) % 256 === blockIndex,3558/3558 全中。时序
ticksPerCycle = framesPerDirection × 256 / animationSpeed,25 Hz tick。等价:每 tick 8.8 定点累加器+= animationSpeed,frameIndex = acc >> 8。帧事件
code=1= ATTACK(命中判定),code=2= MISSILE(生成投射物)。例:SOA1HTH帧 9→1,SOTHHTH帧 10→2,SKA1HTH帧 8→2。⚠️ COF 的 speed 字节常为 0(
sowlhthcofSpeed=0 而SOWLHTHspeed=256)⇒ AnimData 是速度唯一权威。陷阱
MonStats2.txt存在于 MPQ 但不在(listfile)里。必须用archives.has()/read(),用listFiles()会误报 MISSING。现状缺陷
wl/nu)/3/5act-scene.tsL3328continue)attack状态当 stand 画-w/2近似