• 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!

Solved False Flag Code Not Working (Need help to track this down!)

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
NOTE: This is in Build 14 Beta 3 WIP 15

The false flag does not work well at all now. All it does is stop the forts from firing on you.
I really need more information on what is going on here. Just did a test of my own:
1. Started a new Master & Commander game
2. Went to sea straight away: several American and Spanish ships
3. They were all HOSTILE to me straight away, despite me flying an American flag
4. Check my Nation Relations menu
5. Now they ARE neutral

Can anyone confirm that? :shock

Edit: Yep, looking at Nation Relations DOES seem to make quite a difference. On my second test, four out of six US ships went friendly again as soon as I did that.
 
what shall we do to help you?
I didn't tested it yet, but I can say (standard-storyline):
- You cannot change flags if enemies are around you
- Forts can sometimes shoot, even if you are not in the "enemy-zone" . That means, you can change your flag sometimes even if you get shot by a fort and in the next second it stops firing and you can moor. Alltough, it didn't worked on tortuga, where I forgot to change my flag, and had a english hoisted. I was too close to change the flag, so I just hoisted the pirate flag in the command menu. This doesn't work.
This also means, that I was in the relations menu and it didn't changed anything. I even travelled to other ships to escape the fort and looked into the relation-interface. They were still enemies then :shrug
 
This code is being massively confusing. As far as I can tell, all the right code is executed to make this work properly straight away.
But it doesn't. It seems the game can't quite make up its mind on whether ships hate me or not.

I'm trying at the start of the Jan Lafitte storyline straight out of San Juan port.
Sometimes the ships are properly neutral. But then.... sometimes they're not.
And then sometimes opening the Nation Relations menu fixes it. For some. But sometimes not.
And executing this through console doesn't seem to be good enough either:
Code:
    pchar.nation = SPAIN;
    HoistFlag(SPAIN);
    SetRelationsForFlag(SPAIN);
    UpdateRelations();
    RefreshBattleInterface();

Does anyone know if this same problem applied to Beta 3 WIP 13 or WIP 14?
I suspect WIP 13 was fine, because there the whole personal starting relations were messed up. :facepalm
 
- You cannot change flags if enemies are around you
That is perfectly normal. No point ayway; they would all SEE you change.

- Forts can sometimes shoot, even if you are not in the "enemy-zone" .
Whether forts can shoot you depends on their cannon range. The "enemy zone" seems to be defined independent of this.
 
hmm.. see my post in advanced interfaces.. I could install WIP13 or WIP14 again for testing
But.. really.. I don't have any problems with that :confused:
I remember quite good that everything worked fine with this in WIP14. Also WIP15 until now, like I said above.
 
Definitely NOT working fine. Behaviour seems near-random. Start a new game on Jean Lafitte, make a save just before setting sail.
Make sure you're on Arcade Game Mode. When you set sail, see if the ships around are hostile to you and compare to your Nation Relations.
Then observe that it may have changed after closing that interface again.

I just disabled the "flag recognizing" code altogether and it is still going wrong. Well, at least we know THAT is NOT the problem.
But then what is???
 
o_O indeed.. just made a quick test.. I had hoisted the (permanent) jolly roger. Got into a battle between the english and the pirates. Everything was ok.. english of course enemy, pirates neutral. Went into relations-interface and .. only enemies :confusing: Also the relation interface was weird then. I couldn't choose a flag (which is intended, I think) but the strange thing was: the pirates had a "friendly" symbol (the two beer jars) but had -60 points.
I'm only guessing right now.. but maybe something in the new relation/flag code affects the other code in a bad way?

AHHHH I've got some nice error.logs again ;)
Code:
RUNTIME ERROR - file: MAXIMUS_Functions.c; line: 2570
uninitialized aref
RUNTIME ERROR - file: MAXIMUS_Functions.c; line: 2570
AClass ERROR n1
This error is there like 50 times

Code:
RUNTIME ERROR - file: ships\ships.c; line: 743
missed attribute: group
RUNTIME ERROR - file: ships\ships.c; line: 743
no rAP data
and this also. Though I have no idea what the ships.c should have to do with the relations o_O
 
o_O indeed.. just made a quick test.. I had hoisted the (permanent) jolly roger. Got into a battle between the english and the pirates. Everything was ok.. english of course enemy, pirates neutral. Went into relations-interface and .. only enemies :confusing: Also the relation interface was weird then. I couldn't choose a flag (which is intended, I think) but the strange thing was: the pirates had a "friendly" symbol (the two beer jars) but had -60 points.
I'm only guessing right now.. but maybe something in the new relation/flag code affects the other code in a bad way?
Are you sure you are understanding that interface yet?
Those symbols under the "flag" are their current relations at sea, so if you're flying pirate colours, that should be friendly.
For clarity's sake, I do think we should eventually move the column with numbers further left as it matches with your personal relations and NOT your flag relations.

I don't think using a pirate flag will work well for testing though. Unless the pirate ships are ALSO still being hostile to you.
Better to use the standard Spanish flag in the Jean Lafitte storyline, for example.

AHHHH I've got some nice error.logs again ;)
Code:
RUNTIME ERROR - file: MAXIMUS_Functions.c; line: 2570
uninitialized aref
RUNTIME ERROR - file: MAXIMUS_Functions.c; line: 2570
AClass ERROR n1
This error is there like 50 times
That code is related to sidestepping.


