07th-mod / 07th-mod/higurashi-assembly
Globals Flags only save on graceful program shutdown and not when saving normally - (need to check if this has already been fixed on other arcs)
- 主要語言
- C#
- 星號
- 12
- 分支
- 12
- PR 合併指標
- 30 天內沒有已合併 PR
描述
A user on Steam Deck (native) was reporting that their choice option (set by flag "GChoiceMode"), was not obeyed while they were playing the game.
It turned out that every time they exited the game, they either shut down the steam deck, or used steam to exit the game, which force closes the game.
On the console arcs DLL, the game does not save globals, even when you save the game. It only saves on exit. So their globals were never saved, unless they used the in-game menus to exit the game gracefully.
I added a partial fix for this issue by also saving the global flags at the end of public void SaveGame(int slotnum), which is called on quick or normal save. Would be good to also add saving when you return to the main menu.
It may be a good idea to also save whenever a global flag is set in the game script, as usually it's really important those flags are remembered, and that may be the cause of some of the random flag related bugs we see (like completion status not being remembered).
Just need to make sure we don't excessively write to disk (e.g when a flag is written, add a debounce time of 1 second before actually saving to disk, plus a timer to prevent repeated writing more than once every 10 seconds?). If a good debounce method is used, I guess don't need all the extra save methods.
----
I need to check if this was already fixed on the other arcs, as the console arcs code is way behind the other chapters.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
檢查控制台劇情線DLL中的SaveGame方法以查看部分修復。查找遊戲腳本中全域旗標被設定的位置,並與其他劇情線的程式碼進行比較,看它們是否已在設定旗標時或返回主選單時儲存旗標。實作一個防抖動的磁碟儲存以避免過度寫入,並在遊戲過程中用旗標變更進行測試。
由索引模型根據 Issue 內容生成。
評估
- 領域
- game-dev
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100