add flag checking for more intuitve location marking

This commit is contained in:
gymnast86
2026-05-22 19:58:05 -07:00
parent ab007b4c44
commit 08ce522edb
28 changed files with 157 additions and 40 deletions
+1
View File
@@ -1747,6 +1747,7 @@ int daNpc_Aru_c::cutSpeakTo(int i_staffID) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = randomizer_getItemAtLocation("Herding Goats Reward");
randomizer_setTempFlagForLocation("Herding Goats Reward");
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
+1
View File
@@ -1008,6 +1008,7 @@ BOOL daNpcAshB_c::EvCut_Appear(int i_staffID) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_30[0] = verifyProgressiveItem(randomizer_getItemAtLocation("Ashei Sketch"));
randomizer_setTempFlagForLocation("Ashei Sketch");
}
#endif
mItemPartnerId =
+5 -2
View File
@@ -1806,10 +1806,13 @@ int daNpcChin_c::_Evt_GameSucceed_CutMain(const int& param_0) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (itemId1 == dItemNo_ARROW_LV2_e)
if (itemId1 == dItemNo_ARROW_LV2_e) {
itemId1 = randomizer_getItemAtLocation("STAR Prize 1");
else if (itemId1 == dItemNo_ARROW_LV3_e)
randomizer_setTempFlagForLocation("STAR Prize 1");
} else if (itemId1 == dItemNo_ARROW_LV3_e) {
itemId1 = randomizer_getItemAtLocation("STAR Prize 2");
randomizer_setTempFlagForLocation("STAR Prize 2");
}
}
#endif
fpc_ProcID itemId2 = fopAcM_createItemForPresentDemo(&current.pos, itemId1, 0, -1, -1,
+1
View File
@@ -1341,6 +1341,7 @@ void daNpc_Fairy_c::PresentDemoCall() {
// If we haven't visted this great fairy before, give the random item
if (randomizer_IsActive() && !daNpcT_chkEvtBit(505)) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Cave of Ordeals Great Fairy Reward"));
randomizer_setTempFlagForLocation("Cave of Ordeals Great Fairy Reward");
}
#endif
+1
View File
@@ -1688,6 +1688,7 @@ int daNpc_grO_c::talk(void* param_1) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Ebizo Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Ebizo Key Shard");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, itemId, 0, -1, -1, NULL, NULL);
+1
View File
@@ -1345,6 +1345,7 @@ int daNpc_grR_c::talk(void* param_1) {
#if TARGET_PC
if (randomizer_IsActive()) {
i_itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Liggs Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Liggs Key Shard");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, i_itemNo, 0, -1, -1, NULL, NULL);
+1
View File
@@ -1191,6 +1191,7 @@ int daNpc_grS_c::talk(void* param_0) {
#if TARGET_PC
if (randomizer_IsActive()) {
unkInt2 = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Amato Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Amato Key Shard");
}
#endif
mPresentItemId =
+2
View File
@@ -978,6 +978,7 @@ BOOL daNpcImpal_c::EvCut_ImpalAppear1(int i_cut_index) {
#if TARGET_PC
if (randomizer_IsActive()) {
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Charm"));
randomizer_setTempFlagForLocation("Ilia Charm");
}
#endif
mItemPartnerId =
@@ -1072,6 +1073,7 @@ BOOL daNpcImpal_c::EvCut_CopyRod(int i_cut_index) {
#if TARGET_PC
if (randomizer_IsActive()) {
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Skybook From Impaz"));
randomizer_setTempFlagForLocation("Skybook From Impaz");
}
#endif
mItemPartnerId =
+1
View File
@@ -1187,6 +1187,7 @@ int daNpc_Kkri_c::talk(void*) {
if (randomizer_IsActive()) {
if (item_no == dItemNo_OIL_BOTTLE3_e) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Bottle"));
randomizer_setTempFlagForLocation("Coro Bottle");
} /*else if (item_no == dItemNo_SMALL_KEY_e) { // Might be Small Key 2
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Gate Key"));
}*/
+1
View File
@@ -1243,6 +1243,7 @@ int daNpc_Len_c::talk(void* param_0) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_18 = verifyProgressiveItem(randomizer_getItemAtLocation("Renados Letter"));
randomizer_setTempFlagForLocation("Renados Letter");
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_18,
+5 -2
View File
@@ -967,10 +967,13 @@ int daNpc_Pouya_c::cutHaveFavorToAsk(int param_0) {
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (local_64 == dItemNo_Randomizer_DROP_BOTTLE_e)
if (local_64 == dItemNo_Randomizer_DROP_BOTTLE_e) {
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 20 Poe Soul Reward"));
else if (local_64 == dItemNo_Randomizer_SILVER_RUPEE_e)
randomizer_setTempFlagForLocation("Jovani 20 Poe Soul Reward");
} else if (local_64 == dItemNo_Randomizer_SILVER_RUPEE_e) {
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 60 Poe Soul Reward"));
randomizer_setTempFlagForLocation("Jovani 60 Poe Soul Reward");
}
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_64, 0,
+4 -4
View File
@@ -1322,8 +1322,8 @@ bool daNpcRafrel_c::talk(void* param_0) {
if (eventId == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
u8 itemId = randomizer_getItemAtLocation("Auru Gift To Fyer");
itemNo = verifyProgressiveItem(itemId);
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Auru Gift To Fyer"));
randomizer_setTempFlagForLocation("Auru Gift To Fyer");
}
#endif
field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
@@ -1580,8 +1580,8 @@ int daNpcRafrel_c::EvCut_Appear(int i_staffId) {
if (eventId == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
u8 itemId = randomizer_getItemAtLocation("Auru Gift To Fyer");
itemNo = verifyProgressiveItem(itemId);
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Auru Gift To Fyer"));
randomizer_setTempFlagForLocation("Auru Gift To Fyer");
}
#endif
field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
+1
View File
@@ -1168,6 +1168,7 @@ int daNpc_Uri_c::cutEndCarryTutorial(int param_1) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_48 = randomizer_getItemAtLocation("Uli Cradle Delivery");
randomizer_setTempFlagForLocation("Uli Cradle Delivery");
}
#endif
mItemPartnerId =
+1
View File
@@ -2924,6 +2924,7 @@ int daNpc_ykW_c::talk(void* param_0) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Snowpeak Ruins Mansion Map"));
randomizer_setTempFlagForLocation("Snowpeak Ruins Mansion Map");
}
#endif
mItemPartnerId =
+6 -2
View File
@@ -2611,10 +2611,14 @@ BOOL daNpc_zrA_c::ECut_thanksBlast(int i_staffID) {
if (mFlow.getEventId(&item_id) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (item_id == dItemNo_Randomizer_BOMB_IN_BAG_e)
if (item_id == dItemNo_Randomizer_BOMB_IN_BAG_e) {
item_id = verifyProgressiveItem(randomizer_getItemAtLocation("Iza Helping Hand"));
else if (item_id == dItemNo_Randomizer_BOMB_BAG_LV2_e)
randomizer_setTempFlagForLocation("Iza Helping Hand");
} else if (item_id == dItemNo_Randomizer_BOMB_BAG_LV2_e) {
item_id = verifyProgressiveItem(randomizer_getItemAtLocation("Iza Raging Rapids Minigame"));
randomizer_setTempFlagForLocation("Iza Raging Rapids Minigame");
}
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_id,
+1
View File
@@ -1691,6 +1691,7 @@ BOOL daNpc_zrC_c::ECut_earringGet(int i_staffID) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Gift From Ralis"));
randomizer_setTempFlagForLocation("Gift From Ralis");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
+1
View File
@@ -1742,6 +1742,7 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Rutelas Blessing"));
randomizer_setTempFlagForLocation("Rutelas Blessing");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
+5
View File
@@ -248,6 +248,11 @@ int daItemShield_c::initActionOrderGetDemo() {
daItemBase_c::hide();
fopAcM_orderItemEvent(this, 0, 0);
eventInfo.onCondition(dEvtCnd_CANGETITEM_e);
#if TARGET_PC
if (randomizer_IsActive()) {
randomizer_setTempFlagForLocation("Ordon Shield");
}
#endif
mItemId =
fopAcM_createItemForTrBoxDemo(&current.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), 0, 0);
JUT_ASSERT(682, mItemId != fpcM_ERROR_PROCESS_ID_e)
+5
View File
@@ -82,6 +82,11 @@ int daObjSword_c::initActionOrderGetDemo() {
hide();
fopAcM_orderItemEvent(this, 0, 0);
eventInfo.onCondition(8);
#if TARGET_PC
if (randomizer_IsActive()) {
randomizer_setTempFlagForLocation("Ordon Sword");
}
#endif
mProcID = fopAcM_createItemForTrBoxDemo(&current.pos, m_itemNo, -1, fopAcM_GetRoomNo(this),
NULL, NULL);
setStatus(1);
+3 -1
View File
@@ -521,10 +521,12 @@ int dMsgFlow_c::setNormalMsg(mesg_flow_node* i_flowNode_p, fopAc_ac_c* i_speaker
}
auto& flowItemOverrides = randomizer_GetContext().mFlowItemMessageOverrides;
if (flowItemOverrides.contains(key)) {
u8 itemId = verifyProgressiveItem(flowItemOverrides[key]);
u8 itemId = verifyProgressiveItem(flowItemOverrides[key].itemId);
msg_no = getItemMessageID(itemId);
// Store this itemId so that we can give the item when the textbox closes
g_randomizerState.mFlowMessageItemId = itemId;
// Set flag for tracker/AP
randomizer_setTempFlagForFLWOverride(key);
}
}
#endif
+6 -2
View File
@@ -711,21 +711,25 @@ u32 dMsgObject_c::getRevoMessageIndex(u32 param_1) {
if (randomizer_IsActive()) {
// Special case for Ilia Memory Reward Text (param_1 is msgId)
// If we're in the sanctuary cutscene where we get the reward, override the text.
// Otherwise the regular item text for the horse call would be overriden if we find it
// Otherwise, the regular item text for the horse call would be overridden if we find it
if (param_1 == 233 && playerIsInRoomStage(0, "R_SP109") && dComIfGp_getLayerNo() == 9) {
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Memory Reward"));
param_1 = getItemMessageID(itemId);
// Store this itemId so that we can give the item when the textbox closes
g_randomizerState.mFlowMessageItemId = itemId;
// Set flag for tracker/AP
randomizer_setTempFlagForLocation("Ilia Memory Reward");
} else {
// Else override the text if we have an override
u32 key = (dMsgObject_getGroupID() << 16) | param_1;
auto& flowItemOverrides = randomizer_GetContext().mFlowItemMessageOverrides;
if (flowItemOverrides.contains(key)) {
u8 itemId = verifyProgressiveItem(flowItemOverrides[key]);
u8 itemId = verifyProgressiveItem(flowItemOverrides[key].itemId);
param_1 = getItemMessageID(itemId);
// Store this itemId so that we can give the item when the textbox closes
g_randomizerState.mFlowMessageItemId = itemId;
// Set flag for tracker/AP
randomizer_setTempFlagForFLWOverride(key);
}
}
}
+3 -7
View File
@@ -911,13 +911,9 @@ int dShopSystem_c::seq_start(fopAc_ac_c* actor, dMsgFlow_c* i_flow) {
if (mFlow.getEventId(&itemNo) == 1) {
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
// In rando, override the item if it's one of our unique shop checks
if (randomizer_IsActive()) {
switch (itemNo) {
case dItemNo_Randomizer_HALF_MILK_BOTTLE_e:
itemNo = randomizer_getItemAtLocation("Ordon Cat Rescue");
break;
}
// In rando, override the cat rescue item
if (randomizer_IsActive() && itemNo == dItemNo_Randomizer_HALF_MILK_BOTTLE_e) {
itemNo = randomizer_getItemAtLocation("Ordon Cat Rescue");
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1,