From 13bf849e3d46e2927dea707be5b9571d00bf8c65 Mon Sep 17 00:00:00 2001 From: Chesyon <55322011+Chesyon@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:47:25 -0400 Subject: [PATCH 1/3] Document overlay 13 --- headers/data/overlay13.h | 32 +-- headers/functions/overlay13.h | 15 +- .../types/personality_test/personality_test.h | 133 +++++++++++ headers/types/types.h | 1 + symbols/overlay13.yml | 210 +++++++++++++----- 5 files changed, 311 insertions(+), 80 deletions(-) create mode 100644 headers/types/personality_test/personality_test.h diff --git a/headers/data/overlay13.h b/headers/data/overlay13.h index 9125cf82..afe198e4 100644 --- a/headers/data/overlay13.h +++ b/headers/data/overlay13.h @@ -1,23 +1,29 @@ #ifndef HEADERS_DATA_OVERLAY13_H_ #define HEADERS_DATA_OVERLAY13_H_ -extern struct window_params QUIZ_WINDOW_PARAMS_1; -extern struct window_params QUIZ_WINDOW_PARAMS_2; -extern struct window_params QUIZ_WINDOW_PARAMS_3; -extern struct window_params QUIZ_WINDOW_PARAMS_4; -extern struct simple_menu_id_item QUIZ_MENU_ITEMS_1[3]; +extern uint8_t QUIZ_BORDER_COLOR_TABLE[2]; +extern struct vec2 PARTNER_PORTRAIT_OFFSET; +extern uint8_t PLAY_OLD_GAME_BOOST[2][4]; +extern struct overlay_load_entry OVERLAY13_LOAD_ENTRY; +extern struct window_params MAIN_DBOX_WINDOW_PARAMS; +extern struct window_params AURA_BOW_DBOX_WINDOW_PARAMS; +extern struct window_params DEBUG_WINDOW_PARAMS; +extern struct window_params QUIZ_INTRO_WINDOW_PARAMS; +extern struct simple_menu_id_item CONFIRM_PARTNER_MENU_ITEMS[2]; extern struct monster_id_16 STARTERS_PARTNER_IDS[21]; -extern struct monster_id_16 STARTERS_HERO_IDS[32]; -extern uint16_t STARTERS_STRINGS[48]; +extern struct monster_id_16 STARTERS_HERO_IDS[16][2]; +extern uint32_t STARTERS_TYPE_INCOMPATIBILITY_TABLE[18]; +extern uint16_t STARTERS_STRINGS[16][3]; extern uint16_t QUIZ_QUESTION_STRINGS[66]; -extern uint16_t QUIZ_ANSWER_STRINGS[176]; -extern struct quiz_answer_points_entry QUIZ_ANSWER_POINTS[174]; +extern uint16_t QUIZ_ANSWER_STRINGS[175]; +extern uint8_t QUIZ_ANSWER_POINTS[171][16]; extern undefined4 OV13_STATIC_INITIALIZER; +extern struct personality_test* PERSONALITY_TEST_PTR; extern uint32_t PARTNER_SELECT_MENU_OPTION_TRACKER; extern uint32_t PARTNER_SELECT_MENU_OPTION_TIMER; -extern struct window_params QUIZ_WINDOW_PARAMS_5; -extern struct window_params QUIZ_WINDOW_PARAMS_6; -extern struct simple_menu_id_item QUIZ_DEBUG_MENU_ITEMS[9]; -extern uint16_t QUIZ_QUESTION_ANSWER_ASSOCIATIONS[66]; +extern struct window_params QUESTION_ANSWER_WINDOW_PARAMS; +extern struct window_params CHOOSE_PARTNER_WINDOW_PARAMS; +extern struct simple_menu_id_item QUIZ_QUESTION_MENU_ITEMS[9]; +extern struct quiz_answer_association QUIZ_ANSWER_ASSOCIATIONS[66]; #endif diff --git a/headers/functions/overlay13.h b/headers/functions/overlay13.h index 051da3f9..c6fc28f8 100644 --- a/headers/functions/overlay13.h +++ b/headers/functions/overlay13.h @@ -1,12 +1,13 @@ #ifndef HEADERS_FUNCTIONS_OVERLAY13_H_ #define HEADERS_FUNCTIONS_OVERLAY13_H_ -void EntryOverlay13(void); -void ExitOverlay13(void); -int Overlay13SwitchFunctionNa238A1C8(void); -void Overlay13SwitchFunctionNa238A574(void); -int GetPersonality(void); // TODO: Change return type to enum -char* GetOptionStringFromID(char* output, int option_id); -void WaitForNextStep(int switch_case); +void PersonalityTestEntryPoint(void); +void PersonalityTestDestructor(void); +void PersonalityTestFrameUpdate(void); +void PersonalityTestMainManager(void); +int GetPersonality(void); +char* GetPartnerOptionString(char* buf, int idx); +void WaitForNextStep(enum personality_test_state next_state); +void DrawPersonalityTestDebug(int window_id); #endif diff --git a/headers/types/personality_test/personality_test.h b/headers/types/personality_test/personality_test.h new file mode 100644 index 00000000..04f2435d --- /dev/null +++ b/headers/types/personality_test/personality_test.h @@ -0,0 +1,133 @@ +// Types used primarily in the context of the personality test (run by overlay 13), +#ifndef HEADERS_TYPES_PERSONALITY_TEST_H_ +#define HEADERS_TYPES_PERSONALITY_TEST_H_ + +enum personality_test_state { + INIT = 0, + INTRO = 1, + START_QUIZ = 2, + PREP_QUESTION = 3, + QUESTION_PROMPT = 4, + QUESTION_MENU = 5, + ANSWER_QUESTION = 6, + AFTER_QUESTION = 7, + FINISH_QUESTIONS = 8, + AURA_INFO = 9, + AURA_INFO_AWAIT_DBOX_INACTIVE = 10, + AURA_INFO_DBOX_INACTIVE = 11, + HOLD_PROMPT = 12, + HOLD_PROMPT_AWAIT_DBOX_INACTIVE = 13, + HOLD_PROMPT_DBOX_INACTIVE = 14, + AWAIT_BEGIN_HOLD = 15, + BEGIN_HOLD = 16, + CONTINUE_HOLD = 17, + CONTINUE_HOLD_AWAIT_DBOX_INACTIVE = 18, + CONTINUE_HOLD_DBOX_INACTIVE = 19, + PRE_AURA_IDENTIFIED = 20, + AURA_IDENTIFIED = 21, + AURA_IDENTIFIED_AWAIT_DBOX_INACTIVE = 22, + AURA_IDENTIFIED_DBOX_INACTIVE = 23, + AWAIT_LIFT = 24, + LIFTED_AWAIT_COUNTDOWN = 25, + PREP_PRE_SHOW_AURA = 26, + PRE_SHOW_AURA = 27, + PRE_SHOW_AURA_AWAIT_DBOX_INACTIVE = 28, + PRE_SHOW_AURA_DBOX_INACTIVE = 29, + PREP_SHOW_AURA = 30, + SHOW_AURA = 31, + SHOW_AURA_AWAIT_DBOX_INACTIVE = 32, + SHOW_AURA_DBOX_INACTIVE = 33, + THANK_YOU = 34, + UNUSED_35 = 35, + EXPLAIN_PERSONALITY = 36, + HERO_SPECIES = 37, + HERO_SPECIES_AWAIT_DBOX_INACTIVE = 38, + HERO_SPECIES_DBOX_INACTIVE = 39, + PRE_CHOOSE_PARTNER = 40, + PRE_CHOOSE_PARTNER_AWAIT_DBOX_INACTIVE = 41, + CHOOSE_PARTNER_PROMPT = 42, + CHOOSE_PARTNER_PROMPT_AWAIT_DBOX_INACTIVE = 43, + START_CHOOSE_PARTNER = 44, + CHOOSE_PARTNER = 45, + FINISH_CHOOSE_PARTNER = 46, + CONFIRM_PARTNER_SPECIES_PROMPT = 47, + PARTNER_NAME_START = 48, + AWAIT_PARTNER_NAME_FINISH = 49, + PARTNER_NAME_FINISH = 50, + CONFIRM_PARTNER_NAME_RESULT = 51, + CONFIRM_PARTNER_NAME_YES = 52, + CONFIRM_PARTNER_NAME_NO = 53, + READY_TO_GO = 54, + FINISH_1 = 55, + FINISH_2 = 56, + FINISH_3 = 57, + WAIT_NEXT_STEP = 58, + CONFIRM_PARTNER_SPECIES_MENU = 59, + CONFIRM_PARTNER_SPECIES_MENU_RESULT = 60, + EARLY_RELEASE = 61, + EARLY_RELEASE_MESSAGE = 62, + EARLY_RELEASE_RETRY = 63, + UNK_64 = 64, + UNK_65 = 65, +}; + +struct personality_test { + uint8_t outer_state; // 0x0: Used in a switch statement in PersonalityTestFrameUpdate. 0xD + // causes PersonalityTestMainManager to run. + uint8_t next_outer_state; // 0x1: Educated guess. + int8_t main_dbox_window_id; // 0x2 + int8_t menu_window_id; // 0x3 + int8_t aura_bow_dbox_window_id; // 0x4 + int8_t portrait_box_window_id; // 0x5 + int8_t debug_window_id; // 0x6: Window ID for the debug window showing all point values. Only + // assigned if DEBUG_FLAG_EDIT_MODE is enabled. + undefined1 padding_0x7; + char* question_buf_ptr; // 0x8: Points to question_buf. + undefined4 unk_0xc[2]; + char* answer_buf_ptr; // 0x14: Seems to be updated for each answer buf it fills in; as such, + // probably points the the buf for the last valid answer. + undefined4 unk_0x18; // 0x18 + undefined4 unk_0x1c; // 0x1C + enum personality_test_state state; // 0x20 + int32_t question_num; // 0x24: Which question we're currently on. + int32_t lift_continue_countdown; // 0x28: After the "lift your finger" text shows, this begins + // counting down by 1 each frame. The sequence will not advance + // until touch is released AND this countdown has reached 0. + undefined field_0x2c[4]; + enum personality_test_state future_state; // 0x30 + uint8_t personality_points[16]; // 0x34: Tracks points for each personality. The one with the + // highest is the winning personality. + uint8_t tiebreaker_bonus_points[16]; // 0x44: Indexes where points[i] is the highest point value + // will get a random value between [0,19]. + uint8_t question_ids[10]; // 0x54: Question IDs that will be used throughout the quiz. Used to + // index in QUESTION_ANSWER_ASSOCIATIONS and QUIZ_QUESTION_STRINGS. + bool not_play_old_game; // 0x5E + uint8_t gender; // 0x5F + uint16_t question_string_id; // 0x60: String ID for the current question. + undefined field_0x62[10]; + char question_buf[512]; // 0x6C: Size is a guess + char answer_bufs[4][64]; // 0x26C + undefined field_0x36c[4]; + uint32_t n_partner_options; // 0x370 + struct monster_id_16 partner_options[20]; // 0x374: Species that can be the partner, after + // accounting for type incompatibilities. + undefined field_0x39c[24]; + struct portrait_params portrait_params; // 0x3B4: For the portrait used in partner selection + char charbuf_0x3c4[32]; // 0x3C4: Related to the keyboard for naming the partner. + char charbuf_0x3e4[32]; // 0x3E4: Related to the keyboard for naming the partner. Size is an + // (educated) guess. + char charbuf_0x404[32]; // 0x404: Related to the keyboard for naming the partner. Size is an + // (educated) guess. + struct monster_id_16 partner_species; // 0x424 + uint16_t aura_color; // 0x426 +}; +ASSERT_SIZE(struct personality_test, 1064); + +struct quiz_answer_association { + uint8_t num_answers; // 0x0: How many answers there are to this question. + uint8_t answer_idx; // 0x1: Index of the first answer for this question in QUIZ_ANSWER_STRINGS + // and QUIZ_ANSWER_POINTS. +}; +ASSERT_SIZE(struct quiz_answer_association, 2); + +#endif diff --git a/headers/types/types.h b/headers/types/types.h index f45a1433..419779e9 100644 --- a/headers/types/types.h +++ b/headers/types/types.h @@ -4,6 +4,7 @@ #include "common/common.h" #include "dungeon_mode/dungeon_mode.h" #include "ground_mode/ground_mode.h" +#include "personality_test/personality_test.h" #include "sentry_duty/sentry_duty.h" #endif diff --git a/symbols/overlay13.yml b/symbols/overlay13.yml index 87b568ef..3a9723a4 100644 --- a/symbols/overlay13.yml +++ b/symbols/overlay13.yml @@ -13,42 +13,44 @@ overlay13: JP: 0x2E80 description: "Controls the personality test, including the available partners and playable Pokémon. The actual personality test questions are stored in the MESSAGE folder." functions: - - name: EntryOverlay13 + - name: PersonalityTestEntryPoint + aliases: + - EntryOverlay13 address: EU: 0x238AC80 NA: 0x238A140 JP: 0x238B6A0 description: |- - Main function of this overlay. - - Note: unverified, ported from Irdkwia's notes + Called when this overlay is loaded. Allocates and initializes the personality_test struct, and updates PERSONALITY_TEST_PTR. No params. - - name: ExitOverlay13 + - name: PersonalityTestDestructor + aliases: + - ExitOverlay13 address: EU: 0x238ACD0 NA: 0x238A190 JP: 0x238B6F0 description: |- - Note: unverified, ported from Irdkwia's notes + Called before unloading the overlay. Frees the allocated personality_test struct, and clears PERSONALITY_TEST_PTR. No params. - - name: Overlay13SwitchFunctionNa238A1C8 + - name: PersonalityTestFrameUpdate address: EU: 0x238AD08 NA: 0x238A1C8 JP: 0x238B728 description: |- - Handles the 'return' value from MENU_PERSONALITY_TEST called by scripts. + Called every frame while the overlay is loaded. Uses a switch case with PERSONALITY_TEST_PTR->outer_state, where an outer_state of 0xD will call PersonalityTestMainManager. Most outer_states seem to try to head towards this state. Handles the 'return' value from MENU_PERSONALITY_TEST called by scripts. return: int? - - name: Overlay13SwitchFunctionNa238A574 + - name: PersonalityTestMainManager address: EU: 0x238B0B4 NA: 0x238A574 JP: 0x238BAD4 description: |- - Handles the menus and dialogue boxes associated with the personality quiz. + Handles the majority of the logic for the entire personality test, including picking/answering questions, determining aura color, touching the aura bow, choosing the partner species, and more. Uses a switch case with PERSONALITY_TEST_PTR->state to track where we are in the overall test sequence. No params. - name: GetPersonality @@ -59,29 +61,42 @@ overlay13: description: |- Returns the personality obtained after answering all the questions. - The value to return is determined by checking the points obtained for each the personalities and returning the one with the highest amount of points. + The value to return is determined by checking the points obtained for each the personalities and returning the one with the highest amount of points. This is where the "tiebreaker bonus points" are applied. + + In the case that there is still a tie after applying the tiebreaker bonus points, the first personality in the list of tying personalities takes priority. return: Personality (0-15) - - name: GetOptionStringFromID + - name: GetPartnerOptionString + aliases: + - GetOptionStringFromID address: EU: 0x238C930 NA: 0x238BDF0 JP: 0x238D354 description: |- - Note: unverified, ported from Irdkwia's notes. The first parameter and the return value point to the same string (which is passed directly into PreprocessString as the first argument), so I'm not sure why they're named differently... Seems like a mistake? + Gets the string for a partner option (gender symbol + name) and puts it in the provided buffer. Returns the same buffer pointer that was passed in (for some reason). - r0: menu_id - r1: option_id - return: process + r0: [output] buffer + r1: Index in PERSONALITY_TEST_PTR->partner_options + return: buffer - name: WaitForNextStep address: EU: 0x238C98C NA: 0x238BE4C JP: 0x238D3B0 description: |- - Note: unverified, ported from Irdkwia's notes + Sets the current state in PERSONALITY_TEST_PTR to WAIT_NEXT_STEP, and sets the future state to the provided state. - r0: switch_case + r0: Next state for after the WAIT_NEXT_STEP state finishes + - name: DrawPersonalityTestDebug + address: + EU: 0x238C9AC + NA: 0x238BE6C + JP: 0x238D3D0 + description: |- + Updates and draws the text for the personality test debug window that shows the scores for each personality. Assumes that the window exists. + + r0: Window ID for the debug window data: - name: QUIZ_BORDER_COLOR_TABLE address: @@ -92,8 +107,11 @@ overlay13: EU: 0x4 NA: 0x4 JP: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" - - name: PORTRAIT_ATTRIBUTES + description: |- + Value to be passed into SetBothScreensWindowsColor. Indexed using gender. + + type: uint8_t[2] + - name: PARTNER_PORTRAIT_OFFSET address: EU: 0x238CB54 NA: 0x238C014 @@ -102,8 +120,13 @@ overlay13: EU: 0x8 NA: 0x8 JP: 0x8 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_MALE_FEMALE_BOOST_TABLE + description: |- + Offset passed into SetPortraitOffset for the partner portrait. + + type: vec2 + - name: PLAY_OLD_GAME_BOOST + aliases: + - QUIZ_MALE_FEMALE_BOOST_TABLE address: EU: 0x238CB5C NA: 0x238C01C @@ -112,8 +135,11 @@ overlay13: EU: 0x8 NA: 0x8 JP: 0x8 - description: "Note: unverified, ported from Irdkwia's notes" - - name: OVERLAY13_UNKNOWN_STRUCT__NA_238C024 + description: |- + Which personalities will receive a 4 point bonus if "Yes" was answered to the Explorers of Time/Darkness question, by gender. 16 is used as a terminator. + + type: uint8_t[2][4] + - name: OVERLAY13_LOAD_ENTRY address: EU: 0x238CB64 NA: 0x238C024 @@ -122,8 +148,13 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_WINDOW_PARAMS_1 + description: |- + Information about the overlay: the ID, the frame update function, and the destructor function. + + The entrypoint function is NOT specified here, as overlay 11 directly calls PersonalityTestEntryPoint after loading the overlay. + + type: overlay_load_entry + - name: MAIN_DBOX_WINDOW_PARAMS address: EU: 0x238CB74 NA: 0x238C034 @@ -132,8 +163,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_WINDOW_PARAMS_2 + description: |- + Window params for the main dialogue box used throughout the personality test. + + type: window_params + - name: AURA_BOW_DBOX_WINDOW_PARAMS address: EU: 0x238CB84 NA: 0x238C044 @@ -142,8 +176,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_WINDOW_PARAMS_3 + description: |- + Window params for the dialogue box shown on the top screen during the aura bow segment. + + type: window_params + - name: DEBUG_WINDOW_PARAMS address: EU: 0x238CB94 NA: 0x238C054 @@ -152,8 +189,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_WINDOW_PARAMS_4 + description: |- + Window params for the personality test debug window. + + type: window_params + - name: QUIZ_INTRO_WINDOW_PARAMS address: EU: 0x238CBA4 NA: 0x238C064 @@ -162,8 +202,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_MENU_ITEMS_1 + description: |- + Window params for the personality test introduction. + + type: window_params + - name: CONFIRM_PARTNER_MENU_ITEMS address: EU: 0x238CBB4 NA: 0x238C074 @@ -172,7 +215,10 @@ overlay13: EU: 0x18 NA: 0x18 JP: 0x18 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + Items for the menu for confirming partner species. + + type: simple_menu_id_item[2] - name: STARTERS_PARTNER_IDS address: EU: 0x238CBCC @@ -182,7 +228,10 @@ overlay13: EU: 0x2A NA: 0x2A JP: 0x2A - description: "type: struct monster_id_16[21]" + description: |- + Potential partner species. + + type: struct monster_id_16[21] - name: STARTERS_HERO_IDS address: EU: 0x238CBF8 @@ -192,7 +241,10 @@ overlay13: EU: 0x40 NA: 0x40 JP: 0x40 - description: "type: struct monster_id_16[32]" + description: |- + The possible hero species by personality and gender. + + type: struct monster_id_16[16][2]" - name: STARTERS_TYPE_INCOMPATIBILITY_TABLE address: EU: 0x238CC38 @@ -202,7 +254,14 @@ overlay13: EU: 0x54 NA: 0x54 JP: 0x54 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + An array representing each type as different bits. + + [type_id] = 1 << (type_id - 1), so 0b0 = None, 0b1 = Normal, 0b10 = Fire, etc... + + A "bitflag" integer is created for the hero species' types and each potential partner species' types, using this table with bitwise OR. If any bits are shared between the hero bitflag and a partner's bitflag (if the result of a bitwise AND != 0), the hero shares a type with the potential partner, and the partner is invalid. + + type: uint32_t[18] - name: STARTERS_STRINGS address: EU: 0x238CC8C @@ -212,7 +271,12 @@ overlay13: EU: 0x60 NA: 0x60 JP: 0x60 - description: "Irdkwia's notes: InsightsStringIDs" + description: |- + String IDs for the explanation of each personality type. + + These strings come in sets of 3, where the first string is the explanation of the personality, the second string is the male species, and the third string is the female + + type: uint16_t[16][3] - name: QUIZ_QUESTION_STRINGS address: EU: 0x238CCEC @@ -222,30 +286,38 @@ overlay13: EU: 0x84 NA: 0x84 JP: 0x84 - description: "0x2 * (66 questions)" + description: |- + String IDs for each of the 66 quiz questions. + + type: uint16_t[66] - name: QUIZ_ANSWER_STRINGS address: EU: 0x238CD70 NA: 0x238C230 JP: 0x238D798 length: - EU: 0x160 - NA: 0x160 - JP: 0x160 - description: "0x2 * (175 answers + null-terminator)" + EU: 0x15E + NA: 0x15E + JP: 0x15E + description: |- + String IDs for each of the 175 answers to the quiz questions. + + type: uint16_t[175] - name: QUIZ_ANSWER_POINTS address: EU: 0x238CED0 NA: 0x238C390 JP: 0x238D8F8 length: - EU: 0xAE0 - NA: 0xAE0 - JP: 0xAE0 + EU: 0xAB0 + NA: 0xAB0 + JP: 0xAB0 description: |- - 0x10 * (174 answers?) + Points for each of the 16 personalities for each of the 171 answers in the quiz that do NOT have special behavior. + + This excludes the answers to the Explorers of Time/Darkness question and gender question, as these answers have special behavior; the former sets not_play_old_game, and the latter uses PLAY_OLD_GAME_BOOST if not_play_old_game is false. - Note: unverified, ported from Irdkwia's notes + type: uint8_t[171][16] - name: OV13_STATIC_INITIALIZER aliases: - OVERLAY13_RESERVED_SPACE @@ -258,7 +330,7 @@ overlay13: NA: 0x4 JP: 0x4 description: Static initializer for overlay 13. - - name: OVERLAY13_UNKNOWN_POINTER__NA_238CEA0 + - name: PERSONALITY_TEST_PTR address: EU: 0x238D9E0 NA: 0x238CEA0 @@ -267,7 +339,10 @@ overlay13: EU: 0x4 NA: 0x4 JP: 0x4 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + [Runtime] Pointer to the struct holding all information about the personality test. + + type: struct personality_test* - name: PARTNER_SELECT_MENU_OPTION_TRACKER address: EU: 0x238D9E4 @@ -293,7 +368,7 @@ overlay13: Keeps track of how long the currently hovered option in the partner menu has been hovered over. Used to change the portrait to happy after some time has elapsed. - - name: QUIZ_WINDOW_PARAMS_5 + - name: QUESTION_ANSWER_WINDOW_PARAMS address: EU: 0x238D9EC NA: 0x238CEAC @@ -302,8 +377,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_WINDOW_PARAMS_6 + description: |- + Window params for answers to questions in the personality test. Also used for confirming partner species. + + type: window_params + - name: CHOOSE_PARTNER_WINDOW_PARAMS address: EU: 0x238D9FC NA: 0x238CEBC @@ -312,8 +390,11 @@ overlay13: EU: 0x10 NA: 0x10 JP: 0x10 - description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_DEBUG_MENU_ITEMS + description: |- + Window params for choosing the partner species. + + type: window_params + - name: QUIZ_QUESTION_MENU_ITEMS address: EU: 0x238DA0C NA: 0x238CECC @@ -322,7 +403,14 @@ overlay13: EU: 0x48 NA: 0x48 JP: 0x48 - description: "Note: unverified, ported from Irdkwia's notes" + description: |- + A sort of menu item buffer for quiz answers. The result_values are static, but the string_ids are changed for each question to its corresponding answers, with a string_id of 0 being used as a terminator. + + The exact size on this is strange. There are 8 filled entries, with the 9th seemingly acting as a terminator, yet CreateSimpleMenuFromStringIds is called with n_items = 10. Additionally, multiple other parts of the personality_test struct expect there to be a maximum of 4 answers to any given question. + + Maybe earlier in development there were plans to support more questions? Alternatively, maybe this was/is additionally used for some debug menu that has more options; This would explain why Irdkwia's notes called it QUIZ_DEBUG_MENU_ITEMS, at least. + + type: simple_menu_id_item[9] - name: OVERLAY13_UNKNOWN_STRUCT__NA_238CF14 address: EU: 0x238DA54 @@ -333,7 +421,9 @@ overlay13: NA: 0x10 JP: 0x10 description: "Note: unverified, ported from Irdkwia's notes" - - name: QUIZ_QUESTION_ANSWER_ASSOCIATIONS + - name: QUIZ_ANSWER_ASSOCIATIONS + aliases: + - QUIZ_QUESTION_ANSWER_ASSOCIATIONS address: EU: 0x238DA64 NA: 0x238CF24 @@ -343,6 +433,6 @@ overlay13: NA: 0x84 JP: 0x84 description: |- - 0x2 * (66 questions) + Holds information about the answers for each of the 66 possible questions in the quiz. Specifically, each entry for a question contains the number of answers for the question, and the index for the first answer to the question in QUIZ_ANSWER_STRINGS and QUIZ_ANSWER_POINTS. This allows PersonalityTestMainManager to get the necessary info for the answers to the current question. - Note: unverified, ported from Irdkwia's notes + type: quiz_answer_association[66] From 2b900083a0b598fcbf5816036a0a5fae4177b311 Mon Sep 17 00:00:00 2001 From: Chesyon <55322011+Chesyon@users.noreply.github.com> Date: Wed, 25 Mar 2026 07:35:43 -0400 Subject: [PATCH 2/3] Aliases for old names of personality test symbols --- symbols/overlay13.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/symbols/overlay13.yml b/symbols/overlay13.yml index 3a9723a4..cde95e5a 100644 --- a/symbols/overlay13.yml +++ b/symbols/overlay13.yml @@ -112,6 +112,8 @@ overlay13: type: uint8_t[2] - name: PARTNER_PORTRAIT_OFFSET + aliases: + - PORTRAIT_ATTRIBUTES address: EU: 0x238CB54 NA: 0x238C014 @@ -155,6 +157,8 @@ overlay13: type: overlay_load_entry - name: MAIN_DBOX_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_1 address: EU: 0x238CB74 NA: 0x238C034 @@ -168,6 +172,8 @@ overlay13: type: window_params - name: AURA_BOW_DBOX_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_2 address: EU: 0x238CB84 NA: 0x238C044 @@ -181,6 +187,8 @@ overlay13: type: window_params - name: DEBUG_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_3 address: EU: 0x238CB94 NA: 0x238C054 @@ -194,6 +202,8 @@ overlay13: type: window_params - name: QUIZ_INTRO_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_4 address: EU: 0x238CBA4 NA: 0x238C064 @@ -207,6 +217,8 @@ overlay13: type: window_params - name: CONFIRM_PARTNER_MENU_ITEMS + aliases: + - QUIZ_MENU_ITEMS_1 address: EU: 0x238CBB4 NA: 0x238C074 @@ -369,6 +381,8 @@ overlay13: has been hovered over. Used to change the portrait to happy after some time has elapsed. - name: QUESTION_ANSWER_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_5 address: EU: 0x238D9EC NA: 0x238CEAC @@ -382,6 +396,8 @@ overlay13: type: window_params - name: CHOOSE_PARTNER_WINDOW_PARAMS + aliases: + - QUIZ_WINDOW_PARAMS_6 address: EU: 0x238D9FC NA: 0x238CEBC @@ -395,6 +411,8 @@ overlay13: type: window_params - name: QUIZ_QUESTION_MENU_ITEMS + aliases: + - QUIZ_DEBUG_MENU_ITEMS address: EU: 0x238DA0C NA: 0x238CECC From b97c500e1ce7ddbee187cb0b73c9dbf1d4d29d0a Mon Sep 17 00:00:00 2001 From: Chesyon <55322011+Chesyon@users.noreply.github.com> Date: Wed, 25 Mar 2026 07:36:01 -0400 Subject: [PATCH 3/3] Rename enum to be personality test specific --- .../types/personality_test/personality_test.h | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/headers/types/personality_test/personality_test.h b/headers/types/personality_test/personality_test.h index 04f2435d..6817fddb 100644 --- a/headers/types/personality_test/personality_test.h +++ b/headers/types/personality_test/personality_test.h @@ -3,72 +3,72 @@ #define HEADERS_TYPES_PERSONALITY_TEST_H_ enum personality_test_state { - INIT = 0, - INTRO = 1, - START_QUIZ = 2, - PREP_QUESTION = 3, - QUESTION_PROMPT = 4, - QUESTION_MENU = 5, - ANSWER_QUESTION = 6, - AFTER_QUESTION = 7, - FINISH_QUESTIONS = 8, - AURA_INFO = 9, - AURA_INFO_AWAIT_DBOX_INACTIVE = 10, - AURA_INFO_DBOX_INACTIVE = 11, - HOLD_PROMPT = 12, - HOLD_PROMPT_AWAIT_DBOX_INACTIVE = 13, - HOLD_PROMPT_DBOX_INACTIVE = 14, - AWAIT_BEGIN_HOLD = 15, - BEGIN_HOLD = 16, - CONTINUE_HOLD = 17, - CONTINUE_HOLD_AWAIT_DBOX_INACTIVE = 18, - CONTINUE_HOLD_DBOX_INACTIVE = 19, - PRE_AURA_IDENTIFIED = 20, - AURA_IDENTIFIED = 21, - AURA_IDENTIFIED_AWAIT_DBOX_INACTIVE = 22, - AURA_IDENTIFIED_DBOX_INACTIVE = 23, - AWAIT_LIFT = 24, - LIFTED_AWAIT_COUNTDOWN = 25, - PREP_PRE_SHOW_AURA = 26, - PRE_SHOW_AURA = 27, - PRE_SHOW_AURA_AWAIT_DBOX_INACTIVE = 28, - PRE_SHOW_AURA_DBOX_INACTIVE = 29, - PREP_SHOW_AURA = 30, - SHOW_AURA = 31, - SHOW_AURA_AWAIT_DBOX_INACTIVE = 32, - SHOW_AURA_DBOX_INACTIVE = 33, - THANK_YOU = 34, - UNUSED_35 = 35, - EXPLAIN_PERSONALITY = 36, - HERO_SPECIES = 37, - HERO_SPECIES_AWAIT_DBOX_INACTIVE = 38, - HERO_SPECIES_DBOX_INACTIVE = 39, - PRE_CHOOSE_PARTNER = 40, - PRE_CHOOSE_PARTNER_AWAIT_DBOX_INACTIVE = 41, - CHOOSE_PARTNER_PROMPT = 42, - CHOOSE_PARTNER_PROMPT_AWAIT_DBOX_INACTIVE = 43, - START_CHOOSE_PARTNER = 44, - CHOOSE_PARTNER = 45, - FINISH_CHOOSE_PARTNER = 46, - CONFIRM_PARTNER_SPECIES_PROMPT = 47, - PARTNER_NAME_START = 48, - AWAIT_PARTNER_NAME_FINISH = 49, - PARTNER_NAME_FINISH = 50, - CONFIRM_PARTNER_NAME_RESULT = 51, - CONFIRM_PARTNER_NAME_YES = 52, - CONFIRM_PARTNER_NAME_NO = 53, - READY_TO_GO = 54, - FINISH_1 = 55, - FINISH_2 = 56, - FINISH_3 = 57, - WAIT_NEXT_STEP = 58, - CONFIRM_PARTNER_SPECIES_MENU = 59, - CONFIRM_PARTNER_SPECIES_MENU_RESULT = 60, - EARLY_RELEASE = 61, - EARLY_RELEASE_MESSAGE = 62, - EARLY_RELEASE_RETRY = 63, - UNK_64 = 64, - UNK_65 = 65, + QUIZ_INIT = 0, + QUIZ_INTRO = 1, + QUIZ_START_QUIZ = 2, + QUIZ_PREP_QUESTION = 3, + QUIZ_QUESTION_PROMPT = 4, + QUIZ_QUESTION_MENU = 5, + QUIZ_ANSWER_QUESTION = 6, + QUIZ_AFTER_QUESTION = 7, + QUIZ_FINISH_QUESTIONS = 8, + QUIZ_AURA_INFO = 9, + QUIZ_AURA_INFO_AWAIT_DBOX_INACTIVE = 10, + QUIZ_AURA_INFO_DBOX_INACTIVE = 11, + QUIZ_HOLD_PROMPT = 12, + QUIZ_HOLD_PROMPT_AWAIT_DBOX_INACTIVE = 13, + QUIZ_HOLD_PROMPT_DBOX_INACTIVE = 14, + QUIZ_AWAIT_BEGIN_HOLD = 15, + QUIZ_BEGIN_HOLD = 16, + QUIZ_CONTINUE_HOLD = 17, + QUIZ_CONTINUE_HOLD_AWAIT_DBOX_INACTIVE = 18, + QUIZ_CONTINUE_HOLD_DBOX_INACTIVE = 19, + QUIZ_PRE_AURA_IDENTIFIED = 20, + QUIZ_AURA_IDENTIFIED = 21, + QUIZ_AURA_IDENTIFIED_AWAIT_DBOX_INACTIVE = 22, + QUIZ_AURA_IDENTIFIED_DBOX_INACTIVE = 23, + QUIZ_AWAIT_LIFT = 24, + QUIZ_LIFTED_AWAIT_COUNTDOWN = 25, + QUIZ_PREP_PRE_SHOW_AURA = 26, + QUIZ_PRE_SHOW_AURA = 27, + QUIZ_PRE_SHOW_AURA_AWAIT_DBOX_INACTIVE = 28, + QUIZ_PRE_SHOW_AURA_DBOX_INACTIVE = 29, + QUIZ_PREP_SHOW_AURA = 30, + QUIZ_SHOW_AURA = 31, + QUIZ_SHOW_AURA_AWAIT_DBOX_INACTIVE = 32, + QUIZ_SHOW_AURA_DBOX_INACTIVE = 33, + QUIZ_THANK_YOU = 34, + QUIZ_UNUSED_35 = 35, + QUIZ_EXPLAIN_PERSONALITY = 36, + QUIZ_HERO_SPECIES = 37, + QUIZ_HERO_SPECIES_AWAIT_DBOX_INACTIVE = 38, + QUIZ_HERO_SPECIES_DBOX_INACTIVE = 39, + QUIZ_PRE_CHOOSE_PARTNER = 40, + QUIZ_PRE_CHOOSE_PARTNER_AWAIT_DBOX_INACTIVE = 41, + QUIZ_CHOOSE_PARTNER_PROMPT = 42, + QUIZ_CHOOSE_PARTNER_PROMPT_AWAIT_DBOX_INACTIVE = 43, + QUIZ_START_CHOOSE_PARTNER = 44, + QUIZ_CHOOSE_PARTNER = 45, + QUIZ_FINISH_CHOOSE_PARTNER = 46, + QUIZ_CONFIRM_PARTNER_SPECIES_PROMPT = 47, + QUIZ_PARTNER_NAME_START = 48, + QUIZ_AWAIT_PARTNER_NAME_FINISH = 49, + QUIZ_PARTNER_NAME_FINISH = 50, + QUIZ_CONFIRM_PARTNER_NAME_RESULT = 51, + QUIZ_CONFIRM_PARTNER_NAME_YES = 52, + QUIZ_CONFIRM_PARTNER_NAME_NO = 53, + QUIZ_READY_TO_GO = 54, + QUIZ_FINISH_1 = 55, + QUIZ_FINISH_2 = 56, + QUIZ_FINISH_3 = 57, + QUIZ_WAIT_NEXT_STEP = 58, + QUIZ_CONFIRM_PARTNER_SPECIES_MENU = 59, + QUIZ_CONFIRM_PARTNER_SPECIES_MENU_RESULT = 60, + QUIZ_EARLY_RELEASE = 61, + QUIZ_EARLY_RELEASE_MESSAGE = 62, + QUIZ_EARLY_RELEASE_RETRY = 63, + QUIZ_UNK_64 = 64, + QUIZ_UNK_65 = 65, }; struct personality_test {