Could it be? I'm not sure. But some of the code I've been looking at does relate to surrendering.
If I have to rewrite that too, this might end up taking a while....
If I have to rewrite that too, this might end up taking a while....
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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
That is why I want the ships to remember the flag you were flying the first time you passed them.What if you were flying a hostile nation flag and therefore got into a fight with a ship which is normally friendly to you? So you were in combat, presumably got far enough away that you aren't in battle any more and can change your flag, so now you raise Personal flag and Sail-To one of the remaining ships. It should remember that you were hostile a moment ago and resume battle, even though you only lost a point or two so your Personal flag is still friendly to them.
Likewise, I want all flag recognition to be executed ONLY to those ships within visible range. So indeed in your scenario, the ships on the other side of the island should remain ignorant.More importantly, even if this group now recognises you, another group which is the other side of the island should have no idea what's going on - radio hasn't been invented yet. So if you finish battle here, then raise either Personal or a friendly nation's flag, the next group should perform their check as if nothing had happened because as far as they know, nothing has happened.
I'm not entirely sold on that one.... One of the main reasons fot auto-hoisting your served nation flag is for simplicity. That would already be an improvement over auto-hoisting your personal flag, as I had originally thought of doing.You should only automatically hoist your Served Nation flag when you start firing - tie it to pressing the buttons to fire the cannons either by auto-aim or manually. Also hoist your Served Nation flag if you board him, but not if he boards you. This is important for the fort - it sees two apparently friendly ship fighting each other and has no idea which one is genuine, and if you don't return fire or initiate boarding then you're still trying to look friendly. In fact, if you keep that up long enough, the fort ought to have a chance of thinking the other ship is the impostor.
If France is friendly with Holland and England and you have a LoM from Holland or England, then you flying an English flag does not trigger false flag detection with France.Some issues we have are for example if you have 2 differents LOM's. You could fly both of these flags without it being a problem ... but ships might recognise this as flying false colours.
Player character ID is always the same: "Blaze". Character name, perhaps. But then renaming yourself becomes a bit of a cheat, just like currently renaming your ship was a bit of a cheat.So I think we should do the following:
When attacking a ship of an nation there is a chance depending on the size of the ship and your repution to get "known" for being an enemy. If you are know your CharacterID (or model) and ShipID will be stored at the nation.
When spotted from "far" the ship will compare the shipID it knows to the one you have. If this is not an unique ship there is a chance it will detect you based on the distance etc. If you have an unique ship it will instantly detect you.
If you get "closer" the ship will compare the CharacterID it know to the CharacterID you have. We could even change this to models so visiting the tailor actually helps .
When detected depending on the rank of the ship it will have a higher chance of know about you. And if it does it will store the CharacterID and ShipID itself too and it will change the relation to enemy.
If you flee from the ship and encounter it again it will now see it has a characterID and ShipID (depending on the dinstance) set already and compare agains that and if it agrees it will instantly set its relation again because it now remembers you.
What you might want to consider is having an array of character and ships or at least a list of multiple ones so companionships etc can also be detected....
And at that point I delete the game and re-install the previous version because I don't want anything to do with personal flags. If it can't figure out which of my LoM's is hostile to Portugal and pick one of them then I don't want it forcing a personal flag on me instead. Or a pirate flag, unless I do something genuinely piratical such as attack a ship without a LoM from a nation hostile to that ship.If France is friendly with Holland and England and you have a LoM from Holland or England, then you flying an English flag does not trigger false flag detection with France.
If Holland is allied with France but hostile to Portugal and England is allied with France and neutral with Portugal, you could try flying a French flag near Portuguese ships.
Your "served nation" is "personal" because you have multiple LoMs. Because the Portuguese ships ARE hostile to you, they can detect you, causing you to hoist your personal flag, which still makes sense.
What happens if you had a second LoM, making you independent; and then either lost it or gave it up, meaning you now only have the English LoM? If, while you had two LoM's, you made an enemy of France, does the loss of the other LoM now tie your relations to England's, causing France to become friendly to you and effectively forgive whatever you did before?It gets weird if you have only an English LoM, England is friendly to France but you are hostile to France. Flying an English flag near a French ship might then trigger false flag detection.
Then you'll hoist an English flag, which you were already flying and doesn't make the French ship hostile either.
But that is a situation that shouldn't be happening in the first place, because your relations are tied to England's anyway.
Unless you started the game as a Pirate, indeed you would NOT be auto-hoisting a Pirate flag unless you actually committed enough acts of piracy to make your friendly with the Pirates.And at that point I delete the game and re-install the previous version because I don't want anything to do with personal flags. If it can't figure out which of my LoM's is hostile to Portugal and pick one of them then I don't want it forcing a personal flag on me instead. Or a pirate flag, unless I do something genuinely piratical such as attack a ship without a LoM from a nation hostile to that ship.
I do see possibilities there and I have some ideas on how to make it work.I'd much prefer if it doesn't force any flag to be hoisted. However, if you open fire while still flying a friendly flag to the enemy then you lose massive reputation points and possibly switch to being a pirate. This would, however, require that whatever stops you from changing flag during a battle is disabled, so that you can choose to hoist a Dutch flag and then fire. But this is likely to be too complicated...
If you go from two LoMs back to one LoM, then indeed your Served Nation gets set back to whatever nation you are now serving. So in your example, you'll go back to serving England.What happens if you had a second LoM, making you independent; and then either lost it or gave it up, meaning you now only have the English LoM? If, while you had two LoM's, you made an enemy of France, does the loss of the other LoM now tie your relations to England's, causing France to become friendly to you and effectively forgive whatever you did before?
Not quite. My idea was that if you have a specific served nation due to having a single LoM then your relations are tied to that nation's, whereas if you are independent then your relations aren't tied to anything. Hoisting a Personal flag was one way of making yourself independent right away, for the benefit of those players who don't want to be tied to a nation at all. The reverse was never intended - if you're independent then you have no served nation, you don't automatically hoist Personal flag when the game feels like it. I have always been opposed to being forced to hoist a Personal flag.Unless you started the game as a Pirate, indeed you would NOT be auto-hoisting a Pirate flag unless you actually committed enough acts of piracy to make your friendly with the Pirates.
And using false flags and multiple LoMs is player choice anyway.
The idea of setting your served nation to PERSONAL_NATION when you have multiple LoMs was your suggestion, if I recall.
I'm just making use of that suggestion here.
That's only because recognition is so broken that your false flag is detected almost at once.At the moment false flags are bugged and you can basically not use them in any sensible way
I'd have thought that if you've given up (or lost) the other LoM so that you now serve England alone, it's inevitable that you'll fly an English flag all over the place, including near French ships. But if you're serving a single nation and flying that nation's flag then you should indeed skip false flag detection, since you're not flying a false flag.If you go from two LoMs back to one LoM, then indeed your Served Nation gets set back to whatever nation you are now serving. So in your example, you'll go back to serving England.
However, your nation relations are then indeed NOT updated until a new random nation relation change affects you.
So then flying an English flag around French ships would be an odd situation. My thinking at the moment is to just skip false flag detection in that case.
It should be an unlikely scenario and the only alternative would be to build in a special exception to then NOT hoist your served nation flag, but hoist Personal instead.
Maybe I combined different ideas with each other than.Not quite. My idea was that if you have a specific served nation due to having a single LoM then your relations are tied to that nation's, whereas if you are independent then your relations aren't tied to anything. Hoisting a Personal flag was one way of making yourself independent right away, for the benefit of those players who don't want to be tied to a nation at all. The reverse was never intended - if you're independent then you have no served nation, you don't automatically hoist Personal flag when the game feels like it. I have always been opposed to being forced to hoist a Personal flag.
Yes.That's only because recognition is so broken that your false flag is detected almost at once.
My intention is to skip false flag detection ONLY when you're flying your personal flag.I'd have thought that if you've given up (or lost) the other LoM so that you now serve England alone, it's inevitable that you'll fly an English flag all over the place, including near French ships. But if you're serving a single nation and flying that nation's flag then you should indeed skip false flag detection, since you're not flying a false flag.
Your nation relations don't change when you get a LoM nor when you are promoted.The only snag there is that you can become a total pirate, raid everyone's ships and get everyone hostile to you. Then you pay a pirate diplomat to make peace with one nation or pay that nation's governor for forgiveness, then buy a LoM, and you're now a loyal servant of that nation and automatically at peace with anyone who is also at peace with that nation. One possible way to hinder that, though not guaranteed to block it in all circumstances, is if you're not allowed to buy a LoM until you are first at peace with the nation and all its allies - once again making the point that alliance isn't the same as neutrality.
float Ship_GetDistance2D(ref rCharacter1, ref rCharacter2)
{
//Levis trying to get the dutchman out of reach when submerged -->
if(CheckAttribute(rCharacter1, "ship.SubmergeDutchman") || CheckAttribute(rCharacter2, "ship.SubmergeDutchman")) return DIST_NOSHIP;
//Levis trying to get the dutchman out of reach when submerged <--
// PB: Correction for forts -->
bool GetFortDist = false;
if (IsMainCharacter(rCharacter1) && GetCharacterShipID(rCharacter2) == SHIP_FORT_NAME) GetFortDist = true;
if (IsMainCharacter(rCharacter2) && GetCharacterShipID(rCharacter1) == SHIP_FORT_NAME) GetFortDist = true;
if (GetFortDist)
{
ref pchar = GetMainCharacter();
int i, fortidx, num;
aref fortattr;
string fortstr;
if (CheckAttribute(pchar, "seaAI.update.forts")) {
makearef(fortattr, pchar.seaAI.update.forts);
num = GetAttributesNum(fortattr);
for (i = 0; i < num; i++) {
fortstr = "l" + i;
fortidx = sti(fortattr.(fortstr).idx);
if (fortidx < 0) continue;
if (fortidx == sti(rCharacter1.index)) return makefloat(fortattr.(fortstr).distance);
if (fortidx == sti(rCharacter2.index)) return makefloat(fortattr.(fortstr).distance);
}
}
}
// PB: Correction for forts -->
// NK temp bugfix
/*if(!CheckAttribute(rCharacter1,"pos")) trace("Char " + rCharacter1 + " has no ship.pos!");
if(!CheckAttribute(rCharacter2,"pos")) trace("Char " + rCharacter2 + " has no ship.pos!");*/
if(!CheckAttribute(rCharacter1,"ship.pos") || !CheckAttribute(rCharacter2,"ship.pos")) return -1.0; // NK 05-04-15
return GetDistance2D(stf(GetAttribute(rCharacter1, "Ship.Pos.x")), stf(GetAttribute(rCharacter1, "Ship.Pos.z")), stf(GetAttribute(rCharacter2, "Ship.Pos.x")), stf(GetAttribute(rCharacter2, "Ship.Pos.z")));
}
Looks like only Redmond fort actually has its position defined. Indeed adding it to the others should be a much better solution!I think for now this is the best option .... we should just add the location of the forts to the forts tough I think ....
I did notice an error last weekend that seemed to return a distance of 0 for all ships when you first enter 3D sailing mode.The single biggest problem isn't forts, though if forts are now recognising false flags as well, this problem has only got worse. The problem is that ships automatically recognise your false flag even if you're totally unknown. Apart from making false flags 100% useless if forts now do the same, it also means that if you're doing "Strange Things Going On", Montanez turns hostile almost right away. This means you have to be careful not to auto-aim in case one of your broadsides is pointing in her general direction - the peashooters on Montanez aren't likely to do you much harm but it will be a bit embarrassing if you save the Animists some trouble by sinking her yourself...
There was definitely some weirdness going on with nation relations in last week's release. But was that with or without this fix?For one thing, Portugal is allied to England, which it shouldn't be in "Early Explorers" and isn't in "Periods.c". This wasn't a result of random relation changes; after I noticed it, I tried reloading earlier savegames to try to find out when it happened, then started a new game and found that Portugal is allied to England right from the start.
Attacking pirate ships reduces your points with the pirates; that part is intentional.Capturing the two animist ships attacking the Montanez turned Pirates from Wary to Hostile right away. This is going to mess up "Early Explorers", especially for Dutch privateers as Holland isn't allied to France. At least, it shouldn't be - again, "Periods.c" shows Holland to be at war with France, yet my Relations table shows them to be allied.
Only 1 point? But you went from Wary to Hostile anyway?After capturing the Mefisto I noticed these messages:
Type: Ship. Points: 1
Add 1. points: You are in the service of England, which is at war with Pirate
Remove 1. points: Pirate and Pirate are allied
Not surprisingly as:False flag recognition by ships still seems to be far too quick and was responsible for two occasions where I tried to dock at Villa de Vega and was interrupted by a ship turning hostile
Indeed they shouldn't.I routinely fly the Portuguese flag during these test sessions. It's friendly to France and Spain (even without the messed up relations from the update), so provided there isn't a Spanish ship which auto-detects the false flag and spoils things, that gets me into any port I need to visit during "Help the Church" and "Strange Things Going On". On the worldmap I am routinely stopped by any Spanish group which gets close enough to me, though I can generally decline battle and continue on my way. Spain is supposed to be allied to Portugal and shouldn't be trying to stop me on the worldmap.
I hadn't installed that; so far the latest thing I've downloaded and installed, other than @Levis' attempted fix for preprocessing, is the 25th July .7z update.There was definitely some weirdness going on with nation relations in last week's release. But was that with or without this fix?
http://www.piratesahoy.net/threads/nation-in-war-with-itself.25537/#post-513247
If it was without it, try again with. If it was already with that fix, is there ANYTHING defined for the relation between Portugal and England in Early Explorers?
At the moment my new code assumes that ALL relations are defined and it might do weird things if nothing is there at all.
Because Holland is hostile to France (at least when the game obeys "Periods.c" ) which, incidentally, means a Pirate flag might not help them at Tortuga - won't it regard a Pirate flag as a false flag if you fly it while serving Holland? Anyway, if a Dutch privateer then becomes hostile to Pirates as well then he has no friendly ports in "Early Explorers". And since false flags are so easily detected...Attacking pirate ships reduces your points with the pirates; that part is intentional.
How is this going to mess up Dutch privateers in Early Explorers? As I mentioned before, the Tortuga fort is friendly to Pirates even if France is not.
Other way round. Prior to installing the 25th July update, boarding the animist ships cost me a few points with Pirates but didn't turn me outright hostile. After the 25th July update, boarding the animist ships did turn me hostile to Pirates. Perhaps the Nations update will reverse this.Only 1 point? But you went from Wary to Hostile anyway?
At some point, I had the pirates ALWAYS turn hostile if you attack one of their ships, but I changed that some time last week,
But I cannot remember if I actually uploaded that change yet. Possibly this is because you've still got that old version instead of the updated one.