diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index eb6d22df6d..7b5f33243d 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -790,8 +790,9 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) { ParseHintLocationsFile(spoilerFileName); } - CustomMessageManager::Instance->ClearMessageTable(Randomizer::merchantMessageTableID); - CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::merchantMessageTableID); + // TODO: Remove these after we make sure it's fine that they aren't here + // CustomMessageManager::Instance->ClearMessageTable(Randomizer::merchantMessageTableID); + // CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::merchantMessageTableID); // Make an inverse of std::unordered_map SpoilerfileGetNameToEnum // so that we can get the name of the item from the RandomizerCheck @@ -806,14 +807,15 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) { RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index]; std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]]; u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck]; + // TODO: Magic number 100, we don't to overwrite deku scrub messages CustomMessageManager::Instance->CreateMessage( - Randomizer::merchantMessageTableID, index, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE, + Randomizer::merchantMessageTableID, index + 100, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE, "\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02", "\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis&%wOffre spéciale! DERNIER EN STOCK!&Faites vite!\x0A\x02", "\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02", }); CustomMessageManager::Instance->CreateMessage( - Randomizer::merchantMessageTableID, index + shopItemRandomizerChecks.size(), { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE, + Randomizer::merchantMessageTableID, index + shopItemRandomizerChecks.size() + 100, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE, "\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02", "\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis\x09&&\x1B%gAcheter&Ne pas acheter%w\x09\x02", "\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02", diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 1daf09d2ee..67f22515e1 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1765,7 +1765,8 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { } else if (textId >= 0x9000 && textId <= 0x905F) { messageEntry = Randomizer_GetScrubMessage((textId & ((1 << 8) - 1))); } else if (textId >= 0x9100 && textId <= 0x9180) { - messageEntry = Randomizer_GetShopMessage((textId & ((1 << 8) - 1))); + // TODO: Magic number 100, we don't to overwrite deku scrub messages + messageEntry = Randomizer_GetShopMessage((textId & ((1 << 8) - 1)) + 100); } else if (CVar_GetS32("gRandomizeRupeeNames", 0) && (textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE || textId == TEXT_HUGE_RUPEE)) {