• 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

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
We were discussing this some time ago and we should probanly look into it some more.

While ships can recognize false flags in real-time as you come closer, due to game engine limitations forts can not.
This can result in stupid situations where a French ship recognizes you as an enemy right under the French fort's guns and the fort does not respond at all.
That is a bit of an exploit, of course!

Simplest solution that I could suggest is to automatically hoist the player flag when you are recognized.
That should update the fort too, which seems fair enough to me.
 
Please, no. Partly because I don't want the game messing with my flag. Partly because I never use personal flag anyway. And partly because it may break that part of "Tales of a Sea Hawk" when you have to sail into St. Pierre, Martinique, to get the job of escorting the Oiseau.

There may be other occasions, either as part of a quest or as part of what you're doing anyway, when you have to enter a hostile port under a false flag. You may be able to deal with ships which have recognised you but it's going to break the game if you have to fight the fort as well and don't have a battleship.

If this really must be dealt with then give the player a massive reputation penalty if you fire on a ship with a friendly flag, regardless of whether it's firing at you. If you want to defend yourself at that French ship which has recognised you then you must first hoist, say, a British flag, and that will set the fort against you. Or you can just keep your French flag up, accept the damage from the other ship, and all the fort can see is one ship with French colours firing at another ship with French colours so it doesn't know which one to attack.
 
