From a3c52626e61b1d8cabd70a98cab3a959f221c22d Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 16 Oct 2023 00:25:43 +0200 Subject: [PATCH] Randomizer - Colored hints (#3259) * Colored hints * Missed 2 french translations --- .../randomizer/3drando/hint_list.cpp | 4 +-- .../Enhancements/randomizer/3drando/hints.cpp | 32 +++++++++---------- .../Enhancements/randomizer/randomizer.cpp | 32 +++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp index 358ae285d..b830efb60 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp @@ -28,12 +28,12 @@ void HintTable_Init() { hintTable[PREFIX] = HintText::Exclude({ Text{ "They say that ", /*french*/ "Selon moi, ", /*spanish*/ "Según dicen, " } }); hintTable[WAY_OF_THE_HERO] = - HintText::Exclude({ Text{ " is on the way of the hero.", /*french*/ " est sur la voie du héros.", + HintText::Exclude({ Text{ " is on %cthe way of the hero%w.", /*french*/ " est sur %cla voie du héros%w.", /*spanish*/ " conduce a la senda del héroe." } }); hintTable[PLUNDERING] = HintText::Exclude({ Text{ "plundering ", /*french*/ "explorer ", /*spanish*/ "inspeccionar " } }); hintTable[FOOLISH] = HintText::Exclude( - { Text{ " is a foolish choice.", /*french*/ " est futile.", /*spanish*/ " no es una sabia decisión." } }); + { Text{ " is %pa foolish choice%w.", /*french*/ " est %pfutile%w.", /*spanish*/ " no es una sabia decisión." } }); hintTable[CAN_BE_FOUND_AT] = HintText::Exclude({ Text{ "can be found at", /*french*/ "se trouve dans", /*spanish*/ "aguarda en" } }); hintTable[HOARDS] = HintText::Exclude({ Text{ "hoards", /*french*/ "recèle", /*spanish*/ "acapara" } }); diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp index c1610ce07..dea7833fc 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp @@ -314,7 +314,7 @@ static void CreateLocationHint(const std::vector& possibleHintLocation Text itemHintText = Location(hintedLocation)->GetPlacedItem().GetHint().GetText(); Text prefix = Hint(PREFIX).GetText(); - Text finalHint = prefix + locationHintText + " #"+itemHintText+"#."; + Text finalHint = prefix + "%r" + locationHintText + " #%g" + itemHintText + "#%w."; SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG(finalHint.english); SPDLOG_DEBUG("\n\n"); @@ -367,7 +367,7 @@ static void CreateWothHint(uint8_t* remainingDungeonWothHints) { // form hint text Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText(); - Text finalWothHint = Hint(PREFIX).GetText() + "#" + locationText + "#" + Hint(WAY_OF_THE_HERO).GetText(); + Text finalWothHint = Hint(PREFIX).GetText() + "%r#" + locationText + "#%w" + Hint(WAY_OF_THE_HERO).GetText(); SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG(finalWothHint.english); SPDLOG_DEBUG("\n\n"); @@ -411,7 +411,7 @@ static void CreateBarrenHint(uint8_t* remainingDungeonBarrenHints, std::vectorGetParentRegionKey())->GetHint().GetText(); Text finalBarrenHint = - Hint(PREFIX).GetText() + Hint(PLUNDERING).GetText() + "#" + locationText + "#" + Hint(FOOLISH).GetText(); + Hint(PREFIX).GetText() + Hint(PLUNDERING).GetText() + "%r#" + locationText + "#%w" + Hint(FOOLISH).GetText(); SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG(finalBarrenHint.english); SPDLOG_DEBUG("\n\n"); @@ -457,13 +457,13 @@ static void CreateRandomLocationHint(const bool goodItem = false) { Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText(); // RANDOTODO: reconsider dungeon vs non-dungeon item location hints when boss shuffle mixed pools happens if (Location(hintedLocation)->IsDungeon()) { - Text finalHint = Hint(PREFIX).GetText()+"#"+locationText+"# "+Hint(HOARDS).GetText()+" #"+itemText+"#."; + Text finalHint = Hint(PREFIX).GetText()+"%r#"+locationText+"#%w "+Hint(HOARDS).GetText()+" %g#"+itemText+"#%w."; SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG(finalHint.english); SPDLOG_DEBUG("\n\n"); AddHint(finalHint, gossipStone, {QM_GREEN, QM_RED}, HINT_TYPE_NAMED_ITEM, hintedLocation); } else { - Text finalHint = Hint(PREFIX).GetText()+"#"+itemText+"# "+Hint(CAN_BE_FOUND_AT).GetText()+" #"+locationText+"#."; + Text finalHint = Hint(PREFIX).GetText()+"%r#"+itemText+"#%w "+Hint(CAN_BE_FOUND_AT).GetText()+" %g#"+locationText+"#%w."; SPDLOG_DEBUG("\tMessage: "); SPDLOG_DEBUG(finalHint.english); SPDLOG_DEBUG("\n\n"); @@ -602,7 +602,7 @@ void CreateGanonText() { ganonHintText = hint.GetText()+Hint(YOUR_POCKET).GetText(); lightArrowHintLoc = "Link's Pocket"; } else { - ganonHintText = hint.GetText()+GetHintRegion(Location(lightArrowLocation[0])->GetParentRegionKey())->GetHint().GetText(); + ganonHintText = hint.GetText() + "%r" + GetHintRegion(Location(lightArrowLocation[0])->GetParentRegionKey())->GetHint().GetText(); lightArrowHintLoc = Location(lightArrowLocation[0])->GetName(); } ganonHintText = ganonHintText + "!"; @@ -814,9 +814,9 @@ void CreateDampesDiaryText() { uint32_t location = FilterFromPool(allLocations, [item](const uint32_t loc){return Location(loc)->GetPlaceduint32_t() == item;})[0]; Text area = GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText(); Text temp1 = Text{ - "Whoever reads this, please enter %g", - "Toi qui lit ce journal, rends-toi dans %g", - "Wer immer dies liest, der möge folgenden Ort aufsuchen: %g" + "Whoever reads this, please enter %r", + "Toi qui lit ce journal, rends-toi dans %r", + "Wer immer dies liest, der möge folgenden Ort aufsuchen: %r" }; Text temp2 = { @@ -839,13 +839,13 @@ void CreateGregRupeeHint() { Text area = GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText(); Text temp1 = Text{ - "By the way, if you're interested, I saw the shiniest %gGreen Rupee%w somewhere in%g ", - "Au fait, si ça t'intéresse, j'ai aperçu le plus éclatant des %gRubis Verts%w quelque part à %g", + "By the way, if you're interested, I saw the shiniest %gGreen Rupee%w somewhere in%r ", + "Au fait, si ça t'intéresse, j'ai aperçu le plus éclatant des %gRubis Verts%w quelque part à %r", "" }; Text temp2 = { - "%w.^It's said to have %rmysterious powers%w...^But then, it could just be another regular rupee.&Oh well.", + "%w.^It's said to have %cmysterious powers%w...^But then, it could just be another regular rupee.&Oh well.", "%w. On dit qu'il possède des pouvoirs mystérieux... Mais bon, ça pourrait juste être un autre rubis ordinaire.", "" }; @@ -859,8 +859,8 @@ void CreateSheikText() { lightArrowHintLoc = Location(lightArrowLocation[0])->GetName(); Text area = GetHintRegion(Location(lightArrowLocation[0])->GetParentRegionKey())->GetHint().GetText(); Text temp1 = Text{ - "I overheard Ganondorf say that he misplaced the %rLight Arrows%w in&%g", - "J'ai entendu dire que Ganondorf aurait caché les %rFlèches de Lumière%w dans %g", + "I overheard Ganondorf say that he misplaced the %yLight Arrows%w in&%r", + "J'ai entendu dire que Ganondorf aurait caché les %yFlèches de Lumière%w dans %r", "" }; Text temp2 = Text{"%w.", "%w.", "%w."}; @@ -873,8 +873,8 @@ void CreateSariaText() { sariaHintLoc = Location(magicLocation[0])->GetName(); Text area = GetHintRegion(Location(magicLocation[0])->GetParentRegionKey())->GetHint().GetText(); Text temp1 = Text{ - "Did you feel the %gsurge of magic%w recently? A mysterious bird told me it came from %g", - "As-tu récemment ressenti une vague de %gpuissance magique%w? Un mystérieux hibou m'a dit qu'elle provenait du %g", + "Did you feel the %gsurge of magic%w recently? A mysterious bird told me it came from %r", + "As-tu récemment ressenti une vague de %gpuissance magique%w? Un mystérieux hibou m'a dit qu'elle provenait du %r", "" }; Text temp2 = Text{ diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 3e9c0f7c5..578532a33 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -465,9 +465,9 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) { CustomMessageManager::Instance->CreateMessage( Randomizer::randoMiscHintsTableID, TEXT_CURSED_SKULLTULA_PEOPLE, - CustomMessage("Yeaaarrgh! I'm cursed!!^Please save me by destroying&%r{{params}} Spiders of the Curse%w&and I will give you my&%b{{check}}%w!", - "Yeaaarrgh! Ich bin verflucht!^Bitte rette mich, indem du %r{{params}} Skulltulas&%wzerstörst und ich werde dir dafür&%b{{check}} %wgeben!", - "Yeaaarrgh! Je suis maudit!^Détruit encore %r{{params}} Araignées de&la Malédiction%w et j'aurai quelque&chose à te donner!&%b({{check}})") + CustomMessage("Yeaaarrgh! I'm cursed!!^Please save me by destroying&%r{{params}} Spiders of the Curse%w&and I will give you my&%g{{check}}%w!", + "Yeaaarrgh! Ich bin verflucht!^Bitte rette mich, indem du %r{{params}} Skulltulas&%wzerstörst und ich werde dir dafür&%g{{check}} %wgeben!", + "Yeaaarrgh! Je suis maudit!^Détruit encore %r{{params}} Araignées de&la Malédiction%w et j'aurai quelque&chose à te donner!&%g({{check}})") ); CustomMessageManager::Instance->CreateMessage( Randomizer::randoMiscHintsTableID, TEXT_DAMPES_DIARY, @@ -481,7 +481,7 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) { Randomizer::randoMiscHintsTableID, TEXT_FROGS_UNDERWATER, CustomMessage("Some frogs holding&%g{{item}}%w&are looking at you from underwater...", "Unter Wasser gibt es Frösche,&die %g{{item}}%w&bei sich haben und Dich neugierig&beobachten...", - "Des grenouilles se trouvant&sous l'eau vous fixent attentivement,&tenant fermement&%r{{item}}%w.", TEXTBOX_TYPE_BLUE) + "Des grenouilles se trouvant&sous l'eau vous fixent attentivement,&tenant fermement&%g{{item}}%w.", TEXTBOX_TYPE_BLUE) ); CustomMessageManager::Instance->CreateMessage( Randomizer::randoMiscHintsTableID, TEXT_SARIAS_SONG_FOREST_SOUNDS, @@ -565,17 +565,17 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) { //RANDOTODO: Implement obscure/ambiguous hints CustomMessageManager::Instance->CreateMessage( Randomizer::merchantMessageTableID, TEXT_MEDIGORON, - CustomMessage("How about buying %r&{{item}}%w for %g200 rupees%w?\x1B&%gYes&No%w", - "Wie wäre es mit %r&{{item}}%w für %g200 Rubine?%w\x1B&%gJa!&Nein!%w", - "Veux-tu acheter %r&{{item}}%w pour %g200 rubis?%w\x1B&%gOui&Non&w")); + CustomMessage("How about buying %g&{{item}}%w for %y200 rupees%w?\x1B&%gYes&No%w", + "Wie wäre es mit %g&{{item}}%w für %y200 Rubine?%w\x1B&%gJa!&Nein!%w", + "Veux-tu acheter %g&{{item}}%w pour %y200 rubis?%w\x1B&%gOui&Non&w")); //Granny Shopy //RANDOTODO: Implement obscure/ambiguous hints CustomMessageManager::Instance->CreateMessage( Randomizer::merchantMessageTableID, TEXT_GRANNYS_SHOP, - CustomMessage("%r{{item}}%w!&How about %g100 rupees%w?\x1B&%gYes&No%w", - "%r{{item}}%w!&Wie wäre es mit %g100 Rubine?%w\x1B&%gJa!&Nein!%w", - "%r{{item}}%w!&Que dis-tu de %g100 rubis?%w\x1B&%gOui&Non&w")); + CustomMessage("%g{{item}}%w!&How about %y100 rupees%w?\x1B&%gYes&No%w", + "%g{{item}}%w!&Wie wäre es mit %y100 Rubine?%w\x1B&%gJa!&Nein!%w", + "%g{{item}}%w!&Que dis-tu de %y100 rubis?%w\x1B&%gOui&Non&w")); //Carpet Salesman //RANDOTODO: Implement obscure/ambiguous hints @@ -596,14 +596,14 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) { CustomMessageManager::Instance->CreateMessage( Randomizer::merchantMessageTableID, TEXT_CARPET_SALESMAN_1, CustomMessage("Welcome!^I am selling stuff, strange and rare, &from all over the world to " - "everybody.&Today's special is...^%r{{item}}" + - cgBoxTwoText[0] + "How about %g200 Rupees?%w\x1B&&%gYes&No%w", + "everybody.&Today's special is...^%g{{item}}" + + cgBoxTwoText[0] + "How about %y200 Rupees?%w\x1B&&%gYes&No%w", "Sei gegrüßt!^Ich verkaufe allerlei Kuriorisäten.&Stets sonderliche und seltene Ware&aus " - "aller Welt für jedermann.&Das heutige Angebot bleibt...^%r{{item}}" + - cgBoxTwoText[1] + "Wie wäre es mit %g200 Rubinen?%w\x1B&&%gJa!&Nein!%w", + "aller Welt für jedermann.&Das heutige Angebot bleibt...^%g{{item}}" + + cgBoxTwoText[1] + "Wie wäre es mit %y200 Rubinen?%w\x1B&&%gJa!&Nein!%w", "Bienvenue!^Je vends des trucs étranges et rares,&de partout dans le monde et à tout " - "le&monde! L'objet du jour est...^%r{{item}}" + - cgBoxTwoText[2] + "Alors, marché conclu pour %g200 rubis?%w\x1B&&%gOui&Non%w")); + "le&monde! L'objet du jour est...^%g{{item}}" + + cgBoxTwoText[2] + "Alors, marché conclu pour %y200 rubis?%w\x1B&&%gOui&Non%w")); CustomMessageManager::Instance->CreateMessage( Randomizer::merchantMessageTableID, TEXT_CARPET_SALESMAN_2,