From d79783069ce4f57cb14a11fd25decbaf94cd8334 Mon Sep 17 00:00:00 2001 From: pizza1398 <259104093+pizza1398@users.noreply.github.com> Date: Tue, 25 Aug 2026 18:19:36 +0200 Subject: [PATCH 1/2] Add choice markers, CreateShopMessage - Use ># in Tingle and other shops - Create both halves of shop text from first ID - Write price to field_4 and to text --- source/hints.cpp | 68 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/source/hints.cpp b/source/hints.cpp index f2c85e6..391486a 100644 --- a/source/hints.cpp +++ b/source/hints.cpp @@ -441,51 +441,91 @@ void CreateTingleHintText() { if (Settings::ShuffleTingleMaps.Is(true)) { // Logic: Get item names from location. // Create custom message for each tingle location (6) - Text clockTownMap = Text{"#"}+ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName(); - Text woodfallMap = Text{"#"}+ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName(); - Text snowHeadMap = Text{"#"}+ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName(); - Text romaniMap = Text{"#"}+ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName(); - Text greatBayMap = Text{"#"}+ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName(); - Text ikanaMap = Text{"#"}+ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName(); + Text clockTownMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName(); + Text woodfallMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName(); + Text snowHeadMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName(); + Text romaniMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName(); + Text greatBayMap = ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName(); + Text ikanaMap = ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName(); // {"English", "French", "Spanish" "German" }; "Italian" - Text priceFive = {" ##5 Rupees#&", " ##5 Rubis#&", " ##5 rupias#&", " - ##5 Rubine#&" }; // , " ##5 rupie#&" - Text priceTwenty = {" ##20 Rupees#&", " ##20 Rubis#&", " ##20 rupias#&", " - ##20 Rubine#&"}; // , " ##20 rupie#&" + Text priceFive = {" ##5 Rupees#&#", " ##5 Rubis#&#", " ##5 rupias#&#", " - ##5 Rubine#&#" }; // , " ##5 rupie#&" + Text priceTwenty = {" ##20 Rupees#&#", " ##20 Rubis#&#", " ##20 rupias#&#", " - ##20 Rubine#&#"}; // , " ##20 rupie#&" Text priceForty = {" ##40 Rupees#", " ##40 Rubis#", " ##40 rupias#", " - ##40 Rubine#" }; // , " ##40 rupie#" Text leaveShop = {"&#No thanks#", "&#Non merci#", "&#No, gracias#", "&#Nein, danke!#" }; // , "&#No, grazie#" // Clock Town message CustomMessages::CreateMessageFromTextObject(0x1D11, 0xFFFF, 0x3FF0A005, 0xFF1001, - clockTownMap+priceFive+woodfallMap+priceForty+leaveShop, + Text{">3#"}+clockTownMap+priceFive+woodfallMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); // Woodfall message CustomMessages::CreateMessageFromTextObject(0x1D12, 0xFFFF, 0x3FF0A014, 0xFF1001, - woodfallMap+priceTwenty+snowHeadMap+priceForty+leaveShop, + Text{">3#"}+woodfallMap+priceTwenty+snowHeadMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); // Snowhead message CustomMessages::CreateMessageFromTextObject(0x1D13, 0xFFFF, 0x3FF0A014, 0xFF1001, - snowHeadMap+priceTwenty+romaniMap+priceForty+leaveShop, + Text{">3#"}+snowHeadMap+priceTwenty+romaniMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); // Milk Road message CustomMessages::CreateMessageFromTextObject(0x1D14, 0xFFFF, 0x3FF0A014, 0xFF1001, - romaniMap+priceTwenty+greatBayMap+priceForty+leaveShop, + Text{">3#"}+romaniMap+priceTwenty+greatBayMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); // Great Bay message CustomMessages::CreateMessageFromTextObject(0x1D15, 0xFFFF, 0x3FF0A014, 0xFF1001, - greatBayMap+priceTwenty+ikanaMap+priceForty+leaveShop, + Text{">3#"}+greatBayMap+priceTwenty+ikanaMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); // Ikana message CustomMessages::CreateMessageFromTextObject(0x1D16, 0xFFFF, 0x3FF0A014, 0xFF1001, - ikanaMap+priceTwenty+clockTownMap+priceForty+leaveShop, + Text{">3#"}+ikanaMap+priceTwenty+clockTownMap+priceForty+leaveShop, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); } } +void CreateShopMessage(u16 messageID, ItemKey shopItem, u16 buyingPrice, bool isRepeatable) { + Text shopIntro = Text{"#"}+ItemTable(shopItem).GetName()+"& " + +std::to_string(buyingPrice)+Text{ + " Rupees#&", " rubis#&", " rupias#&", " Rubine#&",// " rupie#&" + }; + if (isRepeatable) { + CustomMessages::CreateMessageFromTextObject(messageID, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, + shopIntro+Text{ + /*NaEnglish*/"Special deal!&Buy as many as you want!", + /*NaFrench */"Offre spéciale!&Achetez-en à volonté!", + /*NaSpanish*/"¡Oferta especial!&¡Compra todo lo que quieras!", + /*EuGerman */"Sonderangebot!&Kauft so viel ihr wollt!", + // /*EuItalian*/"Offerta speciale!&Compratene a volontà!", + /*EuEnglish*/"", + /*EuFrench */"Offre spéciale !&Achetez-en à volonté !", + /*EuSpanish*/"", + }, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_ENDLESS); + } else { + CustomMessages::CreateMessageFromTextObject(messageID, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, + shopIntro+Text{ + /*NaEnglish*/"Special deal! ONE LEFT!&Get it while it lasts!", + /*NaFrench */"Offre spéciale! DERNIER EN STOCK!&Maintenant ou jamais!", + /*NaSpanish*/"¡Oferta especial! ¡SOLO QUEDA UNA UNIDAD!&¡Hazte con ella antes de que se agote!", + /*EuGerman */"Sonderangebot! NUR EINS AUF LAGER!&Schlagt zu solange ihr noch könnt!", + // /*EuItalian*/"Offerta speciale! ULTIMO PEZZO!&Affrettatevi ad aquistarlo!", + /*EuEnglish*/"", + /*EuFrench */"Offre spéciale ! DERNIER EN STOCK !&Maintenant ou jamais !", + /*EuSpanish*/"", + }, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_ENDLESS); + } + CustomMessages::CreateMessageFromTextObject(messageID + 1, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF1301, + shopIntro+">2"+Text{ + /*English*/"#Buy&Don't Buy#", + /*French */"#J'achète&J'achète pas#", + /*Spanish*/"#Comprar&No comprar#", + /*German */"#Kaufen!&Nicht kaufen!#", + // /*Italian*/"#Compra&Non comprare#", + }, {QM_WHITE, QM_GREEN}, {}, {}, 0x0, false, false, MESSAGE_END_NULL); +} + void CreateOtherHints() { // Create other hints for various texts From a336d77ba029dc1be2f8b353ff5a990110ded48b Mon Sep 17 00:00:00 2001 From: pizza1398 <259104093+pizza1398@users.noreply.github.com> Date: Thu, 27 Aug 2026 23:08:06 +0200 Subject: [PATCH 2/2] Tweak CreateShopMessage - Make part-timer variants of shop messages (En & Fr only so far) - Make out of stock variant of blue potion message automatically - Draft per-language same-line separators - Center ice trap message --- source/custom_messages.cpp | 8 ++--- source/hints.cpp | 72 ++++++++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 15 deletions(-) diff --git a/source/custom_messages.cpp b/source/custom_messages.cpp index 3f2c3fc..ae574e1 100644 --- a/source/custom_messages.cpp +++ b/source/custom_messages.cpp @@ -335,13 +335,13 @@ void CreateBaselineCustomMessages() { // Ice Trap CreateMessage(0x0012, 0xFFFF, 0x3FFFFFFF, 0xFF0000, - {" #FOOL!#", + {"><#FOOL!#", // French - "#IDIOT!#", + "><#IDIOT!#", // NOT Spanish - " #FOOL!#", + "><#FOOL!#", // German - "#NARR!#", + "><#NARR!#", }, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_NORMAL); diff --git a/source/hints.cpp b/source/hints.cpp index 391486a..3305fd7 100644 --- a/source/hints.cpp +++ b/source/hints.cpp @@ -487,13 +487,25 @@ void CreateTingleHintText() { } void CreateShopMessage(u16 messageID, ItemKey shopItem, u16 buyingPrice, bool isRepeatable) { - Text shopIntro = Text{"#"}+ItemTable(shopItem).GetName()+"& " - +std::to_string(buyingPrice)+Text{ - " Rupees#&", " rubis#&", " rupias#&", " Rubine#&",// " rupie#&" - }; - if (isRepeatable) { - CustomMessages::CreateMessageFromTextObject(messageID, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, - shopIntro+Text{ + Text itemName = ItemTable(shopItem).GetName(); + Text shopIntro = Text{"#"}+itemName+Text{ + "&>>" + // itemName.NAenglish.length() <= 30 ? ": " : "&>>", + // itemName.NAfrench.length() <= 30 ? " : " : "&>>", + // itemName.NAspanish.length() <= 30 ? ": " : "&>>", + // itemName.EURgerman.length() <= 30 ? ": " : "&>>", + // // itemName.EURitalian.length() <= 30 ? ": " : "&>>", + // itemName.EURenglish.length() <= 30 ? ": " : "&>>", + // itemName.EURfrench.length() <= 30 ? " : " : "&>>", + // itemName.EURspanish.length() <= 30 ? ": " : "&>>", + }+std::to_string(buyingPrice)+Text{ + " Rupees#&", " rubis#&", " rupias#&", " Rubine#&",// " rupie#&" + }; + Text shopDescription = {"oops"}; + if ((messageID < 0x06C9) || (messageID > 0x06D8)) { + // Regular shop + if (isRepeatable) { + shopDescription = { /*NaEnglish*/"Special deal!&Buy as many as you want!", /*NaFrench */"Offre spéciale!&Achetez-en à volonté!", /*NaSpanish*/"¡Oferta especial!&¡Compra todo lo que quieras!", @@ -502,10 +514,9 @@ void CreateShopMessage(u16 messageID, ItemKey shopItem, u16 buyingPrice, bool is /*EuEnglish*/"", /*EuFrench */"Offre spéciale !&Achetez-en à volonté !", /*EuSpanish*/"", - }, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_ENDLESS); - } else { - CustomMessages::CreateMessageFromTextObject(messageID, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, - shopIntro+Text{ + }; + } else { + shopDescription = { /*NaEnglish*/"Special deal! ONE LEFT!&Get it while it lasts!", /*NaFrench */"Offre spéciale! DERNIER EN STOCK!&Maintenant ou jamais!", /*NaSpanish*/"¡Oferta especial! ¡SOLO QUEDA UNA UNIDAD!&¡Hazte con ella antes de que se agote!", @@ -514,8 +525,47 @@ void CreateShopMessage(u16 messageID, ItemKey shopItem, u16 buyingPrice, bool is /*EuEnglish*/"", /*EuFrench */"Offre spéciale ! DERNIER EN STOCK !&Maintenant ou jamais !", /*EuSpanish*/"", + }; + } + } else { + // Trading post part-timer + if (isRepeatable) { + shopDescription = { + /*English*/"Pretty sure we've got a bunch.&Oh and it's, like, a special deal.", + /*French */"On doit en avoir un tas dans le stock.&Ah oui, et c'est une offre spéciale.", + /*Spanish?*/"¡Oferta especial!&¡Compra todo lo que quieras!", + /*German ?*/"Sonderangebot!&Kauft so viel ihr wollt!", + // /*Italian?*/"Offerta speciale!&Compratene a volontà!", + }; + } else { + shopDescription = { + /*English*/"This one's a special deal, and uh,&I think we only have the one...", + /*French */"C't'un genre d'offre spéciale, ouais.&Et j'crois qu'c'est tout ce qu'on a...", + /*Spanish?*/"¡Oferta especial! ¡SOLO QUEDA UNA UNIDAD!&¡Hazte con ella antes de que se agote!", + /*German ?*/"Sonderangebot! NUR EINS AUF LAGER!&Schlagt zu solange ihr noch könnt!", + // /*Italian?*/"Offerta speciale! ULTIMO PEZZO!&Affrettatevi ad aquistarlo!", + }; + } + } + + CustomMessages::CreateMessageFromTextObject(messageID, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, + shopIntro+shopDescription, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_ENDLESS); + // Handle blue potion variant for mushroomless hag + // WILL OVERFLOW IN MOST LANGUAGES WHEN ITEM NAME TRIGGERS LINE BREAK + if (messageID == 0x0843) { + CustomMessages::CreateMessageFromTextObject(0x0880, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF0301, + shopIntro+Text{ + /*NaEnglish*/"Actually, I can't get the ingredients&for this, so I'm sold out. Sorry.", + /*NaFrench */"En fait, je n'arrive pas à trouver&les ingrédients pour ça, alors je&n'en ai plus. Désolée.", + /*NaSpanish*/"No puedo conseguir los&ingredientes, así que está&agotada. Lo siento.", + /*EuGerman */"Leider habe ich nicht die passenden&Zutaten auf Lager, daher ist dieser&Artikel gerade nicht lieferbar.", + // /*EuItalian*/"In realtà, questa pozione è esaurita&e non ho gli ingredienti per&prepararne altra. Mi spiace.", + /*EuEnglish*/"", + /*EuFrench */"", + /*EuSpanish*/"En realidad, no puedo conseguir&los ingredientes para esto, así que&no me queda más. Lo siento.", }, {QM_RED}, {}, {}, 0x0, false, false, MESSAGE_END_ENDLESS); } + CustomMessages::CreateMessageFromTextObject(messageID + 1, 0xFFFF, (0x3FFFFC00 | buyingPrice), 0xFF1301, shopIntro+">2"+Text{ /*English*/"#Buy&Don't Buy#",