From 4570fa0d19ac727a6eb77c6353d8761002cdf4af Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 14:51:53 +0400 Subject: [PATCH 01/41] aaa --- headers/functions/arm9.h | 1 + headers/functions/overlay29.h | 24 +++++-- symbols/arm9.yml | 10 +++ symbols/overlay29.yml | 129 ++++++++++++++++++++++++++++++---- 4 files changed, 148 insertions(+), 16 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index b8dc0ab6..afa0f874 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -585,6 +585,7 @@ uint8_t DrawChar(int window_id, int x, int y, char symbol, int color_offset); struct window* GetWindow(int window_id); int NewWindowScreenCheck(struct window_params* params, uint8_t param_2); int NewWindow(struct window_params* params, uint8_t param_2); +int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); void SetScreenWindowsColor(int palette_idx, bool upper_screen); void SetBothScreensWindowsColor(int palette_idx); void UpdateWindow(int window_id); diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index a272f5f4..c53275d2 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -47,13 +47,14 @@ void PopulateActiveMonsterPtrs(void); int GetTeamMemberIndex(struct entity* monster); void SubstitutePlaceholderStringTags(int string_id, struct entity* entity, undefined4 param_3); bool UpdateMapSurveyorFlag(void); -void PointCameraToMonster(struct entity* entity, undefined param_2); +void PointCameraToMonster(struct entity* entity, bool update_trap_vis_and_map); void UpdateCamera(undefined param_1); bool ItemIsActive(struct entity* entity, enum item_id item_id); int GetVisibilityRange(void); void RevealWholeFloor(struct entity* entity); int PlayEffectAnimationEntity(struct entity* entity, int effect_id, bool play_now, int param_4, - int param_5, undefined param_6, int param_7, undefined2* param_8); + int param_5, undefined param_6, enum direction_id effect_dir, + undefined2* param_8); int PlayEffectAnimationPos(struct position* pos, int effect_id, bool play_now); int PlayEffectAnimationPixelPos(struct pixel_position* pixel_pos, int effect_id, bool play_now); void AnimationDelayOrSomething(undefined param_1); @@ -67,6 +68,8 @@ void PlayEffectAnimationEntityStandard(struct entity* entity, int effect_id); void PlaySpeedUpEffect(struct entity* entity); void PlaySpeedDownEffect(struct entity* entity); void ShowPpRestoreEffect(struct entity* entity); +void DisplayStockpileNumbers(struct entity* entity); +void PlayInvisifySeIfShouldDisplayEntity(struct entity* entity); void PlayOffensiveStatDownEffect(struct entity* entity, int stat_index); void PlayDefensiveStatDownEffect(struct entity* entity, int stat_index); void PlayOffensiveStatUpEffect(struct entity* entity, int stat_index); @@ -208,6 +211,14 @@ bool DebugRecruitingEnabled(void); void TryActivateIqBooster(void); bool IsBehaviorLoneOutlaw(enum monster_behavior behavior); bool IsSecretBazaarNpcBehavior(enum monster_behavior behavior); +bool TalkToSecretBazaarNpcStandard(int string_id, struct entity* shopkeeper, + enum portrait_emotion emotion); +bool TalkToSecretBazaarNpcWithYesNoMenu(int string_id, struct entity* shopkeeper, + enum portrait_emotion emotion); +void MakeTargetFaceUserAndIdle(struct entity* target, struct entity* user); +void SubtractMoneyCarriedWithSfx(int amount); +bool TalkToSecretBazaarNpc(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion, + struct simple_menu_id_item* menu_items, bool param_5); struct action_16* GetLeaderAction(void); enum action_id GetLeaderActionId(void); void GetEntityTouchscreenArea(struct entity* entity, struct touchscreen_area* area); @@ -259,8 +270,10 @@ void ReevaluateSnatchMonster(void); struct entity* GetRandomExplorerMazeMonster(void); void RestorePpAllMovesSetFlags(struct entity* entity); bool CheckTeamMemberIdxVeneer(int member_idx); +bool CheckMonsterTeamMemberIdx(struct entity* entity); bool IsMonsterIdInNormalRangeVeneer(enum monster_id monster_id); void BoostIQ(struct entity* entity, int iq_boost, bool suppress_logs); +void ChangeMonsterAnimationToIdle(struct entity* entity, enum direction_id direction); bool ShouldMonsterHeadToStairs(struct entity* entity); bool MewSpawnCheck(enum monster_id monster_id, bool fail_if_mew); void TryEndStatusWithAbility(struct entity* attacker, struct entity* defender); @@ -392,7 +405,7 @@ bool DungeonTmLearnMove(struct entity* user, enum move_id move_id); void GetMonsterMoves(struct move_id_16* out_moves, enum monster_id monster_id, int level); void EvolveMonster(struct entity* user, struct entity* target, enum monster_id new_monster_id); void DisplayMonsterShadow(bool display_shadow, enum shadow_type shadow_type, bool yellow_circle, - uint16_t x, uint16_t y); + int16_t x, int16_t y); void ChangeMonsterAnimation(struct entity* monster, int8_t animation_id, enum direction_id direction); uint8_t GetIdleAnimationId(struct entity* entity); @@ -476,6 +489,8 @@ void UpdateShopkeeperModeAfterAttack(struct entity* attacker, struct entity* def void UpdateShopkeeperModeAfterTrap(struct entity* shopkeeper, bool non_team_member); void ResetDamageCalcDiagnostics(void); bool SpecificRecruitCheck(enum monster_id monster_id); +bool PointCameraToMonsterWrapper(struct entity* entity); +bool IsEitherMonsterInvalid(struct entity* entity1, struct entity* entity2); bool RecruitCheck(struct entity* user, struct entity* target); bool TryRecruit(struct entity* user, struct entity* recruit); void TrySpawnMonsterAndTickSpawnCounter(void); @@ -763,7 +778,7 @@ void ActivateSportCondition(bool water_sport); bool TryActivateWeather(bool param_1, bool param_2); int DigitCount(int n); void LoadTextureUi(void); -int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); +int GetPaletteBaseAddressOv29(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); int DisplayNumberTextureUi(int16_t x, int16_t y, int n, int ally_mode); int DisplayCharTextureUi(struct render_3d_element_64* element64, int16_t x, int16_t y, int char_id, int16_t param_5); @@ -923,6 +938,7 @@ void GenerateAndSpawnItem(enum item_id item_id, int16_t x, int16_t y, uint16_t q bool sticky, bool check_in_bag); bool IsHiddenStairsFloor(void); bool IsSecretBazaarVeneer(void); +void InteractWithSecretBazaarNpc(struct entity* user, struct entity* shopkeeper); void PrepareItemForPrinting(uint8_t tag_id, struct item* item); void PrepareItemForPrinting2(struct preprocessor_args* preprocessor_args, uint8_t tag_id, struct item* item); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index dda5e6ef..59730b16 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -5585,6 +5585,16 @@ arm9: r0: window_params pointer to be copied by value into window::hdr in the new window r1: ? return: window_id + - name: GetPaletteBaseAddress + address: + EU: 0x2027B9C + description: |- + Gets the palette base address for a 3D element loaded from a WTE file. + Takes the same parameters as were used in the specified file's ProcessWte call. + + r0: upper part of the palette VRAM + r1: lower part of the palette VRAM + return: palette base address - name: SetScreenWindowsColor address: EU: 0x2027D5C diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index f9865665..6fd1f97c 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -637,7 +637,7 @@ overlay29: Points the camera to the specified monster. r0: Entity pointer - r1: ? + r1: whether to also update trap visibility and the minimap - name: UpdateCamera address: EU: 0x22E3874 @@ -732,6 +732,7 @@ overlay29: r0: entity pointer r1: Effect ID r2: appears to be a flag for actually running the animation now? If this is 0, the AdvanceFrame loop is skipped entirely. + stack[2]: direction of effect others: ? return: status code, or maybe the number of frames or something? Either way, -1 seems to indicate the animation being finished or something? - name: PlayEffectAnimationPos @@ -863,6 +864,20 @@ overlay29: description: |- Displays the graphical effect on a monster that just lowered movement speed. + r0: entity pointer + - name: DisplayStockpileNumbers + address: + EU: 0x22E5084 + description: |- + Displays the numbers for a monster's stockpile stage above them. + + r0: entity pointer + - name: PlayInvisifySeIfShouldDisplayEntity + address: + EU: 0x22E50B4 + description: |- + Calls PlaySeByIdIfShouldDisplayEntity with the sound effect for turning a monster invisible. + r0: entity pointer - name: ShowPpRestoreEffect address: @@ -2268,6 +2283,53 @@ overlay29: r0: monster behavior ID return: bool + - name: TalkToSecretBazaarNpcStandard + address: + EU: 0x22F0FB8 + description: |- + Opens a dialogue box with the given shopkeeper as the speaker, without a yes/no menu and with param_5 set to false. + + r0: string id + r1: shopkeeper entity pointer + r2: portrait emotion + return: ? (bool) + - name: TalkToSecretBazaarNpcWithYesNoMenu + address: + EU: 0x22F0FE0 + description: |- + Opens a dialogue box with the given shopkeeper as the speaker, with a yes/no menu and with param_5 set to true. + + r0: string id + r1: shopkeeper entity pointer + r2: portrait emotion + return: ? (bool) + - name: MakeTargetFaceUserAndIdle + address: + EU: 0x22F1008 + description: |- + Makes the target face the user and changes their animation to idle. + + r0: target entity pointer + r1: user entity pointer + - name: SubtractMoneyCarriedWithSfx + address: + EU: 0x22F1170 + description: |- + Subtracts the amount of money from the the player's current amount of money and plays the sound effect for buying an item. + + r0: money amount + - name: TalkToSecretBazaarNpc + address: + EU: 0x22F1338 + description: |- + Opens a dialogue box with the given shopkeeper as the speaker. + + r0: string id + r1: shopkeeper entity pointer + r2: portrait emotion + r3: pointer to an array of simple_menu_id_items (null if there is no menu) + stack[0]: ? (changes something in secret_bazaar_dialogue_info if true. seems to only be true if there is a menu) + return: ? (bool) - name: GetLeaderAction address: EU: 0x22F1540 @@ -2792,18 +2854,25 @@ overlay29: Called when a monster is revived. r0: pointer to entity whose moves will be restored - - name: CheckTeamMemberIdxVeneer + - name: CheckMonsterTeamMemberIdx address: - EU: 0x22FA64C - NA: 0x22F9C40 - JP: 0x22FB1F8 + EU: 0x22FA658 description: |- - Likely a linker-generated veneer for CheckTeamMemberIdx. - - See https://developer.arm.com/documentation/dui0474/k/image-structure-and-generation/linker-generated-veneers/what-is-a-veneer- + Calls CheckTeamMemberIdx on the given monster's team_index. - r0: member index + r0: entity pointer return: True if the value is equal to 0x55AA or 0x5AA5 + - name: GetRandomExplorerMazeMonster + address: + EU: 0x22FA3F8 + NA: 0x22F99EC + JP: 0x22FAFA4 + description: |- + Checks if any enemy monsters on the floor have the behavior BEHAVIOR_EXPLORER_MAZE_1, + BEHAVIOR_EXPLORER_MAZE_2, BEHAVIOR_EXPLORER_MAZE_3 or BEHAVIOR_EXPLORER_MAZE_4 and returns + one at random. If none can be found, it returns NULL. + + return: monster entity pointer - name: IsMonsterIdInNormalRangeVeneer address: EU: 0x22FA674 @@ -2827,6 +2896,14 @@ overlay29: r0: monster entity pointer r1: iq boost r2: bool suppress logs + - name: ChangeMonsterAnimationToIdle + address: + EU: 0x22FAD6C + description: |- + Makes the monster play their idle animation in the given direction. + + r0: entity pointer + r1: direction - name: ShouldMonsterHeadToStairs address: EU: 0x22FAE3C @@ -4209,8 +4286,8 @@ overlay29: r0: whether to display the shadow r1: shadow type r2: whether to display a yellow circle (for team members and special cases like decoys, rescue clients, etc.) - r3: x-coordinate in OAM plus 0x10 - stack[0]: y-coordinate in OAM plus 0x8 + r3: the x-coordinate in OAM plus some constant offset. Valid input range: (-0x20, 0x11F) + stack[0]: the y-coordinate in OAM plus some constant offset. Valid input range: (-0x20, 0xE0) - name: ChangeMonsterAnimation address: EU: 0x23053D4 @@ -4862,6 +4939,22 @@ overlay29: Resets the damage calculation diagnostic info stored on the dungeon struct. Called unconditionally at the start of CalcDamage. No params. + - name: PointCameraToMonsterWrapper + address: + EU: 0x230E0B8 + description: |- + Calls PointCameraToMonster on the given monster with update_trap_vis_and_map = 1. + + r0: entity pointer + - name: IsEitherMonsterInvalid + address: + EU: 0x230E0C8 + description: |- + Returns true if at least one of the given monsters is an invalid entity. + + r0: entity pointer + r1: entity pointer + return: bool - name: SpecificRecruitCheck address: EU: 0x230E588 @@ -7492,7 +7585,9 @@ overlay29: Note: unverified, ported from Irdkwia's notes No params. - - name: GetPaletteBaseAddress + - name: GetPaletteBaseAddressOv29 + aliases: + - GetPaletteBaseAddress address: EU: 0x23362B0 NA: 0x2335864 @@ -7501,6 +7596,8 @@ overlay29: Gets the palette base address for a 3D element loaded from a WTE file. Takes the same parameters as were used in the specified file's ProcessWte call. + Is an exact copy of GetPaletteBaseAddress in arm9. + r0: upper part of the palette VRAM r1: lower part of the palette VRAM return: palette base address @@ -9091,6 +9188,14 @@ overlay29: See https://developer.arm.com/documentation/dui0474/k/image-structure-and-generation/linker-generated-veneers/what-is-a-veneer- return: bool + - name: InteractWithSecretBazaarNpc + address: + EU: 0x2345128 + description: |- + Called to interact with a secret bazaar shopkeeper. + + r0: user entity pointer + r1: shopkeeper entity pointer - name: PrepareItemForPrinting address: EU: From 2da053d9b39253ee375c326c1a51a2c8c01e460c Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 14:57:12 +0400 Subject: [PATCH 02/41] aaa --- headers/functions/overlay29.h | 6 +++--- symbols/overlay29.yml | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index c53275d2..07d36ed3 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -211,13 +211,13 @@ bool DebugRecruitingEnabled(void); void TryActivateIqBooster(void); bool IsBehaviorLoneOutlaw(enum monster_behavior behavior); bool IsSecretBazaarNpcBehavior(enum monster_behavior behavior); -bool TalkToSecretBazaarNpcStandard(int string_id, struct entity* shopkeeper, +bool TalkToSecretBazaarNpcStandard(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion); -bool TalkToSecretBazaarNpcWithYesNoMenu(int string_id, struct entity* shopkeeper, +bool TalkToSecretBazaarNpcWithYesNoMenu(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion); void MakeTargetFaceUserAndIdle(struct entity* target, struct entity* user); void SubtractMoneyCarriedWithSfx(int amount); -bool TalkToSecretBazaarNpc(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion, +bool TalkToSecretBazaarNpc(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion, struct simple_menu_id_item* menu_items, bool param_5); struct action_16* GetLeaderAction(void); enum action_id GetLeaderActionId(void); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 53cc57ea..e89183ee 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -2858,6 +2858,18 @@ overlay29: Called when a monster is revived. r0: pointer to entity whose moves will be restored + - name: CheckTeamMemberIdxVeneer + address: + EU: 0x22FA64C + NA: 0x22F9C40 + JP: 0x22FB1F8 + description: |- + Likely a linker-generated veneer for CheckTeamMemberIdx. + + See https://developer.arm.com/documentation/dui0474/k/image-structure-and-generation/linker-generated-veneers/what-is-a-veneer- + + r0: member index + return: True if the value is equal to 0x55AA or 0x5AA5 - name: CheckMonsterTeamMemberIdx address: EU: 0x22FA658 From 0683913665d8727a1d8280b54bf57d9488b4df65 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 14:58:46 +0400 Subject: [PATCH 03/41] aaa --- headers/functions/overlay29.h | 2 +- symbols/overlay29.yml | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 07d36ed3..8bf6d231 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -214,7 +214,7 @@ bool IsSecretBazaarNpcBehavior(enum monster_behavior behavior); bool TalkToSecretBazaarNpcStandard(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion); bool TalkToSecretBazaarNpcWithYesNoMenu(int string_id, struct entity* shopkeeper, - enum portrait_emotion emotion); + enum portrait_emotion emotion); void MakeTargetFaceUserAndIdle(struct entity* target, struct entity* user); void SubtractMoneyCarriedWithSfx(int amount); bool TalkToSecretBazaarNpc(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion, diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index e89183ee..afb2802e 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -2878,17 +2878,6 @@ overlay29: r0: entity pointer return: True if the value is equal to 0x55AA or 0x5AA5 - - name: GetRandomExplorerMazeMonster - address: - EU: 0x22FA3F8 - NA: 0x22F99EC - JP: 0x22FAFA4 - description: |- - Checks if any enemy monsters on the floor have the behavior BEHAVIOR_EXPLORER_MAZE_1, - BEHAVIOR_EXPLORER_MAZE_2, BEHAVIOR_EXPLORER_MAZE_3 or BEHAVIOR_EXPLORER_MAZE_4 and returns - one at random. If none can be found, it returns NULL. - - return: monster entity pointer - name: IsMonsterIdInNormalRangeVeneer address: EU: 0x22FA674 From 64c096bfe27ff6065993cd300e2460247a4ca3c1 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 15:00:31 +0400 Subject: [PATCH 04/41] aaa --- headers/functions/overlay29.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 8bf6d231..879f6ade 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -67,9 +67,9 @@ void PlayParalysisEffect(struct entity* entity); void PlayEffectAnimationEntityStandard(struct entity* entity, int effect_id); void PlaySpeedUpEffect(struct entity* entity); void PlaySpeedDownEffect(struct entity* entity); -void ShowPpRestoreEffect(struct entity* entity); void DisplayStockpileNumbers(struct entity* entity); void PlayInvisifySeIfShouldDisplayEntity(struct entity* entity); +void ShowPpRestoreEffect(struct entity* entity); void PlayOffensiveStatDownEffect(struct entity* entity, int stat_index); void PlayDefensiveStatDownEffect(struct entity* entity, int stat_index); void PlayOffensiveStatUpEffect(struct entity* entity, int stat_index); From 33fe9522f283a1a372626ca033e07215b97cb1d6 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 15:01:49 +0400 Subject: [PATCH 05/41] aaa --- headers/functions/overlay29.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 879f6ade..68031472 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -488,9 +488,9 @@ void CalcDamageFixedWrapper(struct entity* attacker, struct entity* defender, in void UpdateShopkeeperModeAfterAttack(struct entity* attacker, struct entity* defender); void UpdateShopkeeperModeAfterTrap(struct entity* shopkeeper, bool non_team_member); void ResetDamageCalcDiagnostics(void); -bool SpecificRecruitCheck(enum monster_id monster_id); -bool PointCameraToMonsterWrapper(struct entity* entity); +void PointCameraToMonsterWrapper(struct entity* entity); bool IsEitherMonsterInvalid(struct entity* entity1, struct entity* entity2); +bool SpecificRecruitCheck(enum monster_id monster_id); bool RecruitCheck(struct entity* user, struct entity* target); bool TryRecruit(struct entity* user, struct entity* recruit); void TrySpawnMonsterAndTickSpawnCounter(void); From 0503a70f323211faf58a183526f93703e291db09 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 16:16:18 +0400 Subject: [PATCH 06/41] aaa --- symbols/overlay29.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index afb2802e..f9d614bd 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -2306,6 +2306,7 @@ overlay29: r0: string id r1: shopkeeper entity pointer r2: portrait emotion + r3: pointer to an array of simple_menu_id_items return: ? (bool) - name: MakeTargetFaceUserAndIdle address: From 9825d350e20459243407b48257517a47925fe7d0 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 7 Jun 2026 16:16:59 +0400 Subject: [PATCH 07/41] aaa --- headers/functions/overlay29.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 68031472..25da95b4 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -214,7 +214,8 @@ bool IsSecretBazaarNpcBehavior(enum monster_behavior behavior); bool TalkToSecretBazaarNpcStandard(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion); bool TalkToSecretBazaarNpcWithYesNoMenu(int string_id, struct entity* shopkeeper, - enum portrait_emotion emotion); + enum portrait_emotion emotion, + struct simple_menu_id_item* menu_items); void MakeTargetFaceUserAndIdle(struct entity* target, struct entity* user); void SubtractMoneyCarriedWithSfx(int amount); bool TalkToSecretBazaarNpc(int string_id, struct entity* shopkeeper, enum portrait_emotion emotion, From a638af3f5cc11f77d461524eb5a10a4dc28597c1 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 01:39:47 +0400 Subject: [PATCH 08/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 25da95b4..4c52e347 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -172,6 +172,7 @@ void DecrementWindCounter(void); bool IsDungeonEndReasonFailure(void); void SetForcedLossReason(enum forced_loss_reason forced_loss_reason); enum forced_loss_reason GetForcedLossReason(void); +void GetTrapName(char* buffer, enum trap_id trap_id); void BindTrapToTile(struct tile* tile, struct entity* trap, bool is_visible); bool AreLateGameTrapsEnabledWrapper(void); void SpawnTraps(void); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index f9d614bd..10ad2c63 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -1909,6 +1909,14 @@ overlay29: Returns dungeon::forced_loss_reason return: forced_loss_reason + - name: GetTrapName + address: + EU: 0x22EE1DC + description: |- + Gets the name of the given trap. + + r0: [output] buffer + r1: trap id - name: BindTrapToTile address: EU: 0x22EE208 @@ -3547,9 +3555,9 @@ overlay29: NA: 0x2300164 JP: 0x2301538 description: |- - Note: unverified, ported from Irdkwia's notes + Gets the name of a given monster. - r0: buffer + r0: [output] buffer r1: TargetInfo - name: SprintfStatic address: From 5ffa25f502e02349ec5e6dd80c26d5e0fca89552 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 01:46:45 +0400 Subject: [PATCH 09/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 4c52e347..762de709 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -45,6 +45,7 @@ bool CanSeePosition(struct entity* monster, struct position* position); bool CanTargetPosition(struct entity* monster, struct position* position); void PopulateActiveMonsterPtrs(void); int GetTeamMemberIndex(struct entity* monster); +void GetTrapName(char* buffer, struct entity* entity); void SubstitutePlaceholderStringTags(int string_id, struct entity* entity, undefined4 param_3); bool UpdateMapSurveyorFlag(void); void PointCameraToMonster(struct entity* entity, bool update_trap_vis_and_map); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 10ad2c63..445ef690 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -605,6 +605,14 @@ overlay29: r0: Pointer to the entity to find return: Index of the specified entity on the entity list, or null if it's not on the first 4 slots. + - name: GetMonsterOrTrapName + address: + EU: 0x22E33B8 + description: |- + Gets the name of the entity if it is a monster or trap. In other cases, the function either does nothing or gets an unrelated string. + + r0: [output] buffer + r1: entity - name: SubstitutePlaceholderStringTags address: EU: 0x22E3418 From 567ccd2d6d75fc37de54ab00f675896266a9da42 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 01:49:48 +0400 Subject: [PATCH 10/41] aaa --- headers/functions/overlay29.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 762de709..70560adc 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -45,7 +45,7 @@ bool CanSeePosition(struct entity* monster, struct position* position); bool CanTargetPosition(struct entity* monster, struct position* position); void PopulateActiveMonsterPtrs(void); int GetTeamMemberIndex(struct entity* monster); -void GetTrapName(char* buffer, struct entity* entity); +void GetMonsterOrTrapName(char* buffer, struct entity* entity); void SubstitutePlaceholderStringTags(int string_id, struct entity* entity, undefined4 param_3); bool UpdateMapSurveyorFlag(void); void PointCameraToMonster(struct entity* entity, bool update_trap_vis_and_map); From 63f179c524924c85f033e32704759660194226f1 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 01:59:38 +0400 Subject: [PATCH 11/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 70560adc..1457d779 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -206,6 +206,7 @@ bool ApplyRandomTrapEffect(struct trap* trap, struct entity* user, struct entity void ApplyGrudgeTrapEffect(struct entity* monster, struct position* pos); bool ApplyTrapEffect(struct trap* trap, struct entity* user, struct entity* target, struct tile* tile, struct position* pos, enum trap_id, bool random_trap); +void ChangeTrapOnTile(struct tile* tile, enum trap_id trap_id); int SpawnMonstersAroundPos(struct entity* monster, struct position* pos, uint8_t num_enemies); void RevealTrapsNearby(struct entity* monster); bool ShouldRunMonsterAi(struct entity* monster); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 445ef690..8f1741dc 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -2228,6 +2228,14 @@ overlay29: stack[1]: trap ID stack[2]: bool caused by random trap return: True if the trap should be destroyed after the effect is applied + - name: ChangeTrapOnTile + address: + EU: 0x22EFE2C + description: |- + Changes the trap on the tile to the given trap id if there is already one on the tile. + + r0: tile + r1: trap id - name: SpawnMonstersAroundPos address: EU: 0x22EFE68 From 88924757a4599be188c69375b03ad5517aa44e55 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 02:05:18 +0400 Subject: [PATCH 12/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 1457d779..3c8c02da 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -209,6 +209,7 @@ bool ApplyTrapEffect(struct trap* trap, struct entity* user, struct entity* targ void ChangeTrapOnTile(struct tile* tile, enum trap_id trap_id); int SpawnMonstersAroundPos(struct entity* monster, struct position* pos, uint8_t num_enemies); void RevealTrapsNearby(struct entity* monster); +bool RevealTrapAtPos(int x, int y); bool ShouldRunMonsterAi(struct entity* monster); bool DebugRecruitingEnabled(void); void TryActivateIqBooster(void); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 8f1741dc..0bd34abf 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -2257,6 +2257,15 @@ overlay29: Reveals traps within the monster's viewing range. r0: entity pointer + - name: RevealTrapAtPos + address: + EU: 0x22F00B4 + description: |- + Reveals the trap at the given position if one is present. + + r0: x + r1: y + return: true if there was a hidden trap to reveal - name: ShouldRunMonsterAi address: EU: 0x22F03A0 From c26ee748086523d7687ab8ec41173c61c5e5e0b1 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 16:22:06 +0400 Subject: [PATCH 13/41] aaa --- headers/functions/arm9.h | 3 +++ symbols/arm9.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index afa0f874..52ce7909 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -1129,6 +1129,8 @@ bool DexNumbersEqual(enum monster_id monster1, enum monster_id monster2); bool GendersEqual(enum monster_id monster1, enum monster_id monster2); bool GendersEqualNotGenderless(enum monster_id monster1, enum monster_id monster2); bool GendersNotEqualNotGenderless(enum monster_id monster1, enum monster_id monster2); +void RecolorNameString(char* out, char* name, char color_symbol); +void RecolorTeamMemberNameString(char* out, char* name, bool is_leader); bool IsMonsterOnTeam(enum monster_id monster_id, int recruit_strategy); void GetNbRecruited(undefined* recruit); bool IsValidTeamMember(int member_idx); @@ -1147,6 +1149,7 @@ struct ground_monster* GetMainCharacter3(void); int GetFirstMatchingMemberIdx(enum monster_id monster_id); int GetFirstEmptyMemberIdx(int param_1); bool IsMonsterNotNicknamed(struct ground_monster* monster); +void GetRecoloredGroundMonsterName(char* out, struct ground_monster* monster, char color_symbol); void RemoveActiveMembersFromAllTeams(void); void RemoveActiveMembersFromSpecialEpisodeTeam(void); void RemoveActiveMembersFromRescueTeam(void); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index dde3c439..0ea6139b 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -10783,6 +10783,24 @@ arm9: r0: id1 r1: id2 return: bool + - name: RecolorNameString + address: + EU: 0x20552C0 + description: |- + Given a string of up to 10 characters, outputs the string to display it in a specific color, or the original string if r2 is 0. + + r0: [output] buffer + r1: string to recolor + r2: text color symbol for the [CS:r2] tag + - name: RecolorTeamMemberNameString + address: + EU: 0x205531C + description: |- + Given a string of up to 10 characters, outputs the string to display it in either light blue if the monster is the leader or yellow otherwise. + + r0: [output] buffer + r1: string to recolor + r2: whether the monster is the team leader - name: IsMonsterOnTeam address: EU: 0x20554C4 @@ -10977,6 +10995,15 @@ arm9: r0: ground monster pointer return: bool + - name: GetRecoloredGroundMonsterName + address: + EU: 0x20552C0 + description: |- + Gets the name of the ground monster formatted to be displayed in a specific color. + + r0: [output] buffer + r1: ground monster pointer + r2: text color symbol for the [CS:r2] tag - name: RemoveActiveMembersFromAllTeams address: EU: 0x2056444 From 200e1b77080e50cb85d9bc6b3eb0daedf007970b Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 16:23:43 +0400 Subject: [PATCH 14/41] aaa --- symbols/arm9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 0ea6139b..832103da 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -10997,7 +10997,7 @@ arm9: return: bool - name: GetRecoloredGroundMonsterName address: - EU: 0x20552C0 + EU: 0x2056400 description: |- Gets the name of the ground monster formatted to be displayed in a specific color. From ab73edc06c7f745a6f51a5b5341300a68015e101 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 16:34:36 +0400 Subject: [PATCH 15/41] aaa --- headers/functions/arm9.h | 2 ++ symbols/arm9.yml | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index 52ce7909..4ab4d8d8 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -1165,6 +1165,8 @@ void SetTeamSetupHeroOnly(void); int GetPartyMembers(uint16_t* party_members); void RefillTeam(void); int ClearItem(int team_id, bool check); +void GetTeamMemberName(char* out, int roster_idx); +void GetRecoloredTeamMemberName(char* out, struct team_member* team_member); void ChangeGiratinaFormIfSkyDungeon(enum dungeon_id dungeon_id); void RevertGiratinaAndShaymin(uint8_t member_idx, undefined param_2); void* OamTileNumberToVramAddress(short oam_tile_num, uint8_t screen); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 832103da..3c382592 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -11150,6 +11150,22 @@ arm9: r0: team_id r1: check + - name: GetTeamMemberName + address: + EU: 0x2058930 + description: |- + Gets the name of the active team member in the given slot index. + + r0: [output] buffer + r1: roster index + - name: GetRecoloredTeamMemberName + address: + EU: 0x2058930 + description: |- + Gets the name of the team member formatted to be displayed in either light blue if the monster is the leader or yellow otherwise. + + r0: [output] buffer + r1: team member pointer - name: ChangeGiratinaFormIfSkyDungeon address: EU: 0x2058954 From a8a7d302f115269fa4222bfcf9093c4afc32dc05 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 16:36:02 +0400 Subject: [PATCH 16/41] aaa --- symbols/arm9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 3c382592..37c77930 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -11152,7 +11152,7 @@ arm9: r1: check - name: GetTeamMemberName address: - EU: 0x2058930 + EU: 0x2058908 description: |- Gets the name of the active team member in the given slot index. From 0a9ed9fdce95c973917e22d934517b2fc60ae9b7 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 16:40:25 +0400 Subject: [PATCH 17/41] aaa --- headers/functions/arm9.h | 3 ++- symbols/arm9.yml | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index 4ab4d8d8..f9a25c6d 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -1165,7 +1165,8 @@ void SetTeamSetupHeroOnly(void); int GetPartyMembers(uint16_t* party_members); void RefillTeam(void); int ClearItem(int team_id, bool check); -void GetTeamMemberName(char* out, int roster_idx); +void GetRecoloredNameOfTeamMemberAtIdx(char* out, int roster_idx); +void GetNameOfTeamMemberAtIdx(char* out, int roster_idx); void GetRecoloredTeamMemberName(char* out, struct team_member* team_member); void ChangeGiratinaFormIfSkyDungeon(enum dungeon_id dungeon_id); void RevertGiratinaAndShaymin(uint8_t member_idx, undefined param_2); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 37c77930..28d47e07 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -11150,7 +11150,15 @@ arm9: r0: team_id r1: check - - name: GetTeamMemberName + - name: GetRecoloredNameOfTeamMemberAtIdx + address: + EU: 0x2058878 + description: |- + Gets the name of the active team member in the given slot index formatted to be displayed in either light blue if the monster is the leader or yellow otherwise. + + r0: [output] buffer + r1: roster index + - name: GetNameOfTeamMemberAtIdx address: EU: 0x2058908 description: |- From f489e4462db47d1e1b9b4aa308cbb7ac854ecd01 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 18:42:15 +0400 Subject: [PATCH 18/41] aaa --- symbols/arm9.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 28d47e07..aa36829b 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -10787,7 +10787,7 @@ arm9: address: EU: 0x20552C0 description: |- - Given a string of up to 10 characters, outputs the string to display it in a specific color, or the original string if r2 is 0. + Given a string of up to 10 characters, formats the string to display it in a specific color, or the original string if r2 is 0. r0: [output] buffer r1: string to recolor @@ -10796,7 +10796,7 @@ arm9: address: EU: 0x205531C description: |- - Given a string of up to 10 characters, outputs the string to display it in either light blue if the monster is the leader or yellow otherwise. + Given a string of up to 10 characters, formats the string to display it in either light blue if the monster is the leader or yellow otherwise. r0: [output] buffer r1: string to recolor From 43dc1ec35410a29b21213a37df6fabb4295b8a0c Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:01:07 +0400 Subject: [PATCH 19/41] aaa --- headers/functions/arm9.h | 1 + .../types/dungeon_mode/dungeon_mode_common.h | 17 +++++++++-------- symbols/arm9.yml | 8 ++++++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index f9a25c6d..a7440a78 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -179,6 +179,7 @@ int FindItemInInventory(enum item_id item_id); int SprintfStatic(char* str, const char* format, ...); void ItemZInit(struct item* item); bool AreItemsEquivalent(struct item* item1, struct item* item2, int bitmask); +int GetMoneyQuantity(struct item* item); int GetItemsForSave(void* dst, uint32_t len); int ReadItemsFromSave(void* src, uint32_t len); bool IsItemAvailableInDungeonGroup(enum dungeon_id dungeon_id, enum item_id item_id); diff --git a/headers/types/dungeon_mode/dungeon_mode_common.h b/headers/types/dungeon_mode/dungeon_mode_common.h index 5736c383..33d6b1c2 100644 --- a/headers/types/dungeon_mode/dungeon_mode_common.h +++ b/headers/types/dungeon_mode/dungeon_mode_common.h @@ -9,12 +9,12 @@ // Item info struct item { // 0x0: flags: 1-byte bitfield - bool f_exists : 1; // Validity flag - bool f_in_shop : 1; // In a Kecleon Shop - bool f_unpaid : 1; // Picked up from a Kecleon Shop but not paid for yet - bool f_sticky : 1; // Sticky - bool f_set : 1; // Usable by L+R - bool flag_unk5 : 1; + bool f_exists : 1; // Validity flag + bool f_in_shop : 1; // In a Kecleon Shop + bool f_unpaid : 1; // Picked up from a Kecleon Shop but not paid for yet + bool f_sticky : 1; // Sticky + bool f_set : 1; // Usable by L+R + bool f_coin_watcher : 1; // Money picked up by a monster with Coin Watcher // For stolen items to recover from outlaws (has red X)? Could be for other items for other // types of missions? (Uncertain) bool f_unk_mission_item1 : 1; @@ -24,8 +24,9 @@ struct item { bool f_unk_mission_item2 : 1; // 0x1: For bag items. 0 for none, 1 if held by the leader, 2 for the second party member, etc. uint8_t held_by; - // 0x2: Only for stackable items. Will be 0 if unapplicable. For Poké, this is an "amount code" - // rather than the literal amount (see MONEY_QUANTITY_TABLE) + // 0x2: For Poké, this is an "amount code" rather than the literal amount (see + // MONEY_QUANTITY_TABLE). For certain items, this field stores other information (the move for + // TMs, the item inside for boxes, etc.) uint16_t quantity; struct item_id_16 id; // 0x4 }; diff --git a/symbols/arm9.yml b/symbols/arm9.yml index aa36829b..b4a2b33c 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -1894,6 +1894,14 @@ arm9: r1: item r2: bitmask return: bool + - name: GetMoneyQuantity + address: + EU: 0x200D934 + description: |- + Gets the actual money a Poké item should give by indexing its quantity field into MONEY_QUANTITY_TABLE, then multiplying by ~1.2x if the Coin Watcher flag is set. + + r0: item + return: money amount - name: GetItemsForSave aliases: - WriteItemsToSave From dbcfd34b7a81c100a662869123b6c5366bc129c0 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:04:38 +0400 Subject: [PATCH 20/41] aaa --- headers/data/overlay10.h | 1 + symbols/overlay10.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/headers/data/overlay10.h b/headers/data/overlay10.h index 028b25a9..08e239dc 100644 --- a/headers/data/overlay10.h +++ b/headers/data/overlay10.h @@ -21,6 +21,7 @@ extern int16_t HURL_DAMAGE; extern int16_t TRAP_BUSTER_ACTIVATION_CHANCE; extern int16_t MAGNET_PULL_ACTIVATION_CHANCE; extern int16_t FOREWARN_FORCED_MISS_CHANCE; +extern fx32_8 WISE_HEALER_MULTIPLIER; extern int16_t UNOWN_STONE_DROP_CHANCE; extern int16_t SITRUS_BERRY_HP_RESTORATION; extern int16_t AMBER_TEAR_RECRUIT_BOOST; diff --git a/symbols/overlay10.yml b/symbols/overlay10.yml index e99294a4..8b5d704d 100644 --- a/symbols/overlay10.yml +++ b/symbols/overlay10.yml @@ -527,6 +527,16 @@ overlay10: NA: 0x2 JP: 0x2 description: "The chance of Forewarn forcing a move to miss, as a percentage (20%)." + - name: WISE_HEALER_MULTIPLIER + address: + EU: 0x22C4DC8 + NA: 0x22C4710 + JP: 0x22C5DF8 + length: + EU: 0x4 + NA: 0x4 + JP: 0x4 + description: The healing multiplier for monsters with the Wise Healer IQ skill, as a fixed-point number with 8 fraction bits (1.15). - name: UNOWN_STONE_DROP_CHANCE address: EU: 0x22C4DCC From 415cae8358410e26427ee44f123b4d83d2d74232 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:05:32 +0400 Subject: [PATCH 21/41] aaa --- symbols/arm9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index b4a2b33c..fbcf9314 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -1898,7 +1898,7 @@ arm9: address: EU: 0x200D934 description: |- - Gets the actual money a Poké item should give by indexing its quantity field into MONEY_QUANTITY_TABLE, then multiplying by ~1.2x if the Coin Watcher flag is set. + Gets the actual money a Poké item should give by indexing its quantity field into MONEY_QUANTITY_TABLE, then multiplying by 1.2x if the Coin Watcher flag is set. r0: item return: money amount From 5db767bbe27592f74e024a16f18fcacaf1bb50e8 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:06:21 +0400 Subject: [PATCH 22/41] aaa --- symbols/overlay10.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbols/overlay10.yml b/symbols/overlay10.yml index 8b5d704d..205728e2 100644 --- a/symbols/overlay10.yml +++ b/symbols/overlay10.yml @@ -536,7 +536,7 @@ overlay10: EU: 0x4 NA: 0x4 JP: 0x4 - description: The healing multiplier for monsters with the Wise Healer IQ skill, as a fixed-point number with 8 fraction bits (1.15). + description: "The healing multiplier for monsters with the Wise Healer IQ skill, as a fixed-point number with 8 fraction bits (1.15)." - name: UNOWN_STONE_DROP_CHANCE address: EU: 0x22C4DCC From cebbaede6daf4180315d1348a8420f883fecb8b8 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:12:22 +0400 Subject: [PATCH 23/41] aaa --- headers/data/overlay10.h | 3 ++- symbols/overlay10.yml | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/headers/data/overlay10.h b/headers/data/overlay10.h index 08e239dc..8de089e7 100644 --- a/headers/data/overlay10.h +++ b/headers/data/overlay10.h @@ -21,7 +21,8 @@ extern int16_t HURL_DAMAGE; extern int16_t TRAP_BUSTER_ACTIVATION_CHANCE; extern int16_t MAGNET_PULL_ACTIVATION_CHANCE; extern int16_t FOREWARN_FORCED_MISS_CHANCE; -extern fx32_8 WISE_HEALER_MULTIPLIER; +extern int16_t CONSTRICTION_DAMAGE; +extern int16_t WISE_HEALER_MULTIPLIER; extern int16_t UNOWN_STONE_DROP_CHANCE; extern int16_t SITRUS_BERRY_HP_RESTORATION; extern int16_t AMBER_TEAR_RECRUIT_BOOST; diff --git a/symbols/overlay10.yml b/symbols/overlay10.yml index 205728e2..3b9a63de 100644 --- a/symbols/overlay10.yml +++ b/symbols/overlay10.yml @@ -527,16 +527,18 @@ overlay10: NA: 0x2 JP: 0x2 description: "The chance of Forewarn forcing a move to miss, as a percentage (20%)." - - name: WISE_HEALER_MULTIPLIER + - name: CONSTRICTION_DAMAGE + address: + EU: 0x22C4DC4 + length: + EU: 0x2 + description: "Damage dealt by the constriction status condition." + - name: WISE_HEALER_PERCENTAGE address: EU: 0x22C4DC8 - NA: 0x22C4710 - JP: 0x22C5DF8 length: - EU: 0x4 - NA: 0x4 - JP: 0x4 - description: "The healing multiplier for monsters with the Wise Healer IQ skill, as a fixed-point number with 8 fraction bits (1.15)." + EU: 0x2 + description: "The additional percentage of HP that should be restored for monsters with the Wise Healer IQ skill (15%)." - name: UNOWN_STONE_DROP_CHANCE address: EU: 0x22C4DCC From ac0d314e846ca339ca9fe7be86510119b81c91b5 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:13:35 +0400 Subject: [PATCH 24/41] aaa --- headers/data/overlay10.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/data/overlay10.h b/headers/data/overlay10.h index 8de089e7..09b60b0e 100644 --- a/headers/data/overlay10.h +++ b/headers/data/overlay10.h @@ -22,7 +22,7 @@ extern int16_t TRAP_BUSTER_ACTIVATION_CHANCE; extern int16_t MAGNET_PULL_ACTIVATION_CHANCE; extern int16_t FOREWARN_FORCED_MISS_CHANCE; extern int16_t CONSTRICTION_DAMAGE; -extern int16_t WISE_HEALER_MULTIPLIER; +extern int16_t WISE_HEALER_PERCENTAGE; extern int16_t UNOWN_STONE_DROP_CHANCE; extern int16_t SITRUS_BERRY_HP_RESTORATION; extern int16_t AMBER_TEAR_RECRUIT_BOOST; From 2ff80905d332b32e1c243d6a69d8332088007774 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 13 Jun 2026 20:14:17 +0400 Subject: [PATCH 25/41] aaa --- symbols/overlay10.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symbols/overlay10.yml b/symbols/overlay10.yml index 3b9a63de..1d937d7f 100644 --- a/symbols/overlay10.yml +++ b/symbols/overlay10.yml @@ -532,13 +532,13 @@ overlay10: EU: 0x22C4DC4 length: EU: 0x2 - description: "Damage dealt by the constriction status condition." + description: Damage dealt by the constriction status condition. - name: WISE_HEALER_PERCENTAGE address: EU: 0x22C4DC8 length: EU: 0x2 - description: "The additional percentage of HP that should be restored for monsters with the Wise Healer IQ skill (15%)." + description: The additional percentage of HP that should be restored for monsters with the Wise Healer IQ skill (15%). - name: UNOWN_STONE_DROP_CHANCE address: EU: 0x22C4DCC From f0658ea39424d803eb64d080fcc8e1dfa79f0acd Mon Sep 17 00:00:00 2001 From: assidion Date: Wed, 17 Jun 2026 19:13:51 +0400 Subject: [PATCH 26/41] aaa --- headers/functions/arm9.h | 1 + symbols/arm9.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index a7440a78..f4014faf 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -1165,6 +1165,7 @@ void SetTeamSetupHeroAndPartnerOnly(void); void SetTeamSetupHeroOnly(void); int GetPartyMembers(uint16_t* party_members); void RefillTeam(void); +void ClearActiveTeamMemberHeldItemIfNotSticky(int roster_idx); int ClearItem(int team_id, bool check); void GetRecoloredNameOfTeamMemberAtIdx(char* out, int roster_idx); void GetNameOfTeamMemberAtIdx(char* out, int roster_idx); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index fbcf9314..bce8664e 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -11148,6 +11148,13 @@ arm9: Note: unverified, ported from Irdkwia's notes No params. + - name: ClearActiveTeamMemberHeldItemIfNotSticky + address: + EU: 0x20584B4 + description: |- + Clears the held item of the active team member in the given slot index if the item is not sticky. + + r0: roster index - name: ClearItem address: EU: 0x205856C From 272e7689b252a51cee5bc749e34c4ac2e40fea36 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 20 Jun 2026 16:49:07 +0400 Subject: [PATCH 27/41] aaa --- headers/functions/arm9.h | 2 +- symbols/arm9.yml | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index 2b82d4a5..3396b1ff 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -552,6 +552,7 @@ void GeomSetVertexCoord16(int x, int y, int z); void InitRender3dData(void); void GeomSwapBuffers(void); void InitRender3dElement64(struct render_3d_element_64* element64); +int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); void Render3d64Texture0x7(struct render_3d_element_64* element64); void Render3d64WindowFrame(struct render_3d_element_64* element64); void EnqueueRender3d64Tiling(struct render_3d_element_64* element64); @@ -624,7 +625,6 @@ uint8_t DrawChar(int window_id, int x, int y, char symbol, int color_offset); struct window* GetWindow(int window_id); int NewWindowScreenCheck(struct window_params* params, uint8_t param_2); int NewWindow(struct window_params* params, uint8_t param_2); -int GetPaletteBaseAddress(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); void SetScreenWindowsColor(int palette_idx, bool upper_screen); void SetBothScreensWindowsColor(int palette_idx); void UpdateWindow(int window_id); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 4938afcd..59ace569 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -5216,6 +5216,20 @@ arm9: Initialize the render_3d_element_64 structure (without performing any drawing or external data access) r0: render_3d_element_64 + - name: GetPaletteBaseAddress + address: + EU: + - 0x201E858 + - 0x2027B9C + NA: 0x20278A8 + JP: 0x2027C08 + description: |- + Gets the palette base address for a 3D element loaded from a WTE file. + Takes the same parameters as were used in the specified file's ProcessWte call. + + r0: upper part of the palette VRAM + r1: lower part of the palette VRAM + return: palette base address - name: Render3d64Texture0x7 address: EU: 0x201E8E0 @@ -5980,18 +5994,6 @@ arm9: r0: window_params pointer to be copied by value into window::hdr in the new window r1: ? return: window_id - - name: GetPaletteBaseAddress - address: - EU: 0x2027B9C - NA: 0x20278A8 - JP: 0x2027C08 - description: |- - Gets the palette base address for a 3D element loaded from a WTE file. - Takes the same parameters as were used in the specified file's ProcessWte call. - - r0: upper part of the palette VRAM - r1: lower part of the palette VRAM - return: palette base address - name: SetScreenWindowsColor address: EU: 0x2027D5C From 6f01a5733f57103f34173cd16c6fc196a3e7e382 Mon Sep 17 00:00:00 2001 From: assidion Date: Sun, 21 Jun 2026 00:32:20 +0400 Subject: [PATCH 28/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index df7bba4a..46a832c6 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -406,6 +406,7 @@ bool IsTacticSet(struct entity* entity, enum tactic_id tactic_id); bool HasDropeyeStatus(struct entity* entity); bool IqSkillIsEnabled(struct entity* entity, enum iq_skill_id iq_id); void UpdateIqSkills(struct monster* monster); +void UpdateIqSkillsWrapper(struct entity* entity); bool CanSeeTeammate(struct monster* monster); enum type_id GetMoveTypeForMonster(struct entity* entity, struct move* move); int GetMovePower(struct entity* entity, struct move* move); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 8f0ca7eb..eeae901a 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -4254,6 +4254,13 @@ overlay29: Called after exiting the IQ skills menu or after an enemy spawns. r0: monster pointer + - name: UpdateIqSkillsWrapper + address: + EU: 0x2302C1C + description: |- + Wrapper function for UpdateIqSkills. + + r0: monster entity pointer - name: CanSeeTeammate address: EU: 0x2302C2C From 555506ba3686515bbee004324d3120d56cc90484 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 00:56:45 +0400 Subject: [PATCH 29/41] aaa --- headers/functions/arm9.h | 11 ++++- headers/functions/overlay29.h | 11 ++++- headers/types/common/graphics.h | 10 ++--- headers/types/files/wan.h | 17 ++++--- symbols/arm9.yml | 72 +++++++++++++++++++++++++++-- symbols/overlay29.yml | 80 +++++++++++++++++++++++++++++++++ 6 files changed, 184 insertions(+), 17 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index 2a06e3c2..b097d882 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -485,6 +485,9 @@ uint32_t DecodeFragmentByteAssemblyTable(struct wan_fragment_bytes_assembly_entr void* dst); int LoadObjPalette(struct obj_graphics_control* obj_graphics_control, struct palette_init_info* palette_init_info, uint8_t palette_num); +int AddWanFragmentToOam(struct obj_graphics_control* obj_graphics_control, + struct wan_fragment* fragment, uint16_t param_3, + uint16_t* oam_adjustment_info); int AddSimpleObjToOam(struct obj_graphics_control* obj_graphics_control, uint16_t* obj, int group); void GroupOamAttributesWrapper(struct obj_graphics_control* obj_graphics_control); void CopyAttributesToOamWrapper(struct obj_graphics_control* obj_graphics_control); @@ -495,6 +498,7 @@ void InitObjGraphicsControls(void); void CopyAttributesToOamBothScreens(void); void GroupOamAttributesBothScreens(void); void CopyAndInterleaveWrapper(uint16_t* dst, uint16_t* src, uint32_t len, uint8_t val); +void InitOamAdjustmentInfo(uint16_t* oam_adjustment_info); void InitAnimationControl(struct animation_control* animation_control); void InitAnimationControlWithSet(struct animation_control* animation_control); void SetSpriteIdForAnimationControl(struct animation_control* anim_ctrl, uint16_t sprite_id); @@ -512,7 +516,7 @@ void SetAndPlayAnimationForAnimationControl(struct animation_control* anim_ctrl, void SwitchAnimationControlToNextFrame(struct animation_control* anim_ctrl); void LoadAnimationFrameAndIncrementInAnimationControl(struct animation_control* anim_ctrl, struct wan_animation_frame* anim_frame); -void FillOamAttributeInfo(struct animation_control* dst, uint16_t* src); +void FillOamAdjustmentInfo(struct animation_control* dst, uint16_t* src); uint32_t AnimationControlGetAllocForMaxFrame(struct animation_control* anim_ctrl); void DeleteWanTableEntry(struct wan_table* wan_table, int wan_id); int AllocateWanTableEntry(struct wan_table* wan_table); @@ -589,7 +593,12 @@ int PreprocessStringFromId(char* output, int output_size, int string_id, struct preprocessor_flags flags, struct preprocessor_args* args); bool StrcmpTagVeneer(const char* s1, const char* s2); int AtoiTagVeneer(const char* s); +void CopyOrInitPreprocessorArgs(struct preprocessor_args* out, struct preprocessor_args* in); void InitPreprocessorArgs(struct preprocessor_args* args); +void QuantityToString(char* s, int quantity, uint8_t adj_size, undefined4 param_4); +void MoneyQuantityToString(char* s, int quantity); +void BankQuantityToString(char* s, int quantity); +void ExpQuantityToString(char* s, int quantity); char* SetStringAccuracy(char* s, int param_2); char* SetStringPower(char* s, int param_2); char* GetRankString(char* s, int rank_and_flags); diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 46a832c6..f0789593 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -57,7 +57,7 @@ int GetVisibilityRange(void); void RevealWholeFloor(struct entity* entity); int PlayEffectAnimationEntity(struct entity* entity, int effect_id, bool play_now, int param_4, int param_5, undefined param_6, enum direction_id effect_dir, - undefined2* param_8); + uint16_t* custom_oam_adjustment_info); int PlayEffectAnimationPos(struct position* pos, int effect_id, bool play_now); int PlayEffectAnimationPixelPos(struct pixel_position* pixel_pos, int effect_id, bool play_now); void AnimationDelayOrSomething(undefined param_1); @@ -147,6 +147,8 @@ int CalcStatusDuration(struct entity* entity, int16_t* turn_range, bool iq_skill void DungeonRngUnsetSecondary(void); void DungeonRngSetSecondary(int i); void DungeonRngSetPrimary(void); +void PlayLevelUpSound(void); +void PlayDungeonTipSound(void); void PlaySeByIdIfNotSilence(int se_id); void PlayMeByIdIfNot998(int me_id); enum music_id MusicTableIdxToMusicId(int music_table_idx); @@ -294,6 +296,7 @@ void DisplayLinkedMovesWarnings(struct entity* entity, int move_slot); bool MewSpawnCheck(enum monster_id monster_id, bool fail_if_mew); void TryEndStatusWithAbility(struct entity* attacker, struct entity* defender); bool ExclusiveItemEffectIsActive(struct entity* entity, enum exclusive_item_effect_id effect_id); +bool ShouldTreatMonsterAsAlly(struct entity* entity1, struct entity* entity2); struct entity* GetTeamMemberWithIqSkill(enum iq_skill_id iq_skill); bool TeamMemberHasEnabledIqSkill(enum iq_skill_id iq_skill); bool TeamLeaderIqSkillIsEnabled(enum iq_skill_id iq_skill); @@ -508,6 +511,12 @@ void UpdateShopkeeperModeAfterTrap(struct entity* shopkeeper, bool non_team_memb void ResetDamageCalcDiagnostics(void); void PointCameraToMonsterWrapper(struct entity* entity); bool IsEitherMonsterInvalid(struct entity* entity1, struct entity* entity2); +void SwapDefensiveStages(struct entity* attacker, struct entity* defender, bool log_message); +void SwapDefensiveMultipliers(struct entity* attacker, struct entity* defender, bool log_message); +void SwapOffensiveStages(struct entity* attacker, struct entity* defender, bool log_message); +void SwapOffensiveMultipliers(struct entity* attacker, struct entity* defender, bool log_message); +void SwapHitChanceStages(struct entity* attacker, struct entity* defender, bool log_message); +void SwapUserAtkAndDefModifiers(struct entity* attacker, struct entity* defender, bool log_message); bool SpecificRecruitCheck(enum monster_id monster_id); bool RecruitCheck(struct entity* user, struct entity* target); bool TryRecruit(struct entity* user, struct entity* recruit); diff --git a/headers/types/common/graphics.h b/headers/types/common/graphics.h index 2de0cf30..63cd0273 100644 --- a/headers/types/common/graphics.h +++ b/headers/types/common/graphics.h @@ -18,12 +18,12 @@ struct animation_control { uint16_t field6_0xc; // (from struct entity) animation frame counter for the idle animation? undefined field7_0xe; undefined field8_0xf; - // 0x10: Information used to create an object's OAM attributes. + // 0x10: Information used to adjust an object's OAM attributes. // See https://problemkaputt.de/gbatek.htm#lcdobjoamattributes - // To do so, the first three elements of the array are ANDed with some value, then ORed - // with the element three indexes above. - // Notably, setting bit 0x400 of oam_attribute_info[3] will make the object semi-transparent. - uint16_t oam_attribute_info[6]; + // To do so, each attribute is ANDed with the corresponding element in the first half + // of the array, then ORed with the corresponding element in the second half. + // Notably, setting bit 0x400 of oam_adjustment_info[3] will make the object semi-transparent. + uint16_t oam_adjustment_info[6]; struct vec2_16 position; struct vec2_16 anim_frame_offset; struct vec2_16 anim_frame_shadow_offset; diff --git a/headers/types/files/wan.h b/headers/types/files/wan.h index 8ac42c79..e293d9c6 100644 --- a/headers/types/files/wan.h +++ b/headers/types/files/wan.h @@ -103,25 +103,28 @@ ASSERT_SIZE(struct wan_header, 10); struct wan_fragment { // negative mean using the previous defined fragment bytes (or to not update it?) int16_t fragment_bytes_index; - int8_t unk1; - int8_t unk2; + int16_t unk1; // 2 bytes int8_t offset_y : 8; + bool unk2 : 1; bool unk3 : 1; - bool unk4 : 1; - uint8_t likely_padding_1 : 3; + // 0=Normal, 1=Semi-Transparent, 2=OBJ Window, 3=Prohibited + // Seemingly always 0 in the base game, but still works properly for creating + // semi-transparent objects assuming it is not zeroed by oam_adjustment_info. + uint8_t obj_mode : 2; + uint8_t likely_padding_1 : 1; bool is_mosaic : 1; - uint8_t shape_indice : 2; // as used in OBJ attribute 1 + uint8_t shape_indice : 2; // as used in OBJ attribute 0 // 2 bytes uint16_t offset_x : 9; // The value to be used is this - 256, which can end up negative. bool likely_padding_2 : 1; - bool unk5 : 1; + bool unk4 : 1; bool is_last : 1; bool h_flip : 1; bool v_flip : 1; - uint8_t size_indice : 2; // as used in OBJ attribute 0 + uint8_t size_indice : 2; // as used in OBJ attribute 1 // 2 bytes uint16_t fragment_alloc_counter : 10; diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 23ec52ec..4d0adf0d 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -4701,6 +4701,17 @@ arm9: r1: palette_init_info r2: palette_num (bits 12-15 of OAM attribute 2) return: always 1 + - name: AddWanFragmentToOam + address: + EU: 0x201B770 + description: |- + Adds a WAN fragment to OAM. + + r0: obj_graphics_control + r1: wan_fragment + r2: ? + r3: oam_adjustment_info (length 6 array, or null to not adjust) + return: -2 if group out of bounds, -1 if too many objects, 0 if successful - name: AddSimpleObjToOam address: EU: 0x201BA94 @@ -4775,6 +4786,13 @@ arm9: r1: src r2: len (in bytes, will be divided by 2 in the call to CopyAndInterleave) r3: val + - name: InitOamAdjustmentInfo + address: + EU: 0x201C09C + description: |- + Initializes an oam_adjustment_info array that will be used in an animation_control structure with default values (0xFFFF for the ANDs, 0 for the ORs). + + r0: [output] oam_adjustment_info array (length 6) - name: InitAnimationControl address: EU: 0x201C0EC @@ -4895,13 +4913,15 @@ arm9: r0: animation_control r1: animation_frame - - name: FillOamAttributeInfo + - name: FillOamAdjustmentInfo + aliases: + - FillOamAttributeInfo address: EU: 0x201D1AC NA: 0x201D110 JP: 0x201D168 description: |- - Copies an array of values into an animation_control struct's oam_attribute_info. + Copies an array of values into an animation_control struct's oam_adjustment_info. r0: animation_control r1: source array (length 6) @@ -5614,9 +5634,55 @@ arm9: NA: 0x2023690 JP: 0x20236E0 description: |- - Initializes a struct preprocess_args. + Initializes a preprocessor_args struct. r0: preprocessor args pointer + - name: CopyOrInitPreprocessorArgs + address: + EU: 0x2023920 + description: |- + Copies the input preprocessor_args struct to the output struct, or initializes it if the input is a null pointer. + + r0: [output] preprocessor args pointer + r1: input preprocessor args pointer, or null if should initialize one + - name: QuantityToString + address: + EU: 0x20239D8 + description: |- + Converts a quantity to a string, adding commas in between numbers when appropriate. + + r0: [output] string + r1: quantity + r2: adjusted size (if there are less characters in the string than this number, leading spaces will be added to make it this size) + r3: ? + - name: MoneyQuantityToString + address: + EU: + - 0x2023B30 + - 0x2023B58 + description: |- + Converts a money quantity to a string, adding commas in between numbers when appropriate. + + Note that this function does not add the P symbol at the end. + + r0: [output] string + r1: quantity + - name: BankQuantityToString + address: + EU: 0x2023B6C + description: |- + Converts a money quantity shown in the bank menu to a string, adding commas in between numbers when appropriate and also adding leading spaces. + + r0: [output] string + r1: quantity + - name: ExpQuantityToString + address: + EU: 0x2023B6C + description: |- + Converts an experience quantity to a string, adding commas in between numbers when appropriate. + + r0: [output] string + r1: quantity - name: SetStringAccuracy address: EU: 0x20245C0 diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 77daf643..e37ee663 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -763,6 +763,7 @@ overlay29: r1: Effect ID r2: appears to be a flag for actually running the animation now? If this is 0, the AdvanceFrame loop is skipped entirely. stack[2]: direction of effect + stack[3]: custom oam_adjustment_info array for the animation_control struct (length 6, or null if should use default values) others: ? return: status code, or maybe the number of frames or something? Either way, -1 seems to indicate the animation being finished or something? - name: PlayEffectAnimationPos @@ -1673,6 +1674,22 @@ overlay29: description: |- Sets the dungeon PRNG to use the primary LCG for subsequent random number generation. + No params. + - name: PlayLevelUpSound + address: + EU: 0x22EB62C + description: |- + Plays the sound for leveling up. + + No params. + - name: PlayDungeonTipSound + address: + EU: + - 0x22EB63C + - 0x22EB66C + description: |- + Plays the sound effect for displaying a dungeon tip. + No params. - name: PlaySeByIdIfNotSilence address: @@ -3143,6 +3160,15 @@ overlay29: r0: entity pointer r1: exclusive item effect ID return: bool + - name: ShouldTreatMonsterAsAlly + address: + EU: 0x22FB9E0 + description: |- + Returns true if entity 1 should treat entity 2 as an ally, assuming entity 1 can see invisible monsters and will not ignore petrified ones. + + r0: Pointer to entity 1 + r1: Pointer to entity 2 + return: bool - name: GetTeamMemberWithIqSkill address: EU: 0x22FBA04 @@ -5130,6 +5156,60 @@ overlay29: r0: entity pointer r1: entity pointer return: bool + - name: SwapDefensiveStages + address: + EU: 0x230E2E8 + description: |- + Swaps the defensive stages of two monsters. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message + - name: SwapDefensiveMultipliers + address: + EU: 0x230E35C + description: |- + Swaps the defensive multipliers of two monsters. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message + - name: SwapOffensiveStages + address: + EU: 0x230E3D0 + description: |- + Swaps the offensive stages of two monsters. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message + - name: SwapOffensiveMultipliers + address: + EU: 0x230E444 + description: |- + Swaps the offensive multipliers of two monsters. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message + - name: SwapHitChanceStages + address: + EU: 0x230E444 + description: |- + Swaps the hit chance stages of two monsters. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message + - name: SwapUserAtkAndDefModifiers + address: + EU: 0x230E444 + description: |- + Swaps the attack and defense modifiers of the user entity. + + r0: attacker pointer + r1: defender pointer + r2: whether to log a message - name: SpecificRecruitCheck address: EU: 0x230E588 From 9b06076d33688d36ebc24370aba516b7696a9ae1 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 01:01:24 +0400 Subject: [PATCH 30/41] aaa --- headers/functions/arm9.h | 4 ++-- symbols/arm9.yml | 4 ++-- symbols/overlay29.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index b097d882..a7e80523 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -486,7 +486,7 @@ uint32_t DecodeFragmentByteAssemblyTable(struct wan_fragment_bytes_assembly_entr int LoadObjPalette(struct obj_graphics_control* obj_graphics_control, struct palette_init_info* palette_init_info, uint8_t palette_num); int AddWanFragmentToOam(struct obj_graphics_control* obj_graphics_control, - struct wan_fragment* fragment, uint16_t param_3, + struct wan_fragment* fragment, uint16_t* param_3, uint16_t* oam_adjustment_info); int AddSimpleObjToOam(struct obj_graphics_control* obj_graphics_control, uint16_t* obj, int group); void GroupOamAttributesWrapper(struct obj_graphics_control* obj_graphics_control); @@ -593,8 +593,8 @@ int PreprocessStringFromId(char* output, int output_size, int string_id, struct preprocessor_flags flags, struct preprocessor_args* args); bool StrcmpTagVeneer(const char* s1, const char* s2); int AtoiTagVeneer(const char* s); -void CopyOrInitPreprocessorArgs(struct preprocessor_args* out, struct preprocessor_args* in); void InitPreprocessorArgs(struct preprocessor_args* args); +void CopyOrInitPreprocessorArgs(struct preprocessor_args* out, struct preprocessor_args* in); void QuantityToString(char* s, int quantity, uint8_t adj_size, undefined4 param_4); void MoneyQuantityToString(char* s, int quantity); void BankQuantityToString(char* s, int quantity); diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 4d0adf0d..53817982 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -5657,7 +5657,7 @@ arm9: r3: ? - name: MoneyQuantityToString address: - EU: + EU: - 0x2023B30 - 0x2023B58 description: |- @@ -5669,7 +5669,7 @@ arm9: r1: quantity - name: BankQuantityToString address: - EU: 0x2023B6C + EU: 0x2023B44 description: |- Converts a money quantity shown in the bank menu to a string, adding commas in between numbers when appropriate and also adding leading spaces. diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index e37ee663..02ae898d 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -5194,7 +5194,7 @@ overlay29: r2: whether to log a message - name: SwapHitChanceStages address: - EU: 0x230E444 + EU: 0x230E4B8 description: |- Swaps the hit chance stages of two monsters. @@ -5203,7 +5203,7 @@ overlay29: r2: whether to log a message - name: SwapUserAtkAndDefModifiers address: - EU: 0x230E444 + EU: 0x230E52C description: |- Swaps the attack and defense modifiers of the user entity. From 37aed59e18397a7fd11e8b77ce2a7feb10815722 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 01:12:32 +0400 Subject: [PATCH 31/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index f0789593..79a0bd98 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -88,6 +88,7 @@ bool ShouldDisplayEntityAdvanced(struct entity* entity); void PlayEffectAnimation0x1A9(struct entity* entity); void PlayEffectAnimation0x29(struct entity* entity); void PlayEffectAnimation0x18E(struct entity* entity); +void PlayStairSensorArrowEffect(struct entity* entity, enum direction_id arrow_dir); void LoadMappaFileAttributes(int quick_saved, bool disable_monsters, undefined* special_process); enum trap_id GetRandomSpawnTrapId(void); enum trap_id GetRandomTrapId(void); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 02ae898d..55437cd6 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -1088,6 +1088,14 @@ overlay29: Just a guess. Calls PlayEffectAnimation with data from animation ID 0x18E. r0: entity pointer + - name: PlayStairSensorArrowEffect + address: + EU: 0x22E72D8 + description: |- + Plays the Stair Sensor arrow effect. + + r0: entity pointer + r1: arrow direction - name: LoadMappaFileAttributes address: EU: 0x22E796C From 2740c4900ee82982e0574da29dedefff04dd0151 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 01:20:34 +0400 Subject: [PATCH 32/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 79a0bd98..3d18dbeb 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -297,6 +297,7 @@ void DisplayLinkedMovesWarnings(struct entity* entity, int move_slot); bool MewSpawnCheck(enum monster_id monster_id, bool fail_if_mew); void TryEndStatusWithAbility(struct entity* attacker, struct entity* defender); bool ExclusiveItemEffectIsActive(struct entity* entity, enum exclusive_item_effect_id effect_id); +void TryActivateStairSensor(bool dont_log_message); bool ShouldTreatMonsterAsAlly(struct entity* entity1, struct entity* entity2); struct entity* GetTeamMemberWithIqSkill(enum iq_skill_id iq_skill); bool TeamMemberHasEnabledIqSkill(enum iq_skill_id iq_skill); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 55437cd6..0d4b1dc0 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -3168,6 +3168,13 @@ overlay29: r0: entity pointer r1: exclusive item effect ID return: bool + - name: TryActivateStairSensor + address: + EU: 0x22FB758 + description: |- + Activates the Stair Sensor IQ skill if a member on the team has it and they are not a special story ally. + + r0: whether to not log a message (always 0) - name: ShouldTreatMonsterAsAlly address: EU: 0x22FB9E0 From 8d62f1e3f9de8b8e050785341a4b11bb6194cbb1 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 01:45:41 +0400 Subject: [PATCH 33/41] aaa --- headers/functions/overlay29.h | 4 +++- symbols/overlay29.yml | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 3d18dbeb..8bcffdba 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -296,8 +296,10 @@ bool ShouldMonsterHeadToStairs(struct entity* entity); void DisplayLinkedMovesWarnings(struct entity* entity, int move_slot); bool MewSpawnCheck(enum monster_id monster_id, bool fail_if_mew); void TryEndStatusWithAbility(struct entity* attacker, struct entity* defender); +void TryActivateNewFloorPpRestoration(bool suppress_logs); bool ExclusiveItemEffectIsActive(struct entity* entity, enum exclusive_item_effect_id effect_id); -void TryActivateStairSensor(bool dont_log_message); +void TryActivateNewFloorHpRestoration(bool log_failure); +void TryActivateStairSensor(bool suppress_logs); bool ShouldTreatMonsterAsAlly(struct entity* entity1, struct entity* entity2); struct entity* GetTeamMemberWithIqSkill(enum iq_skill_id iq_skill); bool TeamMemberHasEnabledIqSkill(enum iq_skill_id iq_skill); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 0d4b1dc0..12abf847 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -3121,6 +3121,13 @@ overlay29: r0: attacker entity pointer r1: defender entity pointer + - name: TryActivateNewFloorPpRestoration + address: + EU: 0x22FB464 + description: |- + Activates the Deep Breather IQ skill and/or the exclusive item effect for restoring PP on new floors for team members that have them. + + r0: flag to suppress message logging - name: ExclusiveItemEffectIsActive address: EU: @@ -3168,13 +3175,20 @@ overlay29: r0: entity pointer r1: exclusive item effect ID return: bool + - name: TryActivateNewFloorHpRestoration + address: + EU: 0x22FB6C8 + description: |- + Activates the exclusive item effect for fully restoring HP on new floors for team members that have it. + + r0: flag to log a message on failure - name: TryActivateStairSensor address: EU: 0x22FB758 description: |- Activates the Stair Sensor IQ skill if a member on the team has it and they are not a special story ally. - r0: whether to not log a message (always 0) + r0: flag to suppress message logging - name: ShouldTreatMonsterAsAlly address: EU: 0x22FB9E0 From a5ef11a410abe411b82ff7c8b5e0c49f841d5168 Mon Sep 17 00:00:00 2001 From: assidion Date: Tue, 23 Jun 2026 01:54:49 +0400 Subject: [PATCH 34/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 8bcffdba..2e95a370 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -300,6 +300,7 @@ void TryActivateNewFloorPpRestoration(bool suppress_logs); bool ExclusiveItemEffectIsActive(struct entity* entity, enum exclusive_item_effect_id effect_id); void TryActivateNewFloorHpRestoration(bool log_failure); void TryActivateStairSensor(bool suppress_logs); +void TryActivateAcuteSniffer(bool suppress_logs); bool ShouldTreatMonsterAsAlly(struct entity* entity1, struct entity* entity2); struct entity* GetTeamMemberWithIqSkill(enum iq_skill_id iq_skill); bool TeamMemberHasEnabledIqSkill(enum iq_skill_id iq_skill); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 12abf847..e9a5fc29 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -3188,6 +3188,13 @@ overlay29: description: |- Activates the Stair Sensor IQ skill if a member on the team has it and they are not a special story ally. + r0: flag to suppress message logging + - name: TryActivateAcuteSniffer + address: + EU: 0x22FB914 + description: |- + Activates the Acute Sniffer IQ skill if a member on the team has it and no boss fight is active. + r0: flag to suppress message logging - name: ShouldTreatMonsterAsAlly address: From 006190b897d1a602da00ec9161d1df2fb49b6ac4 Mon Sep 17 00:00:00 2001 From: assidion Date: Wed, 24 Jun 2026 00:14:38 +0400 Subject: [PATCH 35/41] aaa --- symbols/arm9.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 53817982..664c8892 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -1161,7 +1161,7 @@ arm9: r0: oam_info r1: oam_attributes - r2: group + r2: priority group - name: UpdateFadeStatus address: EU: 0x200BA18 @@ -4725,7 +4725,7 @@ arm9: r0: obj_graphics_control r1: obj - r2: group + r2: priority group return: -2 if group out of bounds, -1 if too many objects, 0 if successful - name: GroupOamAttributesWrapper address: From 21a410fd8bb2f6ba9f86b8da2f9c93aea0e560b1 Mon Sep 17 00:00:00 2001 From: assidion Date: Wed, 24 Jun 2026 00:44:46 +0400 Subject: [PATCH 36/41] aaa --- headers/types/files/wan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers/types/files/wan.h b/headers/types/files/wan.h index e293d9c6..9c511691 100644 --- a/headers/types/files/wan.h +++ b/headers/types/files/wan.h @@ -39,7 +39,7 @@ struct palette_init_info { // https://problemkaputt.de/gbatek.htm#dsvideoextendedpalettes uint16_t palette_mode; uint16_t nb_colors_or_palettes; // 0x6 - uint16_t ext_palette_upper; // 0x8: Upper 4 bits in 256-color extended palette + uint16_t ext_palette_upper; // 0x8: Starting position in 256-color extended palette int8_t palette_num_custom; // 0xA: If not -1, overwrites palette_num in LoadObjPalette // 0xB: If 1, splits the palette in chunks of 0x10 across multiple // extended palettes starting from palette_num From 6db4cc716a72aab67d724c099f91a10109a5cde0 Mon Sep 17 00:00:00 2001 From: assidion Date: Wed, 24 Jun 2026 00:45:48 +0400 Subject: [PATCH 37/41] aaa --- headers/functions/arm9.h | 2 +- headers/types/files/wan.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/functions/arm9.h b/headers/functions/arm9.h index a7e80523..0445875c 100644 --- a/headers/functions/arm9.h +++ b/headers/functions/arm9.h @@ -573,7 +573,7 @@ void ConvertPointersSir0(undefined* sir0_ptr); int HandleSir0TranslationVeneer(uint8_t** dst, uint8_t* src); void FillPaletteInitInfo(struct palette_init_info* palette_init_info, struct rgba* palette_bytes, uint16_t palette_mode, uint16_t nb_colors_or_palettes, - uint16_t ext_palette_upper, int8_t palette_num_custom); + uint16_t ext_palette_start, int8_t palette_num_custom); int DecompressAtNormalVeneer(undefined* addr_decomp, int expected_size, undefined* at_ptr); int DecompressAtNormal(undefined* addr_decomp, int expected_size, undefined* at_ptr); int DecompressAtHalf(undefined* addr_decomp, int expected_size, undefined* at_ptr, int high_nibble); diff --git a/headers/types/files/wan.h b/headers/types/files/wan.h index 9c511691..61776e79 100644 --- a/headers/types/files/wan.h +++ b/headers/types/files/wan.h @@ -39,7 +39,7 @@ struct palette_init_info { // https://problemkaputt.de/gbatek.htm#dsvideoextendedpalettes uint16_t palette_mode; uint16_t nb_colors_or_palettes; // 0x6 - uint16_t ext_palette_upper; // 0x8: Starting position in 256-color extended palette + uint16_t ext_palette_start; // 0x8: Starting position in 256-color extended palette int8_t palette_num_custom; // 0xA: If not -1, overwrites palette_num in LoadObjPalette // 0xB: If 1, splits the palette in chunks of 0x10 across multiple // extended palettes starting from palette_num From 00e79101ad4226823cdb4db72384b593bbd160b7 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 27 Jun 2026 14:03:23 +0400 Subject: [PATCH 38/41] aaa --- headers/types/files/wan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/types/files/wan.h b/headers/types/files/wan.h index 61776e79..7d56cb84 100644 --- a/headers/types/files/wan.h +++ b/headers/types/files/wan.h @@ -107,8 +107,8 @@ struct wan_fragment { // 2 bytes int8_t offset_y : 8; - bool unk2 : 1; bool unk3 : 1; + bool unk4 : 1; // 0=Normal, 1=Semi-Transparent, 2=OBJ Window, 3=Prohibited // Seemingly always 0 in the base game, but still works properly for creating // semi-transparent objects assuming it is not zeroed by oam_adjustment_info. @@ -120,7 +120,7 @@ struct wan_fragment { // 2 bytes uint16_t offset_x : 9; // The value to be used is this - 256, which can end up negative. bool likely_padding_2 : 1; - bool unk4 : 1; + bool unk5 : 1; bool is_last : 1; bool h_flip : 1; bool v_flip : 1; From 0a0ba1135c135e48522f76fa626531a485f1cbe1 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 27 Jun 2026 14:36:57 +0400 Subject: [PATCH 39/41] aaa --- headers/functions/overlay29.h | 1 + symbols/overlay29.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 2e95a370..859c7961 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -810,6 +810,7 @@ void ActivateSportCondition(bool water_sport); bool TryActivateWeather(bool param_1, bool param_2); int DigitCount(int n); void LoadTextureUi(void); +void InitUi3dElement(struct render_3d_element_64* element64, undefined4 pal_vram_offset_upper); int GetPaletteBaseAddressOv29(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); int DisplayNumberTextureUi(int16_t x, int16_t y, int n, int ally_mode); int DisplayCharTextureUi(struct render_3d_element_64* element64, int16_t x, int16_t y, int char_id, diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index e9a5fc29..8334101e 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -7876,6 +7876,14 @@ overlay29: Note: unverified, ported from Irdkwia's notes No params. + - name: InitUi3dElement + address: + EU: 0x2336254 + description: |- + Initializes a 3D element for displaying a part of the dungeon UI. + + r0: [output] render_3d_element_64 + r1: upper part of the palette VRAM - name: GetPaletteBaseAddressOv29 aliases: - GetPaletteBaseAddress From e900bb1a17ac80eaf87cbcb0a1e019ba872f1c93 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 27 Jun 2026 16:18:36 +0400 Subject: [PATCH 40/41] aaa --- headers/functions/overlay29.h | 2 +- symbols/overlay29.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/functions/overlay29.h b/headers/functions/overlay29.h index 859c7961..5bbdfc88 100644 --- a/headers/functions/overlay29.h +++ b/headers/functions/overlay29.h @@ -814,7 +814,7 @@ void InitUi3dElement(struct render_3d_element_64* element64, undefined4 pal_vram int GetPaletteBaseAddressOv29(undefined4 pal_vram_offset_upper, undefined4 pal_vram_offset_lower); int DisplayNumberTextureUi(int16_t x, int16_t y, int n, int ally_mode); int DisplayCharTextureUi(struct render_3d_element_64* element64, int16_t x, int16_t y, int char_id, - int16_t param_5); + undefined4 pal_vram_offset_lower); void DisplayUi(void); struct tile* GetTile(int x, int y); struct tile* GetTileSafe(int x, int y); diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 8334101e..49ea08f1 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -7925,7 +7925,7 @@ overlay29: r1: x position r2: y position r3: char_id - stack[0]: ? + stack[0]: lower part of the palette VRAM return: ? - name: DisplayUi address: From 3fff17f598f4d8e246ab94931d75859e01d17800 Mon Sep 17 00:00:00 2001 From: assidion Date: Sat, 27 Jun 2026 16:20:43 +0400 Subject: [PATCH 41/41] aaa --- symbols/arm9.yml | 2 +- symbols/overlay29.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/symbols/arm9.yml b/symbols/arm9.yml index 664c8892..c29900c0 100644 --- a/symbols/arm9.yml +++ b/symbols/arm9.yml @@ -5256,7 +5256,7 @@ arm9: JP: 0x2027C08 description: |- Gets the palette base address for a 3D element loaded from a WTE file. - Takes the same parameters as were used in the specified file's ProcessWte call. + Normally takes the same parameters as were used in the specified file's ProcessWte call. r0: upper part of the palette VRAM r1: lower part of the palette VRAM diff --git a/symbols/overlay29.yml b/symbols/overlay29.yml index 49ea08f1..239df016 100644 --- a/symbols/overlay29.yml +++ b/symbols/overlay29.yml @@ -7893,7 +7893,7 @@ overlay29: JP: 0x2336C34 description: |- Gets the palette base address for a 3D element loaded from a WTE file. - Takes the same parameters as were used in the specified file's ProcessWte call. + Normally takes the same parameters as were used in the specified file's ProcessWte call. Is an exact copy of GetPaletteBaseAddress in arm9.