Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
int GetCharacterCurrentIsland(ref _refCharacter)
{
//#20171026-01 Bug fix
int curLocNum = FindLocation(_refCharacter.location);
if(curLocNum<0) return -1;
return GetIslandIdxByLocationIdx(curLocNum);
}
int GetIslandIdxByLocationIdx(int locIdx)
{
aref rootar,ar;
makearef(rootar,Locations[0].IslandsList);
for(int i=0; i<GetAttributesNum(rootar); i++)
{
ar = GetAttributeN(rootar,i);
//#20171026-01 Bug fix Begin of next island locators is same as end of previous
if( locIdx>=sti(ar.begin) && locIdx<sti(ar.end) )
{
return FindIsland(GetAttributeName(ar));
}
}
return -1;
}
case "ActIntoLocator":
.
.
.
break;
//#20171026-02 Add ExitIsland quest condition
case "ExitIsland":
if(CheckAttribute(worldMap, "isLoaded") && worldMap.isLoaded == "true")
{
if(worldMap.island != condition.island)
return true;
else
return false;
}
if(bSeaActive)
{
if(CheckAttribute(AISea, "island") && AISea.Island != condition.island)
return true;
else
return false;
}
int myIslandIdx = GetCharacterCurrentIsland(refCharacter);
if(myIslandIdx > -1) {
string myisland = Islands[myIslandIdx].id;
if(myisland != condition.island)
return true;
}
return false;
break;
case "dutchman_KillJones":
//Kill Jones by function
chr = GetCharacter(GetCharacterIndex("Davy Jones"));
if( CheckAttribute(chr,"Killer.status") && sti(chr.Killer.status)==KILL_BY_ABORDAGE )
{
SetQuestHeader("Dutchman");
AddQuestRecord("Dutchman", "3_captured");
trace("*** Davy Jones Killed by Abordage");
DoQuestCheckDelay("dutchman_dead", 2.0);
}
else
{
trace("Flying Dutchman Killed by Cannonfire");
SetQuestHeader("Dutchman");
AddQuestRecord("Dutchman", "2_failed");
LAi_group_Delete("FlyingDutchman"); //Sea group
Pchar.quest.spawn_dutchman.win_condition.l1 = "ExitIsland");
Pchar.quest.spawn_dutchman.win_condition.l1.island = "Guadeloupe");
PChar.quest.spawn_dutchman.win_condition = "spawn_dutchman";
}
break;
Why Guadeloupe?Good news. Even without your save, I constructed some console.c code to replicate the one part not yet working and this will probably do it:
First, there are a couple bugs in the original CT CharacterUtilite.c. Change these two functions:
Code:int GetCharacterCurrentIsland(ref _refCharacter) { //#20171026-01 Bug fix int curLocNum = FindLocation(_refCharacter.location); if(curLocNum<0) return -1; return GetIslandIdxByLocationIdx(curLocNum); } int GetIslandIdxByLocationIdx(int locIdx) { aref rootar,ar; makearef(rootar,Locations[0].IslandsList); for(int i=0; i<GetAttributesNum(rootar); i++) { ar = GetAttributeN(rootar,i); //#20171026-01 Bug fix Begin of next island locators is same as end of previous if( locIdx>=sti(ar.begin) && locIdx<sti(ar.end) ) { return FindIsland(GetAttributeName(ar)); } } return -1; }
In quests_check.c, I developed a way to get your desired feature to indicate that you left the island. Find function bool ProcessCondition(aref condition), scroll toward the end and insert, immediately after the case "ActIntoLocator": break; statement:
Code:case "ActIntoLocator": . . . break; //#20171026-02 Add ExitIsland quest condition case "ExitIsland": if(CheckAttribute(worldMap, "isLoaded") && worldMap.isLoaded == "true") { if(worldMap.island != condition.island) return true; else return false; } if(bSeaActive) { if(CheckAttribute(AISea, "island") && AISea.Island != condition.island) return true; else return false; } int myIslandIdx = GetCharacterCurrentIsland(refCharacter); if(myIslandIdx > -1) { string myisland = Islands[myIslandIdx].id; if(myisland != condition.island) return true; } return false; break;
Last, change dutch_encounter.c:
Code:case "dutchman_KillJones": //Kill Jones by function chr = GetCharacter(GetCharacterIndex("Davy Jones")); if( CheckAttribute(chr,"Killer.status") && sti(chr.Killer.status)==KILL_BY_ABORDAGE ) { SetQuestHeader("Dutchman"); AddQuestRecord("Dutchman", "3_captured"); trace("*** Davy Jones Killed by Abordage"); DoQuestCheckDelay("dutchman_dead", 2.0); } else { trace("Flying Dutchman Killed by Cannonfire"); SetQuestHeader("Dutchman"); AddQuestRecord("Dutchman", "2_failed"); LAi_group_Delete("FlyingDutchman"); //Sea group Pchar.quest.spawn_dutchman.win_condition.l1 = "ExitIsland"); Pchar.quest.spawn_dutchman.win_condition.l1.island = "Guadeloupe"); PChar.quest.spawn_dutchman.win_condition = "spawn_dutchman"; } break;
Why Guadeloupe?
//Borrow COAS
void PGG_UpdateShipEquip(ref chr)
{
if (sti(chr.Ship.Type) == SHIP_NOTUSED) return;
ref refTown, chref;
string curTown;
ProcessHullRepair(chr, 100.0);
ProcessSailRepair(chr, 100.0);
SetCrewQuantityFull(chr);
Fantom_SetCannons(chr, "pirate");
Fantom_SetBalls(chr, "pirate");
Fantom_SetGoods(chr, "pirate");
}
//Borrow COAS
void SetCrewQuantityFull(ref _refCharacter)
{
SetCrewQuantity(_refCharacter, GetMaxCrewQuantity(_refCharacter));
}
else { //Reset ship attributes (restock HP, ammo, etc.)
PGG_UpdateShipEquip(GetCharacter(qChar));
}
The Dutchman Still doesn't re-spawn... At least the game doesn't crash anymore... (After sinking I returned to the worldmap then sailed around a bit then came back to grenada)... Logs:Let's abandon SetBaseShipData in the dutchman. Add these to CharacterUtilite.c:
Code://Borrow COAS void PGG_UpdateShipEquip(ref chr) { if (sti(chr.Ship.Type) == SHIP_NOTUSED) return; ref refTown, chref; string curTown; ProcessHullRepair(chr, 100.0); ProcessSailRepair(chr, 100.0); SetCrewQuantityFull(chr); Fantom_SetCannons(chr, "pirate"); Fantom_SetBalls(chr, "pirate"); Fantom_SetGoods(chr, "pirate"); } //Borrow COAS void SetCrewQuantityFull(ref _refCharacter) { SetCrewQuantity(_refCharacter, GetMaxCrewQuantity(_refCharacter)); }
Change call in SpawnDutchman():
Code:else { //Reset ship attributes (restock HP, ammo, etc.) PGG_UpdateShipEquip(GetCharacter(qChar)); }
else { //Reset ship attributes (restock HP, ammo, etc.)
PGG_UpdateShipEquip(GetCharacter(qChar));
LAi_SetCurHPMax(GetCharacter(qChar));
}
Pchar.quest.spawn_dutchman.win_condition.l1 = "ExitIsland");
Pchar.quest.spawn_dutchman.win_condition.l1.island = "Grenada");
PChar.quest.spawn_dutchman.win_condition = "spawn_dutchman";
The Dutchman finally re-spawns, however the cannons on the ship post re-spawn are not correct. 48 pdr demi-cannons are supposed to be the dutchman's cannons...