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

Confirmed Bug Stuck At Sea When Assaulted During Mooring

The problem stems from the delay between you giving command to anchor and the actual reload to shore.
If enemies approach you before the reload actually occurs, then it can be locked after you gave the command and get you stuck.
Original game had this instantaneous, getting past any potential such issues.

It is a rare and very inconsistent bug, but it is a bug nonetheless and should ideally be fixed some time.
 
That is weird. Because I am quite sure that I was well out of reach, for the enemy ship to inhibit anything about me being able to moor.
 
Pieter.. the most simple solution here is just reducing/switching off this anchor reloadtime.. I reduced it to 2 or 3 seconds, and had no problems so far, even on Nevis, where this situation happens in 90% of the time.. the standard time is just too long, so enemy ships have the possibility to get into the 'attack-radius' before you reload
 
Not technically a "solution", but does indeed reduce the chance of it happening.

Worth a try. Change in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Code:
  if (CheckAttribute(PChar, "Anchoring") == true && sti(PChar.Anchoring) == true) {
     if (!CheckAttribute(PChar, "Anchoring.Duration")) PChar.Anchoring.Duration = sea_time;
     if (stf(PChar.Ship.Speed.z) < 0.3 || GetSeaTime() - sti(PChar.Anchoring.Duration) > 3) { // PB: was 5 seconds
       bool bImmediate = CheckAttribute(PChar, "Anchoring.Immediate") == true && sti(PChar.Anchoring.Immediate) == true;
       DeleteAttribute(PChar, "Anchoring");
       PChar.ForceReload = true; // PB: To fix potentially getting stuck
       if (VISIT_DECK == 1 && bImmediate == false)
         GoToDeck();
       else
         AnchorDrop();
     }
     return;
   }
 
Speaking of Nevis: It never happened to me there. Even though I go to shore there a lot. Often directly after I went to sea, only to have a freaking frigate right in front ofe me, well in firing range. And yet it never ever happened there.

The problem seems to be very rare and inconsistent.
 
I had it happen to me at Martinique. Britain is supposed to be neutral to France so I sailed to St. Pierre port, dropped anchor, then something tried to attack me and I got stuck. Apparently it's a recognised error condition because the message which appeared on screen instructed me to report it to "Pirates Ahoy", so here I am. :D
 
At least the game DOES know it happens now, so at least I had some success. But you still get stuck.
More research required.... :facepalm

And I doubt that this is specifically island-related. It could happen anywhere, but rarely so.
Maybe I should vastly INCREASE the anchoring time just so I can force this to happen more often. :wp
 
Any news on this?
 
There have been no further reports about this on the forum. So while it might still technically be possible to happen, it is very unlikely.
The chance was decreased by making the anchoring faster. As far as I'm concerned, we can call this one "Fixed" for now.
 
Now I have this message :
Reload: Continue despite locked locator. Please report this at piratesahoy.net!
 

Attachments

  • compile.zip
    1.9 KB · Views: 197
Did you end up stuck at sea there as well?
Arrived at Port Royal two French warship was attacking the fort. I engage and defeated them,
then the message came on the screen, and I could not land at the harbor. I cant replicate it again.
 
Arrived at Port Royal two French warship was attacking the fort. I engage and defeated them,
then the message came on the screen, and I could not land at the harbor. I cant replicate it again.
Thanks for confirming. While unlikely to occur, I have reopened the original report and moved your post to this thread.

So annoying that this cannot be replicated on demand! Otherwise it would be so much simpler to fix. :facepalm

Actually, I've had an idea based on the below post:
Not technically a "solution", but does indeed reduce the chance of it happening.

Worth a try. Change in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Code:
  if (CheckAttribute(PChar, "Anchoring") == true && sti(PChar.Anchoring) == true) {
     if (!CheckAttribute(PChar, "Anchoring.Duration")) PChar.Anchoring.Duration = sea_time;
     if (stf(PChar.Ship.Speed.z) < 0.3 || GetSeaTime() - sti(PChar.Anchoring.Duration) > 3) { // PB: was 5 seconds
       bool bImmediate = CheckAttribute(PChar, "Anchoring.Immediate") == true && sti(PChar.Anchoring.Immediate) == true;
       DeleteAttribute(PChar, "Anchoring");
       PChar.ForceReload = true; // PB: To fix potentially getting stuck
       if (VISIT_DECK == 1 && bImmediate == false)
         GoToDeck();
       else
         AnchorDrop();
     }
     return;
   }
