Enemy Of My Enemy Quest Bug & Load Pop-ups

by Admin 43 views
The Enemy of My Enemy Quest: Bugged Castles and Recurring Pop-ups

Hey everyone! Let's dive into a couple of annoying bugs that can crop up in the "The Enemy of My Enemy" questline. Specifically, we're talking about castles that don't register as cleared and those persistent prologue pop-ups that just won't quit. If you've run into these, you're definitely not alone, and hopefully, this breakdown will shed some light on what's happening.

The Unacknowledged Castles

So, here's the deal: The core issue revolves around the "The Enemy of My Enemy" quest. If you're like me and enjoy a bit of early exploration, you might've cleared a castle or two before actually picking up the quest. This is where the trouble starts. The quest has two objectives per castle: "Find the [color] Castle" and "Rescue the [color] Captive". For castles cleared after getting the quest, things usually go smoothly. You beat the boss, the narrator chimes in about the lack of a captive, and both objectives get ticked off. However, the game seems to have a hiccup when it comes to recognizing castles you've already conquered.

The Blue Castle Blues

Let's focus on the Blue Castle as an example. Imagine you stormed the Blue Castle, defeated the boss, and then later got the "The Enemy of My Enemy" quest. Now, when you revisit the Blue Castle, the quest only acknowledges that you've found it, but it doesn't register the rescue of the captive. This is a problem because it halts your progress in the questline. Looking at the quest data (quests.json), the "Rescue the Blue Captive" objective doesn't seem to have any obvious issues. It has an ID of 7, a description of freeing the wizard, and is linked to the "Ch1BlueCastleComplete" flag. The game does set this flag when you defeat the boss in the Blue Castle (blue_castle_f1.tmx). The problem, it seems, is that the quest doesn't reassess this flag retroactively. Defeating other castle bosses doesn't trigger it to acknowledge the Blue Castle.

Why This Matters

The inability of the quest to recognize previously cleared castles is a significant roadblock. It prevents players from completing the main story and enjoying the full game experience. It's crucial to find a solution that triggers a reassessment of these flags, retroactively acknowledging the defeated bosses. We need the game to say, "Okay, you already did this, let's mark it as complete!"

Digging Deeper into the Code

To understand why this is happening, let's examine the relevant snippets from the game's files:

quests.json Snippet:

{
  "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
}

This section defines the objectives for rescuing captives. Each objective is associated with a specific castle and a corresponding quest flag. The "objective": "QuestFlag" indicates that the completion of the objective depends on the state of the specified quest flag.

blue_castle_f1.tmx Snippet:

<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": [{"": "(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": [{"": "(Continue)", "action": [{"setQuestFlag": {"key": "Ch1BlueCastleComplete", "val": 1} }, {"deleteMapObject": -1}, {"advanceQuestFlag": "Ch1CastlesComplete"}]}]}]</property>

This XML snippet defines the dialog that appears after defeating the boss in the Blue Castle. The key part is the <property name="defeatDialog"> section. This section sets the "Ch1BlueCastleComplete" quest flag to 1, indicating that the Blue Castle has been cleared. However, this only happens when you defeat the boss within the map.

Possible Solutions

Here are a few potential approaches to fix this issue:

  1. Retroactive Flag Check: Implement a system that, upon accepting the "The Enemy of My Enemy" quest, checks for pre-existing castle completion flags (e.g., "Ch1BlueCastleComplete"). If a flag is already set, the corresponding objective should be marked as complete.
  2. Re-trigger Mechanism: Add a mechanism that allows players to re-trigger the boss fight or a similar event in previously cleared castles. This would allow the game to properly register the completion of the objectives.
  3. Quest Modification: Modify the quest to directly check for the castle completion flags instead of relying on the defeat dialog. This would ensure that the quest recognizes castles cleared before or after accepting the quest.

The Case of the Recurring Prologue Pop-ups

Now, let's shift gears to another annoying bug: the recurring prologue pop-ups. Every time you load a saved game, you're greeted with a message from the last quest you accepted. It doesn't matter where you are or what you're doing; that darn pop-up just keeps coming back. In the reported case, it's the "Good luck" message (quests.json).

Why This Happens

The issue likely stems from how the game handles quest prologues and save data. It seems that the prologue message is being stored in the save file and re-triggered every time the game loads. This is particularly common with quests that have a prologue defined in the quests.json file.

A Closer Look at the Code

To understand this bug, let's look at the quest definition in quests.json:

{
  "id": ..., 
  "prologue": {
      "text": "Good luck!",
      "...":
   }
}

The presence of the "prologue" section is the culprit. It defines the message that is displayed when the quest is accepted. The problem is that this message is being re-triggered on every game load.

Potential Solutions

Here are some approaches to address this bug:

  1. Flag-Based Prologue Display: Implement a flag that indicates whether the prologue has already been displayed. The game should check this flag before displaying the prologue message. If the flag is set, the prologue should not be displayed again.
  2. Save Data Modification: Modify the save data structure to prevent the prologue message from being stored. This would ensure that the message is not re-triggered on game load.
  3. Event-Driven Prologue: Change the way prologues are triggered. Instead of displaying the prologue on quest acceptance, trigger it through a specific event or action in the game world. This would give the developers more control over when the prologue is displayed.

Wrapping Up

The bugs with "The Enemy of My Enemy" quest and the recurring prologue pop-ups can be frustrating, but understanding the underlying causes is the first step toward finding a solution. Hopefully, the developers will address these issues in a future update. Keep an eye out for patches and updates, and in the meantime, happy gaming!