update tracker flags for various locations

This commit is contained in:
gymnast86
2026-05-24 19:12:10 -07:00
parent 143b548102
commit 580b772c3c
5 changed files with 32 additions and 7 deletions
+2
View File
@@ -4089,6 +4089,8 @@ void daB_DS_c::executeBattle2Dead() {
// Give the boss item
u8 agDungeonReward = randomizer_getItemAtLocation("Arbiters Grounds Dungeon Reward");
g_randomizerState.addItemToEventQueue(agDungeonReward);
// Set custom item flag
dComIfGs_onItem(0x9E, -1);
}
#endif
/* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
+2
View File
@@ -224,6 +224,8 @@ int daObjLife_c::create() {
} else if (getStageID() == Ook) {
// Special case for Gale Boomerang check
itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Forest Temple Gale Boomerang"));
// Set rando custom collection flag
dComIfGs_onItem(0x9D, -1);
} else {
u8 flag = getSaveBitNo();
u8 stageIdx = getStageID();
@@ -781,10 +781,17 @@ static void randomizer_setTempFlag(RandomizerContext::itemLocationData data) {
// If stage is 0xFF, then this is an event flag
if (data.stage == 0xFF) {
g_randomizerState.mTrackerTempEventFlag = data.flag;
} else {
}
// If it's less than 0x80 then it's a switch flag
else if (data.flag < 0x80) {
g_randomizerState.mTrackerTempSwitchFlag.stage = getStageSaveId(data.stage);
g_randomizerState.mTrackerTempSwitchFlag.flag = data.flag;
}
// Otherwise it's an item flag. Currently, any item flags that go through here are custom
// so we just set the bit directly.
else {
dComIfGs_onItem(data.flag, getStageSaveId(data.stage));
}
}
void randomizer_setTempFlagForLocation(const std::string& locationName) {
@@ -1061,6 +1068,9 @@ RandomizerContext WriteSeedData(randomizer::logic::world::World* world) {
} else if (metaData["Switch Flag"]) {
itemData.stage = metaData["Switch Flag"]["Stage"].as<u8>();
itemData.flag = metaData["Switch Flag"]["Flag"].as<u8>();
} else if (metaData["Item Flag"]) {
itemData.stage = metaData["Item Flag"]["Stage"].as<u8>();
itemData.flag = metaData["Item Flag"]["Flag"].as<u8>();
}
};
+6 -1
View File
@@ -504,6 +504,11 @@ bool isLocationObtained(randomizer::logic::location::Location* location) {
auto stageId = getStageSaveId(switchFlagNode["Stage"].as<u8>());
return tracker_isStageSwitch(stageId, flag);
}
if (auto& itemFlagNode = locationMeta["Item Flag"]) {
auto flag = itemFlagNode["Flag"].as<u8>();
auto stageId = getStageSaveId(itemFlagNode["Stage"].as<u8>());
return tracker_isStageItem(stageId, flag);
}
return false;
}
@@ -546,7 +551,7 @@ int getLocationItem(randomizer::logic::location::Location* location) {
return context.mSkyCharacterOverrides[key];
}
if (auto& bugRewardNode = locationMeta["Bug Reward"]) {
u8 bugItemId = bugRewardNode["Item Id"].as<u8>();
u8 bugItemId = bugRewardNode[0]["Item Id"].as<u8>();
return context.mBugRewardOverrides[bugItemId];
}
@@ -4790,9 +4790,9 @@
Metadata:
Name Lookup:
- Forest Temple Gale Boomerang
Switch Flag:
Item Flag:
Stage: 8
Flag: 0x59
Flag: 0x9D
- Name: Forest Temple Big Key Chest
Original Item: Forest Temple Big Key
@@ -4890,7 +4890,9 @@
FLW Message:
- Group: 5
Message Id: 5001
Event Flag: 0x0602 # late
Item Flag:
Stage: 7
Flag: 0x9E
# GORON MINES
@@ -5754,7 +5756,9 @@
Metadata:
Name Lookup:
- Arbiters Grounds Dungeon Reward
Event Flag: 0x2010
Item Flag:
Stage: 25
Flag: 0x9E
# SNOWPEAK RUINS
@@ -6278,7 +6282,9 @@
FLW Message:
- Group: 5
Message Id: 9401
Event Flag: 0x2004
Item Flag:
Stage: 10
Flag: 0x9E
# CITY IN THE SKY