Skip to content

Fix PlaceNpc action not serializing marker #2742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TwelveEyes
Copy link

@TwelveEyes TwelveEyes commented Jun 4, 2025

Marker indexes for the PlaceNpc quest action are not properly serialized, causing quest npcs to be placed at a random marker when the action is loaded. This is quite obvious in the quest Lord K'avar Part III, where the Lord K'avar flat could be located at a incorrect marker, and the foe at the correct one, causing K'avar to seemingly teleport across the dungeon.

Also edited PlaceFoe's AssignQuestResource pattern to match that of PlaceNpc's AssignQuestResource for consistency.

Fixes #2700

@@ -79,7 +79,7 @@ public override void Update(Task caller)
}

// Assign Foe to Place
place.AssignQuestResource(foeSymbol, marker);
place.AssignQuestResource(foe.Symbol, marker);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is there any way foeSymbol could differ from foe.Symbol?

Copy link
Author

@TwelveEyes TwelveEyes Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK foe.Symbol would be set in Foe.SetResources(), which parses quest definitions (e.g. Foe _mtraitor_ is Ranger). This would still match PlaceFoe's foeSymbol from parsing a quest action (e.g. place foe _mtraitor_ at _wayrest_ marker 3). _mtraitor_ matches _mtraitor_. If they differed somehow then I think something would be seriously wrong.

Both PlaceNpc and PlaceItem use <QuestResource>.Symbol member variable for AssignQuestResource() as well, leaving PlaceFoe the odd one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.1.1: Quest S0000501, Lord K'avar Part 3 can't spawn enemy in correct marker
2 participants