Skip to content

Commit

Permalink
Tokensanity (#108)
Browse files Browse the repository at this point in the history
* TokenSanity Logic

- Adds Tokensanity option in settings
- Adjusts GetItemIDs for Swamp and Ocean Skulltula Tokens
- Adjusts Logic to account for Tokensanity
- Adjusts "Flag" value for Skulltula Locations

* Token Messages

- Moves message creation for Tingle Item Text to hopefully remediate issue where it does not match what he sells
- Adjust colors on dungeon items to be dungeon colored
- Adds Messages for Skulltula Tokens to differentiate between Swamp and Ocean and display proper count
- Hides Zora Eggs and Deku Princess from spoiler log as they're not a collectable check
- Updates MM3DR

---------

Co-authored-by: Phlex <[email protected]>
  • Loading branch information
Tacoman369 and PhlexPlexico authored Jul 29, 2024
1 parent 0d59ddb commit 84cbb0c
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 129 deletions.
35 changes: 23 additions & 12 deletions source/custom_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,61 +64,61 @@ void CreateBaselineCustomMessages() {
// Woodfall
CreateMessage(0x6133, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got a #small key# for the #Woodfall Temple#! Use it to open a locked door in that temple.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_GREEN}, {}, {}, 0x0, false, false);
// Snowhead
CreateMessage(0x6134, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got a #small key# for the #Snowhead Temple#! Use it to open a locked door in that temple.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_MAGENTA}, {}, {}, 0x0, false, false);
// Great Bay
CreateMessage(0x6135, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got a #small key# for the #Great Bay Temple#! Use it to open a locked door in that temple.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_CYAN}, {}, {}, 0x0, false, false);
// Stone Tower
CreateMessage(0x6136, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got a #small key# for the #Stone Tower Temple#! Use it to open a locked door in that temple.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_YELLOW}, {}, {}, 0x0, false, false);

// Maps
// Woodfall
CreateMessage(0x6137, 0x003E, 0x3FFFFFFF, 0xFF0000,
"You found the #dungeon map# for the #Woodfall#!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_GREEN}, {}, {}, 0x0, false, false);

// Snowhead
CreateMessage(0x6138, 0x003E, 0x3FFFFFFF, 0xFF0000,
"You found the #dungeon map# for the #Snowhead#!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_MAGENTA}, {}, {}, 0x0, false, false);

// Great Bay
CreateMessage(0x6139, 0x003E, 0x3FFFFFFF, 0xFF0000,
"You found the #dungeon map# for the #Great Bay#!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_CYAN}, {}, {}, 0x0, false, false);

// Stone Tower
CreateMessage(0x613A, 0x003E, 0x3FFFFFFF, 0xFF0000,
"You found the #dungeon map# for the #Stone Tower#!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_YELLOW}, {}, {}, 0x0, false, false);

// Compasses
// Woodfall
CreateMessage(0x613B, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got the #compass# for the #Woodfall Temple#! Now many of the dungeon's hidden things will appear on the map!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_GREEN}, {}, {}, 0x0, false, false);

// Snowhead
CreateMessage(0x613C, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got the #compass# for the #Snowhead Temple#! Now many of the dungeon's hidden things will appear on the map!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_MAGENTA}, {}, {}, 0x0, false, false);

// Great Bay
CreateMessage(0x613D, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got the #compass# for the #Great Bay Temple#! Now many of the dungeon's hidden things will appear on the map!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_CYAN}, {}, {}, 0x0, false, false);

// Stone Tower
CreateMessage(0x613E, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got the #compass# for the #Stone Tower Temple#! Now many of the dungeon's hidden things will appear on the map!",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);
{QM_GREEN, QM_YELLOW}, {}, {}, 0x0, false, false);

// Boss Keys
// Woodfall
Expand Down Expand Up @@ -150,6 +150,17 @@ void CreateBaselineCustomMessages() {
CreateMessage(0x0012, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
" #FOOL!#",
{QM_RED}, {}, {}, 0x0, false, false);

//Swamp Skulltula Tokens
CreateMessage(0x0052, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got a #Swamp Skulltula Token#! &You have collected #=SSH#.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);

//Ocean Skulltula Tokens
CreateMessage(0x6143, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got an #Ocean Skulltula Token#! &You have collected #=OSH#.",
{QM_BLUE, QM_RED}, {}, {}, 0x0, false, false);

}

u32 NumMessages() {
Expand Down
46 changes: 46 additions & 0 deletions source/hints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,4 +551,50 @@ void CreateAllHints() {
//Call the function one last time to get rid of false positives on locations not
//being reachable.
GetAccessibleLocations({});

// Create custom messages for Tingle items if we shuffled.
if (Settings::ShuffleTingleMaps.Is(true)) {
// Logic: Get item names from location.
// Create custom message for each tingle location (6)
std::string clockTownMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName().GetEnglish();
std::string woodfallMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName().GetEnglish();
std::string snowHeadMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName().GetEnglish();
std::string romaniMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName().GetEnglish();
std::string greatBayMap = ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName().GetEnglish();
std::string stoneTowerMap = ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D11, 0xFFFF, 0x3FF0A005, 0xFF1001,
clockTownMap.insert(0, "#").append("# #5 Rupees#&").append(woodfallMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
clockTownMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName().GetEnglish();
woodfallMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D12, 0xFFFF, 0x3FF0A014, 0xFF1001,
woodfallMap.insert(0, "#").append("# #20 Rupees#&").append(snowHeadMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
woodfallMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName().GetEnglish();
snowHeadMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D13, 0xFFFF, 0x3FF0A014, 0xFF1001,
snowHeadMap.insert(0, "#").append("# #20 Rupees#&").append(romaniMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
snowHeadMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName().GetEnglish();
romaniMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D14, 0xFFFF, 0x3FF0A014, 0xFF1001,
romaniMap.insert(0, "#").append("# #20 Rupees#&").append(greatBayMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
romaniMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName().GetEnglish();
greatBayMap = ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D15, 0xFFFF, 0x3FF0A014, 0xFF1001,
greatBayMap.insert(0, "#").append("# #20 Rupees#&").append(stoneTowerMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
greatBayMap = ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName().GetEnglish();
stoneTowerMap = ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName().GetEnglish();

CustomMessages::CreateMessage(0x1D16, 0xFFFF, 0x3FF0A014, 0xFF1001,
stoneTowerMap.insert(0, "#").append("# #20 Rupees#&").append(clockTownMap.insert(0, "#").c_str()).append("# #40 Rupees#").append("&#No thanks#").c_str(),
{QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false);
}
}
4 changes: 2 additions & 2 deletions source/item_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ void ItemTable_Init() { //repeatable denotes that an item in a vanilla playth
itemTable[FISHING_PASS] = Item(false, true, &noVariable, Text{"Fishing Pass", "Fishing Pass", "Fishing Pass"}, FISHING_PASS, 0xBA, ITEMTYPE_ITEM );
//
//Swamp Spider Tokens
itemTable[SWAMP_SKULLTULA_TOKEN] = Item(true, true, &SwampSkulltulaTokens, Text{"Swamp Skulltula Token", "Jeton de Skulltula dorée", "Símbolo de skulltula dorada" }, SWAMP_SKULLTULA_TOKEN, (u32)GetItemID::GI_GOLD_SKULLTULA_SPIRIT, ITEMTYPE_TOKEN);
itemTable[SWAMP_SKULLTULA_TOKEN] = Item(true, true, &SwampSkulltulaTokens, Text{"Swamp Skulltula Token", "Jeton de Skulltula dorée", "Símbolo de skulltula dorada" }, SWAMP_SKULLTULA_TOKEN, 0x44, ITEMTYPE_TOKEN);

//Oceanside Spider Tokens
itemTable[OCEANSIDE_SKULLTULA_TOKEN] = Item(true, true, &OceanSkulltulaTokens, Text{"Oceanside Skulltula Token", "Jeton de Skulltula dorée", "Símbolo de skulltula dorada" }, OCEANSIDE_SKULLTULA_TOKEN, (u32)GetItemID::GI_GOLD_SKULLTULA_SPIRIT, ITEMTYPE_TOKEN);
itemTable[OCEANSIDE_SKULLTULA_TOKEN] = Item(true, true, &OceanSkulltulaTokens, Text{"Oceanside Skulltula Token", "Jeton de Skulltula dorée", "Símbolo de skulltula dorada" }, OCEANSIDE_SKULLTULA_TOKEN, 0x6D, ITEMTYPE_TOKEN);

//Stray Fairies//

Expand Down
Loading

0 comments on commit 84cbb0c

Please sign in to comment.