Skip to content

Autosaves: "Autosaving..." among the event messages, as the original - #192

Open
MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/autosaving-message
Open

MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/autosaving-message

Conversation

@MortenLyhr

Copy link
Copy Markdown
Contributor

What it changes

Each time OpenCiv4 writes an autosave, the first one included, "Autosaving..." now shows among the event messages at the top, as in the original. Before, nothing showed. The text is the game's own TXT_KEY_AUTOSAVING (CIV4GameText_Misc1.xml), added in main.cpp's onAutoSave as a display-only message (MESSAGE_TYPE_DISPLAY_ONLY).

What it is based on

  • The original under Wine (BtS 3.19, plain game, 2026-11-22, kit testgames/shots/cleanroom/, record wine-cleanroom/README.md): "Autosaving..." shows in the event-message area at the top whenever an autosave is written, the initial one and each interval's (cr-t01-hold8-endturn.png, cr-u*.png).
  • The game's text: TXT_KEY_AUTOSAVING, "Autosaving..." in BtS's Assets/XML/Text/CIV4GameText_Misc1.xml.

How it was checked

  • clean room: neither I nor any tool or AI agent I used looked inside the original game's executables or libraries (no disassembly, decompiling, debugging, strings/dumpbin/objdump), and nothing here comes from someone else's (CONTRIBUTING)
  • ctest --test-dir build\Release passes: 15/15 (macOS arm64 build of this branch on master)
  • game results unchanged: --turns 100 --map Fractal --size STANDARD --seed 7 gives D7D43800 at turn 100 on this branch, the same as master
  • original saves still load: not run (no save code is touched)

A new game played by hand on a scratch Documents folder (OC4_DOCUMENTS), two turns: the message was shown at turn 0's and turn 1's autosaves (checked with a temporary log line in Interface::show, not committed).

Wine, the turn after the first autosave, with the message at the top:

wine-autosaving.jpg

Not done / not checked:

  • Whether the original also puts the line in the turn log (Ctrl+Tab). Here it is shown only.
  • On master every turn is autosaved (OpenCiv4's own rule), so the message shows every turn. Bundle 4/6: the options screen #148 brings the original's interval, and then it shows only when a save is written. The two touch the same lambda; whichever merges second keeps both (the play branch has it: the message in Bundle 4/6: the options screen #148's save helper).

Backlog #13.

🤖 Generated with Claude Code

Seen in Wine (BtS 3.19, 2026-11-22, testgames/shots/wine-cleanroom/cr-t01-hold8-endturn.png,
cr-u*.png, record wine-cleanroom/README.md): each time the original writes an autosave, the first
one included, "Autosaving..." shows among the event messages at the top. The text is the game's
TXT_KEY_AUTOSAVING (CIV4GameText_Misc1.xml). OpenCiv4 showed nothing (backlog bssth#13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant