Add catalogue filters, item detail views, and purchase and resale actions. Resolve images from the player's asset pack, public image URLs, or local game data. Add a utility for creating the optional local asset pack. Type checking and JavaScript syntax checks passed. Embedded browser appearance and in-game behavior still need acceptance.
32 lines
2.5 KiB
JSON
32 lines
2.5 KiB
JSON
{
|
||
"id": "tutorials/immediate-save-skip-tutorial",
|
||
"title": "新手教程询问窗勾选「不再询问」后立即落盘保存",
|
||
"file": "scripts/tutorials/nexttutorialhandler.nut",
|
||
|
||
"program_behaviour": {
|
||
"stock": "scripts/tutorials/nexttutorialhandler.nut 的 onSkipTutorial 调用 saveLocalByAccount(skipTutorialBitmaskId, skipTutorial),默认走 saveProfile() 的 60 秒延迟定时器才调用 save_profile(false) 写盘与上行同步。",
|
||
"patched": "向 saveLocalByAccount 第三参数显式传入 @() save_profile(false)(与同文件第 52 行 prepareStartTutorial 一致),勾选或取消「不再询问」后立即触发本地 global.blk 写入与云端设置上行同步。"
|
||
},
|
||
|
||
"derivation": {
|
||
"requirement": "Persist the tutorial opt-out immediately so it remains set when the client restarts.",
|
||
"cause": "原版 saveLocalByAccount 默认回调 saveProfile()(scripts/clientState/saveProfile.nut SAVE_TIMEOUT = 60000)仅启动 60 秒延迟定时器,期间既不写本地磁盘也不向本地服务发送请求;若 60 秒内进程异常退出或被外部终止,跳过标记即丢失。",
|
||
"lighter_options_ruled_out": [
|
||
"仅靠本地服务:勾选后的 60 秒窗口内客户端不发出任何网络请求,本地服务无从获知勾选状态。"
|
||
],
|
||
"conclusion": "利用 saveLocalByAccount 原生支持的第三参数 saveFunc,传入本文件第 20 行已导入的 save_profile(false),使勾选变更即时落盘并触发 cln_bulk_set_gblk 同步。",
|
||
"if_not_applied": "勾选「不再询问」后 60 秒内若游戏崩溃或强退,下次启动仍会重复弹出新手教程询问窗。"
|
||
},
|
||
|
||
"features": ["A-新手流程"],
|
||
"evidence": [
|
||
"2.61.0.37 gui.vromfs.bin:scripts/tutorials/nexttutorialhandler.nut 第 20、52、121-128 行;scripts/clientstate/localprofiledeprecated.nut 第 40-53 行(saveLocalByAccount 第三参数 saveFunc);scripts/clientstate/saveprofile.nut 第 12、65 行(SAVE_TIMEOUT = 60000)。",
|
||
"2.61.0.37 aces.exe:0x1555600(chard.save_profile 绑定)-> 0x15ffb30 -> 0x4664880(online_storage::save_locally)与 0x4663080(online_storage::send_to_server)。"
|
||
],
|
||
|
||
"edit": {
|
||
"find": " skipTutorial = stdMath.change_bit(skipTutorial, this.checkIdx, obj.getValue())\r\n saveLocalByAccount(skipTutorialBitmaskId, skipTutorial)\r\n }",
|
||
"replace": " skipTutorial = stdMath.change_bit(skipTutorial, this.checkIdx, obj.getValue())\r\n saveLocalByAccount(skipTutorialBitmaskId, skipTutorial, @() save_profile(false))\r\n }"
|
||
}
|
||
}
|