The problem is when you sell a ship. I found the savegame in Sao Jorge, went to the shipyard to sell Gherarde de Jongh's ship, and the same thing happened - the game forgot where my ship was moored, I couldn't board it by walking to the port or beach, I could fast-travel to the deck and then the game broke when I tried to go to sea.
@pedrwyth: you have more experience with "PROGRAM\INTERFACE\shipyard.c" than I, so perhaps you could advise? The game here appears to have picked up attribute "location.old_from_sea", which is blank. As far as I can tell from a search for "location.old_from_sea", this attribute is set as a backup of "location.from_sea" when you sell or berth your last ship, then "location.from_sea" is blanked so that you can't try to board ship when you don't have one. When you buy or relaunch a ship, function 'ClampShipToType' checks if "location.old_from_sea" exists, and if so, copies it to "location.from_sea" and then deletes it. That function is also called when you sell a ship that isn't your last one. So it finds the blank "location.old_from_sea" in this game, copies it to "location.from_sea", and that's why the ship is no longer in port or at the beach. But there is a ship, so fast-travel is possible - and then when the game switches to sailing mode, it has no idea where to put the ship. My question is therefore, do you think it would break anything if I change this line in 'ClampShipToType':
Code:
chref.location.from_sea = chref.location.old_from_sea;
... to this:
Code:
if (chref.location.old_from_sea!= "") chref.location.from_sea = chref.location.old_from_sea;
It should still only get to this line if it's found "chref.location.old_from_sea", and will still delete the attribute; but there's no point in copying "chref.location.old_from_sea" to "chref.location.from_sea" if it's blank.