Hm... an idea: When the player gets recognized in an enemy port, we add a log message like this: 'Alarm! An Intruder/Spy/etc..' and then you automatically hoist the pirate flag/personal flag (I'd prefer the pirate flag here). BUT: We add a perk (I love adding perks :D ) that prevents this, so only ships recognize you. OR: We could code it that way, if you are just a normal trader/freeboater (so no national rank), you can get recognized, but ships won't open fire, unless you fire at them. If you are e.g. Commodore at the British Navy and sail under a false french flag to Martinique and you get recognized, the game automatically hoists the british flag again (so the flag of your nation). Sounds too complicated, right?^^
 
If a French ship recognizes you while in range of the fort's guns, it makes no logical sense for the fort to take no action whatsoever.
Sailing straight into an enemy port under the fort's cannons SHOULD be dangerous and right now it very simply is not.

Doing what I propose still leaves things easier for the player than it technically should be.
Ideally I would like it if the fort could recognize you just like any on-sea ship could. After all, why not? Only reason is game engine limitations here.
As per my suggestion, we change this to depend on the ships around. So if there AREN'T any ships to recognize you in the vicinity of the fort, then you're good.
Additionally, in the early game when you aren't well-known yet and most ships believe your false flags, so will the fort.

If the worst comes to the worst and you REALLY must go into that port and you cannot seem to manage it without being recognized,
you can always buy peace at a pirate tavern and then nobody has any reason left to fire on you.
Or take the back door from a shore somewhere. Because if the risk is too great, then you should find a different route.

I am aware that what I proposed isn't perfect. But it would be the simplest solution that would at least make this whole thing a bit more believable.

In the end, what I would like is that it should be proper dangerous to visit enemy towns! Because why shouldn't it be? They're enemy towns!
This should apply both while proceeding in under false flag as well as while in the town where the guards may catch you any time.
 
Hm... an idea: When the player gets recognized in an enemy port, we add a log message like this: 'Alarm! An Intruder/Spy/etc..' and then you automatically hoist the pirate flag/personal flag (I'd prefer the pirate flag here). BUT: We add a perk (I love adding perks :D ) that prevents this, so only ships recognize you. OR: We could code it that way, if you are just a normal trader/freeboater (so no national rank), you can get recognized, but ships won't open fire, unless you fire at them. If you are e.g. Commodore at the British Navy and sail under a false french flag to Martinique and you get recognized, the game automatically hoists the british flag again (so the flag of your nation). Sounds too complicated, right?^^
Doesn't sound impossible though. I see potential there.

This whole thing will require some proper thinking through. While we can come up with "ideal scenarios", we also have to deal with the way the game is set up right now.
We should really try to NOT have to rewrite all sea AI relation code if we can avoid it, because that is bound to cause more trouble than it solves.
So ideallt we should remain within the confines of what we have right now and build on that to make things more sensible.
 
I Think making the player raise the jolly roger or him own flag once spotted sounds good. Maybe we could introduce a perk which makes it harder for enemies to detect you fly a false flag. How does that sound?
 
Maybe we could introduce a perk which makes it harder for enemies to detect you fly a false flag. How does that sound?
Not a bad idea, otherwise it may become TOO impossible in the later game to fool anyone.
Though it depends on how you play: If you make a name for yourself, then fooling anyone becomes hard.
 
I added a poll to the opening post to see how people would like this to work.

Note that we won't do this for Beta 3.4, but I definitely have it on the wish-list for Beta 3.5 to have something done about this!
 
My instinct says rewriting is the best option, but probably that means I have to do it so I voted for the simple solution.
I am however planning on adding a perk for this.
I was thinking of having a perk called "Disguiser" or something like that. I might also have something to do with guards recognising you on the street and it MIGHT also give the tailor a better job..... lets see who can follow where I'm going.
 
My instinct says rewriting is the best option, but probably that means I have to do it so I voted for the simple solution.
Would probably be best. But sooo much work. I'd like to avoid that if we can.... :wp

I was thinking of having a perk called "Disguiser" or something like that. I might also have something to do with guards recognising you on the street and it MIGHT also give the tailor a better job..... lets see who can follow where I'm going.
Me = intrigued.
 
I will try the "automatic hoist player flag" idea after Beta 3.4 is released. Then we can see how that works out and establish if anything else is required.
 
Relevant code for this is....

PROGRAM\SEA_AI\sea.c:
Code:
  if (ENABLE_FLAGS && !bLoadSavedGame && !bDirectSail)
   {
     int MyFlag = GetCurrentFlag();
     bRecognized = false;
     if (iForceDetectionFalseFlag == 1)
     {
         MyFlag = PERSONAL_NATION;
         bRecognized = true;
         if (iRealismMode<2) Log_SetStringToLog(TranslateString("", "We are recognized, captain!"));
     }
     HoistFlag(MyFlag);
     SetRelationsForFlag(MyFlag);
   }
And:
Code:
PROGRAM\Screwface_functions.c:[CODE]
      if(Recognized==true && GetRMRelationType(GetActualRMRelation(sti(chr.nation))) == RELATION_ENEMY && !Checkattribute(chr,"recognized"))
       {
         chr.recognized = 1;
         chr.EnemyShipName = Pchar.Ship.Name;
         chr.EnemyShipType = Pchar.Ship.Type;
         if(iRealismMode<2) Log_SetStringToLog(TranslateString("", "We are recognized, captain!"));
         SetCharacterRelationBoth(sti(chr.index), sti(Pchar.index), RELATION_ENEMY);
         // Each ship of group must have recognized you just in case where leader would surrender or be destroyed
         bool fini = false;
         while (!fini)
         {
           int iCharacterIndex = Group_GetCharacterIndexR(rGroup, i); i++;
           if(iCharacterIndex >= 0)
           {
             Characters[iCharacterIndex].recognized = 1;
             Characters[iCharacterIndex].EnemyShipName = Pchar.Ship.Name;
             Characters[iCharacterIndex].EnemyShipType = Pchar.Ship.Type;
           }
           else
           {
             fini = true;
           }
         }
         UpdateRelations();
       }

And here is the code that hoists a pirate flag:
Code:
  case "BI_HoistFlag":
     // PB: Update Changed Flag -->

     // store old playernation
     PChar.orgnation = PChar.nation;   // ccc dec 05

     // become an evil pirate
     PChar.flagchanged = 1; // Screwface
     for (cc = 0; cc < 4; cc++)
     {
       compIdx = GetCompanionIndex(PChar, cc);
       if(compIdx < 0) continue;
       if(GetRemovable(GetCharacter(compIdx)))
       {
         Characters[compIdx].nation = PIRATE;
         Characters[compIdx].Flags.DoRefresh = true;
       }
     }
     if (ENABLE_FLAGS == 1) {
       HoistFlag(PIRATE);
       SetRelationsForFlag(PIRATE);
     }
     RefreshBattleInterface(); // TIH helps to refresh minimap colors if relation changed Aug27'06
     RefreshFlags(); // KK
     LogIt(TranslateString("","You have hoisted a Pirate flag! Argh!"));
     if (ENABLE_EXTRA_SOUNDS == 1) PlaySound("OBJECTS\abordage\abordage_wining.wav");
     // PB: Update Changed Flag <--
   break;

So the suggestion would to adapt that pirate flag code for use in Screwface_functions.c and see what happens. :wp
 
I've been thinking a bit about flags. It would be nice to be forced, or at least strongly encouraged, to hoist your own national flag before opening fire on an enemy. One snag is that once battle has started, e.g. if the enemy recognised your false flag and fired first, you can't change flag. On the other hand, there was a suggestion of forcing a change of flag if you've been recognised by an enemy ship so that the fort will join in.

My suggestion, then, is to work out what nation a player is serving. That would be the one in which he holds the highest rank - pretty easy for a commissioned officer, may need to work it out for a privateer with multiple letters of marque. Then, when battle starts, force a change to that flag. Maybe have an option in one of the configuration files so that you can choose to have personal flag forced instead. That simultaneously takes care of forts not firing when they should and you fighting under a false flag.

Multiple letters of marque: there are (at least) three ways to go here. Ultra-patriotic: if you already have a letter of marque, no other governor will give you one, you can only serve one master. Semi-patriotic: the governor doesn't mind if you have a letter of marque from an allied nation, you're probably fighting the same enemy anyway. Pragmatic: the governor doesn't care what letter of marque you already have, if it's from an enemy nation then all you can do without voiding one of them is to hunt pirates, which frees up some of his navy ships to fight the war against an enemy nation.

Realistically, there should be no distinction between personal and pirate flags. Legally there would be no such distinction - if you're not flying a national flag, particularly if you then attack another ship, you're a pirate. Practically there would be no such distinction - if you're commander of a ship or fort, and another ship approaches flying no national flag but instead flying some irregular banner, you treat it as a pirate. (If you recognise the personal flag, it probably means the owner is famous, which in this game means he's a pirate!) The only way you'd be allowed to fire at another ship without being navy is if it fired first and you're defending yourself, a loophole which probably kept lawyers in comfortable homes all across the Caribbean. :)
 
