Characters: Laden in the Esc menu, timed autosave

- Esc menu: "Exportieren" became "Laden"; it opens the load window, always
  in load mode. In a game every world loads (the current one reloads); a
  "(neu)" world stops the game (cCommand_armaStop) and starts the new one
  without the main menu. The character being played cannot be deleted.
- Silent autosave every sacredK.ini [characters] AutosaveMinutes (default
  10, 0 = off) into the character's autosave file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-20 22:41:20 +02:00
1 parent feebe72ab7
commit 732d9c2abb
4 files changed
+161 -71

No files matched your search

+21 -9
View File
@@ -261,21 +261,34 @@ game the character's.
number). Story autosaves (engine event 0xf subtype 2 with the flag at +0x18,
noted in `cEngine::ReceiveEvent`) go into the autosave file.
Silent autosave: 10 minutes after the last save of any kind (or the game's
start), `SaveOnTick` does the direct save marked as an autosave, so it goes
into the autosave file. While a window is open or a save runs it waits for
the next tick. A character never saved yet gets its character file from it.
Interval: `sacredK.ini` `[characters] AutosaveMinutes` (default 10, 0 off).
Direct save (K key, Esc menu "Speichern"): on the next engine tick, as the
quicksave does (0x618ebb): `cUI_Manager::CanOpenWindow` (0x75a690),
`cEngine::CaptureScreen` (0x613710, 1), description +0x6a, row +0x68 = 0,
flag +0x54 |= 0x40. The Esc menu line keeps its action (Show
`UI_WND_SAVEGAME`); `cUI_Manager::ReceiveEvent` (0x757120) turns that into the
direct save while a game runs. Its text is patched at 0x6bc1f7 (id 0x41b is
used by other windows too). Loading is from the main menu only.
used by other windows too).
The Esc menu has no "Exportieren" (request 2026-10-20): `cUI_EscMenu::BuildLines`
(0x6bb870, called by the constructor and on an event) makes five
cUI_StaticText64 lines in the vector +0x158, 0x24 apart; each handles its own
events. After it the UI_ESC_EXPORT line is removed and deleted, the lines
below move up, and the window (0x108 x 0xc8) loses 0x24 of height, staying
centred. With it the export screen (cUI_Character mode 5) is unreachable;
its mod (charexport.cpp, an erase button for export slots) was deleted.
The Esc menu: "Exportieren" became "Laden" (requests 2026-10-20). The line
(text id 0x419 pushed at 0x6bc272, now "Laden") keeps its command, which shows
UI_CHARACTER (the export screen) and hides the menu; in a game
`UiManager_ReceiveEvent` turns that into showing the load window. The load
window always opens in load mode (`cUI_Savegame::Show` vf24 0x71cfb0 picks
save mode in a game; `SetMode` 0x71c4f0 (2) after it). In a game every
world can be loaded, the current one too (a reload from its last save; the
game's in-game load, engine flag 0x200). A "(neu)" world needs a new engine:
the running game stops as "Beenden" stops it (`cCommand_armaStop`, execute
0x755b30, vtable 0x88ee2c: posts 0x8001 to the main window, whose handler
deletes the engine), and when the engine is gone (`OnGameEnd`) the new game's
start command follows (0x8002), without the main menu. The character being
played cannot be deleted. The export screen (cUI_Character
mode 5) is unreachable; its mod (charexport.cpp, an erase button for export slots) was deleted.
### Migration
@@ -286,6 +299,5 @@ kept, the newest file overall is the shared hero.
## Open
- Silent autosave every 10 minutes.
- Quickload (row 0) does not know characters.
- Multiplayer (see `todo.md`).
+11 -3
View File
@@ -184,14 +184,22 @@ From the characters rework (`docs/characters.md`, request of 2026-10-19):
are one byte per difficulty in cStatsManager +0x5704 (read 0x424be0) and
travel in the save header (+0x88..+0x98) and the hero file. Done
2026-10-20 (docs/characters.md).
- **Silent autosave every 10 minutes** (a setting later) into the
autosave file, without the busy dialog, like the direct save
(`SaveOnTick`) but marked as an autosave.
- **Autosave interval in the options window** (now only
`sacredK.ini` `[characters] AutosaveMinutes`).
- **Quickload (row 0) does not know characters.** Ctrl+Z saves into the
current character, but the quickload event (0x116, engine +0x68 = row,
flag 0x200) loads `GAME00.PAK`, which is not listed; make it reload the
current character's world (or its newer autosave).
## Two saves in a row (2026-10-20, not reproduced)
Once two real saves ("saved", not "autosaved") went into the same character
1.8 s apart, about 77 s after loading, with the timed autosave off. Save
flag 0x40 is set in cEngine::ReceiveEvent at 0x618876 (quicksave),
0x618f08 and 0x6190c5 (save event 0xf: +0xc row, +0x18 autosave flag). A
log of the event that sets the flag (dwords 0..9) did not catch it again;
add it back if it shows.
## Savegames screen redesign ("Spielen")
Asked 2026-10-20: redesign the load window (cUI_Savegame, the "Spielen"