Rework story engine flow and reorganize project docs
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-06 23:19:00 +08:00
parent d678929064
commit ddcb5d5c8c
241 changed files with 19805 additions and 2478 deletions

View File

@@ -0,0 +1,228 @@
# 编辑器 UI / 游戏 UI / 预设内容英文与乱码审计
更新时间:`2026-03-25`
## 范围与方法
- 范围只覆盖当前源码里会直接进入编辑器 UI、游戏运行时 UI、预设内容预览的文案。
- 本轮直接按 `utf-8` 读取 `src/components``src/data` 复核,不把旧审计文档当最终事实来源。
- 不统计 `import`、类型名、变量名、接口字段名、资源路径等纯开发层英文。
## 结论摘要
- 当前目标范围内,确认到 **1 处直接写进源码的中文乱码**
- `src/components/PresetEditor.tsx:72``鐗╁搧`
- 当前更大的问题已经不是“大片中文乱码”,而是 **编辑器与部分游戏界面还残留成组英文 UI 文案**
- 预设内容层面的英文主要集中在 **原始枚举值 / 构筑字段**,例如 `common / rare / legendary``neutral``buildProfile.role``idle / move / attack / die``steady / burst / mobility / finisher / projectile`。这些值本身在数据层可以保留英文,但当前有一部分被界面直接原样显示出来了。
## 编辑器 UI
### 英文残留
- `src/components/PresetEditor.tsx:84-89`
- 编辑器标签仍是 `Characters / NPCs / Scenes / Monsters / Items / Functions`
- `src/components/PresetEditor.tsx:97-104`
- 预设编辑里仍直接使用 `idle / move / attack / die``steady / burst / mobility / finisher / projectile`
- `src/components/StateFunctionEditor.tsx:333-367`
- 预览实体与效果摘要仍是英文:
- `Preview NPC`
- `Fallback NPC preview for ...`
- `Preview Treasure`
- `Treasure preview for ...`
- `Damage x / Incoming x / Heal + / Mana + / Cooldown + / Turn x`
- `src/components/StateFunctionEditor.tsx:496-607`
- 预览阶段与提示说明仍有整段英文:
- `Player Turn Preview`
- `Escape Preview`
- `Travel Result Preview`
- `Explore Preview`
- `Call-Out Preview`
- `Idle Behavior Preview`
- `Predicted skill: ...`
- `Monster counter template uses ...`
- `Battle behaviors are driven by skill weights ...`
- `Escape behaviors always use the chase flow ...`
- `src/components/StateFunctionEditor.tsx:855-939`
- 预览面板头部与信息卡仍是英文:
- `Option`
- `Mode`
- `Replay Preview`
- `Preview Playing`
- `Preview Ready`
- `Live Player`
- `Live Scene`
- `No scene`
- `Resolved Plan`
- `Option kind`
- `Target scene`
- `Cooldowns`
- `Battle Snapshot`
- `Animation`
- `Delivery`
- `Damage`
- `Predicted kill`
- `Target survives`
- `Snapshot based on live playback`
- `src/components/ItemCatalogEditor.tsx:25`
- 稀有度选项仍是 `common / uncommon / rare / epic / legendary`
- `src/components/ItemCatalogEditor.tsx:486-560`
- 物品预览区仍直接显示英文键和值:
- `rarity`
- `value`
- `usable`
- `yes / no`
- `equip`
- `world`
- `neutral`
- `HP / MP / Damage / Guard`
- `HP Restore / MP Restore / CD Reduce`
- `Build / 套装`
- `Role / Set / Piece`
- `none / standalone`
- `src/components/NpcVisualEditor.tsx`
- 目前大部分文案已中文化,但 `NPC` 缩写仍在标题、字段、保存提示中大量保留,属于低优先级统一项,不是乱码问题。
### 确认的中文乱码
| 文件 | 位置 | 当前文本 | 判断 |
| --- | --- | --- | --- |
| `src/components/PresetEditor.tsx` | `72` | `鐗╁搧` | 明确乱码,语义应为“物品” |
### 编辑器 UI 小结
- **最高优先级乱码修复点**`PresetEditor.tsx:72`
- **最高优先级英文清理点**`StateFunctionEditor.tsx``ItemCatalogEditor.tsx`
## 游戏各界面 UI
### 英文残留
- `src/components/GameShell.tsx:414`
- 标题副标仍是 `TAVERNREALMS`
- `src/components/GameShell.tsx:1083-1094`
- 团队弹窗里仍保留 `TavernRealms`
- `src/components/CharacterChatModal.tsx:52,73,76`
- `CHARACTER CHAT`
- `HP`
- `MP`
- `src/components/CharacterDetailModal.tsx:24-40`
- 属性与技能风格映射仍为英文:
- `Strength / Agility / Intelligence / Spirit`
- `Burst / Steady / Mobility / Finisher / Projectile`
- `Female / Male / Unknown`
- `src/components/CharacterDetailModal.tsx:149,186,194-271`
- 详情弹窗区块标题与标签仍有整段英文:
- `INITIAL COMPANION`
- `Close character details`
- `Profile`
- `Candidate`
- `Gender`
- `Stats`
- `Max HP / Max MP`
- `Journey`
- `Reason / Goal`
- `Skills / Loadout / Pack / Backstory / Personality`
- `src/components/InventoryPanel.tsx:39-50`
- 稀有度标签仍是 `Legendary / Epic / Rare / Uncommon / Common`
- `src/components/InventoryPanel.tsx:179-196,215`
- 物品详情仍是英文:
- `Quantity`
- `Owner`
- `Usable`
- `Yes / No`
- `Equipable`
- `Value`
- `Type`
- `Tags`
- `no-tags`
- `src/components/AdventureEntityModal.tsx:206-217`
- 自动生成的物品描述仍是英文整句:
- `helps restore HP`
- `supports MP recovery`
- `fits offensive loadouts`
- `supports defensive gearing`
- `works as a rare trinket-grade pickup`
- `can be saved for crafting or trading`
- `${item.name} can be kept for trading, gifting, or future build planning.`
- `${item.name} is a ${item.category} item that ...`
- `src/components/AdventureEntityModal.tsx:226-235`
- 物品属性摘要仍是英文:
- `HP`
- `MP`
- `Damage`
- `Guard x...`
- `src/components/AdventureEntityModal.tsx:1271-1332`
- NPC 物品详情弹窗仍有一整块英文:
- `ITEM DETAIL`
- `NPC inventory`
- `Quantity`
- `Value`
- `Equip Slot`
- `Not equippable`
- `Usable item`
- `Story, trade, or gift resource`
- `Type`
- `Rarity`
- `Tags`
- `No tags`
- `src/components/CompanionCampModal.tsx:152,176-177,213,216`
- `Active`
- `HP`
- `MP`
- `待命 roster`
- `Reserve`
- `src/components/NpcModals.tsx:507`
- 招募替换提示里仍混入 `roster`
### 当前未确认到的乱码
- 本轮没有在游戏运行时 UI 组件里复核到新的、直接写死在源码中的中文乱码。
- 当前游戏 UI 的主要问题已经转为“英文标签 / 英文句子未汉化”,不是大面积中文乱码。
## 预设内容
### 直接会透到 UI 的英文源
- `src/data/itemDesign.ts:52-72`
- 材质主题里直接保存了英文原始值:
- `worldAffinity: "neutral"`
- `role: "fieldcraft" / "breaker" ...`
- `rarity: "common"`
- `tags: ["scout", "craft"]`
- `src/data/itemCatalog.ts:260-270`
- `designed.rarity / designed.worldAffinity / designed.buildProfile` 会原样流入物品目录数据
- `src/components/ItemCatalogEditor.tsx:486-560`
- 上述原始字段当前会在编辑器预览里被直接显示,因此形成了可见英文泄漏
- `src/data/questFlow.ts:24-30`
- 任务奖励物品稀有度仍是 `rare / uncommon`
- `src/data/npcInteractions.ts:71-82,102-103,166`
- 稀有度与标签推断仍使用 `common / uncommon / rare / epic / legendary`
- 物品标签仍使用 `weapon / armor`
- `src/components/PresetEditor.tsx:97-104`
- 预设编辑直接使用 `idle / move / attack / die`
- 技能风格直接使用 `steady / burst / mobility / finisher / projectile`
- `src/components/StateFunctionEditor.tsx:85-98`
- 行为编辑直接使用 `battle / idle`
- 朝向直接使用 `left / right`
- 怪物动画直接使用 `idle / move / attack`
- 风格直接使用 `steady / burst / mobility / finisher / projectile`
### 当前未确认到的乱码
- 本轮没有在 `src/data/*.ts` 的预设正文里复核到新的、直接写死的中文乱码。
- 当前预设内容层面的问题,主要是“英文字段值没有在显示层做 label 映射”,不是正文汉字被写坏。
## 建议处理顺序
1. 先修 `src/components/PresetEditor.tsx:72``鐗╁搧`
2. 再集中处理 `src/components/StateFunctionEditor.tsx` 的整组英文预览与提示文案。
3. 然后处理 `src/components/ItemCatalogEditor.tsx` 的物品预览英文键名与英文值。
4. 之后清理游戏运行时最明显的英文块:
- `src/components/CharacterDetailModal.tsx`
- `src/components/InventoryPanel.tsx`
- `src/components/AdventureEntityModal.tsx`
- `src/components/CompanionCampModal.tsx`
- `src/components/CharacterChatModal.tsx`
- `src/components/GameShell.tsx`
5. 最后为预设源字段补统一显示映射,把 `common / rare / legendary / neutral / idle / left / right ...` 全部收口到统一词典。