• 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
Pretty much the last line in the large section of code in my post 26 on the previous page.
 
Do not work in what way?
Are you still being recognized too quickly?
Yes.

Starting from Kingston with a new game of "Nelson's First Command", the first place I went was San Juan, where I sneaked in under a false Spanish flag without any trouble. This, as I realised when I later checked Relations, was because Spain was not at war with Britain in this scenario. The Spanish ships probably did recognise me and laughed themselves silly. :facepalm

The second place I went was St. Pierre, which was a different matter. France was at war with Britain and despite me being so unknown that the French shouldn't know me from a smoked mackerel, the ships in port did in fact recognise me. It's just as well the fort didn't join in otherwise neither I nor Vigila Mendes would have had time to think "Oops, wrong turn" before being proud skippers of two piles of driftwood.

In town, the store was quite happy to trade with me but the shipyard was not. Possibly because Arnaud Matton has to be able to trade with you for quest purposes?
 
In town, the store was quite happy to trade with me but the shipyard was not. Possibly because Arnaud Matton has to be able to trade with you for quest purposes?
Store and shipyard all have a false flag detection chance too. So you might be able to fool them, but not always.
And when they don't believe your flag, they'll remember.

The second place I went was St. Pierre, which was a different matter. France was at war with Britain and despite me being so unknown that the French shouldn't know me from a smoked mackerel, the ships in port did in fact recognise me. It's just as well the fort didn't join in otherwise neither I nor Vigila Mendes would have had time to think "Oops, wrong turn" before being proud skippers of two piles of driftwood.
Which difficulty are you playing at?

I think having this feature difficulty-related is asking for trouble. We should just come up with one set of values that works well for gameplay instead.
In PROGRAM\NATIONS\nations.c find:
Code:
  chance = chance * difficulty/2.0;     // 0.5, 1.0, 1.5, 2.0
   //   chance = chance * (difficulty+1)/3.0;     // alternate difficulty calculation 0.67, 1,0, 1.33, 1.67
Replace with:
Code:
chance = chance * 0.5;
See if that makes a difference. If not, keep decreasing that 0.5 value until it seems right to you.
Only thing we have to be careful of is to not decrease it TOO far otherwise nobody will ever recognize you which doesn't really make for good gameplay.... :wp
 
I'll need your help on the above to set the values in such a way that false flag detection is a useful and fun feature, but also reasonably challenging.
Balancing requires substantial playtesting with different versions, so your help on this would be much appreciated.
Can't truly figure out improvements to the on-sea nation relations work unless we get this sorted out.
Especially @Hylie Pistof and @Grey Roger.
 
I think they should have a large chance of regocnising you and if your fame is very high or low even more (on a scale from 0 to 1 the normal chance should be round 0.75 and with high fame round 0.95) then I can make a perk which would trim down the chance a bit (to say 0.5 and 0.8 or so)
 
Note that the recognizing chance is ship-specific, depends on distance and is used in real-time.
So you can't really express it in percentages and the resulting values do need to remain small.

As far as I'm concerned, in the early game when nobody knows you, you should hardly ever be recognized.
So that means you could mostly get into enemy ports quite safely, which makes sense also in regards to the Standard storyline.
Then in the later game this should turn around so that you can basically not use a false flag anymore because everybody knows you.

If the chance of being recognizes is quite high from the start and increases in the later game as you become more famous, then this feature becomes close to useless.
 
I dont know for sure but maye we could also make it playstyle depended.
Say you are a merchant but you are sailing a warship this would draw attention more so you are recognised easier, while if you are a navy officer its more normal to sail a warship so you are recognised less easy.

Does that make sense?

moved this to brainstorming btw
 
That would indeed make sense. But perhaps we should first get the current system working reasonably before we make it more complicated.... :wp

moved this to brainstorming btw
While the balancing is still causing troubles for Hylie and Grey Roger, I think we should keep this as a bug that needs to be fixed.
 
I dont know for sure but maye we could also make it playstyle depended.
Say you are a merchant but you are sailing a warship this would draw attention more so you are recognised easier, while if you are a navy officer its more normal to sail a warship so you are recognised less easy.

Does that make sense?
Not really. If the enemy captain knows you're a merchant then he's already recognised you. ;) He might know you're a navy officer because you're in uniform, except the game doesn't take any notice of what you're wearing. If it did, you'd just need to visit a few tailors and get some false uniforms to go with your false flags. But a captain of a warship wearing civilian clothing is probably a privateer, which is fine; what the enemy captain doesn't know is whether the signature on your letter of marque matches the flag on your mast.
 
