Today I was investigating this here issue: Fix in Progress - Jack Sparrow: Improvements to Maximus and Philippe Quest | PiratesAhoy!
Some enemies didn't appear but the quest still worked because the game figured you already killed them.
The reason was really very similar to this problem we had before:
Fixed - Levelling: Missing Ships and Crashes on Encounter Reload from Worldmap to Sea | PiratesAhoy!
As a solution, I applied pretty much the same trick.
For that particular quest situation, the better fix would probably be to NOT use those pre-initialized characters in the first place.
But for the actual Treasure Quests, I noted that their settings are not at all making proper use of @Levis' Levelling system either.
This code may yield better results:
Some enemies didn't appear but the quest still worked because the game figured you already killed them.
The reason was really very similar to this problem we had before:
Fixed - Levelling: Missing Ships and Crashes on Encounter Reload from Worldmap to Sea | PiratesAhoy!
As a solution, I applied pretty much the same trick.
For that particular quest situation, the better fix would probably be to NOT use those pre-initialized characters in the first place.
But for the actual Treasure Quests, I noted that their settings are not at all making proper use of @Levis' Levelling system either.
This code may yield better results:
Code:
if(rand(sti(Pchar.skill.sneak))<3) // PB: was >0 - HIGHER luck skill gives a HIGHER chance at enemies?
{
ref pir; string ani;
int con;
for(con = 1; con < 11 ; con++)
{
pir = &Characters[GetcharacterIndex("Treas_Pirate_" + con)];
ClearCharacter(pir); // PB: Clear ALL attributes from previous character
pir.nation = PIRATE;
SetModelfromArray(pir, GetModelIndex(GetRandomModelForTypeExSubCheck(1, "Sailors", "man", sti(sld.nation))) );
SetRandomNameToCharacter(pir);
InitCharacterSkills(pir); // PB: Reset this character
LAi_NPC_Equip(pir, sti(pir.rank), true, true);
LAi_SetWarriorType(pir);
LAi_group_MoveCharacter(pir, "treasure_pirates");
LAi_SetImmortal(pir, false);
if(rand(Makeint(Pchar.skill.sneak)) > 0) { ChangeCharacterAddressGroup(pir, attackers_location, "goto", attackers_locator); }
else { ChangeCharacterAddressGroup(pir, "", "", ""); }
//Logit("TreasureQuest: Treas_Pirate "+GetcharacterIndex("Treas_Pirate_" + con)+" generated");// DEBUG
}
LAi_group_SetRelation(LAI_GROUP_PLAYER, "treasure_pirates", "enemy");
LAi_group_SetRelation(LAI_DEFAULT_GROUP, "treasure_pirates", "enemy");
LAi_group_SetRelation(LAI_GROUP_MONSTERS, "treasure_pirates", "enemy");
LAi_group_FightGroups("treasure_pirates", LAI_GROUP_PLAYER, true);
}