refactor(wilderness): 移除凭空发明的程序化十字矮石墙网络,回归原版自然地貌阻隔 #65
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: troytt/diablo2-web#65
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?
背景
在对当前地图生成器与原版暗黑 2 (
D2Common.dll/ D2MOO) 进行全量比对时发现:当前 Web 引擎在
src/game/wilderness.ts中实现了一套程序化石墙网络(stampThemedDividers/stampOutdoorDividers),沿着关卡中间的宏观网格十字轴铺设带缺口的程序化隔断矮石墙。而在暴雪原版的暗黑破坏神 2 荒野生成器(
DRLGOUTDOORS_GenerateLevel)中,完全没有这种人为的十字形/网格形程序化切分矮墙。原版的野外空间阻隔与动线引导完全由:LvlSub.txt规则按概率放置的独立树木、篱笆、石墙地标簇(如Act 1 - Fence Fill 1..6,Stone Fill 1..2)自然构成。当前的人工十字矮墙破坏了原版大自然的开阔感与质感,属于凭空发明的非原版机制。
改造内容
stampThemedDividers与stampOutdoorDividers对第一、二、三、五幕野外地图强制铺设十字矮石墙的逻辑。LvlSub.txt替代簇的地貌填充:applySubstitution与DRLGTILESUB_DoSubstitutions,让野外空间的遮挡物完全由 MPQ 数据表驱动的 DS1 地标提供(篱笆、废墟、石块、枯木)。WildernessTelemetry中与proceduralDividerCells/proceduralWallCells相关的非原版统计项。验收标准
LvlSub.txt真实预设地标构成npm run typecheck零错误,npx vitest run全绿