Code:
RUNTIME ERROR - file: ships\ships.c; line: 743
missed attribute: group
RUNTIME ERROR - file: ships\ships.c; line: 743
no rAP data
and this also. Though I have no idea what the ships.c should have to do with the relations o_O
That code is just trying to check if a ship is a merchant to decide what visible flag to put on her.
 
What I have seen with the false flag is really random. First, you get recognised even when you can not even see any ships at all. Then whether they go hostile or not depends on their distance.
Now this is the random part.
Sometimes they are hostile before you see them. Your first sight of them is them coming at you at full speed. This usually happens at the start of a game when your skills and luck are low. This usually means game over.
Later in the game you are recognized immediately but you can get within 1,000 yards before they go hostile or even closer if visibility is bad, like at night. Then you can sneak in and the fort will not fire on you. This is needed in order to complete the standard storyline.

How famous does one need to be to be instantly recognized by common soldiers and townfolk? They did not have photography back then. If you are an Admiral or a famous Pirate then yes you would be recognized, but if you are not famous only people you have dealt with would recognize you.
Smuggling was quite common then so the townfolk would not care about another smuggler, only the military. And successful smugglers, by definition, do not come to the military's attention.
Also, some of the storylines require you to go into hostile towns and if you had to fight everyone as soon as you set foot in town, would that not break the storyline?
 
Even executing this through console isn't good enough:
Code:
    for (i = 0; i < iNumShips; i++)
    {
        if (Ships[i] < 0) continue;
        ch = GetCharacter(Ships[i]);
        LogIt("Setting relation to neutral for " + ch.id);
        SetCharacterRelationBoth(Ships[i], GetMainCharacterIndex(), RELATION_NEUTRAL);
    }
    RefreshBattleInterface();
Something is big time messed up and I don't know what it is.

Can anyone confirm that it DID work properly in Beta 2.5? Am I going to have to restore more code to its original state?
Character relation code is scary.... o_O
 
I started a new game (Assassin) in beta 15 and I have not seen the "we are recognized" warning and since I have no compass I do not know when they go hostile. I do know that one Spanish ship surrendered while it was approx. 700 yards away. The funny thing was that no shots were fired and I was trying to avoid it. I could not take it because it was right next to a fort.
 
There is little point in testing this further in WIP 15, I suppose. It is bugged and it appears simple solutions aren't good enough.
Can you confirm it worked properly in WIP 12? Then I'm going to have to try to do more code restoring.
I'm REALLY looking forward to the day when this is over and done with. :modding
 
I have been playing WIP 12 until last night and today. It works pretty much like I described in post #10 methinks. Its hard to say because I am playing the standard storyline there and avoided hostiles early on. The Assassin storyline is the one where I dive right into smuggling right from the start. I sell any excess gear and head straight for Puerto Rico.
 
Are you saying it is really random in WIP 12 as well? REALLY???? :shock
 
As well as I can remember the false flag thing has never worked well.

Typically I get recognized right away at any and all levels. Then depending on the ship type they will turn away and keep their distance or close in. When any ship gets close enough (500-600 yards?) they all turn hostile.

What is new, and I suspect this is fixed, is the distance at which they react to you. I got quite upset to see warships charging at me from extreme distances when it should not be possible for them to recognize you.
 
As well as I can remember the false flag thing has never worked well.
I'm pretty sure it used to. At some point. Might have been as long ago as Beta 1 or before, though. Screwface DID have it working at some point.
Just wished I knew when it still did work.

Typically I get recognized right away at any and all levels.
You mean they're hostile straight away when the scene is loaded?
Could you try in Arcade Game Mode? The Sail-To Menu is quite useful then for seeing what is going on with this.

When any ship gets close enough (500-600 yards?) they all turn hostile.
That is what is supposed to happen. The closer you get, the higher the chance for being recognized.

What is new, and I suspect this is fixed, is the distance at which they react to you. I got quite upset to see warships charging at me from extreme distances when it should not be possible for them to recognize you.
The worst part is that it is NOT the actual false flags code doing this at all. I completely disabled that code and it still doesn't make any sense.
Things should start out with ships just being neutral to you when the scene is loaded and I can't even manage that. :modding
 
They do not recognize me immediately. It takes 1-2 minutes before the message appears, but there are often no ship close enough to see you well. If I can not tell what nationality they are, then how can they tell who I am? I now try to judge who they are by their actions. If the hold their course they are probably neutral, but if the veer away or towards me they are probably hostile.

In the Open Sea mod I either direct sail to an island or use the World Map. The world map drops me so far away that I often can not see the island, or maybs just the surf line. Either way I am waay out there and have to warily approach the island over many hours.

Oh wait, you say it is not the false flag doing it? So the false flag works but the ship recognition overrides it causing all ships to react immediately. :facepalm
 
Oh wait, you say it is not the false flag doing it? So the false flag works but the ship recognition overrides it causing all ships to react immediately. :facepalm
There is no deliberate recognizing involved at all. It's just doing weird shit.
The code related to that never even executes and they already go hostile. Some of them anyway.
 
Back
Top