Quest book as one list: story, then side quests by region with ??? rows

The game's list builder runs on a reordered copy of the book: the story, then
one section per region (id blocks of 100 grouped by the region their quests
lie in, named as the megamap names regions), unknown quests as "???", the
rest joined to the nearest area, undiscovered counts. Act tabs hidden, page
turning kept. "Erledigte anzeigen" row toggles completed quests
([questbook] ShowCompleted).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-25 11:41:19 +01:00
1 parent 34cacefcfc
commit 1d16fc65c4
7 files changed
+675 -14

No files matched your search

+61
View File
@@ -40,3 +40,64 @@ script has run) the quest's flags 1/2/4/8 are cleared and its book entries
removed, as if never triggered; quests failed before the mod are reset once
after loading. Confirmed in the log (the four quests above reset, 2026-10-25);
the giver offering them again is still to be tested in the game.
## Quest book (measured 2026-10-25)
- Book entries (quest manager +0x424, 0x174 bytes): kind +0 (3 main quest,
4 side quest: ids 1..99 are main quests, 0x46c450), state +4, quest id +8,
title / text ids +0x24 / +0x28, progress log text ids +0x2c.., map position
+0x18 / +0x1c (0x497830), chapter +0x16c (u16). A new entry (0x46c450,
thiscall (quest index, ?), ret 8, called by the script interpreter
0x48f602) copies its chapter from the player's current main quest entry
(+0x3a4 + slot * 8; selected entry +0x3a8 + slot * 8, read by 0x49dd40).
- cUI_Book (one per book mode, 0x7a8[mode] of the book window; quest mode
+0x166 = 0): list builder 0x6b04c0 (thiscall, from the rebuild 0x6b1670),
page-full check 0x6b1a70 (thiscall (tab, page), ret 8), render 0x6b27f0
(thiscall (renderer, bookmarks only), ret 8: the left page's rows, then the
selected row's detail record on the right, 0x6b1cd0 thiscall (renderer,
record, sub-page), ret 0xc), events 0x6b3620 (thiscall (event), ret 4).
Current tab +0x15e, page +0x162; per tab pages +0x97c + tab * 0xc (0x1c
bytes: title text +0, selected row +4, rows +0x10) and detail records
+0x9d0 + tab * 0xc (0x40 bytes). Row (0x14 bytes): u16 flags (4 spacer,
0x40 done, 0x80 entry flag 1), title +4, detail record +8, book entry +0xc,
icon +0x10. Act tabs: chapter text table 0x9de7e4 (9000 "Pfade des
Schicksals", 9001 "Unter blutigen Bannern", 9002 "Die rastlosen Toten",
9003 "Zeitenwende"); bookmarks: 7 controls at +0x168, 0xbc apart.
- The book's list and the quest scripts run on the same thread (logged).
- Quest table (Gladiator, Silber): 28 main quests, 87 side quests in id
blocks of 100 (1xx .. 25xx, 2 to 7 each; their accepted quests lie together
on the map), about 120 other side quests (5xxx, 6xxx, 9xxx, 102xx, 15xxx),
352 generic ones (2600..3599) and bookkeeping entries (0, 99 "MP-Start",
5081..5089 "Region 1 befreit").
## Quest book as one list (request 2026-10-25)
"Show all quests, unknown ones as ???, so a player knows how many quests an
area holds"; then: "get rid of the tabs ... a section for story, and then a
section per region", the game's page turning kept. `mods/questbook.cpp`: the
game's builder runs on a reordered copy of the book (story, then a section
"<region> (known/all)" with "???" rows, other side quests joined to the
nearest area, "Unentdeckt" counts), all in the first tab; rows are mapped
back to the real entries afterwards (ours to none, which clicks ignore). The
bookmarks are hidden, pages titled "Quests", each page selects its first
quest, a click on a heading keeps the selection. Counted: side quests whose
name is unique in the table.
Area names (measured 2026-10-25): an area is an id block (1xx .. 25xx); its
name is the game's name of the region most of its known quests lie in, as the
megamap names the hero's region: book cell +0x18/+0x1c (x 53.66563 = world
units) -> `World_SectorAt` 0x634970 -> `Sector_Region` 0x622e30 ->
`Region_NameKey` 0x425370 -> text (`game/engine/regions.h`). Several blocks
lie in one named region (regions 1, 2, 3 are all `UI_REGION_SOUTHKERN`), so
blocks with the same name make one section; blocks without a known position
are "Gebiet N".
"Erledigte anzeigen" (request 2026-10-25: "some kind of 'Show completed'
checkmark. If unchecked, completed quests are not in the list (as well as
completed regions)"): the list's first row, an own entry whose state draws the
solved mark (100) when on and no icon (0) when off; its row carries the marker
entry 0xfffffffe. A click toggles it (`sacredK.ini` `[questbook]
ShowCompleted`, default 1) and calls `cUI_Book::Rebuild` 0x6b1670 (thiscall,
no arguments; keeps tab and page if the page still exists, else ours clamps
it). Off leaves out solved entries (main and side) and areas whose quests are
all known and solved; failed quests stay (restartable).