Don't ask me. I don't do false flags and can't test it now anyway as no one is mad at me.
 
Whereas I'm still trying out side quests as Nelson and I'm close to the ends of both "Strange Things Happening in the Archipelago" and "Hard Labours of an Assassin". Which means both quests will soon send me from San Juan towards Barbados and Grenada respectively, then back again. Martinique and Guadeloupe are directly in the line of travel, France hates me, and I will soon have plenty of opportunity to put this to the test...
 
Both. It doesn't matter if I use the false flag or not, the results are the same. I don't remember if I used that trick you posted a while back or not. It's hard to see that stuff making it not worth the bother.

Pirates aren't even a nuisance. I don't bother them and they don't bother me. Right now all nations are friendly to me, which is a good thing as I am gearing up for the Battles of Bridgetown and Cozumel. I have picked up a British Centurion and a Spanish Heavy Pinnace of War. They might be enough.
 
Both. It doesn't matter if I use the false flag or not, the results are the same. I don't remember if I used that trick you posted a while back or not. It's hard to see that stuff making it not worth the bother.
This will make a difference alright:

In the GetChanceDetectFalseFlag function in PROGRAM\NATIONS\nations.c:
Code:
float GetChanceDetectFalseFlag()
{
   // original code -->
   //   float rank = GetRankFromPoints(GetScore(GetMainCharacter()));
   //   return CHANCE_DETECT_FALSE_FLAG_BASE+(CHANCE_DETECT_FALSE_FLAG_MAX-CHANCE_DETECT_FALSE_FLAG_BASE)*rank/MAX_RANK;
   // original code <--
   // LDH -->
   ref mchr = GetMainCharacter(); // KK
   float score  = GetScore(mchr); // KK
   float rank  = GetRankFromPoints(score);
   int  sneak  = GetSummonSkillFromName(mchr, SKILL_SNEAK);
   int difficulty = GetDifficulty();
   float chance = rank/MAX_RANK * (11.0-sneak)/10.0;
   chance = chance * difficulty/2.0;     // 0.5, 1.0, 1.5, 2.0
   //   chance = chance * (difficulty+1)/3.0;     // alternate difficulty calculation 0.67, 1,0, 1.33, 1.67
   chance = fclamp(CHANCE_DETECT_FALSE_FLAG_BASE, CHANCE_DETECT_FALSE_FLAG_MAX, chance); // PURSEON: so chance doesn't go over min/max
   //   LogIt("False Flag Detection - Score: " + score + ", rank: " + rank + ", Sneak: " + sneak + ", Chance: " + chance*100.0 + "%"); // for testing
   //   LogIt("The chance of your false flag being detected is " + chance*100.0 + "%");   // Tell the player, it might get him used to looking for it.
   return chance;
   // LDH <--
}
Change that last line to return 0;
That should make everybody ALWAYS believe your false flag so you should notice if it doesn't work soon enough.

If that doesn't make things work for you, that proves beyond a shadow of a doubt that this whole functionality is NOT doing what it should.
But I doubt it; it is much more likely a balancing issue.
 
First report:
There are two "Logit" lines which have been commented out. One displays the chance of being detected and according to the comment is intended for players. The other displays all the variables used to calculate the chance and is intended for testing. I removed the comment markers on both so as to activate them. "rank" is presumably fame, which for me is 11 out of 12. "sneak" is presumably luck, which is 7. The formula is:
chance = rank/MAX_RANK * (11.0-sneak)/10.0 * 0.5
That gives me a chance of 18.333%. By contrast a novice player with rank 1 and sneak 1 would get 4.167%. Worst case is a fully famous character with luck 1 who gets 50%.

Starting from a savegame on the beach at Guadeloupe, I put up the French flag, then went to sea. First I did Sail-To the port, and if nothing French was there then I did Sail-To the various ships around the island. Sometimes I get recognised, sometimes I don't; the relative frequency seems to be in line with "chance", though I haven't tried it often enough for a proper statistical report.

