Files
WT-Offline/exe-patches/isolation/user-data-folder-name/patch.json
T
N0VAN0M4LY 7f482ae530 feat(accounts): implement local login
Route login and character requests by their original host names on one
loopback port. Add local accounts, saves, and credential redaction.
2026-11-24 05:01:26 +08:00

44 lines
3.1 KiB
JSON
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.
{
"id": "isolation/user-data-folder-name",
"title": "把游戏名从 WarThunder 改成 WTOffline,让离线版的用户数据目录和正版分开",
"program_behaviour": {
"stock": "程序的游戏身份表里,游戏名是 \"WarThunder\"。引擎的文件夹模块用它拼出用户数据目录:我的文档\\My Games\\WarThunder(设置、上次登录的账号、机器识别码),以及 AppData\\Local\\WarThunder;日志路径、内置浏览器缓存、\"同一时间只能运行一个游戏\" 的检查也用它。这些位置和 Steam 正版完全相同。",
"patched": "游戏名变成 \"WTOffline\"。上面这些位置全部变成离线版自己的:我的文档\\My Games\\WTOffline 等,正版的数据既不会被读到,也不会被改写。"
},
"derivation": {
"requirement": "开发纪律第 18 条、功能清单 A「与正版隔离」:离线版不得读写正版的任何数据。实测中,未打这个补丁的副本在退出时改写了正版账号的 global.blk、machine.blk,并把\"上次登录的账号\"改成了测试账号。",
"cause": "目录由引擎按游戏名拼出(DagorEngine prog/gameLibs/folders/platform/windows.cpp,get_gamedata_dir:我的文档 + \"My Games\" + 游戏名),游戏名是程序里的常量。",
"lighter_options_ruled_out": [
"原生自带:文件夹模块没有改默认目录的配置项(folders.cpp:load_custom_folders 只能新增具名位置,不能覆盖 gamedatadir)。",
"本地服务:不适用。这是客户端在本机读写文件,不经过网络。",
"换 Windows 用户运行:只适合开发期的观察,不能要求玩家这样做。"
],
"conclusion": "只能改 exe。改的是数据(一个字符串),不改代码。",
"if_not_applied": "离线版会读写正版的设置目录:退出时改写正版账号的设置,登录时改写\"上次登录的账号\"。"
},
"why_this_site": [
"游戏身份表(0x7a9a7c8)的游戏名字段和第三个字段都指向这同一个字符串,程序里其他地方不直接引用它。改这一个字符串,所有由游戏名派生的位置一起改变。",
"用到游戏名的 13 处都已核对:反作弊初始化、浏览器缓存路径、日志路径、单实例检查、脚本里的 app 名、语音客户端名、Steam 初始化。没有一处影响玩法;原版界面脚本不按游戏名分支。",
"新名字比原来短,原地替换即可,不需要新增数据。"
],
"features": ["A-与正版隔离"],
"requires": [],
"evidence": [
"2.61.0.37 原版 aces.exe:身份表 0x7a9a7c8 = { \"WarThunder\", L\"Software\\\\Gaijin\\\\WarThunder\", \"WarThunder\", \"wt\", …, \"production\", \"aces.vromfs.bin\" }。",
"Original client logs show that the default save directory is shared with the retail installation.",
"尚未在游戏里验证改名后的效果,由隔离观察(local development tool)确认。"
],
"verified_on": [],
"edit": {
"offset": 1,
"data": { "encoding": "ascii", "text": "WTOffline" },
"bytes": "57544f66666c696e6500",
"expect_original": "5761725468756e646572"
}
}