There IS a GetServedNation() function that I used a few times in code related to this.
It returns PERSONAL_NATION by default, but otherwise returns the nation that gave you your last promotion.

Instead of always hoisting personal flag, we could also have the game hoist that flag instead.
Problem is though that unless you are a navy officer, personal relations are NOT tied to any one nation in the game.
All nations treat you as your own person; it has been like that since the original game and the "personal flag" basically retains that functionality.

It is indeed not realistic to fly your personal flag, but I'm not sure of disabling this feature altogether or forcing it to result in hostile relations to all nations.
This is also because many players might like to fly their own flag, which I do not think we should penalize.
 
For further thought, consider the following situation:
England and France are at peace. The player has an English LoM, but for whatever reason is hated by France anyway.

If you approach a French ship under French colours (eg. false flag), they may recognize you.
If you auto-hoist your "served nation flag" at this time, you'll end up flying English colours which doesn't make sense as England and France are not hostile to each other.

Not entirely sure what would happen if you approach that French ship under English colours.
It technically isn't a "false" flag per se, but I think the French ship would recognize you anyway for being hostile to France.

The only flag that always triggers your correct on-sea relations with other nations ships is your "personal flag".
In a way, you can indeed consider this as partly pirate behaviour, because flying your personal flag, the French will KNOW that you are an enemy and treat you as such.
However, since you are friendly with England, they would also know to be friendly with you at sea.

One thing that *may* be possible if you are recognized:
1. Check your "served nation"; if this is hostile to the ship that recognizes you, hoist that
2. If your served nation is NOT hostile to the encountered ship, only then hoist your personal flag

That might be more realistic as @Grey Roger suggests, but it is also less simple than always hoisting your personal flag.
Of course either way an exception should be made for "professional navy" characters, who of course should always hoist their served flag.
 
When deciding which flag to hoist, see if you serve any nation hostile to the ship you're facing, pick the highest of those and hoist its flag.

Otherwise, why are you hostile to France if you're supposed to be serving England and they're not at war with France? Have you been attacking French ships anyway? If so, it wasn't in the service of your nation, and that makes you a pirate. In that case, hoist your pirate flag!

Or, England and France were at war, and you attacked French shipping under your letter of marque. They're now at peace and France now considers you a pirate. That's the risk of being a privateer as opposed to a commissioned officer - there are greater rewards and greater freedom to being a privateer, there should be risks to go with them, and being caught out by changing international relations is one of them.
 
When deciding which flag to hoist, see if you serve any nation hostile to the ship you're facing, pick the highest of those and hoist its flag.
Awww.... I like simple coding! :razz

