diff --git a/soh/soh/Enhancements/randomizer/actors/z_en_g_switch_rando.c b/soh/soh/Enhancements/randomizer/actors/z_en_g_switch_rando.c index 957c31e84..872796c4f 100644 --- a/soh/soh/Enhancements/randomizer/actors/z_en_g_switch_rando.c +++ b/soh/soh/Enhancements/randomizer/actors/z_en_g_switch_rando.c @@ -8,6 +8,13 @@ void EnGSwitch_Randomizer_SilverRupeeIdle(EnGSwitch* self, PlayState* play) { self->actor.shape.rot.y += 0x800; if (self->actor.xyzDistToPlayerSq < 900.0f) { if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_SILVER_RUPEES) != RO_SILVER_SHUFFLE_VANILLA) { + player->getItemEntry = *self->giEntry; + + if (self->giEntry->getItemId == RG_ICE_TRAP) { + Message_StartTextbox(play, 0xF8, NULL); + } else { + Message_StartTextbox(play, self->giEntry->textId, NULL); + } if (self->giEntry->modIndex == MOD_NONE) { // RANDOTOD: Move this into Item_Give() or some other more central location if (self->giEntry->getItemId == GI_SWORD_BGS) { @@ -27,14 +34,6 @@ void EnGSwitch_Randomizer_SilverRupeeIdle(EnGSwitch* self, PlayState* play) { // player->actor.freezeTimer = 10; // } - player->getItemEntry = *self->giEntry; - - if (self->giEntry->getItemId == RG_ICE_TRAP) { - Message_StartTextbox(play, 0xF8, NULL); - } else { - Message_StartTextbox(play, self->giEntry->textId, NULL); - } - if (IS_RANDO) { if (self->giEntry->getItemId != RG_ICE_TRAP) { Audio_PlayFanfare_Rando(*self->giEntry); diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 6e348e3bb..12b4f562c 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2851,11 +2851,12 @@ void CreateGetItemMessages(const std::array* messageEntries) } // Special Case for Silver Rupees //TODO: AI Translated Text, get translation from native speaker. - customMessageManager->CreateMessage(Randomizer::getItemMessageTableID, RG_SILVER_RUPEE_FIRST, - CustomMessage("You got a %cSilver Rupee%w for the&%g{{location}}%w!", - "Du hast eine %cSilberne Rupie%w für die&%g{{location}}%w!", - "Vous avez reçu une %cRoupie d'Argent%w pour le&%g{{location}}%w!", - TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM)); + customMessageManager->CreateMessage( + Randomizer::getItemMessageTableID, RG_SILVER_RUPEE_FIRST, + CustomMessage("You got a %cSilver Rupee%w for the&%g{{location}}%w!&{{count_text}}!", + "Du hast eine %cSilberne Rupie%w für die&%g{{location}}%w!{{count_text}}!", + "Vous avez reçu une %cRoupie d'Argent%w pour le&%g{{location}}%w!{{count_text}}!", + TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM)); // Special Case for Silver Rupee Pouches // customMessageManager->CreateMessage(Randomizer::getItemMessageTableID, RG_SILVER_RUPEE_POUCH_FIRST, // { TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, diff --git a/soh/soh/Enhancements/randomizer/silver_rupee.cpp b/soh/soh/Enhancements/randomizer/silver_rupee.cpp index 1ddfef4d2..1a8c3633c 100644 --- a/soh/soh/Enhancements/randomizer/silver_rupee.cpp +++ b/soh/soh/Enhancements/randomizer/silver_rupee.cpp @@ -171,6 +171,16 @@ namespace Rando { if (rgid >= RG_SILVER_RUPEE_FIRST && rgid <= RG_SILVER_RUPEE_LAST) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::getItemMessageTableID, RG_SILVER_RUPEE_FIRST); + auto ctx = Rando::Context::GetInstance(); + // Get the collected amount + 1, since the text is retrieved before the count is incremented in `Randomizer_Item_Give` + int srCount = ctx->GetSilverRupees()->GetInfo(static_cast(rgid)).GetCollected() + 1; + bool complete = ctx->GetSilverRupees()->GetInfo(static_cast(rgid)).GetTotal() <= srCount; + if (complete) { + messageEntry.Replace("{{count_text}}", "That's all of them"); + } else { + messageEntry.Replace("{{count_text}}", "You have collected %g{{count}}%w of them so far"); + messageEntry.Replace("{{count}}", std::to_string(srCount)); + } }/* else if (rgid >= RG_SILVER_RUPEE_POUCH_FIRST && rgid <= RG_SILVER_RUPEE_POUCH_LAST) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::getItemMessageTableID, RG_SILVER_RUPEE_POUCH_FIRST);