• 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!

Solved [relations problem]

gianflores13

Sailor Apprentice
My own controlled town's fort is attacking me. Why??? And the pirate fort in san salvador in grand turk is attacking me even if at the relations page it says I'm "friendly" with them.

1. Note that only the forts are the ones hostile and the ships remain neutral. Pirates and Personal

2. I am not flying a false flag. Note that I am flying my personal flag.
...
So this is generally the problem. Forts that are supposed to be neutral, are attacking me. please help.
...
Saved file is attached so you could investigate this properly.
Build 14 4.1 WIP april 2016

....

I am really tempted to just invade my own town and destroy my own fort to see what would happen, if that would fix things, but it's pretty late/early this side of the globe and I really should get some sleep. I'll leave this up to you guys, thank you.
 

Attachments

  • -=Gian=- Open Sea December 24th, 1679.rar
    832.4 KB · Views: 178
Last edited:
Here you go Pieter.

If I have 4.1 installed, should it appear as may 22 2016 on my main menu?

....

Sorry I may have uploaded it twice
 

Attachments

  • compile.log
    873 bytes · Views: 185
  • compile.log
    873 bytes · Views: 161
May 22 is indeed the most recent update I posted
When in doubt, you can check my signature. :doff

I'll check your log file as soon as I'm near a PC again.

Do you have a list of towns where you have this problem?
 
I have the town in eleuthera, and grand turk.

17th april 2016 is not yet 4.1? If I remember correctly, I already updated to 4.1 to prevent characters from getting erased or disappearing.


Also, what is the temporary fix that I could do to reclaim those bugged forts?
 
Unfortunately your compile.log isn't actually from your play-through where the fort fired on you, so there are no useful details in it.
So I have to assume that I'm right and it is indeed this error:
Fixed - Captured Town for Pirates: Fort Still Hostile | PiratesAhoy!

I17th april 2016 is not yet 4.1? If I remember correctly, I already updated to 4.1 to prevent characters from getting erased or disappearing.
While we're sitll developing, I just increase the date number for every new update, not the version number.
So 17th April was indeed a 4.1 WIP version, but it isn't the latest one.

Also, what is the temporary fix that I could do to reclaim those bugged forts?
Try to execute this through console:
Code:
ResetForts(PERSONAL_NATION);
See here point #4 for how to do that: Tutorial - Modding Tips & Tricks | PiratesAhoy!
 
So I tried your solution.

Try to execute this through console:
Code:
ResetForts(PERSONAL_NATION);

I followed the one in tutorial.

I placed the code both before and after the switch, but always after these


Code:
void ExecuteConsole()
{
ref pchar = GetMainCharacter();
ref ch;
int i;
int limit;

It hadn't worked so far. So any advice?

I also updated to the latest 4.1 WIP
 
You can also try:
Code:
ResetCharacterMemory(CharacterFromID("YOUR FORT COMMANDER"));
Replace "YOUR FORT COMMANDER" with the relevant character ID as found in PROGRAM\Characters\init\FortCommandants.c .

I won't have access to my game files for the next few days, so I can only give suggestions from memory....
 
I wonder if @Grey Roger might be able to give any assistance.
He should be relatively familiar with the related code as well. If I'm right, then just the fort commander memories need to be reset.

@gianflores13: If you get the chance, play the game again until one of your fort commanders fires on you, then immediately post your compile.log here.
At the moment I'm still "shooting in the dark" because I have no actual evidence regarding your situation.

As I mentioned in my above post, I cannot check your savegame until at least next Monday.
But even then no guarantees as I've got quite a bit to do as it is. :facepalm
 
Replace "YOUR FORT COMMANDER" with the relevant character ID as found in PROGRAM\Characters\init\FortCommandants.c .


This right? ch.id = "Eleuthera Commander";

if so, still no luck, and I can't attack my own fort since it registers as neutral.
i also tried the second code you gave me with the first code together. but still no luck.
 
Here's the compile log.

I read it, and found this...

FLAGS: The 'Puerto la Cruz Fort' remembers us as English

So I tried flying an english flag but still, no luck.
 

Attachments

  • compile.log
    2.6 KB · Views: 162
I wonder if @Grey Roger might be able to give any assistance.
He should be relatively familiar with the related code as well. If I'm right, then just the fort commander memories need to be reset.
Remind me - where is the code in question? I've a vague memory of fiddling with it a bit to make it reset if you get a new ship, as well as adding the option to prevent the fort from remembering you at all if you're a friend, but I can't remember where I did it.

@gianflores13: what is your personal relation to England? If you're personally hostile to England, the fort thinks you're English, but the fort also knows that you're at war with England, then it effectively thinks you're at war with yourself. :facepalm Make peace with England, then the fort shouldn't object when you try to enter port and it thinks you're English.

The fort memory resets if you get a different ship. Go and capture (or buy) something. If you're really attached to your current ship, berth it somewhere. Then return to your port in your new ship. The fort should create a new memory of you in the new ship. For preference, edit "PROGRAM\InternalSettings.h" and change "RELATION_IGNORE_FRIENDLY" to 1. Then, when you approach the fort in your new ship, it will forget its original memory and not create a new one because you're a friend. Then go and pull your favourite ship out of berth.
 
Relevant file is nations.c and maybe also NK.c .
The log entry above confirms my suspicion and one of my suggestions must solve that.

Either the console command is not being executed right or you're doing it without triggering an update afterwards.
Try hoisting another flag or going to worldmap and then returning.
 
Back
Top