Files
MemRelay/projects/4111f53b-afa5-48e1-aaf8-d70a7edc0638/Checkpoint 2026-09-02 09-32-44 UTC [31a260eaf8].md
T

41 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Checkpoint 2026-09-02 09:32:44 UTC [31a260eaf8]
type: checkpoint
permalink: main/projects/4111f53b-afa5-48e1-aaf8-d70a7edc0638/checkpoint-2026-09-02-09-32-44-utc-31a260eaf8
stable_id: f53a8ba7-e28d-42a8-88cb-575a14fbca67
scope: project
project_id: 4111f53b-afa5-48e1-aaf8-d70a7edc0638
memory_type: checkpoint
status: active
revision: 1
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
created_at: '2026-09-23T14:52:36.737985+00:00'
updated_at: '2026-09-23T14:52:36.738037+00:00'
tags:
- wpf
- mod
- additive
- markdown
- checkpoint
---
## 完成内容(提交 9bafe57、10c013c)
- Mod 导出改为官方 Additive Data Mods:protoy→Data\protomods.xml、techtreey→techtreemods.xml、civs→civmods.xml、字符串→strings\<语言>\stringmods.xml(<stringmods><StringTable><Language name><String _locID>)。顶层节点按 name 比较:新增 mergeMode=add,改动 replace,删除 remove;civs 根级标量(defaultpoplimit)直接写新值。母城/abilities/tactics 仍完整 XML 覆盖(增量根节点名未确认)。
- 一键安装:GameDataService.ExportMod(game, working, changed, name, dir) 返回 ModExportResult;ModDirectoryService.Enable 在 mods\age3-mod-status.json 登记 {CheckSum:"0",Enabled:true,LastUpdate:毫秒字符串,Path:"local//名",Priority:max+1,PublishID:0,Title,WorkshopID:0},写前备份 .bak,游戏运行中拒绝。用户机器该文件原本为 {"Actions":[],"Mods":[]}。
- 手册页用 MdXaml 1.27.0 MarkdownScrollViewer(GithubLike 样式)渲染,可切换源码;VM 属性 ManualShowSource/ManualShowPreview。
- FieldDefinitions.DescribeEffect(effectType, subtype, amount, relativity, status) 翻译成中文句子;relativity 官方语义:Assign 设为 / Absolute 加减 / Percent 乘 / BasePercent 按基础值叠加。补齐科技树高频 subtype 与 effect type 词典;FlagSubtypes(UpdateVisual 等)不显示数值。buildbounty=训练/建成时自己得经验;idletimeout、corpsedecaltime 已弃用。
- 编辑器按钮:「安装 Mod 到游戏」(ExportModCommand) 与「备份并直接覆盖 Data.bar」(ApplyCommand),下方一行说明两种生效方式。
- 测试 50/50 通过(新增 ModExportTests)。release\ 已重新发布(含 MdXaml.dll)。
## 验证结论
- protoy 字段语义(maxhitpoints/rof=装填秒数/populationcount/trainpoints/los/maxvelocity/armor 减伤比例/bounty 给对手经验)与 AoE3DE 数据指南一致。
- 本地 Mod 结构 mods\local\<名>\Data\... 与论坛/官方一致;游戏需在 Mod 管理器启用或由状态文件登记;改动后需重启游戏。
## 坑
- 用户同时开着另一个 AI 会话改同一工作树(17:16–17:20 重写了 FieldDefinitions.cs / EditorModels.cs),需提醒用户只保留一个会话。
- 用户桌面会话断开/锁屏时 WPF 不绘制,RenderTargetBitmap 与 PrintWindow 截图均为空,属环境问题。
- 用户运行着 bin\Debug 的编辑器进程会锁住输出,编译/测试用 -p:OutDir=%TEMP%\aoe3build\ 绕开。
## 下一步
- 在真实游戏里验证增量 Mod 生效(可在 Startup\user.cfg 加 DebugOutputGameData,比对 %TEMP%\Age of Empires 3 DE\Data 输出)。
- 若确认 homecity.mods.xml / abilitymods.xml / x.mods.tactics 的根节点名,可把这三类也改为增量。