Skip to content

Commit

Permalink
Version 1.3.0 RC (#50)
Browse files Browse the repository at this point in the history
* Bug Fixes & New Things

- Adjusts text on Kokiri Sword item obtain message to have proper capitalization
- Adjust Vanilla & No Logic fills to respect starting inventory, excluded locations, and generate hints (only no logic)
- Renames Circus Leader Mask to Troupe Leader Mask
- Adjusts name of Ocean Spider House Reward to no longer include "Day 1" as in 3D it can be obtained any day
- Adds overrides for Heart Containers from bosses
- Adds Giants Mask back into randomization logic
- Adds Deku Mask requirement to the North Clock Town Great Fairy Deku check
- Adds Bunny Hood to Postman Game check (will add trick later to not require it)
- Adds Seahorse to all Pinnacle Rock checks (No longer need to navigate the murky water without a guide (likely will add trick later for doing the maze without the seahorse))
- Adjusts a few logical helpers as they only accounted for one bottle not any
- Adjusts Gold Dust and Mystery Milk to be considered Quest Items during placement (ensures they will be placed in a location available on day 1)
- Adds option in dungeon settings for shuffling Heart Containers

* Update Z3DR to bring in patch features.

* Include chest size option for contents.

---------

Co-authored-by: Tacoman369 <[email protected]>
  • Loading branch information
PhlexPlexico and Tacoman369 authored Feb 19, 2024
1 parent 356514f commit db09533
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 57 deletions.
2 changes: 1 addition & 1 deletion source/custom_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void CreateBaselineCustomMessages() {

// Kokiri Sword
CreateMessage(0x0037, 0xFFFF, 0x3FFFFFFF, 0xFF0000,
"You got the #kokiri sword!# The trusty sword you're familiar with. A treasure from Kokiri Forest.",
"You got the #Kokiri Sword!# The trusty sword you're familiar with. A treasure from Kokiri Forest.",
{QM_GREEN, QM_RED}, {}, {}, 0x0, false, false);

// Ice Trap
Expand Down
70 changes: 45 additions & 25 deletions source/fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ std::vector<LocationKey> GetAccessibleLocations(const std::vector<LocationKey>&
}
return {};
}

erase_if(accessibleLocations, [&allowedLocations](LocationKey loc) {
for (LocationKey allowedLocation : allowedLocations) {
if (loc == allowedLocation || Location(loc)->GetPlacedItemKey() != NONE) {
Expand All @@ -247,6 +247,7 @@ std::vector<LocationKey> GetAccessibleLocations(const std::vector<LocationKey>&
}
return true;
});

return accessibleLocations;

}
Expand Down Expand Up @@ -731,11 +732,14 @@ static void RandomizeLinksPocket() {

int VanillaFill() {
//Perform minimum needed initialization
AreaTable_Init();
CitraPrint("Starting VanillaFill\n");
AreaTable_Init(); //Reset the world graph to intialize the proper locations
ItemReset(); //Reset shops incase of shopsanity random
GenerateLocationPool();
GenerateItemPool();
GenerateStartingInventory();
//Place vanilla item in each location
RemoveStartingItemsFromPool();
FillExcludedLocations();
RandomizeDungeonRewards();
for (LocationKey loc : allLocations) {
Location(loc)->PlaceVanillaItem();
Expand All @@ -747,42 +751,58 @@ int VanillaFill() {
// printf("\x1b[7;32HDone");
//}
//Finish up
GeneratePlaythrough();
printf("Done");
printf("\x1b[9;10HCalculating Playthrough...");
PareDownPlaythrough();
printf("Done");
printf("\x1b[10;10HCalculating Way of the Hero...");
CalculateWotH();
printf("Done");
CitraPrint("Creating Item Overrides");
CreateItemOverrides();
//CreateEntranceOverrides();
//CreateAlwaysIncludedMessages();
// CreateEntranceOverrides();
// CreateAlwaysIncludedMessages();
if (GossipStoneHints.IsNot(rnd::GossipStoneHintsSetting::HINTS_NO_HINTS)) {
printf("\x1b[11;10HCreating Hints...");
CreateAllHints();
printf("Done");
}

return 1;
}

int NoLogicFill() {
CitraPrint("StartingNoLogicFill\n");
AreaTable_Init(); //Reset the world graph to intialize the proper locations
ItemReset(); //Reset shops incase of shopsanity random
GenerateLocationPool();
GenerateItemPool();
GenerateStartingInventory();
RemoveStartingItemsFromPool();
FillExcludedLocations();
RandomizeDungeonRewards();
std::vector<ItemKey> remainingPool = FilterAndEraseFromPool(ItemPool, [](const ItemKey i) {return true;});
FastFill(remainingPool, GetAllEmptyLocations(), false);
GeneratePlaythrough();
//Successful placement, produced beatable result
//if (playthroughBeatable && !placementFailure) {
// printf("Done");
// printf("\x1b[9;10HCalculating Playthrough...");
// PareDownPlaythrough();
// CalculateWotH();
// printf("Done");
CreateItemOverrides();
// CreateEntranceOverrides();
// CreateAlwaysIncludedMessages();
/*if (GossipStoneHints.IsNot(HINTS_NO_HINTS)) {
printf("\x1b[10;10HCreating Hints...");
CreateAllHints();
printf("Done");
}
if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) {
CreateMerchantsHints();
}*/
//}
return 1;
printf("Done");
printf("\x1b[9;10HCalculating Playthrough...");
PareDownPlaythrough();
printf("Done");
printf("\x1b[10;10HCalculating Way of the Hero...");
CalculateWotH();
printf("Done");
CitraPrint("Creating Item Overrides");
CreateItemOverrides();
// CreateEntranceOverrides();
// CreateAlwaysIncludedMessages();
if (GossipStoneHints.IsNot(rnd::GossipStoneHintsSetting::HINTS_NO_HINTS)) {
printf("\x1b[11;10HCreating Hints...");
CreateAllHints();
printf("Done");
}

return 1;
}


Expand Down
2 changes: 1 addition & 1 deletion source/hints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static std::vector<LocationKey> GetAccessibleGossipStones(const LocationKey hint
auto accessibleGossipStones = GetAccessibleLocations(gossipStoneLocations);
//Give the item back to the location
Location(hintedLocation)->SetPlacedItem(originalItem);

return accessibleGossipStones;
}

Expand Down
6 changes: 3 additions & 3 deletions source/item_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void ItemTable_Init() { //repeatable denotes that an item in a vanilla playth
itemTable[DON_GEROS_MASK] = Item(true, false, &DonGerosMask, Text{"Don Gero's Mask", "Masque de Don Gero", "Máscara de Don Gero"}, DON_GEROS_MASK, (u32)GetItemID::GI_MASK_DON_GEROS, ITEMTYPE_MASK );
itemTable[MASK_OF_SCENTS] = Item(true, false, &MaskOfScents, Text{"Mask of Scents", "Masque des Senteurs", "Máscara de aromas"}, MASK_OF_SCENTS, (u32)GetItemID::GI_MASK_OF_SCENTS, ITEMTYPE_MASK );
itemTable[ROMANIS_MASK] = Item(true, false, &RomanisMask, Text{"Romani's Mask", "Masque de Romani", "Máscara de Romani"}, ROMANIS_MASK, (u32)GetItemID::GI_MASK_ROMANIS, ITEMTYPE_MASK );
itemTable[CIRCUS_LEADERS_MASK] = Item(true, false, &CircusLeadersMask, Text{"Circus Leader's Mask", "Masque de chef de cirque", "Máscara de lider de circo"}, CIRCUS_LEADERS_MASK, (u32)GetItemID::GI_MASK_TROUPE_LEADERS, ITEMTYPE_MASK );
itemTable[CIRCUS_LEADERS_MASK] = Item(true, false, &CircusLeadersMask, Text{"Troupe Leader's Mask", "Masque de chef de troupe", "Máscara de lider de troupe"}, CIRCUS_LEADERS_MASK, (u32)GetItemID::GI_MASK_TROUPE_LEADERS, ITEMTYPE_MASK );
itemTable[KAFEIS_MASK] = Item(true, false, &KafeisMask, Text{"Kafei's Mask", "Masque de Kafei", "Máscara de Kafei"}, KAFEIS_MASK, (u32)GetItemID::GI_MASK_KAFEIS, ITEMTYPE_MASK );
itemTable[COUPLES_MASK] = Item(true, false, &CouplesMask, Text{"Couple's Mask", "Masque de couple", "Máscara de pareja"}, COUPLES_MASK, (u32)GetItemID::GI_MASK_COUPLES, ITEMTYPE_MASK );
itemTable[KAMAROS_MASK] = Item(true, false, &KamarosMask, Text{"Kamaro's Mask", "Masque de Kamaro", "Máscara de Kamaro"}, KAMAROS_MASK, (u32)GetItemID::GI_MASK_KAMARAOS, ITEMTYPE_MASK );
Expand Down Expand Up @@ -94,9 +94,9 @@ void ItemTable_Init() { //repeatable denotes that an item in a vanilla playth
itemTable[EMPTY_BOTTLE] = Item(true, false, &HasBottle, Text{"Empty Bottle", "Flacon vide", "Botella vacía" }, EMPTY_BOTTLE, (u32)GetItemID::GI_BOTTLE_EMPTY, ITEMTYPE_ITEM);
itemTable[BOTTLE_WITH_MILK] = Item(true, false, &AlienBottle, Text{"Bottle with Milk", "Flacon de lait", "Botella de leche Lon Lon"}, BOTTLE_WITH_MILK, (u32)GetItemID::GI_BOTTLE_MILK, ITEMTYPE_ITEM);
itemTable[BOTTLE_WITH_RED_POTION] = Item(true, false, &WitchBottle, Text{"Bottle with Red Potion", "Flacon de potion rouge", "Botella de poción roja"}, BOTTLE_WITH_RED_POTION, (u32)GetItemID::GI_BOTTLE_POTION_RED, ITEMTYPE_ITEM);
itemTable[GOLD_DUST] = Item(true, true, &GoronRaceBottle, Text{"Gold Dust", "Poudre d'Or", "Polvo de Oro" }, GOLD_DUST, (u32)GetItemID::GI_BOTTLE_GOLD_DUST, ITEMTYPE_ITEM);
itemTable[GOLD_DUST] = Item(true, true, &GoronRaceBottle, Text{"Gold Dust", "Poudre d'Or", "Polvo de Oro" }, GOLD_DUST, (u32)GetItemID::GI_BOTTLE_GOLD_DUST, ITEMTYPE_QUEST);
itemTable[CHATEAU_ROMANI] = Item(true, false, &ChateauBottle, Text{"Chateau Romani", "Chateau Romani", "Reserva Romani" }, CHATEAU_ROMANI, (u32)GetItemID::GI_BOTTLE_CHATEAU_ROMANI, ITEMTYPE_ITEM);
itemTable[BOTTLE_WITH_MYSTERY_MILK] = Item(true, true, &MysteryMilkBottle, Text{"Bottle with Mystery Milk", "Bottle with Mystery Milk", "Bottle with Mystery Milk"}, BOTTLE_WITH_MYSTERY_MILK, (u32)GetItemID::GI_BOTTLE_MYSTERY_MILK, ITEMTYPE_ITEM);
itemTable[BOTTLE_WITH_MYSTERY_MILK] = Item(true, true, &MysteryMilkBottle, Text{"Bottle with Mystery Milk", "Bottle with Mystery Milk", "Bottle with Mystery Milk"}, BOTTLE_WITH_MYSTERY_MILK, (u32)GetItemID::GI_BOTTLE_MYSTERY_MILK, ITEMTYPE_QUEST);
//Other bottle items
itemTable[DEKU_PRINCESS] = Item(true, true, &DekuPrincess, Text{"Deku Princess", "Princesse Mojo", "Princesa Deku"}, DEKU_PRINCESS, (u32)GetItemID::GI_DEKU_PRINCESS_FAIRY, ITEMTYPE_ITEM);
itemTable[BOTTLE_WITH_GREEN_POTION] = Item(false, false, &HasBottle, Text{"Bottle with Green Potion", "Flacon de potion verde", "Botella de poción verte"}, BOTTLE_WITH_GREEN_POTION, (u32)GetItemID::GI_POTION_GREEN, ITEMTYPE_ITEM);
Expand Down
14 changes: 7 additions & 7 deletions source/item_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void LocationTable_Init() {
locationTable[GORON_VILLAGE_LEDGE_SPRING] = ItemLocation::Collectable(0x48, 0x00, false, "GV Piece of Heart (Spring)", GORON_VILLAGE_LEDGE_SPRING, PIECE_OF_HEART, {Category::cGoronVillage, Category::cVanillaHeartPiece,Category::cDayOne}, SpoilerCollectionCheckGroup::GROUP_GORON_VILLAGE );

//Great Bay Coast
locationTable[GBC_OCEAN_SPIDER_DAY1] = ItemLocation::Base (0x28, 0x48, false, "OSH Day 1 Reward", GBC_OCEAN_SPIDER_DAY1, PROGRESSIVE_WALLET, {Category::cGreatBayCoast ,Category::cDayOne}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_GREAT_BAY_COAST );
locationTable[GBC_OCEAN_SPIDER_DAY1] = ItemLocation::Base (0x28, 0x48, false, "OSH Reward", GBC_OCEAN_SPIDER_DAY1, PROGRESSIVE_WALLET, {Category::cGreatBayCoast ,Category::cDayOne}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_GREAT_BAY_COAST );
//locationTable[GBC_OCEAN_SPIDER_DAY2] = ItemLocation::Base (0x28, 0x00, true, "OSH Day 2 Reward", GBC_OCEAN_SPIDER_DAY2, PURPLE_RUPEE, {Category::cGreatBayCoast ,Category::cDayTwo}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_GREAT_BAY_COAST );
//locationTable[GBC_OCEAN_SPIDER_DAY3] = ItemLocation::Base (0x28, 0x00, true, "OSH Day 3 Reward", GBC_OCEAN_SPIDER_DAY3, RED_RUPEE, {Category::cGreatBayCoast,Category::cDayThree}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_GREAT_BAY_COAST );
locationTable[GBC_FISHERMAN_GAME] = ItemLocation::Base (0x37, 0x0C, false, "GBC Fisherman's Game", GBC_FISHERMAN_GAME, PIECE_OF_HEART, {Category::cGreatBayCoast, Category::cMinigame,Category::cDayOne}, SpoilerCollectionCheck::ItemGetInf(0), SpoilerCollectionCheckGroup::GROUP_GREAT_BAY_COAST );
Expand Down Expand Up @@ -507,10 +507,10 @@ void LocationTable_Init() {
/*-------------------------------
---HEART CONTAINERS ---
-------------------------------*/
locationTable[ODOLWA_HEART_CONTAINER] = ItemLocation::Base (0x1F, 0x00, false, "Woodfall Temple Odolwa Heart Container", ODOLWA_HEART_CONTAINER, HEART_CONTAINER, {Category::cWoodfall, Category::cWoodfallTemple,Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_WOODFALL_TEMPLE );
locationTable[GOHT_HEART_CONTAINER] = ItemLocation::Base (0x44, 0x00, false, "Snowhead Temple Goht Heart Container", GOHT_HEART_CONTAINER, HEART_CONTAINER, {Category::cSnowhead, Category::cSnowheadTemple, Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_SNOWHEAD_TEMPLE );
locationTable[GYORG_HEART_CONTAINER] = ItemLocation::Base (0x5F, 0x00, false, "Great Bay Temple Gyorg Heart Container", GYORG_HEART_CONTAINER, HEART_CONTAINER, {Category::cZoraCape, Category::cGreatBayTemple, Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_GREAT_BAY );
locationTable[TWINMOLD_HEART_CONTAINER] = ItemLocation::Base (0x36, 0x00, false, "Stone Tower Temple Twinmold Heart Container", TWINMOLD_HEART_CONTAINER, HEART_CONTAINER, {Category::cStoneTower, Category::cStoneTowerTemple,Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_STONE_TOWER );
locationTable[ODOLWA_HEART_CONTAINER] = ItemLocation::Base (0x1F, 0x0D, false, "Woodfall Temple Odolwa Heart Container", ODOLWA_HEART_CONTAINER, HEART_CONTAINER, {Category::cWoodfall, Category::cWoodfallTemple,Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_WOODFALL_TEMPLE );
locationTable[GOHT_HEART_CONTAINER] = ItemLocation::Base (0x44, 0x0D, false, "Snowhead Temple Goht Heart Container", GOHT_HEART_CONTAINER, HEART_CONTAINER, {Category::cSnowhead, Category::cSnowheadTemple, Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_SNOWHEAD_TEMPLE );
locationTable[GYORG_HEART_CONTAINER] = ItemLocation::Base (0x5F, 0x0D, false, "Great Bay Temple Gyorg Heart Container", GYORG_HEART_CONTAINER, HEART_CONTAINER, {Category::cZoraCape, Category::cGreatBayTemple, Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_GREAT_BAY );
locationTable[TWINMOLD_HEART_CONTAINER] = ItemLocation::Base (0x36, 0x0D, false, "Stone Tower Temple Twinmold Heart Container", TWINMOLD_HEART_CONTAINER, HEART_CONTAINER, {Category::cStoneTower, Category::cStoneTowerTemple,Category::cBossHeart, Category::cDungeonReward,Category::cDayOne}, SpoilerCollectionCheck::Collectable(0x00,0x00), SpoilerCollectionCheckGroup::GROUP_DUNGEON_STONE_TOWER );

/*-------------------------------
--- COWS ---
Expand Down Expand Up @@ -1132,11 +1132,11 @@ void LocationReset() {

for (LocationKey il : dungeonRewardLocations) {
Location(il)->RemoveFromPool();
}
}*/

for (LocationKey il : gossipStoneLocations) {
Location(il)->RemoveFromPool();
}*/
}

// Something's still missing from allLocations, IDK what though and this fixes it
for (LocationKey il = LINKS_POCKET; il <= OSH_COLORED_SKULLS_POT; il++) {
Expand Down
8 changes: 2 additions & 6 deletions source/item_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static void PlaceVanillaSongs() {
};

// TODO: Change back to 18 when the override value is correct.
const std::array<ItemKey, 17> maskList = {
const std::array<ItemKey, 18> maskList = {
KEATON_MASK,
BUNNY_HOOD,
POSTMANS_HAT,
Expand All @@ -303,7 +303,7 @@ const std::array<ItemKey, 17> maskList = {
GIBDOS_MASK,
GAROS_MASK,
CAPTAINS_HAT,
// GIANTS_MASK, // TODO: Add this back in after the override is completed.
GIANTS_MASK,
MASK_OF_TRUTH,
};

Expand Down Expand Up @@ -894,10 +894,6 @@ void GenerateItemPool() {

//temp placement until shopsanity works
PlaceItemInLocation(SOUTHERN_SWAMP_SCRUB_PURCHASE, MAGIC_BEAN);

// TODO: Remove these once overrides are fixed.
PlaceItemInLocation(STONE_TOWER_TEMPLE_GIANTS_MASK_CHEST, GIANTS_MASK);


//Place Temp Items at alt locations so they don't get filled with important stuff - will be replaced later
PlaceItemInLocation(SOUTHERN_SWAMP_KOTAKE_IN_WOODS, BLUE_RUPEE);
Expand Down
Loading

0 comments on commit db09533

Please sign in to comment.