• 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 Sea Relations: Behaviour for Recognizing False Flags

How should enemy forts treat players sailing into port under a false flag?

  • Other, please specify below

    Votes: 0 0.0%

  • Total voters
    20
Ahoy @Hylie Pistof: If you didn't already, can you please post a save with those bugged Hispaniola forts?
I'd like to see if I can convince them to behave themselves properly on Friday.
 
Sorry, didn't catch that. Shame, without log files or save game, I might end up shooting in the dark trying to fix that one because I still have no clue how our why that might have happened. :(
 
So then I think only a reputation loss when firing on friendly ships to start with.
And they'll turn hostile too; I discovered the game engine handles that part so I couldn't even prevent it if I wanted.

I wouldn't even have the reputation loss for just firing a shot which hits a friendly ship; or if you do, make it a -1 loss, nothing serious. It's still possible to hit a friendly ship by accident, or for that matter to be hit by a friendly ship which was aiming at the enemy ship next to you. Especially if you're firing manually; you might think you have a clear shot at an enemy ship from where you're standing, but what you haven't noticed is the friendly ship next to your bow which is about to be hit by the forward guns of your broadside.
 
Explain this one.
sightings4.jpg

HMS Speightstown Fort must have amazingly good eyesight. That screenshot was taken at Cuba. xD

This was during "Mutiny". You start by docking at Speightstown and Pellew tells you to meet up with Midshipman Kennedy, then go to Bridgetown where you'll join the Renown. Various shenanigans happen on board Renown, then you proceed to Playa de Sabana for the attack on the fort. Interestingly, I saved game before taking that screenshot, and when I reloaded the screenshot I got a whole lot of new sighting reports including Havana fort and Santiago fort. They still must have X-ray vision because they're a long way away and Cuba blocks line of sight, but at least they're on the right island.

One thing I should mention is that I have not installed the latest zip update; the last one I installed was the second one released on 31st July. The 2nd August update apparently requires a new game and I don't want to lose my progress through "Hornblower"! So any fixes you've made on this issue during August won't affect what I'm seeing.
 
Last edited:
I think that is pretty conclusive proof that the engine attributes I'm using aren't always updated when and how I need them to be.
Will need to do some playing around with that one.

You should get a list with EVERY ship in the scene and how their relation is set to you.
For ships close to you, there will be a different message about them actually having spotted and remembered you.
It is of course unrealistic to get details about ships on the other side of the island, but the texts are meant purely to facilitate testing.

For savegame compatibility, you can usually just edit globals.c . In this particular case, that isn't enough, but it is still quite easy to fool the game into being compatible.

Reason for the incompatibility is that I got rid of the now useless ENABLE_FLAGS toggle.
But savegames still look for that variable. So you just have to return the previous version of InternalSettings.h and it should work.

I didn't do that because it does need to be deleted at some point. But you can do that for yourself when it suits you.
 
The "surrendered ship turning hostile" now has a proper explanation.
ANY ship that you fire on gets the "recognized" attribute so that if you don't finish them off, they'll still be hostile next time (and for good reason!).
However, that also partly overrode the "surrendered" state. I have now put a check in place so that should no longer happen.
 
I also made a general function that makes the forts of a given nation forget your earlier flags and whether they recognized you as being hostile.
This is now called properly when you buy amnesty as the earlier method didn't work with the new system.
It has also been added whenever you are promoted so that your past mistakes won't continue to haunt you.
 
@Pieter Boelen from what I can see ships are added to sea by a engine message and are added to the Ships array.
But the function to remove ships ("RemoveShipFromSea") seems to be never called.
Are you using NearShips or Ships to go trough the ships?
 
I'm using a set of character attributes that I think are created by the engine and automatically contain the distance to the ships and forts too so I don't have to get those using the 2D distance calculation.
 
I think I've got all primary weirdness with the relations at sea just about ironed out.

It turns out that the first time RefreshBattleinterface is called, the list with ships I'm using isn't updated and therefore you get a list of ships from your last time in 3D sailing mode.
The reason for that being called at all was because for some bizarre reason, it seemed to be required to stop the "victory music" when entering 3D sailing mode with a false flag.
However, I have now come up with a much reliable and efficient approach so that instead of calling RefreshBattleinterface with the wrong list of ships,
it just sets all actual current ships and forts to neutral, so that the correct relations can be set shortly after without triggering the "victory music".

Extra work done includes getting the "Tortuga is tolerant of pirates" functionality to fully work for the player as well, including ashore.
So that means Dutch players in Early Explorers WILL be able to safely use Tortuga as a base of operations, despite Holland and France being actually hostile.

Tomorrow I'll get together another ZIP with the latest files, including a complete change log to indicate the various issues that should now be fixed.

