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
This commit is contained in:
Christopher Leggett
2026-01-15 20:57:13 +00:00
committed by GitHub
parent c43139ebd6
commit 7b3efb1e7b
38 changed files with 2753 additions and 2802 deletions
-64
View File
@@ -111,68 +111,4 @@ extern "C" void OTRMessage_Init() {
// Assert staff credits start at the first credits ID
assert(sStaffMessageEntryTablePtr[0].textId == 0x0500);
}
CustomMessageManager::Instance->AddCustomMessageTable(customMessageTableID);
CustomMessageManager::Instance->CreateGetItemMessage(
customMessageTableID, (GetItemID)TEXT_GS_NO_FREEZE, ITEM_SKULL_TOKEN,
CustomMessage("You got a %rGold Skulltula Token%w!&You've collected %r[[gsCount]]%w tokens&in total!\x0E\x3C",
"Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r[[gsCount]]&%wGoldene "
"Skulltula-Symbole&gesammelt!\x0E\x3C",
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r[[gsCount]]%w symboles en "
"tout!\x0E\x3C",
TEXTBOX_TYPE_BLUE));
CustomMessageManager::Instance->CreateGetItemMessage(
customMessageTableID, (GetItemID)TEXT_GS_FREEZE, ITEM_SKULL_TOKEN,
CustomMessage(
"You got a %rGold Skulltula Token%w!&You've collected %r[[gsCount]]%w tokens&in total!",
"Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r[[gsCount]]&%wGoldene "
"Skulltula-Symbole&gesammelt!",
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r[[gsCount]]%w symboles en tout!",
TEXTBOX_TYPE_BLUE));
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_BUY_BOMBCHUS_10_DESC,
CustomMessage("\x08%rBombchu 10 pieces 99 Rupees&%wThis looks like a toy mouse, but&it's actually a "
"self-propelled time&bomb!\x09\x0A",
"\x08%rKrabbelmine 10 Stück 99 Rubine&%wDas ist eine praktische Zeitbombe,&die Du als "
"Distanzwaffe&einsetzen kannst!\x09\x0A",
"\x08%rMissile 10 unités 99 Rubis&%wProfilée comme une souris&mécanique, cette arme est "
"&destructrice!!!\x09\x0A"));
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_BUY_BOMBCHUS_10_PROMPT,
CustomMessage("\x08"
"Bombchu 10 pieces 99 Rupees\x09&&\x1B%gBuy&Don't buy%w",
"\x08Krabbelmine 10 Stück 99 Rubine\x09&&\x1B%gKaufen!&Nicht kaufen!%w",
"\x08Missiles 10 unités 99 Rubis\x09&&\x1B%gAcheter&Ne pas acheter%w"));
CustomMessageManager::Instance->CreateGetItemMessage(
customMessageTableID, (GetItemID)TEXT_HEART_CONTAINER, ITEM_HEART_CONTAINER,
CustomMessage(
"You got a %rHeart Container%w!&You've collected %r[[heartContainerCount]]%w containers&in total!",
"Ein %rHerzcontainer%w!&Du hast nun insgesamt %r[[heartContainerCount]]%w&Herzcontainer gesammelt!",
"Vous obtenez un %rCoeur&d'Energie%w! Vous en avez&collecté %r[[heartContainerCount]]%w en tout!"));
CustomMessageManager::Instance->CreateGetItemMessage(
customMessageTableID, (GetItemID)TEXT_HEART_PIECE, ITEM_HEART_PIECE,
CustomMessage("You got a %rHeart Piece%w!&You've collected %r[[heartPieceCount]]%w pieces&in total!",
"Ein %rHerzteil%w!&Du hast nun insgesamt %r[[heartPieceCount]]%w&Herzteile gesammelt!",
"Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r[[heartPieceCount]]%w en tout!",
TEXTBOX_TYPE_BLUE));
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_MARKET_GUARD_NIGHT,
CustomMessage("You look bored. Wanna go out for a&walk?\x1B&%gYes&No%w",
"Du siehst gelangweilt aus.&Willst Du einen Spaziergang machen?\x1B&%gJa&Nein%w",
"Tu as l'air de t'ennuyer. Tu veux&aller faire un tour?\x1B&%gOui&Non%w"));
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_FISHERMAN_LEAVE,
CustomMessage("Hey! Hey!&You can't take the rod out of here!&I'm serious!^Do you want to quit?&\x1B&%gYes&No%w",
"Hey! Hey!&Du kannst die Angel doch nicht&einfach mitnehmen!&Ganz im Ernst!^Möchtest Du "
"aufhören?&\x1B&%gJa&Nein%w",
"Holà! Holà!&Les cannes ne sortent pas d'ici!&Je suis sérieux!^Voulez-vous "
"arrêter?&\x1B&%gOui&Non%w")); // TODO Used AI translation as placeholder
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_CARPET_SALESMAN_CUSTOM_FAIL_TO_BUY,
CustomMessage("I'm sorry I can't sell you these fine specimens, they need an #experienced owner#.^"
"Come back when you have had #Bombchus# of your own.",
{ QM_RED, QM_GREEN }));
CustomMessageManager::Instance->CreateMessage(
customMessageTableID, TEXT_BIG_POE_COLLECTED_RANDO,
CustomMessage("You have #" + CustomMessage::POINTS("\x01") + "# points.", { QM_RED }));
}