From 5e1c2b0042b27b6e44d07faffca3ea14ee7ccc68 Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 9 Oct 2023 13:44:13 +0200 Subject: [PATCH] Rando shorter messages (#41) * Revert item tables * Revert item tables more * First pass of custom GI messages for vanilla items * More progress + prepare all vanilla GI messages * Move GI vanilla injection --- .../custom-message/CustomMessageManager.cpp | 3 + .../Enhancements/randomizer/randomizer.cpp | 708 +++++++++++++++--- soh/soh/Enhancements/randomizer/randomizer.h | 3 +- soh/soh/OTRGlobals.cpp | 31 +- 4 files changed, 618 insertions(+), 127 deletions(-) diff --git a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp index e552a9672d9..ed417f8e180 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp +++ b/soh/soh/Enhancements/custom-message/CustomMessageManager.cpp @@ -188,6 +188,9 @@ const std::string CustomMessage::MESSAGE_END() const { } const std::string CustomMessage::ITEM_OBTAINED(uint8_t x) const { + if (x == ITEM_NONE) { + return ""; + } return "\x13"s + char(x); } diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 30371aeaec8..03775fe9e8f 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -54,7 +54,8 @@ std::set> checkTrackerStat u8 generated; char* seedString; -const std::string Randomizer::getItemMessageTableID = "Randomizer"; +const std::string Randomizer::vanillaTableGetItemMessageTableID = "RandomizerTableGetItem"; +const std::string Randomizer::randomizerTableGetItemMessageTableID = "RandomizerTableGetItem"; const std::string Randomizer::hintMessageTableID = "RandomizerHints"; const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants"; const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees"; @@ -5414,7 +5415,7 @@ static const char* mapGetItemHints[3][2] = { }; CustomMessage Randomizer::GetMapGetItemMessageWithHint(GetItemEntry itemEntry) { - CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::getItemMessageTableID, itemEntry.getItemId); + CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randomizerTableGetItemMessageTableID, itemEntry.getItemId); int sceneNum; switch (itemEntry.getItemId) { case RG_DEKU_TREE_MAP: @@ -5464,12 +5465,24 @@ CustomMessage Randomizer::GetMapGetItemMessageWithHint(GetItemEntry itemEntry) { } template -void CreateGetItemMessages(const std::array* messageEntries) { +void CreateVanillaGetItemMessages(const std::array* messageEntries) { CustomMessageManager* customMessageManager = CustomMessageManager::Instance; - customMessageManager->AddCustomMessageTable(Randomizer::getItemMessageTableID); + customMessageManager->AddCustomMessageTable(Randomizer::vanillaTableGetItemMessageTableID); for (const GetItemMessage& messageEntry : *messageEntries) { customMessageManager->CreateGetItemMessage( - Randomizer::getItemMessageTableID, messageEntry.giid, messageEntry.iid, + Randomizer::vanillaTableGetItemMessageTableID, messageEntry.giid, messageEntry.iid, + CustomMessage(messageEntry.english, messageEntry.german, messageEntry.french, TEXTBOX_TYPE_BLUE, + TEXTBOX_POS_BOTTOM)); + } +} + +template +void CreateRandomizerGetItemMessages(const std::array* messageEntries) { + CustomMessageManager* customMessageManager = CustomMessageManager::Instance; + customMessageManager->AddCustomMessageTable(Randomizer::randomizerTableGetItemMessageTableID); + for (const GetItemMessage& messageEntry : *messageEntries) { + customMessageManager->CreateGetItemMessage( + Randomizer::randomizerTableGetItemMessageTableID, messageEntry.giid, messageEntry.iid, CustomMessage(messageEntry.english, messageEntry.german, messageEntry.french, TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM)); } @@ -5866,129 +5879,594 @@ CustomMessage Randomizer::GetGoronMessage(u16 index) { void Randomizer::CreateCustomMessages() { // RANDTODO: Translate into french and german and replace GIMESSAGE_UNTRANSLATED // with GIMESSAGE(getItemID, itemID, english, german, french). - const std::array getItemMessages = {{ - - GIMESSAGE(RG_PROGRESSIVE_BOMB_BAG, ITEM_BOMB_BAG_20, - "You found a %rBomb Bag%w!&If you see something&suspicious, bomb it!", - "You found a %rBomb Bag%w!&If you see something&suspicious, bomb it!", - "Vous obtenez un %rSac de &Bombes%w!"), - GIMESSAGE(RG_PROGRESSIVE_BOW, ITEM_BOW, + const std::array vanillaTableGetItemMessages = {{ + GIMESSAGE(GI_BOMBS_5, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_NUTS_5, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBCHUS_10, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOW, ITEM_BOW, "You found the %rFairy Bow%w!", "You found the %rFairy Bow%w!", "Vous obtenez l'%rArc des Fées%w!"), - GIMESSAGE(RG_FIRE_ARROWS, ITEM_ARROW_FIRE, - "You got the %rFire Arrow%w!&If you hit your target,&it will catch fire.", - "You got the %rFire Arrow%w!&If you hit your target,&it will catch fire.", - "Vous obtenez la %rFlèche de&Feu!%w! Tirez et embrasez&votre cible!"), - GIMESSAGE(RG_ICE_ARROWS, ITEM_ARROW_ICE, - "You got the %bIce Arrow%w!&If you hit your target,&it will freeze.", - "You got the %bIce Arrow%w!&If you hit your target,&it will freeze.", - "Vous obtenez la %bFlèche de&Glace!%w! Tirez et gelez&votre cible!"), - GIMESSAGE(RG_LIGHT_ARROWS, ITEM_ARROW_LIGHT, - "You got the %cLight Arrow%w!&The light of justice will&smite evil!", - "You got the %cLight Arrow%w!&The light of justice will&smite evil!", - "Vous obtenez la %cFlèche de&Lumière!%w! La clarté de la&Justice dissipera le Malin!"), - GIMESSAGE(RG_DINS_FIRE, ITEM_DINS_FIRE, - "You got %rDin's Fire%w!&Its fireball engulfs everything!", - "You got %rDin's Fire%w!&Its fireball engulfs everything!", - "Vous obtenez le %rFeu de Din%w!&Invoquez une puissante aura de&feu destructrice!"), - GIMESSAGE(RG_FARORES_WIND, ITEM_FARORES_WIND, - "You got %gFarore's Wind%w!&This is warp magic you can use!", - "You got %gFarore's Wind%w!&This is warp magic you can use!", - "Vous obtenez le %gVent de&Farore%w! Ce sortilège vous&permettra de vous téléporter."), - GIMESSAGE(RG_NAYRUS_LOVE, ITEM_NAYRUS_LOVE, - "You got %bNayru's Love%w!&Cast this to create a powerful&protective barrier.", - "You got %bNayru's Love%w!&Cast this to create a powerful&protective barrier.", - "Vous obtenez l%bAmour de&Nayru%w! Ce sortilège vous&permettra d'invoquer&une barrière protectrice."), - GIMESSAGE(RG_PROGRESSIVE_SLINGSHOT, ITEM_SLINGSHOT, + GIMESSAGE(GI_SLINGSHOT, ITEM_SLINGSHOT, "You found the %rFairy Slingshot%w!", "You found the %rFairy Slingshot%w!", "Vous obtenez %rLance-Pierre&des Fées!%w!"), - GIMESSAGE(RG_PROGRESSIVE_OCARINA, ITEM_OCARINA_FAIRY, - "You received the %rFairy Ocarina%w!&This is a memento from Saria.", - "You received the %rFairy Ocarina%w!&This is a memento from Saria.", - "Vous obtenez l'%rOcarina des&Fées%w! C'est un cadeau de Saria."), - GIMESSAGE(RG_PROGRESSIVE_OCARINA, ITEM_OCARINA_TIME, - "You found the %rOcarina of Time%w!&It glows with a mystical light...", - "You found the %rOcarina of Time%w!&It glows with a mystical light...", - "Vous obtenez l'%rOcarina du&Temps%w! Il rayonne d'une lumière&mystique..."), - GIMESSAGE(RG_PROGRESSIVE_BOMBCHUS, ITEM_BOMBCHU, - "fff", - "fff", - "fff"), - GIMESSAGE(RG_PROGRESSIVE_HOOKSHOT, ITEM_HOOKSHOT, + GIMESSAGE(GI_BOOMERANG, ITEM_BOOMERANG, + "You found the %rBoomerang%w!", + "You found the %rBoomerang%w!", + "Vous obtenez le %rBoomreang%w!"), + GIMESSAGE(GI_STICKS_1, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HOOKSHOT, ITEM_HOOKSHOT, "You found the %rHookshot%w!&It's a spring-loaded chain that&you can cast out to hook things.", "You found the %rHookshot%w!&It's a spring-loaded chain that&you can cast out to hook things.", "Vous obtenez le %rGrappin%w!&Cette chaîne montée sur&ressort peut s'accrocher à&certaines choses."), - GIMESSAGE(RG_BOOMERANG, ITEM_BOOMERANG, - "You found the %rBoomerang%w!", - "You found the %rBoomerang%w!", - "Vous obtenez le %rBoomreang%w!"), - GIMESSAGE(RG_LENS_OF_TRUTH, ITEM_LENS, - "You found the %rLens of Truth%w!&Mysterious things are hidden&everywhere!", - "You found the %rLens of Truth%w!&Mysterious things are hidden&everywhere!", + GIMESSAGE(GI_LONGSHOT, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_LENS, ITEM_LENS, + "You found the %rLens of Truth%w!&Mysterious things are hidden&everywhere!", + "You found the %rLens of Truth%w!&Mysterious things are hidden&everywhere!", "Vous obtenez le %rMonocle de&Vérité!%w Certains éléments sont&dissimulés un peu partout!"), - GIMESSAGE(RG_MEGATON_HAMMER, ITEM_HAMMER, + GIMESSAGE(GI_LETTER_ZELDA, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_OCARINA_OOT, ITEM_OCARINA_TIME, + "You found the %rOcarina of Time%w!&It glows with a mystical light...", + "You found the %rOcarina of Time%w!&It glows with a mystical light...", + "Vous obtenez l'%rOcarina du&Temps%w! Il rayonne d'une lumière&mystique..."), + GIMESSAGE(GI_HAMMER, ITEM_HAMMER, "You found the %rMegaton Hammer%w!&It's so heavy, you need to&use two hands to swing it!", "You found the %rMegaton Hammer%w!&It's so heavy, you need to&use two hands to swing it!", "Vous obtenez la %rMasse des&Titans%w! Utilise le pour&écraser quelque chose!"), - - - // TODO: TRADE ITEM HERE - - - - GIMESSAGE(RG_PROGRESSIVE_STRENGTH, ITEM_BRACELET, - "You got the %rGoron's Bracelet%w!&Now you can pull up Bomb&Flowers.", - "You got the %rGoron's Bracelet%w!&Now you can pull up Bomb&Flowers.", - "Vous obtenez le %rBracelet&Goron%w! Vous pouvez désormais&soulever les Choux-Péteurs."), - GIMESSAGE(RG_PROGRESSIVE_STRENGTH, ITEM_GAUNTLETS_SILVER, - "You found the %bSilver Gauntlets%w!&You feel the power to lift&big things with it!", - "You found the %bSilver Gauntlets%w!&You feel the power to lift&big things with it!", - "Vous trouvez les %bGantelets&d'argent%w! En les portant vous&pouvez soulever d'énormes&objets avec!" ), - GIMESSAGE(RG_PROGRESSIVE_STRENGTH, ITEM_GAUNTLETS_GOLD, - "You found the %bGolden Gauntlets%w!&You can feel even more power&coursing through your arms!", - "You found the %bGolden Gauntlets%w!&You can feel even more power&coursing through your arms!", - "Vous trouvez les %bGantelets&d'or%w! Une puissance démesurée&vous envahit!"), - GIMESSAGE(RG_PROGRESSIVE_SCALE, ITEM_SCALE_SILVER, - "You got the %bSilver Scale%w!&You can dive deeper than you&could before.", - "You got the %bSilver Scale%w!&You can dive deeper than you&could before.", - "Vous recevez l'%bEcaille&d'argent%w! Vous pouvez&désormais&plonger plus&profondément. "), - GIMESSAGE(RG_PROGRESSIVE_SCALE, ITEM_SCALE_GOLDEN, - "You got the %bGolden Scale%w!&Now you can dive much&deeper than you could before!", - "You got the %bGolden Scale%w!&Now you can dive much&deeper than you could before!", - "Vous recevez l'%bEcaille d'or%w!&Vous pouvez désormais plonger&encore plus profondément!"), - GIMESSAGE(RG_KOKIRI_SWORD, ITEM_SWORD_KOKIRI, + GIMESSAGE(GI_COJIRO, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOTTLE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POTION_RED, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POTION_GREEN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POTION_BLUE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_FAIRY, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MILK_BOTTLE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_LETTER_RUTO, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BEAN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_SKULL, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_SPOOKY, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_CHICKEN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_KEATON, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_BUNNY, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_TRUTH, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POCKET_EGG, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POCKET_CUCCO, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_ODD_MUSHROOM, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_ODD_POTION, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SAW, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SWORD_BROKEN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_PRESCRIPTION, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_FROG, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_EYEDROPS, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_CLAIM_CHECK, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SWORD_KOKIRI, ITEM_SWORD_KOKIRI, "You got the %gKokiri Sword%w!&This is a hidden treasure of&the Kokiri.", "You got the %gKokiri Sword%w!&This is a hidden treasure of&the Kokiri.", "Vous trouvez l'%gEpée Kokiri%w!&Cette lame est le trésor&secret de la tribu Kokiri."), - GIMESSAGE(RG_BIGGORON_SWORD, ITEM_SWORD_BGS, - "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!", - "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!", - "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!"), - GIMESSAGE(RG_DEKU_SHIELD, ITEM_SHIELD_DEKU, + GIMESSAGE(GI_SWORD_KNIFE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SHIELD_DEKU, ITEM_SHIELD_DEKU, "You got a %cDeku Shield%w!", "You got a %cDeku Shield%w!", "Vous obtenez un %cBouclier&Mojo!"), - GIMESSAGE(RG_HYLIAN_SHIELD, ITEM_SHIELD_HYLIAN, + GIMESSAGE(GI_SHIELD_HYLIAN, ITEM_SHIELD_HYLIAN, "You got a %cHylian Shield%w!", "You got a %cHylian Shield%w!", "Vous obtenez un %cBouclier&Hylien%w!"), - GIMESSAGE(RG_MIRROR_SHIELD, ITEM_SHIELD_MIRROR, + GIMESSAGE(GI_SHIELD_MIRROR, ITEM_SHIELD_MIRROR, "You found the %cMirror Shield%w!&The shield's polished surface can&reflect light or energy.", "You found the %cMirror Shield%w!&The shield's polished surface can&reflect light or energy.", "Vous trouvez le %cBouclier&Miroir%w! Ce bouclier peut&réfléchir lumière et énergie."), - GIMESSAGE(RG_HOVER_BOOTS, ITEM_BOOTS_HOVER, + GIMESSAGE(GI_TUNIC_GORON, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_TUNIC_ZORA, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOOTS_IRON, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOOTS_HOVER, ITEM_BOOTS_HOVER, "You got the %rHover Boots%w!&With these mysterious boots&you can hover above the ground.", "You got the %rHover Boots%w!&With these mysterious boots&you can hover above the ground.", "You got the %rHover Boots%w!&With these mysterious boots&you can hover above the ground."), - //GIMESSAGE_NO_GERMAN(, , "", "", ""), + GIMESSAGE(GI_QUIVER_40, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_QUIVER_50, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMB_BAG_20, ITEM_BOMB_BAG_20, + "You found a %rBomb Bag%w!&If you see something&suspicious, bomb it!", + "You found a %rBomb Bag%w!&If you see something&suspicious, bomb it!", + "Vous obtenez un %rSac de &Bombes%w!"), + GIMESSAGE(GI_BOMB_BAG_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMB_BAG_40, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_GAUNTLETS_SILVER, ITEM_GAUNTLETS_SILVER, + "You found the %bSilver Gauntlets%w!&You feel the power to lift&big things with it!", + "You found the %bSilver Gauntlets%w!&You feel the power to lift&big things with it!", + "Vous trouvez les %bGantelets&d'argent%w! En les portant vous&pouvez soulever d'énormes&objets avec!" ), + GIMESSAGE(GI_GAUNTLETS_GOLD, ITEM_GAUNTLETS_GOLD, + "You found the %bGolden Gauntlets%w!&You can feel even more power&coursing through your arms!", + "You found the %bGolden Gauntlets%w!&You can feel even more power&coursing through your arms!", + "Vous trouvez les %bGantelets&d'or%w! Une puissance démesurée&vous envahit!"), + GIMESSAGE(GI_SCALE_SILVER, ITEM_SCALE_SILVER, + "You got the %bSilver Scale%w!&You can dive deeper than you&could before.", + "You got the %bSilver Scale%w!&You can dive deeper than you&could before.", + "Vous recevez l'%bEcaille&d'argent%w! Vous pouvez&désormais&plonger plus&profondément. "), + GIMESSAGE(GI_SCALE_GOLD, ITEM_SCALE_GOLDEN, + "You got the %bGolden Scale%w!&Now you can dive much&deeper than you could before!", + "You got the %bGolden Scale%w!&Now you can dive much&deeper than you could before!", + "Vous recevez l'%bEcaille d'or%w!&Vous pouvez désormais plonger&encore plus profondément!"), + GIMESSAGE(GI_STONE_OF_AGONY, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_GERUDO_CARD, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_OCARINA_FAIRY, ITEM_OCARINA_FAIRY, + "You received the %rFairy Ocarina%w!&This is a memento from Saria.", + "You received the %rFairy Ocarina%w!&This is a memento from Saria.", + "Vous obtenez l'%rOcarina des&Fées%w! C'est un cadeau de Saria."), + GIMESSAGE(GI_SEEDS_5, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HEART_CONTAINER, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HEART_PIECE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_KEY_BOSS, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_COMPASS, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MAP, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_KEY_SMALL, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MAGIC_SMALL, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MAGIC_LARGE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_WALLET_ADULT, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_WALLET_GIANT, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_WEIRD_EGG, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HEART, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_ARROWS_SMALL, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_ARROWS_MEDIUM, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_ARROWS_LARGE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_GREEN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_BLUE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_RED, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HEART_CONTAINER_2, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MILK, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_GORON, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_ZORA, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_MASK_GERUDO, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BRACELET, ITEM_BRACELET, + "You got the %rGoron's Bracelet%w!&Now you can pull up Bomb&Flowers.", + "You got the %rGoron's Bracelet%w!&Now you can pull up Bomb&Flowers.", + "Vous obtenez le %rBracelet&Goron%w! Vous pouvez désormais&soulever les Choux-Péteurs."), + GIMESSAGE(GI_RUPEE_PURPLE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_GOLD, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SWORD_BGS, ITEM_SWORD_BGS, + "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!", + "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!", + "You got the %rBiggoron's Sword%w!&This blade was forged by a &master smith and won't break!"), + GIMESSAGE(GI_ARROW_FIRE, ITEM_ARROW_FIRE, + "You got the %rFire Arrow%w!&If you hit your target,&it will catch fire.", + "You got the %rFire Arrow%w!&If you hit your target,&it will catch fire.", + "Vous obtenez la %rFlèche de&Feu!%w! Tirez et embrasez&votre cible!"), + GIMESSAGE(GI_ARROW_ICE, ITEM_ARROW_ICE, + "You got the %bIce Arrow%w!&If you hit your target,&it will freeze.", + "You got the %bIce Arrow%w!&If you hit your target,&it will freeze.", + "Vous obtenez la %bFlèche de&Glace!%w! Tirez et gelez&votre cible!"), + GIMESSAGE(GI_ARROW_LIGHT, ITEM_ARROW_LIGHT, + "You got the %cLight Arrow%w!&The light of justice will&smite evil!", + "You got the %cLight Arrow%w!&The light of justice will&smite evil!", + "Vous obtenez la %cFlèche de&Lumière!%w! La clarté de la&Justice dissipera le Malin!"), + GIMESSAGE(GI_SKULL_TOKEN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_DINS_FIRE, ITEM_DINS_FIRE, + "You got %rDin's Fire%w!&Its fireball engulfs everything!", + "You got %rDin's Fire%w!&Its fireball engulfs everything!", + "Vous obtenez le %rFeu de Din%w!&Invoquez une puissante aura de&feu destructrice!"), + GIMESSAGE(GI_FARORES_WIND, ITEM_FARORES_WIND, + "You got %gFarore's Wind%w!&This is warp magic you can use!", + "You got %gFarore's Wind%w!&This is warp magic you can use!", + "Vous obtenez le %gVent de&Farore%w! Ce sortilège vous&permettra de vous téléporter."), + GIMESSAGE(GI_NAYRUS_LOVE, ITEM_NAYRUS_LOVE, + "You got %bNayru's Love%w!&Cast this to create a powerful&protective barrier.", + "You got %bNayru's Love%w!&Cast this to create a powerful&protective barrier.", + "Vous obtenez l%bAmour de&Nayru%w! Ce sortilège vous&permettra d'invoquer&une barrière protectrice."), + GIMESSAGE(GI_BULLET_BAG_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BULLET_BAG_40, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_STICKS_5, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_STICKS_10, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_NUTS_5_2, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_NUTS_10, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBS_1, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBS_10, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBS_20, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBS_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_SEEDS_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BOMBCHUS_5, ITEM_BOMBCHU, + "fff", + "fff", + "fff"), + GIMESSAGE(GI_BOMBCHUS_20, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_FISH, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BUGS, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BLUE_FIRE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_POE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BIG_POE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_DOOR_KEY, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_GREEN_LOSE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_BLUE_LOSE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_RED_LOSE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_RUPEE_PURPLE_LOSE, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_HEART_PIECE_WIN, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_STICK_UPGRADE_20, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_STICK_UPGRADE_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_NUT_UPGRADE_30, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_NUT_UPGRADE_40, ITEM_NONE, + "", + "", + ""), + GIMESSAGE(GI_BULLET_BAG_50, ITEM_NONE, + "", + "", + "") + }}; - GIMESSAGE(RG_GREG_RUPEE, ITEM_MASK_GORON, + const std::array randomizerTableGetItemMessages = {{ + GIMESSAGE(RG_ZELDAS_LULLABY, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_EPONAS_SONG, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_SARIAS_SONG, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_SUNS_SONG, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_SONG_OF_TIME, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_SONG_OF_STORMS, ITEM_NONE, + " ", + " ", + " "), + + GIMESSAGE(RG_MINUET_OF_FOREST, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_BOLERO_OF_FIRE, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_SERENADE_OF_WATER, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_REQUIEM_OF_SPIRIT, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_NOCTURNE_OF_SHADOW, ITEM_NONE, + " ", + " ", + " "), + GIMESSAGE(RG_PRELUDE_OF_LIGHT, ITEM_NONE, + " ", + " ", + " "), + + GIMESSAGE(RG_FOREST_MEDALLION, ITEM_MEDALLION_FOREST, + " ", + " ", + " "), + GIMESSAGE(RG_FIRE_MEDALLION, ITEM_MEDALLION_FIRE, + " ", + " ", + " "), + GIMESSAGE(RG_WATER_MEDALLION, ITEM_MEDALLION_WATER, + " ", + " ", + " "), + GIMESSAGE(RG_SPIRIT_MEDALLION, ITEM_MEDALLION_SPIRIT, + " ", + " ", + " "), + GIMESSAGE(RG_SHADOW_MEDALLION, ITEM_MEDALLION_SHADOW, + " ", + " ", + " "), + GIMESSAGE(RG_LIGHT_MEDALLION, ITEM_MEDALLION_LIGHT, + " ", + " ", + " "), + GIMESSAGE(RG_KOKIRI_EMERALD, ITEM_KOKIRI_EMERALD, + " ", + " ", + " "), + GIMESSAGE(RG_GORON_RUBY, ITEM_GORON_RUBY, + " ", + " ", + " "), + GIMESSAGE(RG_ZORA_SAPPHIRE, ITEM_ZORA_SAPPHIRE, + " ", + " ", + " "), + + GIMESSAGE(RG_GREG_RUPEE, ITEM_MASK_GORON, "You found %gGreg%w!", "%gGreg%w! Du hast ihn wirklich gefunden!", "Félicitation! Vous avez trouvé %gGreg%w!"), - GIMESSAGE(RG_BOTTLE_WITH_BLUE_FIRE, ITEM_BLUE_FIRE, + GIMESSAGE(RG_BOTTLE_WITH_BLUE_FIRE, ITEM_BLUE_FIRE, "You got a %rBottle with Blue &Fire%w! Use it to melt Red Ice!", "Du erhältst eine %rFlasche mit&blauem Feuer%w! Nutze es um&%rRotes Eis%w zu schmelzen!", "Vous obtenez une %rBouteille avec&une Flamme Bleue%w! Utilisez-la&pour faire fondre la %rGlace&Rouge%w!"), @@ -6215,7 +6693,8 @@ void Randomizer::CreateCustomMessages() { "Du erhältst die %rGoldene&Geldbörse%w! Die größte aller&Geldbörsen! Jetzt kannst Du bis&zu %y999 Rubine%w mit dir führen!", "Vous obtenez la %rBourse de Magnat%w!&Elle peut contenir jusqu'à %y999 rubis%w!&C'est gigantesque!") }}; - CreateGetItemMessages(&getItemMessages); + CreateVanillaGetItemMessages(&vanillaTableGetItemMessages); + CreateRandomizerGetItemMessages(&randomizerTableGetItemMessages); CreateRupeeMessages(); CreateTriforcePieceMessages(); CreateNaviRandoMessages(); @@ -6238,6 +6717,17 @@ class ExtendedVanillaTableInvalidItemIdException: public std::exception { void InitRandoItemTable() { // These entries have ItemIDs from vanilla, but not GetItemIDs or entries in the old sGetItemTable static GetItemEntry extendedVanillaGetItemTable[] = { + GET_ITEM(ITEM_MEDALLION_LIGHT, OBJECT_GI_MEDAL, GID_MEDALLION_LIGHT, 0x40, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_LIGHT_MEDALLION), + GET_ITEM(ITEM_MEDALLION_FOREST, OBJECT_GI_MEDAL, GID_MEDALLION_FOREST, 0x3E, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_FOREST_MEDALLION), + GET_ITEM(ITEM_MEDALLION_FIRE, OBJECT_GI_MEDAL, GID_MEDALLION_FIRE, 0x3C, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_FIRE_MEDALLION), + GET_ITEM(ITEM_MEDALLION_WATER, OBJECT_GI_MEDAL, GID_MEDALLION_WATER, 0x3D, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_WATER_MEDALLION), + GET_ITEM(ITEM_MEDALLION_SHADOW, OBJECT_GI_MEDAL, GID_MEDALLION_SHADOW, 0x41, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_SHADOW_MEDALLION), + GET_ITEM(ITEM_MEDALLION_SPIRIT, OBJECT_GI_MEDAL, GID_MEDALLION_SPIRIT, 0x3F, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_SPIRIT_MEDALLION), + + GET_ITEM(ITEM_KOKIRI_EMERALD, OBJECT_GI_JEWEL, GID_KOKIRI_EMERALD, 0x80, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_KOKIRI_EMERALD), + GET_ITEM(ITEM_GORON_RUBY, OBJECT_GI_JEWEL, GID_GORON_RUBY, 0x81, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_GORON_RUBY), + GET_ITEM(ITEM_ZORA_SAPPHIRE, OBJECT_GI_JEWEL, GID_ZORA_SAPPHIRE, 0x82, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_ZORA_SAPPHIRE), + GET_ITEM(ITEM_SONG_LULLABY, OBJECT_GI_MELODY, GID_SONG_ZELDA, 0xD4, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_ZELDAS_LULLABY), GET_ITEM(ITEM_SONG_SUN, OBJECT_GI_MELODY, GID_SONG_SUN, 0xD3, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_SUNS_SONG), GET_ITEM(ITEM_SONG_EPONA, OBJECT_GI_MELODY, GID_SONG_EPONA, 0xD2, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, RG_EPONAS_SONG), @@ -6257,27 +6747,9 @@ void InitRandoItemTable() { // RandomizerGet enum values for both. static GetItemEntry randoGetItemTable[] = { GET_ITEM(RG_ICE_TRAP, OBJECT_GI_RUPY, GID_RUPEE_GOLD, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_ICE_TRAP), - - GET_ITEM(ITEM_BOW, OBJECT_GI_BOW, GID_BOW, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_BOW), - GET_ITEM(ITEM_ARROW_FIRE, OBJECT_GI_M_ARROW, GID_ARROW_FIRE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_FIRE_ARROWS), - GET_ITEM(ITEM_ARROW_ICE, OBJECT_GI_M_ARROW, GID_ARROW_ICE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_ICE_ARROWS), - GET_ITEM(ITEM_ARROW_LIGHT, OBJECT_GI_M_ARROW, GID_ARROW_LIGHT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_LIGHT_ARROWS), - GET_ITEM(ITEM_SLINGSHOT, OBJECT_GI_PACHINKO, GID_SLINGSHOT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_SLINGSHOT), - GET_ITEM(ITEM_BOOMERANG, OBJECT_GI_BOOMERANG,GID_BOOMERANG, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_BOOMERANG), - GET_ITEM(ITEM_OCARINA_FAIRY, OBJECT_GI_OCARINA_0,GID_OCARINA_FAIRY, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_OCARINA), - GET_ITEM(ITEM_OCARINA_TIME, OBJECT_GI_OCARINA, GID_OCARINA_TIME, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_OCARINA), - GET_ITEM(ITEM_HAMMER, OBJECT_GI_HAMMER, GID_HAMMER, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_MEGATON_HAMMER), - GET_ITEM(ITEM_HOOKSHOT, OBJECT_GI_HOOKSHOT, GID_HOOKSHOT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_HOOKSHOT), - GET_ITEM(ITEM_LONGSHOT, OBJECT_GI_HOOKSHOT, GID_LONGSHOT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_HOOKSHOT), - GET_ITEM(ITEM_LENS, OBJECT_GI_GLASSES, GID_LENS, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_LENS_OF_TRUTH), - GET_ITEM(ITEM_DINS_FIRE, OBJECT_GI_GODDESS, GID_DINS_FIRE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_DINS_FIRE), - GET_ITEM(ITEM_FARORES_WIND, OBJECT_GI_GODDESS, GID_FARORES_WIND, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_FARORES_WIND), - GET_ITEM(ITEM_NAYRUS_LOVE, OBJECT_GI_GODDESS, GID_NAYRUS_LOVE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_NAYRUS_LOVE), - - GET_ITEM(RG_MAGIC_SINGLE, OBJECT_GI_MAGICPOT, GID_MAGIC_SMALL, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_MAGIC_SINGLE), - GET_ITEM(RG_MAGIC_DOUBLE, OBJECT_GI_MAGICPOT, GID_MAGIC_LARGE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER, RG_MAGIC_DOUBLE), - GET_ITEM(RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER, RG_DOUBLE_DEFENSE), - + GET_ITEM(RG_MAGIC_SINGLE, OBJECT_GI_MAGICPOT, GID_MAGIC_SMALL, 0xE4, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_MAGIC_SINGLE), + GET_ITEM(RG_MAGIC_DOUBLE, OBJECT_GI_MAGICPOT, GID_MAGIC_LARGE, 0xE8, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER, RG_MAGIC_DOUBLE), + GET_ITEM(RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xE9, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER, RG_DOUBLE_DEFENSE), GET_ITEM(RG_GREG_RUPEE, OBJECT_GI_RUPY, GID_RUPEE_GREEN, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_GREG_RUPEE), GET_ITEM(RG_BOTTLE_WITH_RED_POTION, OBJECT_GI_LIQUID, GID_POTION_RED, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_BOTTLE_WITH_RED_POTION), GET_ITEM(RG_BOTTLE_WITH_GREEN_POTION, OBJECT_GI_LIQUID, GID_POTION_GREEN, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_BOTTLE_WITH_GREEN_POTION), diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h index a726cecdeee..c15303f6c38 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.h +++ b/soh/soh/Enhancements/randomizer/randomizer.h @@ -44,7 +44,8 @@ class Randomizer { Randomizer(); ~Randomizer(); - static const std::string getItemMessageTableID; + static const std::string vanillaTableGetItemMessageTableID; + static const std::string randomizerTableGetItemMessageTableID; static const std::string hintMessageTableID; static const std::string merchantMessageTableID; static const std::string rupeeMessageTableID; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 8b56d352cee..e036d83a060 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1947,14 +1947,26 @@ extern "C" ItemObtainability Randomizer_GetItemObtainabilityFromRandomizerCheck( return OTRGlobals::Instance->gRandomizer->GetItemObtainabilityFromRandomizerCheck(randomizerCheck); } -CustomMessage Randomizer_GetCustomGetItemMessage(Player* player) { +CustomMessage Randomizer_GetCustomVanillaGetItemMessage(Player* player) { + CustomMessage getItemText; + GetItemEntry getItemEntry = player->getItemEntry; + if (getItemEntry.objectId == OBJECT_GI_MEDAL || getItemEntry.objectId == OBJECT_GI_JEWEL || + getItemEntry.objectId == OBJECT_GI_MELODY) { + getItemText = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randomizerTableGetItemMessageTableID, getItemEntry.getItemId); + } else { + getItemText = CustomMessageManager::Instance->RetrieveMessage(Randomizer::vanillaTableGetItemMessageTableID, getItemEntry.getItemId); + } + return getItemText; +} + +CustomMessage Randomizer_GetCustomRandomizerGetItemMessage(Player* player) { s16 giid; if (player->getItemEntry.objectId != OBJECT_INVALID) { giid = player->getItemEntry.getItemId; } else { giid = player->getItemId; } - const CustomMessage getItemText = CustomMessageManager::Instance->RetrieveMessage(Randomizer::getItemMessageTableID, giid); + const CustomMessage getItemText = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randomizerTableGetItemMessageTableID, giid); return getItemText; } @@ -1978,34 +1990,34 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { } else if (player->getItemEntry.getItemId == RG_TRIFORCE_PIECE) { messageEntry = Randomizer::GetTriforcePieceMessage(); } else { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } else if (textId == TEXT_ITEM_DUNGEON_MAP || textId == TEXT_ITEM_COMPASS) { if (DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_STARTING_MAPS_COMPASSES)) { if (textId == TEXT_ITEM_DUNGEON_MAP) { messageEntry = OTRGlobals::Instance->gRandomizer->GetMapGetItemMessageWithHint(player->getItemEntry); } else { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } } else if (textId == TEXT_ITEM_KEY_BOSS) { if (player->getItemEntry.getItemId == RG_GANONS_CASTLE_BOSS_KEY) { if (DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_GANONS_BOSS_KEY)) { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } else { if (DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_BOSS_KEYSANITY)) { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } } else if (textId == TEXT_ITEM_KEY_SMALL) { if (player->getItemEntry.getItemId == RG_GERUDO_FORTRESS_SMALL_KEY) { if (Randomizer_GetSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA) { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } else { if (DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_KEYSANITY)) { - messageEntry = Randomizer_GetCustomGetItemMessage(player); + messageEntry = Randomizer_GetCustomRandomizerGetItemMessage(player); } } } else if (textId == TEXT_RANDOMIZER_GOSSIP_STONE_HINTS && Randomizer_GetSettingValue(RSK_GOSSIP_STONE_HINTS) != RO_GOSSIP_STONES_NONE && @@ -2119,6 +2131,9 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { textId == TEXT_SARIAS_SONG_FOREST_TEMPLE) { messageEntry = OTRGlobals::Instance->gRandomizer->GetSariaMessage(textId); } + // Get custom textbox for items in the vanilla item table and the extended vanilla item table. + } else if (player->getItemEntry.objectId != OBJECT_INVALID && player->getItemEntry.modIndex == 0) { + messageEntry = Randomizer_GetCustomVanillaGetItemMessage(player); } } if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {