summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2026-01-29 07:19:01 -0600
committerGitHub <noreply@github.com>2026-01-29 07:19:01 -0600
commitbfcb6047653d0766a070616dd02ba822aebc9a84 (patch)
treec9ebe8bc6ed4babcc3e6573d053aa22cf7f05e93
parentd80a5cf2e8b5bfefd83fb55f38afd4fee92097a5 (diff)
More metrics tweaks (#1514)
-rw-r--r--mm/2s2h/Rando/Logic/GeneratePools.cpp24
-rw-r--r--mm/2s2h/Rando/Menu.cpp6
2 files changed, 10 insertions, 20 deletions
diff --git a/mm/2s2h/Rando/Logic/GeneratePools.cpp b/mm/2s2h/Rando/Logic/GeneratePools.cpp
index fa8ce7b55..2900a1a61 100644
--- a/mm/2s2h/Rando/Logic/GeneratePools.cpp
+++ b/mm/2s2h/Rando/Logic/GeneratePools.cpp
@@ -278,9 +278,7 @@ void GeneratePools(RandoSaveInfo& saveInfo, std::vector<RandoCheckId>& checkPool
// Plentiful
if (saveInfo.randoSaveOptions[RO_PLENTIFUL_ITEMS] == RO_GENERIC_YES) {
- int replaceableItems = 0;
std::vector<RandoItemId> plentifulItems;
- std::vector<RandoItemId> potentialPlentifulItems;
for (size_t i = 0; i < itemPool.size(); i++) {
// The user can specify exactly how many pieces they want to shuffle, so skip those
if (itemPool[i] == RI_TRIFORCE_PIECE) {
@@ -295,31 +293,21 @@ void GeneratePools(RandoSaveInfo& saveInfo, std::vector<RandoCheckId>& checkPool
plentifulItems.push_back(itemPool[i]);
break;
case RITYPE_LESSER:
- case RITYPE_SKULLTULA_TOKEN:
- case RITYPE_STRAY_FAIRY:
- if (Ship_Random(0, 2) == 1) {
- potentialPlentifulItems.push_back(itemPool[i]);
+ if (Rando::StaticData::Items[itemPool[i]].itemId != ITEM_TINGLE_MAP &&
+ Rando::StaticData::Items[itemPool[i]].itemId != ITEM_DUNGEON_MAP &&
+ Rando::StaticData::Items[itemPool[i]].itemId != ITEM_COMPASS) {
+ plentifulItems.push_back(itemPool[i]);
}
break;
case RITYPE_HEALTH:
case RITYPE_JUNK:
default:
- replaceableItems++;
break;
}
}
- if (replaceableItems > plentifulItems.size()) {
- for (RandoItemId plentifulItem : plentifulItems) {
- itemPool.push_back(plentifulItem);
- }
- }
-
- // Only add potentialPlentifulItems if we think we have enough room (this might not be perfect)
- if ((replaceableItems - plentifulItems.size() - 10) > potentialPlentifulItems.size()) {
- for (RandoItemId plentifulItem : potentialPlentifulItems) {
- itemPool.push_back(plentifulItem);
- }
+ for (RandoItemId plentifulItem : plentifulItems) {
+ itemPool.push_back(plentifulItem);
}
}
diff --git a/mm/2s2h/Rando/Menu.cpp b/mm/2s2h/Rando/Menu.cpp
index ac250d2a9..fdbac9b62 100644
--- a/mm/2s2h/Rando/Menu.cpp
+++ b/mm/2s2h/Rando/Menu.cpp
@@ -209,10 +209,10 @@ void RefreshMetrics() {
setOfItemsInPool.insert(RI_TIME_NIGHT_3);
}
// If there are less checks than non-junk items, we can't balance
- if (checksInPool < (itemsInPool - junkInPool)) {
+ if (checksInPool * 0.9f < itemsInPool - junkInPool) {
balanceStatus = 2;
// If there are only slightly more checks than non-junk items, balancing is unlikely
- } else if (checksInPool < (itemsInPool - junkInPool) + 10) {
+ } else if (checksInPool * 0.85f < itemsInPool - junkInPool) {
balanceStatus = 1;
} else {
balanceStatus = 0;
@@ -319,6 +319,8 @@ static void DrawGeneralTab() {
float junkProgress = static_cast<float>(junkInPool) / static_cast<float>(itemsInPool);
ImGui::SeparatorText("Current Settings Metrics");
+ ImGui::TextWrapped("To ensure proper balancing, aim for the item pool to be at least 10%% smaller than the check "
+ "pool. (Not including junk items)");
ImGui::Text("Status:");
ImGui::SameLine();
if (balanceStatus == 0) {