From 1dee20713b85f3e05ea0cbb52afcfebe6accdb8a Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 30 May 2026 09:52:19 -0700 Subject: [PATCH] explain quest counters more clearly --- src/QuestScript.cc | 4 ++-- src/SaveFileFormats.hh | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/QuestScript.cc b/src/QuestScript.cc index fd975dd3..1d155284 100644 --- a/src/QuestScript.cc +++ b/src/QuestScript.cc @@ -40,9 +40,9 @@ // stack_pop opcodes to work with arbitrary data. There is protection from stack underflows (the caller receives the // value 0, or the thread terminates in case of the ret opcode), but there is no protection from overflows. // - The quest flags are a per-character array of 1024 single-bit flags saved with the character data. (On Episode 3, -// there are 8192 instead.) +// there are 8192 instead.) Each character has independent sets of quest flags for each difficulty level. // - The quest counters are a per-character array of 16 32-bit values saved with the character data. (On Episode 3, -// there are 48 instead.) +// there are 48 instead.) Unlike quest flags, there is only one set of quest counters, used for all difficulties. // - The event flags are an array of 0x100 bytes stored in the system file (not the character file). using AttackData = BattleParamsIndex::AttackData; diff --git a/src/SaveFileFormats.hh b/src/SaveFileFormats.hh index 9cf8c908..c55f10b4 100644 --- a/src/SaveFileFormats.hh +++ b/src/SaveFileFormats.hh @@ -334,8 +334,8 @@ struct PSOBBMinimalSystemFile { } __packed_ws__(PSOBBMinimalSystemFile, 0x114); struct PSOBBBaseSystemFile : PSOBBMinimalSystemFile { - /* 0114 */ parray key_config; - /* 0280 */ parray joystick_config; + /* 0114 */ parray key_config; + /* 0280 */ parray joystick_config; /* 02B8 */ PSOBBBaseSystemFile(); @@ -808,15 +808,15 @@ struct PSOBBCharacterFile { /* 1AC8 */ le_uint32_t unknown_a3 = 0; /* 1ACC */ parray symbol_chats; /* 1FAC */ parray shortcuts; - /* 29EC */ pstring auto_reply; - /* 2B44 */ pstring info_board; + /* 29EC */ pstring auto_reply; + /* 2B44 */ pstring info_board; /* 2C9C */ PlayerRecordsBattle battle_records; /* 2CB4 */ parray unknown_a4; /* 2CB8 */ PlayerRecordsChallengeBB challenge_records; - /* 2DF8 */ parray tech_menu_shortcut_entries; + /* 2DF8 */ parray tech_menu_shortcut_entries; /* 2E20 */ ChoiceSearchConfig choice_search_config; - /* 2E38 */ parray unknown_a6; - /* 2E48 */ parray quest_counters; + /* 2E38 */ parray unknown_a6; + /* 2E48 */ parray quest_counters; /* 2E88 */ PlayerRecordsBattle offline_battle_records; /* 2EA0 */ parray unknown_a7; /* 2EA4 */ @@ -1040,18 +1040,18 @@ struct LegacySavedPlayerDataBB { // .nsc file format /* 0008 */ parray unused; /* 0028 */ PlayerRecordsBattle battle_records; /* 0040 */ PlayerDispDataV4Preview preview; - /* 00BC */ pstring auto_reply; + /* 00BC */ pstring auto_reply; /* 0214 */ PlayerBank200 bank; /* 14DC */ PlayerRecordsChallengeBB challenge_records; /* 161C */ PlayerDispDataV4 disp; - /* 17AC */ pstring guild_card_description; - /* 185C */ pstring info_board; + /* 17AC */ pstring guild_card_description; + /* 185C */ pstring info_board; /* 19B4 */ PlayerInventory inventory; /* 1D00 */ parray unknown_a2; /* 1D04 */ QuestFlags quest_flags; /* 1F04 */ le_uint32_t death_count = 0; - /* 1F08 */ parray quest_counters; - /* 1F60 */ parray tech_menu_shortcut_entries; + /* 1F08 */ parray quest_counters; + /* 1F60 */ parray tech_menu_shortcut_entries; /* 1F88 */ } __packed_ws__(LegacySavedPlayerDataBB, 0x1F88); @@ -1059,7 +1059,7 @@ struct LegacySavedAccountDataBB { // .nsa file format static const char* SIGNATURE; /* 0000 */ pstring signature; - /* 0040 */ parray blocked_senders; + /* 0040 */ parray blocked_senders; /* 00B8 */ PSOBBGuildCardFile guild_card_file; /* D648 */ PSOBBBaseSystemFile system_file; /* D880 */ PSOBBFullTeamMembership team_membership;