And... it didn't work. That is, the whole scene with the pirate didn't work. He didn't show up.
The whole quest seems to have been rewritten. For one thing, if I recall correctly, originally you had to gamble a lot before it would trigger - it seemed as though you needed to defeat literally every gambler in the archipelago. This time I fleeced one guy in Port Royale tavern, then talked to the second permanent resident and he triggered the quest right away. I took the precaution of saving game while we were on the way up to the tavern room, so that if there turned out to be a problem with "danielle_quests_pirate_dialog.c", I could edit it and try again. That wasn't the problem, though.
In "quests_common.c":
Code:
case "girl_for_sale":
LAi_type_actor_Reset(CharacterFromID("Virginie d'Espivant"));
ChangeCharacterAddress(CharacterFromID("Virginie d'Espivant"), "none", "none");/*
PostEvent("CheckQuestPossibility", 100, "1", 0);
pchar.quest.not_to_the_ship_2.win_condition.l1 = "ExitFromLocation";
pchar.quest.not_to_the_ship_2.win_condition.l1.location = pchar.location;
pchar.quest.not_to_the_ship_2.win_condition = "girl_for_sale_2";*///MAXIMUS: moved to MAXIMUS_Functions.c
break;
The code to set up the encounter with the pirate when you leave the tavern room has been commented out. Following the clue from the comment, in MAXIMUS_Functions.c:
Code:
#event_handler("CheckQuestPossibility", "CheckGambledQuest");
void CheckGambledQuest()
{
ref PChar = GetMainCharacter();
if(!HasSubStr(PChar.location,"tavern") && !CheckAttribute(PChar,"IsOnDeck"))
{
PChar.quest.not_to_the_ship_2.win_condition.l1 = "ExitFromLocation";
PChar.quest.not_to_the_ship_2.win_condition.l1.location = PChar.location;
PChar.quest.not_to_the_ship_2.win_condition = "girl_for_sale_2";
}
else { PostEvent("CheckQuestPossibility", 100, "1", 0); }
}
I don't know how events work, but at a guess, the idea is that when you're in a location that isn't a tavern and isn't a deck,
then the encounter happens when you move to a new location. So the event triggers when I leave the tavern and am in the town centre. Now "PChar.quest.not_to_the_ship_2.win_condition" should trigger when I leave the town centre, which then leads to "girl_for_sale_2". Back to "quests_common.c":
Code:
case "girl_for_sale_2":
LAi_SetHP(characterFromID("danielle_quests_corsair_1"), 80.0, 80.0);
ChangeCharacterAddressGroup(characterFromID("danielle_quests_corsair_1"), pchar.location, "reload", "reload1");
LAi_SetActorType(characterFromID("danielle_quests_corsair_1"));
LAi_ActorDialog(characterFromID("danielle_quests_corsair_1"), pchar, "", 2.0, 1.0);
break;
The pirate tries to spawn at locator "reload/reload1". This fails because I went to the port, and "REDMOND_PORT" has no such locator.
There seem to be two ways out of this. One is to put the code back the way it used to be so that the pirate spawns in the main tavern as soon as you leave the room. The other is to replace that 'ChangeCharacterAddressGroup' with:
Code:
PlaceCharacter(characterFromID("danielle_quests_corsair_1"), "reload");
That should put him at the nearest "reload" locator to you, whichever it happens to be. I tried the latter, the pirate did indeed appear when I entered the port, and the dialog still works properly.