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 -
void RemoveLandFromCharacterNation(ref _refCharacter, int iNation)
{
if (iNation < 0 || iNation >= NATIONS_QUANTITY) return;
iNation++;
string n = "n" + iNation;
for (int i = 0; i < ISLANDS_QUANTITY; i++)
{
if (!CheckAttribute(&Islands[i], "id")) continue;
string sIsland = Islands[i].id;
if (CheckAttribute(_refCharacter, "land." + sIsland + "." + n)) DeleteAttribute(_refCharacter, "land." + sIsland + "." + n);
}
}
bool LeaveService(ref char, int iNation, bool override)
{
bool leavebad = false;
if(sti(char.reputation) < REP_LEAVEMIN) leavebad = true;
if(override) leavebad = true;
string sNation = iNation;
int curRank = GetRank(char, iNation);
char.nations.(sNation).Rank = 0;
char.nations.(sNation).OldRank = 0;
if(curRank)
{
aref arTmp; // KK
if(leavebad)
{
RemoveLandFromCharacterNation(&char, iNation); // KK
curRank = 0;
}
// KK -->
makearef(arTmp, char.nations.(sNation));
arTmp.OldRank = curRank;
// <-- KK
}
//UpdateTitle(&char);
if(leavebad)
{
if(GetRMRelation(&char, iNation) > REL_WAR) SetRMRelation(&char, iNation, REL_WAR);
// KK -->
if (ENABLE_FLAGS == 1)
if(GetActualRMRelation(iNation) > REL_WAR) SetActualRMRelation(iNation, REL_WAR);
// <-- KK
//if(GetRMKills(&char, iNation) < RM_GROUP_MINKILLS) SetRMKills(&Char, iNation, RM_GROUP_MINKILLS);
LAi_group_SetRelation(GetSoldiersName(iNation)+"_SOLDIERS", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY);
//SetAllSoldierGroups(&char);
}
else {
if(GetRMRelation(&char, iNation) > REL_AFTERATTACK) SetRMRelation(&char, iNation, REL_AFTERATTACK);
// KK -->
if (ENABLE_FLAGS == 1) {
if(GetActualRMRelation(iNation) > REL_AFTERATTACK) SetActualRMRelation(iNation, REL_AFTERATTACK);
}
// <-- KK
}
// KK -->
// Lost LoM
if (ENABLE_FLAGS == 1) {
LooseLetterOfMarque(iNation);
HoistFlag(sti(char.nation));
}
// <-- KK
//choose new flag
// KK -->
if (ENABLE_FLAGS == 0) {
if(sti(char.nation) == iNation && iNation != PIRATE) ChooseBestFlag(&char);
}
// <-- KK
// PB: Reset Crew -->
Characters[GetCharacterIndex("Crewmember_01")].model = "bocman";
Characters[GetCharacterIndex("Crewmember_01")].headmodel = "h_bocman";
Characters[GetCharacterIndex("Crewmember_02")].model = "black_corsair";
Characters[GetCharacterIndex("Crewmember_02")].headmodel = "h_black_corsair";
Characters[GetCharacterIndex("Crewmember_03")].model = "man5";
Characters[GetCharacterIndex("Crewmember_03")].headmodel = "h_man5";
Characters[GetCharacterIndex("Crewmember_04")].model = "man4";
Characters[GetCharacterIndex("Crewmember_04")].headmodel = "h_man4";
Characters[GetCharacterIndex("Crewmember_05")].model = "capitan";
Characters[GetCharacterIndex("Crewmember_05")].headmodel = "h_capitan";
Characters[GetCharacterIndex("Treas_Crewmember_1")].model = "Bocman";
Characters[GetCharacterIndex("Treas_Crewmember_1")].headmodel = "h_Bocman";
Characters[GetCharacterIndex("Treas_Crewmember_2")].model = "Sailor4";
Characters[GetCharacterIndex("Treas_Crewmember_2")].headmodel = "h_Sailor4";
Characters[GetCharacterIndex("Treas_Crewmember_3")].model = "Sailor5";
Characters[GetCharacterIndex("Treas_Crewmember_3")].headmodel = "h_Sailor5";
Characters[GetCharacterIndex("Treas_Crewmember_4")].model = "Sailor6";
Characters[GetCharacterIndex("Treas_Crewmember_4")].headmodel = "h_Sailor6";
Characters[GetCharacterIndex("Treas_Crewmember_5")].model = "Sailor7";
Characters[GetCharacterIndex("Treas_Crewmember_5")].headmodel = "h_Sailor7";
Characters[GetCharacterIndex("Treas_Crewmember_6")].model = "Pirtt7";
Characters[GetCharacterIndex("Treas_Crewmember_6")].headmodel = "h_Pirtt7";
Characters[GetCharacterIndex("Treas_Crewmember_7")].model = "Sailor1";
Characters[GetCharacterIndex("Treas_Crewmember_7")].headmodel = "h_Sailor1";
Characters[GetCharacterIndex("Treas_Crewmember_8")].model = "Bocman3";
Characters[GetCharacterIndex("Treas_Crewmember_8")].headmodel = "h_Bocman3";
Characters[GetCharacterIndex("Treas_Crewmember_9")].model = "Black_corsair";
Characters[GetCharacterIndex("Treas_Crewmember_9")].headmodel = "h_Black_corsair";
Characters[GetCharacterIndex("Treas_Crewmember_10")].model = "50evl2in";
Characters[GetCharacterIndex("Treas_Crewmember_10")].headmodel = "h_50evl2in";
DeleteAttribute(char, "boardingmodels");
// PB: Reset Crew <--
if(leavebad) return true;
return false;
}
int AddLandToCharacter(ref _refCharacter, string sIsland, int iNation, int quantity)
{
if (FindIsland(sIsland) < 0) return 0;
if (iNation < 0 || iNation >= NATIONS_QUANTITY) return 0;
int newland = GetCharacterLandIslandNation(_refCharacter, sIsland, iNation) + quantity;
if (newland < 0) newland = 0;
iNation++;
string n = "n" + iNation;
_refCharacter.land.(sIsland).(n).quantity = newland;
return newland;
}
Yes, it IS called when attacking at sea through the AttackRMRelation function.For example, I'm not sure if the whole LeaveService function is even triggered at all if you turn hostile at sea; it may be only if you actually tell a governor you are leaving the service in dialog.
Of course that should then be addressed, since it should ALWAYS be called if appropriate.
True. Should not be too hard to sort that out, though.If you become a member of any of these trading compagnies we need to make sure it wont interfere with the jack sparrow storyline where you also do that.