How often is "chance" checked? Certainly at least once per ship, which means even if you have a relatively low percentage, a group of four or more ships is quite likely to have one of them get lucky. Shortly thereafter the rest of them turn hostile as well. This happened when I went to Martinique, with the French flag up the whole way. I used worldmap to get from Guadeloupe to Martinique, reverted to 3D sailing near the island, did Sail-To the port, and found a whole load of French ships plus a couple of pirates. I joined in blowing the pirates out of the water. (With the firepower of an Endymion, that's a lot quicker than boarding them, and I wanted the battle over as quickly as possible so as to continue testing.) One of the French ships recognised me and was hostile for a while; I didn't attack it, and a little time later the rest of them turned hostile as well. See previous comment about the firepower of an Endymion. xD

If you only get checked once (per ship), and if range is a factor, then those who Direct Sail all the way from one island to another have an advantage over those who use worldmap to get around and only switch to 3D sailing near the island, because the Direct Sailors will be checked once at maximum range wheras the worldmappers will be checked at shorter range. But if you get checked several times then it's the other way round, Direct Sailors will be checked several times before they get anywhere near port while worldmappers will get checked once, Sail-To the port and dock.

The cursed albatross now becomes a serious liability rather than an amusing Easter egg.

More worrying is that sometimes I'd be attacked by French ships even though no warning about being recognised had appeared. I didn't quite do what you said; instead I inserted line "change = 0;" right above those "Logit" lines. The reports confirmed that I now had 0% chance of being detected, nevertheless I was still attacked. It's unlikely to be someone remembering detecting me before I landed on the beach because before I landed on the beach I had the British flag up, that's why I landed on the beach! So if ships can remember you being hostile earlier, they should all have been hostile every time.
 
False flag detection chance is checked for each ship individually and is called fairly frequently.
Might be once per second, actually. Which means that even apparent low chances can become quite substantial because of how often it is called.

Ships do have a "memory" of whether you were hostile or not, so if they KNEW you to be hostile before going ashore, that could be the reason for them being hostile again.
If I recall, thet actually remember your ship name and type so if you rename your ship, you might be able to turn them friendly again.

The cursed albatross now becomes a serious liability rather than an amusing Easter egg.
Is that still stacked or not? Or do 5 albatrosses still give only -1 Luck?
That shouldn't be that bad. And it'd only be temporary.
 
As I said, I had the British flag up when I went ashore. If the ships are remembering that then they should all be hostile. They weren't.

The albatross reduces your luck by 2. That would raise my chance from 18.333% to 27.5%.

Anyway, it doesn't really matter what the chance is. Best case is someone with no fame and Luck 10, whose chance is then 0.417%. Four ships between them have about 1.666% chance of recognising him, which means if they're checking every second, one or other of them will probably have him in about a minute. Unless you've done something to draw suspicion, they shouldn't be checking anything like that often. (Maybe the captain of the Costa Concordia can claim this as his defence. He'd spotted a ship flying what should be a friendly flag and was checking it every second to make sure it wasn't a pirate in disguise, which is why he didn't notice that he was about to be ambushed by a rock. xD)
 
As I said, I had the British flag up when I went ashore. If the ships are remembering that then they should all be hostile. They weren't.
The memorizing is ship-dependent. A ship that was on the other side of the island when you went ashore would not remember you as being hostile and might believe your friendly flag when you go back to sea.
But a ship that you passed relatively closely would have seen you going in under a British flag.
Try renaming your ship and see if they start believing you again.

The albatross reduces your luck by 2. That would raise my chance from 18.333% to 27.5%.
Was it -2? Ah, I suppose it was. The "Cooking with Albatross" book does -1 Luck and is not hidden to serve as a "hint" for the REAL albatross which does -2 Luck and IS hidden.
Perhaps it would be better to make it -1 Luck and have it stacked? So one Albatross wouldn't be quite that evil on its own?

Anyway, it doesn't really matter what the chance is. Best case is someone with no fame and Luck 10, whose chance is then 0.417%. Four ships between them have about 1.666% chance of recognising him, which means if they're checking every second, one or other of them will probably have him in about a minute. Unless you've done something to draw suspicion, they shouldn't be checking anything like that often. (Maybe the captain of the Costa Concordia can claim this as his defence. He'd spotted a ship flying what should be a friendly flag and was checking it every second to make sure it wasn't a pirate in disguise, which is why he didn't notice that he was about to be ambushed by a rock. xD)
I think the false flag detection code was just dumped into a default function which is run very frequently.
That frequency isn't intentional, but simply a result of what was simple to code at the time.
@Levis was intending to have a look at such too-frequent checks and tone things down a bit. That'll help nicely with performance too.
In the meantime, the range of chance values should just be really, really small. So that while there IS a chance of being recognized any second, that chance is always low.
 
Back
Top