From 7b3efb1e7b85783edd5d736eff07fbeae76a0d19 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 15 Jan 2026 20:57:13 +0000 Subject: Upgrades Custom Messages to Hooks and ShipInit (#5101) Defines the hook for OnTextLoad. Intercepts message loading with hooks. Adds file to handle the CustomMessage creation for items. Handles Ice Traps, Triforce Pieces, and Custom Items. Handle maps, compasses, and keys Converts gossip stone hints to hook. Handle one-off merchant messages. Convert scrubs and shop text and remove now-unused code Convert Sheik and Ganondorf hint text. Convert skulltula people messages. Convert more static hints Specifically Dampe, Greg, Warp Songs, Frogs, Loach, Fishing Pole, and Saria Convert Biggoron Hint. Convert Big Poes hint. Convert Anju hint dialogue. Convert Malon hint. Convert Horseback Archery hints. Convert Mask Shop SIgn hint Convert Lake Hylia Switch related text. Convert Shooting Gallery bow reminder message Convert random rupee names. Convert Rando-Relevant Navi Enhancement. Convert Random Goron messages Convert Injecting Skull token counts. Add in a way to AutoFormat with an item icon.. Fix some errors with skull tokens and apply icon Convert heart container item counts. Convert Inject Item Count for Heart Pieces. Port Better Bombchu Shopping. Convert Market Sneak Port Quit Fishing At Door and clean up unused stuff. Reintroduce missing Mysterious warp song hint Make ShipInitFuncs static Adds and uses per-item articles for get item messages Fix Entrance Hints and port toggle from dev-copper --- soh/src/code/z_message_PAL.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'soh/src/code') diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 25efbaadd..93c632703 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -2713,6 +2713,9 @@ void Message_OpenText(PlayState* play, u16 textId) { Font* font = &msgCtx->font; s16 textBoxType; + bool loadFromMessageTable = true; + GameInteractor_ExecuteOnOpenText(&textId, &loadFromMessageTable); + sDisplayNextMessageAsEnglish = false; if (msgCtx->msgMode == MSGMODE_NONE) { @@ -2782,7 +2785,8 @@ void Message_OpenText(PlayState* play, u16 textId) { gSaveContext.eventInf[0] = gSaveContext.eventInf[1] = gSaveContext.eventInf[2] = gSaveContext.eventInf[3] = 0; } - if (CustomMessage_RetrieveIfExists(play)) { + // RANDOTODO: Use this for ice trap messages + if (!loadFromMessageTable) { osSyncPrintf("Found custom message"); if (gSaveContext.language == LANGUAGE_JPN) { sDisplayNextMessageAsEnglish = true; -- cgit v1.2.3