To some extent, yes. Except that the fort saw me pirate the SP_CastelF. Anyway, I added your modifications from post 78 and the problem is solved. At least, it is now.But what is the part that seems wrong to you? I read through that 1.5 times and I must be missing something.
^ There it also seems like it is doing exactly what you meant it to.Code:FLAGS: The 'Santiago Fort' has spotted us at 696.52 and will remember us as Pirate in Shnyava2 with visibility=867.5 [...] FLAGS: The 'Santiago Fort' remembered us as having Shnyava2, which we no longer have.
After adding those modifications I tested it by reloading my Playa de Sierra Maestra savegame, capturing the payroll ship, then going away and pirating something else. When I returned to Santiago I wasn't attacked and "compile.log" correctly reported that Santiago fort remembered me being in a SP_CastelF which I no longer had. Then I reloaded the savegame, captured the payroll ship, went away and did not get a new ship, and returned to Santiago. The fort still didn't attack me and "compile.log" still reported that the fort remembered me being in a SP_CastelF which I no longer had. Huh?
This is why:
Code:
compidx = GetCompanionIndex(GetMainCharacter(), n);
if (compidx > 0)
I merely put the forget code in the same place as the remember code. If it can remember your ship then it can forget because you don't have it any more. When you next come within visible range, if you give them reason to remember your new ship then that's when they'll remember it. If you don't come within visible range then it doesn't really matter.Should the ResetCharacterMemory not be triggered only within visible range? Otherwise they'd forget even if they don't even know you're there.
And when they do forget, shouldn't they immediately remember your new ship and flag instead?
It wasn't a player mistake - he's not to know that some time in the future Portugal and France will go to war, so at the time it was fine. Another possible scenario is if you're on good terms with Portugal and Holland, they're on good terms with each other, you've just come from Kralendijk so you're flying a Dutch flag, and you're planning on going back soon so there's no reason to change to Portuguese. If Sao Jorge remembers you as Dutch and Portugal later goes to war with Holland, you're in trouble next time you visit Sao Jorge even though you've personally done nothing against Portugal. But if Sao Jorge doesn't care about you when it sees you as a friend then, provided you don't do anything to provoke them, it still won't care if you return as a friend.While Hylie's example was definitely surprising, as I said earlier, I don't see it as being actually wrong.
For all that fort knows, the flag you flew last time was actually true. Which means that now you're an enemy because war has been declared.
They don't know it was a false flag. There was no need to use that flag, so that makes it a player mistake, not an issue with the system.
Maybe increase visibility ranges again? Anyway, I suspect that's rather optimistic because even in WW2 with better optics, it wasn't that easy to identify a ship properly until it got rather closer. That's from reading books written by the ships' officers about real events, not fiction.Reading Hornblower, those crews can recognize specific ships (with names!) when they appear at the horizon, quite literally "from the cut of their jibs", e.g. from their rigging.
So if ship crews can do that, it isn't such a stretch that a fort could maintain some sort of log of all ships that it sees.
If they did that, they'd end up with so much paper that they'd never have been able to find the record of the ships which were actually important, i.e. the ones they knew to be suspicious.Probably this wouldn't be 100% watertight as ship identification systems and record keeping at the time must have been less good than they are now.
But still, I imagine they would have given it their best shot.
On the other hand, thinking about it a bit more, I'm inclined to agree with you on making the memory depend on model rather than type, provided a default model is indeed assigned where none is specified in the ship's own entry in "Ships_init.c". My analogy with a crook repainting a car to avoid detection would be valid if repainting the ship was as much of an effort as repainting a car to a good enough standard to be convincing, which it isn't; and anyway, detecting model rather than type doesn't get in the way of doing what I want to do, which is go away, pirate something else, then return and the fort doesn't remember me as I'm not in the ship it saw me steal.
So, pending a test of whether "GetCharacterShipModel" works as intended, try this version. Friendly ships still aren't remembered but ships which are worth remembering should now be remembered by model rather than type.