Otherwise, why are you hostile to France if you're supposed to be serving England and they're not at war with France? Have you been attacking French ships anyway? If so, it wasn't in the service of your nation, and that makes you a pirate. In that case, hoist your pirate flag!
I thought you were saying your personal flag is like a pirate flag anyway?
Not sure about auto-hoisting a pirate flag though, because that will make ALL other ships at sea turn hostile as well instead of just the ship(s) that recognized you.

Or, England and France were at war, and you attacked French shipping under your letter of marque. They're now at peace and France now considers you a pirate. That's the risk of being a privateer as opposed to a commissioned officer - there are greater rewards and greater freedom to being a privateer, there should be risks to go with them, and being caught out by changing international relations is one of them.
LOL! You make it sound quite fun. :cheeky
 
I thought you were saying your personal flag is like a pirate flag anyway?
Yes, which would mean a personal non-pirate flag wouldn't even be an option. ;)
Not sure about auto-hoisting a pirate flag though, because that will make ALL other ships at sea turn hostile as well instead of just the ship(s) that recognized you.
Remember, the law is that if you're attacking a ship and you're not a naval (or privateer) ship serving a nation hostile to that ship, you are a pirate. As for other ships, what they see is a ship which is flying no national flag but some sort of custom flag, and pirate flags weren't all variants on a theme of bony bits on black (neither are those in the game). If the other ships recognise your flag then you're famous, and what are all the descriptions of fame in PoTC? ;) If they don't recognise your flag - well, let's suppose I draw a nice new design for a flag, post a picture of it here and don't tell anyone what it's supposed to be, you can't tell if it's a personal or pirate flag, and neither can those ships.
 
Technically and realistically, I cannot fault your logic since it does make sense.

But we have some extra things to consider here that do not exist in the real world:

Programming:
Big changes require time and effort and risk breaking things.
I know the relations system is very fragile as it is and sometimes makes very little sense as written.
So I'm inclined to tread carefully there....

Gameplay:
Making things fully sensible would limit player freedom. Should we force that or allow players the choice at any time in the game?
Right now, the "personal flag" technically admittedly doesn't make any sense. But removing the feature altogether sounds a bit drastic.
Same for treating it the same way as a pirate flag.

Player Familiarity:
Some players might get quite confused if they are familiar with the original game or if they do not really think along proper historical lines.

Player Customization:
Many people will be wanting to fly whatever flag they like the look of, regardless of nationality. Right now the "personal nation" allows you that choice.
Of course virtually nobody in real historically would have ever done that, but getting rid of that feature would not be a popular change at all.

If we want to keep the choice of a "personal flag", how would you propose it should be treated? I see several options:
1. Keep as-is: The player is treated as his/her own entity in the game world and isn't joined with any particular nation
2. Player nation = pirate
3. Only allow player nation use after reaching a certain "fame" level

There are probably more, but I don't have time to think about this further right now.
 
Taking into account all the above, I propose we develop this change in stages and see what effect our changes have.

First Stage:
When recognized you auto-hoist your Personal Flag, unless you are a professional navy character in which case you hoist your Served Nation Flag

Second Stage:
Figure out how to treat non-navy characters. For example, make privateers fly their Served Nation Flag instead of Personal Flag as well.

Perhaps some sort of extra toggle between both behaviours would be required. This could be related to:
- Separate toggle for "Patriot": Agh! I like to avoid those if I can.
- Linked to Realism Mode: Eg. on Arcade your Personal Flag is used and on any other mode it is not
- Linked to Player Ability: Perk-related (see below)
- Linked to Player Action or Event: Fame-related or after special event (see below)

Third Stage:
Figure out how to bring some extra realism to the use of your Personal Flag. Couple of options:
- No Personal Flag at all: This does not sound like a good idea to me....
- Personal Flag only available on Arcade Game Mode
- Personal Flag "unlocked" after getting a to-be-added "Personal Nation" perk
- Personal Flag "unlocked" after reaching a certain fame level (would finally give players some incentive to actually BE famous)
- Personal Flag "unlocked" after capturing a town for yourself and therefore establishing your own nation as being a political faction

Fourth Stage:

Think of what other things should be affected by all the above. Such as:
- Should getting multiple LoMs at the same time be allowed or not? This may call for another player ability to unlock multiple LoMs.
- Should Personal Nation remain a starting game option?
At the moment that is a bit of an easy choice, because it starts you out as being friendly with everyone except the pirates.

So a lot of things to do here. Comments and suggestions appreciated so that we can fill in these proposed stages further.
And... then actually get started on developing this! :cheeky
 
Last edited:
Back
Top