And what's "Nueva Espana Flota"? That shouldn't even be a ship name. I recognise that name after reading the web page someone cited for the proposed Treasure Fleet - "Nueva Espana Flota" was one of the treasure fleets and certainly shouldn't be anywhere near Jamaica!
I just double-checked on that one and it isn't strange at all. "NuevO Espana Flota" as shown on your screenshot is one of the many random Spanish names that the game can choose from.
 
To all quest writers and players, but probably especially @Bartolomeu o Portugues, @Grey Roger and @Talisman:

Do you remember any quest scenes where ships are supposed to attack each other against their normal nation-based relations?
For example Spanish ships fighting other Spanish ships or ships of allied nations fighting each other?

With my recent rewrites, the game overrides the sea relations for between each and every ship.
If there are such custom quest requirements, those may not work correctly now.

Though now that I start the scene with all ships and forts neutral to the player,
possibly we can revert to ONLY changing ships to hostile as needed, but not overriding them back to neutral again.
However, that might prove tricky as we'd let go some of the control we finally seem to have acquired.
So I'd rather avoid that if I can, just to be on the safe side for general gameplay....

That being said, I don't want to break the storylines. That'd be a crying shame! :shock
 
To all quest writers and players, but probably especially @Bartolomeu o Portugues, @Grey Roger and @Talisman:

Do you remember any quest scenes where ships are supposed to attack each other against their normal nation-based relations?
For example Spanish ships fighting other Spanish ships or ships of allied nations fighting each other?

The only instance of AI ships attacking each other that I can think of is the Animists attacking the Montanez ( in Strange goings on in the Carribean - - Sao Fengs Missing Bodyguards )

But in that case I think the Quest sets the Animists as Pirates.


:read
 
The only instance of AI ships attacking each other that I can think of is the Animists attacking the Montanez ( in Strange goings on in the Carribean - - Sao Fengs Missing Bodyguards )

But in that case I think the Quest sets the Animists as Pirates.
Correct, so those should be good.
 
To all quest writers and players, but probably especially @Bartolomeu o Portugues, @Grey Roger and @Talisman:

Do you remember any quest scenes where ships are supposed to attack each other against their normal nation-based relations?
For example Spanish ships fighting other Spanish ships or ships of allied nations fighting each other?
Off-hand, no, unless you consider the possibility of a player in "Tales of a Sea Hawk" having paid either a diplomat or a governor to restore relations with Britain and then facing Silehard's fleet at Bridgetown.

I can't think of any situations where AI ships are supposed to attack other AI ships which would normally be friendly. But back to "Tales of a Sea Hawk", what about AI ships which aren't supposed to attack other AI ships that would normally be hostile? Sovereign of the Seas is Silehard's ship in the battle at Cozumel and, if I recall correctly, is British, while his support ships are all Pirate.
 
I can't think of any situations where AI ships are supposed to attack other AI ships which would normally be friendly. But back to "Tales of a Sea Hawk", what about AI ships which aren't supposed to attack other AI ships that would normally be hostile? Sovereign of the Seas is Silehard's ship in the battle at Cozumel and, if I recall correctly, is British, while his support ships are all Pirate.
That might be a tricky one. I'd probably need to see the scene to find out what happens and needs to be done.
I've been thinking of adding a "surrendered" attribute to some ships to skip the whole automated relations functionality.

A better idea might be to add a different character attribute to REALLY skip all of this functionality.
Then we can add that to specific quest ships so we gain manual control over their relations and can do whatever we want with them for story purposes.
 
As far as I'm aware, the whole nations and relations functionality is now pretty much at an acceptable level.
So I won't continue further development on this for a while; not until we've had some good testing to check if it does now indeed do what I think it does.

If I can get the feedback I need by coming Monday, we can look into balancing the dynamic false flag detection next week so that we can do away with the 100% detection chance at last.
Hopefully it will then all be fully functional shortly after.
 
It's broken again. :( Here's me losing a lot of reputation after manually aiming at a ship:
rep_loss.jpg

The problem is that it's an enemy ship. It's a pirate and I'm flying a British flag. It hasn't surrendered, it's still hostile and it's still firing at me.

The first time this happened, the enemy ship wasn't flying a pirate flag, or any other flag for that matter, because several salvoes of chainshot meant it didn't have anything left to fly the flag from. I thought perhaps that's why it was counting as having surrendered, though it still showed up hostile on compass and gunsight and fired at me when I moved into arc. After the reputation loss I reloaded a savegame from just before the battle, tried again, and this time got the reputation loss while the enemy ship still had a mast - well, I never really thought the explanation about having no mast and therefore no flag was correct anyway.

It didn't happen every time I fired manually and it never happened when I fired with auto-aim. Attached is the pre-battle savegame along with the compile and save logs from just after a reputation loss.
 

Attachments

  • -=Player=- Open Sea June 26th, 1798.zip
    667.9 KB · Views: 83
  • compile.log
    4.7 KB · Views: 92
  • system.log
    2.5 KB · Views: 101
Back
Top