Specifically this line:
Code:
  if (stf(PChar.Ship.Speed.z) < 0.3 || GetSeaTime() - sti(PChar.Anchoring.Duration) > 3) { // PB: was 5 seconds
Replace that value of "3" with a stupidly high number, say, 100.
Now when you anchor, it should take 100(!) seconds before you are actually reloaded to shore.
That means there is a lot more time for enemy ships to intercept you and break the reload process.

Please see if you can consistently replicate the problem with that.
Some experimenting may be required and you may have to lure some enemy ships to follow you towards the anchorage.
If you can make a savegame where you can start the anchoring process, but you get stuck like this with that increased number, that should give me a good test case to work from.
Would be nice to REALLY see this fixed. :doff
 
Well this is an impossible mission I think, I tried and tried a lot of times,
without any luck.
Another thing: it seems to be more storms than I ever have seen, almost
every time I try to land at Port Royal, a storm is raising!
 
Well this is an impossible mission I think, I tried and tried a lot of times,
without any luck.
Never mind then. I don't care today. :razz

Another thing: it seems to be more storms than I ever have seen, almost
every time I try to land at Port Royal, a storm is raising!
I can guarantee you no code related to the weather has been touched. :shrug
 
Thanks to @ANSEL's compile.log posted above, I have another lead on fixing this.
It turns out that the reason why the reload fails now is because the game tries to reload to "" and that is of course not specific enough:
Code:
Reload: Continue despite locked locator. Please report this at piratesahoy.net!
Can't reload...
Reload locator '' in current location  not found!

Further investigating showed that the Reload call on anchoring comes from the AnchorDrop() function in PROGRAM\SEA_AI\sea.c:
Code:
void AnchorDrop()
{
// KK -->
   ref mchr = GetMainCharacter();
   string sLocator = sIslandLocator;
   ClearDeck();//MAXIMUS
   if (CheckAttribute(mchr, "location.Fort")) {
     if (sti(mchr.location.Fort) == true) sLocator = sAbordageLocator;
     DeleteAttribute(mchr, "location.Fort");
   }
   Reload(arIslandReload, sLocator, sIslandID);
   bSeaActive = false;//MAXIMUS: used for new "Mutiny" [just to be sure]
// <-- KK
}
Note that sLocator and sIslandID are two global variables.
These are being reset once per second by the Ship_CheckMainCharacter function in PROGRAM\SEA_AI\AIShip.c .
For this resetting, they are first both set to "" and then later to whatever is the actual active reload.

So to hopefully fix this FOR REAL, I am now skipping that reset to "" part if we already know there is a reload from anchoring in progress:
Code:
  if(!CheckAttribute(rCharacter, "ForceReload")) // PB: Don't override this if a reload is already in progress!
   {
     sIslandLocator = "";
     sIslandID  = "";
   }

The request to post compile.log here if it happens does remain.
Hopefully next time the person who does that can report that he did NOT actually get stuck! :wp
 
I was mooring my ship at Martinique and some text appeared at the top left saying "Reload".....and something about a "locked locator" and to report it, so here it is.
 
I was mooring my ship at Martinique and some text appeared at the top left saying "Reload".....and something about a "locked locator" and to report it, so here it is.
Thanks very much for reporting this. :woot

That must have been the "Reload: Continue despite locked locator. Please report this at piratesahoy.net!" message.
See here for full details: Low Priority - Stuck At Sea When Assaulted During Mooring | PiratesAhoy!

What used to happen is this:
1. You give the order to drop anchor
2. Enemy ships approach while this is happening
3. The reload gets "locked" because of those enemy ships
4. As a result, the anchoring process is aborted, you end up completely stuck and have to reload from an earlier save

That was a potentially very nasty bug, but also a very uncommon one.
That made it very difficult to replicate and test if any attempted fixes actually solved the problem.

If I read your post correctly, everything up to point #3 there DID happen (because that is what triggers the message), but #4 did NOT and everything played out fine.
That means my attempts to fix this problem have FINALLY WORKED! :dance
 
Last edited:
Back
Top