• 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

None of the keys worked other than the escape key. Is this what you intended?
The way it should work is that you see the log message, but nothing bad actually happens.
Are you saying that you DID get stuck? Since you didn't mention that, I was hopeful that actually didn't happen this time.

What did the Escape key do? o_O

Also, if you still have it, please post the compile.log file from your main game folder.
 
Alas, it happened once more. This time no keys worked at all, and I became stuck. I am using the latest modpack.
 
Alas, it happened once more. This time no keys worked at all, and I became stuck. I am using the latest modpack.
In that case, at least we know the problem still exists. Therefore: Original problem reopened again.

I am still interested in that compile.log because it should contain some extra details.

Haven't the foggiest when this might be fixed. As I said, I've been trying but confirming that changes work or not takes months because it is so unlikely to happen.
I don't think I'll be diving into this one again for a while. But at least it is on the To-Do list once more. :(
 
Looking at this thread it seems current attempts to prevent this have focussed on shortening the delay (which I presume was added for realism) whilst anchoring and preventing the locator resetting. However in considering the locking of the locator in question I would suggest an extra possible approach in putting in place code to skip the attack trigger if anchoring sequence has already been triggered. The locator MAY then be reset as would normally happen? o_O

Looking at the code in AIShip.

Code:
if (fMinEnemyDistance < MIN_ENEMY_DISTANCE_TO_DISABLE_MAP_ENTER)
    {
        bCanEnterToLand = false;
        bDisableMapEnter = true;

        rCharacter.Ship.POS.Mode = SHIP_WAR;
    }
CanEnterToLand is set false and MapEnter disabled by an enemy AI ship approaching into range. which may be confusing the code in mid "reload to land" delay. I would suggest putting another condition around the locking map, CanEnterToLand (and initialisation of ship to SHIP_WAR) if anchoring has commenced - I hope this then skips the attack from screwing things. You will be more familiar with the code having worked at fixing it but looks like the presence of the anchoring attribute may be an appropriate test :bonaparte


Having only considered a fraction of the code there may be any number of reasons why this would be "off track" as a suggestion (or the fix be actually needed elsewhere) but I thought I would raise it anyway. :unsure
 
@pedrwyth: That's definitely worth a try, that is! Because this problem is so hard to replicate, it has been a matter of trial-and-error.
My changes so far do seem to have succeeded and letting the process get further than it used to do.
But not far enough, because apparently the "enemy ship near" causes code to be aborted/go wrong in a lot of places, rather than just one.

Based on the code you found, I suggest changing it to:
Code:
  if (fMinEnemyDistance < MIN_ENEMY_DISTANCE_TO_DISABLE_MAP_ENTER && !CheckAttribute(rCharacter, "ForceReload")) // PW: Continue anchoring process if already started
  {
  bCanEnterToLand = false;
  bDisableMapEnter = true;

  rCharacter.Ship.POS.Mode = SHIP_WAR;
  }
That makes use of an attribute I added to continue the reload upon anchoring regardless of anything else.
With a bit of luck, that hasn't been deleted again by the time you do that check.
But there's only one way to find out and that is to try.

Anyway, for certain a good suggestion! :bow
 
Anyway, for certain a good suggestion! :bow

May be but maybe only part of the solution (if indeed it is) since further up the same function Ship_CheckMainCharacter is another suspicious section of code that probably is in need of a tweak

Code:
// check reload to locations possibility
    if (iIslandIndex >= 0 && fMinEnemyDistance > MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION)
    {
        if (Island_isReloadEnableGlobal(sPlayerLocation))
        {
            aref arReload;
            makearef(arReload, rIsland.Reload);

            int iNumLocators = GetAttributesNum(arReload);
            for (int j=0; j<iNumLocators; j++)
            {
                aref arLocator;
                arLocator = GetAttributeN(arReload, j);
                string sLocatorName = GetAttributeName(arLocator);
                if (Island_isReloadFort(sPlayerLocation, arLocator.name)) { continue; }
                if (!Island_isReloadEnableLocal(sPlayerLocation, arLocator.name)) { continue; }
                float x1 = stf(rIsland.reload.(sLocatorName).x);
                float z1 = stf(rIsland.reload.(sLocatorName).z);
                float r = stf(rIsland.reload.(sLocatorName).radius);
                if (sqrt(sqr(x1 - x) + sqr(z1 - z)) < r)
                {
                    bCanEnterToLand = bMapEnter; // KK
                    sIslandID = rIsland.id;
                    makearef(arIslandReload, rIsland.reload);
                    sIslandLocator = rIsland.reload.(sLocatorName).name;
// KK -->

- this time to ensure it is still run even if anchoring despite an enemy coming within MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION.
 
Last edited:
I indeed remember running into that code when checking this problem before because indeed that needs to set 'sIslandID' and 'sIslandLocator' correctly for the reload to work.

Try the same addition (in reverse):
Code:
if (iIslandIndex >= 0 && fMinEnemyDistance > MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION && CheckAttribute(rCharacter, "ForceReload")) // PW: Continue anchoring process if already started
 
@ColonelKetchup30: Please extract attached file to your main game folder folder.
This contains my changes based on @pedrwyth's suggestions.

If you see the same log message again at any point, please post the compile.log from your main game folder.
And specify also if you did or did not get stuck. Thanks in advance! :cheers

And also thanks to @pedrwyth: Your suggestions are definitely very valuable! :bow

EDIT: See post below for a corrected version of the attachment.
 
Last edited:
I think that second && ( ie in the if with MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION)
needs to be an OR otherwise it is ONLY called when the anchoring force reload is active and you don't get mooring anywhere. I have put a couple of trace and logs around these tweaks and am still looking at it but I don't think it quite does the job yet. (Upping the load delay time to 100 does allow it to be triggered more frequently for testing)
 
I think that second && ( ie in the if with MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION)
needs to be an OR otherwise it is ONLY called when the anchoring force reload is active and you don't get mooring anywhere.
Oops, GOOD CATCH! :shock
Better use this instead:
Code:
   bool bDoReload = iIslandIndex >= 0 && fMinEnemyDistance > MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION;
   if (bDoReload || CheckAttribute(rCharacter, "ForceReload")) // PW: Continue anchoring process if already started
(Has to be written like that because the game engine doesn't handle nested or/and statements very well.)

See attached file instead for the corrected version. Thanks once again, @pedrwyth! :doff
 

Attachments

  • StuckAtSeaAttemptedFix.zip
    60.4 KB · Views: 179
Something happened in my game now... I'm battling a bark and I kept reloading until I managed to defeat it.. but in one of my reloads, the screen went x0.5 times slower and I was unable to command anything, F1, F2, ESC, R, G, nothing... on the log screen it said something about "Please inform PiratesAhoy.net...."

Even ALT + F4 didn't work... I had to press CTRL + ESC to go to window mode, then I could abandon game.

Never happened before and Error log is normal, nothing logged there. :S


Edit: I am unable to access any features of the game, when I open Engine.exe, and on the menu options, I can't click anything.. New Game, Load Game, Options.. nothing.. mouse click or arrow + Enter doesn't work either.
 
Never happened before and Error log is normal, nothing logged there. :S
If it said, "please inform PiratesAhoy.net", then at the very least there must be something in compile.log .
Please post all .log files (specifically including that one), just in case. :doff
 
Yea let's see what the problem is... maybe something failed to download while I kept retrying on the 97 MB file, which might have left some files
 

Attachments

  • compile.log
    1.7 KB · Views: 156
Yea let's see what the problem is...
That is not the compile.log from what you reported. You probably started the game again afterwards, which erases the logs.

maybe something failed to download while I kept retrying on the 97 MB file, which might have left some files
Not likely. The Installer EXE does an internal check and if it is corrupted, it will say so.
 
Ok I restarted PC.. I was able to click options on main menu.
Then when I reload my save .. I jumped into battle with the Barc.. then this problem happened:
 

Attachments

  • compile.log
    5.2 KB · Views: 166
  • POTC1.jpg
    POTC1.jpg
    137 KB · Views: 198
  • Gameplay Freeze.zip
    1.4 MB · Views: 174
Then when I reload my save ..
Is it correct that the savegame you posted is in a Tavern?

I jumped into battle with the Barc.. then this problem happened:
What exactly were the circumstances of that happening?
Normally that should only ever show up if you are Anchoring at a Port/Beach.
 
Yes was the save file in tavern? Then let me upload the other one, must have mixed up sorry

Should be in moor outside of St Piere

Exact circumstance: Stay outside port.. fast travel to mission quest enemy barc. It is the 3rd one from the last (right)... the last 2 are big pirate ships.. the 3rd one from the right should be the quest mission..
 

Attachments

  • -=Player=- QuickSave 5.zip
    1.4 MB · Views: 159
Hmm then definately something wrong with my game files...

Edit: Seems after another 3 attempts it is working normal now :S
Not sure what the problem was in the first place, but Pieter sure has good magic spells to fix computers :modding
 
Last edited:
Back
Top