forge icon indicating copy to clipboard operation
forge copied to clipboard

"The Enemy of My Enemy" story quest doesn't acknowledge castles that'd already been cleared

Open Vhati opened this issue 3 months ago • 3 comments

Describe the bug

In Shandalar, the main story cannot be completed if a castle boss was defeated prior to getting "The Enemy of My Enemy" quest.

I had already defeated the boss at the "Blue Castle" location before getting the quest. That quest has two objectives per castle: "Find the [color] Castle" and "Rescue the [color] Captive".

AFTER getting the quest, when I defeated bosses of the Black, Green, and White castles the narrator said there was no captive and ticked both objectives.

Yet despite revisiting the Blue castle, the quest only ticks off the "find" objective, not "captive".

The Blue Captive objective (quests.json) doesn't look unusual.

{ "id": 6, "name": "Rescue the Black Captive", "description": "Free the wizard being held captive inside the Black Castle.", "mapFlag": "Ch1BlackCastleComplete", "POITags": ["BiomeBlack", "Chapter1Boss"], "objective": "QuestFlag", "prerequisiteIDs": [ 1 ], "prologue": {}, "epilogue": {}, "allowInactivePOI": true }, { "id": 7, "name": "Rescue the Blue Captive", "description": "Free the wizard being held captive inside the Blue Castle.", "mapFlag": "Ch1BlueCastleComplete", "POITags": ["BiomeBlue", "Chapter1Boss"], "objective": "QuestFlag", "prerequisiteIDs": [ 2 ], "prologue": {}, "epilogue": {}, "allowInactivePOI": true },

Defeating the boss does set the "Ch1BlueCastleComplete" quest flag (blue_castle_f1.tmx).

<property name="defeatDialog">[{ "condition": [{"checkQuestFlag": "Ch1CastlesComplete", "not":true}], "text": "As you land your final blow against Lorthos, you feel a significant pulse of mana. But with the immediate threat removed, you can now see clearly that the locked room at the north end of the chamber does not hold any prisoners.", "options": [{   "name": "(Continue)",   "action": [     {"setQuestFlag": {"key":"Ch1BlueCastleComplete", "val": 1} },     {"deleteMapObject": -1},     {"advanceQuestFlag": "Ch1CastlesComplete"}   ] }] }, { "condition": [{"checkQuestFlag": "Ch1CastlesComplete"}], "text": "As you land your final blow against Lorthos, you feel a another pulse of mana. But just as before, the locked room behind your fallen foe does not hold any prisoners.", "options": [{   "name": "(Continue)",   "action": [     {"setQuestFlag": {"key":"Ch1BlueCastleComplete", "val": 1} },     {"deleteMapObject": -1},     {"advanceQuestFlag": "Ch1CastlesComplete"}   ] }] }]</property>

I don't know what (if anything) triggers quests to reassess flags. Defeating other castle bosses didn't make it acknowledge the blue one. This bug needs to be fixed in a way that triggers a reassessment to retroactively acknowledge defeated bosses.

{ "id": 6, "name": "Rescue the Black Captive", "description": "Free the wizard being held captive inside the Black Castle.", "mapFlag": "Ch1BlackCastleComplete", "POITags": ["BiomeBlack", "Chapter1Boss"], "objective": "QuestFlag", "prerequisiteIDs": [ 1 ], "prologue": {}, "epilogue": {}, "allowInactivePOI": true }, { "id": 7, "name": "Rescue the Blue Captive", "description": "Free the wizard being held captive inside the Blue Castle.", "mapFlag": "Ch1BlueCastleComplete", "POITags": ["BiomeBlue", "Chapter1Boss"], "objective": "QuestFlag", "prerequisiteIDs": [ 2 ], "prologue": {}, "epilogue": {}, "allowInactivePOI": true },

Another Bug

Every time I load a saved game, I get a message popup from the last quest I accepted. No matter where I am, after every load. In this case, it says, "Good luck" (quests.json). That happened with other quests, too. Not every quest, but the quests that do it, do it every time, presumably ones with a prologue (as seen at the link).

Operating System 2.0.07-snapshot-10.25 on Android 15.

/EDIT: Mentioned Shandalar.

Vhati avatar Nov 04 '25 21:11 Vhati

I'm unclear on "mapFlag" versus "setQuestFlag" for "Ch1BlueCastleComplete", but the other castles ticked their objectives okay with the same structure (after the quest was accepted).

So it's not like the engine is setting/checking a wrong kind of flag that happens to have the same name.

Vhati avatar Nov 04 '25 22:11 Vhati

In quests.json, the next stage of the quest would've directed me to visit "the spawn point at the center of the wastes" for answers. And it would've set the flag "mainQuest" = 3.

It turns out, that navigation hint was all I missed out on. The captive objectives were superfluous because the "Spawn" location dialogue (spawn.tmx) only checks whether 5 bosses were beaten. I don't think anything depends on "mainQuest" == 3.

So for now, anyone affected by this bug can simply go to the center, unprompted, after beating the castle bosses to progress the story.

Despite the "Spawn" dialogue saying "several difficult dungeons" were added to the map, "Emrakul's Castle" had already been there, and that's the only one it could've (incorrectly) meant. According to points_of_interest.json that location is activated when "mainQuest" == 2, which is set upon accepting "The Enemy of My Enemy" quest. That was the same value that activated the 5 color castle locations.

The "Emrakul Castle" location's early visibility could be another bug, a benign one. You can't get in the front door without the "Strange Key" that came with the mox from beating 5 castle bosses. OTOH, if the location had been restricted to "mainQuest" == 3, the captive bug would have prevented me from progressing to see the location at all.

Hm. If conditional locations are really implemented, maybe I couldn't have visited/beaten a castle prior to this quest like I thought??? The "Spawn" dialogue says the story's a work-in-progress, and you've reached the end it so far. Emrakul was still being redesigned 2 months ago.

Vhati avatar Nov 13 '25 18:11 Vhati

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

github-actions[bot] avatar Dec 21 '25 09:12 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Dec 26 '25 09:12 github-actions[bot]