• 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 "Tales of a Sea Hawk": Speightstown fort remains hostile

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
I've escaped from Speightstown with Rabel Yverneau's ship. I've made it back to Port Royale, tried to deliver a chest, been mugged by a pair of pirates, escaped from prison, and been told that the shipyard owner of Speightstown set me up and that Speightstown is now back in British control. So I sail back to Speightstown to ask the shipyard owner some pointed questions, and the fort starts blowing big holes in my ship even though I'm flying a British flag, which is genuine because I have a British LoM and haven't done anything naughty to British or allied ships.

A 'dumpattributes' of Speightstown fort commander shows that he still has the "recognized" attribute set. So this version of "quests_reaction.c" deletes the attribute right after Speightstown is retaken by Britain. With that in place, I replayed the escape from Speightstown, events in Port Royale and return to Speightstown, and this time was able to sail in safely.
 

Attachments

  • quests_reaction.c
    344.5 KB · Views: 250
I thought I added some "forget" code to the main functions that change town nationality, which should in theory have prevented this one too.
So how come this still happened, I wonder!

What code is being called to change Speightstown back to English?
I'm curious now...
 
I'll have to double check that function then to see if it also includes the "forget" bit or if I only added that to the "capture for player" section. :facepalm
 
Confirmed it is still a bug as of the latest patch. I used both British flag and personal flag. Still getting fired on.
 
That's odd. I just checked 'CaptureTownForNation' in PROGRAM\Towns\Towntable.c and that does contain the code to reset the forts:
Code:
    int nforts = GetTownNumForts(town);
   for (int i = 0; i < nforts; i++) {
       ref fortchar = GetTownFortCommander(town, i);
       fortchar.nation = iNation;
       ResetCharacterMemory(fortchar); // PB <-------------------- THIS LINE ---------------------
       if (iNation != PERSONAL_NATION) SetModelFromID(fortchar, SelectSoldierModelByNation(iNation, "officer"));
   }

You could trigger it manually through console too:
Code:
ResetCharacterMemory(CharacterFromID("Oxbay Commander"));
See Tutorial - Modding Tips & Tricks point #4.
 
You know what. I know what happened. In the latest patch (extra fix archive), the line "ResetCharacterMemory(fortchar);" is MISSING in Towntable.c Please double check. Probably something else is missing that is causing other issues the players are currently reporting.
 
In the latest patch (extra fix archive), the line "ResetCharacterMemory(fortchar);" is MISSING in Towntable.c
Huh; that's bizarre!
Thought I updated to the latest ZIP a while back and my game version does have it...

@Grey Roger... something for you to confirm?
 
Back
Top