• New Horizons on Maelstrom
    Maelstrom New Horizons


    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!

Fixed Turks Fort won't recognise my Pirate Flag

Talisman

Smuggler
Storm Modder
Latest build 14 b 4 version 16 Sept

Sailing from Guadeloupe to Turks to Meet Petros

Leave Guadeloupe flying French Flag.

Change flag at sea ( Have Tried Pirate & British )

Turks Fort fires on me when I sail into the Port - so I cannot land. :(

Attached Save is as leaving Guadeloupe.

:cheers
 

Attachments

  • -=Player=- Open Sea October 10th, 1740.7z
    539.5 KB · Views: 89
In PROGRAM\Screwface_functions.c the following line should have been added:
Code:
int GetFortRelationToPirates(ref chr)
{
   if (CheckAttribute(chr, "relation_to_pirates"))
   {
     return sti(chr.relation_to_pirates);
   }
   else
   {
     int iRelation = RELATION_ENEMY;
     string town;
     ref rPeriod;

     if (CheckAttribute(chr, "town"))   town = chr.town;       // For fort commanders
     else                 town = GetCurrentTownID();   // For characters in town
     if (town != "")
     {
       iRelation = GetNationRelation(GetTownNation(town), PIRATE); // <------------------- THIS LINE ------------------
       makeref(rPeriod, Periods[GetCurrentPeriod()]);
       if (CheckAttribute(rPeriod, "Towns." + town + ".relation_to_pirates")) iRelation = sti(rPeriod.Towns.(town).relation_to_pirates);
     }
     chr.relation_to_pirates = iRelation; // Skip the above checks after the first time
     return iRelation;
   }
}
My mistake; thanks for catching! :woot
This affects ALL storylines, by the way; not just the Jack Sparrow one.

This fix now included in here: http://www.piratesahoy.net/threads/build-14-beta-4-internal-wip-for-testing.25696/
If you start from the save you uploaded, it should work properly now.

For performance reasons, once the fort has figured out whether it likes pirates or not, it will be stuck with that for the remainder of the game.
That is probably not a clever idea in case of a town capture and giving the town TO the pirates (the fort would remain firing on pirates).
I have already made a fix for that eventuality too. That will be included in a future update because I can't be bothered to update the EXE three times today.... :wp
In the meantime, this should set you back on track.
 
Back
Top