• 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: Change in Nation Relations from Player Actions

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
The way nations perceive your actions upon firing on a ship/capturing a ship/sinking a ship should probably be completely rewritten so that:

- Characters with .professionalnavy AND/OR a LoM gain points as before, but only with their ServedNation AND all other nations that they have a LoM from
- Any other character does NOT gain positive relation points at all as they aren't licensed to commit acts of war, but DO gain negative points with the nation you fought with
- Pirate characters: Again no need to distinguish here. If you haven't officially joined them (e.g. no fake "LoM"), you gain no points with them but DO gain negative points with the other nations.
IDEA: DO improve your standings with the pirates, but not exceeding the limit where they stop being hostile, so that you can become friendly with them by acting like a pirate.
Once you're friendly, you can officially join them.

Maybe reduce the points scored if you have multiple LoM's? A single LoM is a way of patriotically serving your nation without submitting to the full rigour of navy discipline. Multiple LoM's are just a legal cover for piracy. The governor is still happy for you to attack ships belonging to his enemy but isn't as friendly to you as if you were dedicated to serving his nation.

Maybe try something like points * (1 - LoMs/10), only applied if LoMs > 1, so that:
2 -> points * 0.8; 3 -> points * 0.7; 4 -> points * 0.6; 5 -> points * 0.5; 6 -> points * 0.4
By the time you have 5 LoM's or more, about the only thing you can attack is pirates, which won't earn you many points anyway as they're only small ships. 4 LoM's is probably only viable in "Revolutions" - get them from France, Spain, Holland and America, then attack British ships. 3 LoM's is good in "Golden Age" or "Colonial Powers" - get them from Britain, Holland and Portugal, then both France and Spain are targets.

Also, lose your LoM and be branded a traitor if you attack a ship belonging to the nation which issued the LoM or any of its allies. That makes alliance distinctive from neutrality and also means anyone with multiple LoM's had better keep an eye on international relations, especially if they're variable. You're working for both Britain and Holland, Britain is at war with both Spain and France, Holland is at war with Spain but neutral to France, so you're OK to attack Spanish ships (gets you points from Britain and Holland) and French ships (only gets you points from Britain, Holland doesn't care). Holland allies with France - now if you sink or capture a French ship, Britain is happy but Holland strips you of your LoM. Problem: with multiple LoM's, your relations aren't tied to a nation's, so France still hates you and its warships will attack you. You're OK if you fire back and either knock down the French ship's mast so you can run away, or it surrenders and you leave it alone. You're only penalised for sinking or boarding it.

If a ship from an enemy navy attacks you, you should be allowed to defend yourself. Merchants just aren't allowed to initiate combat.

And someone somewhere is going to have to explain the details of international law to novice players! Governors can probably tell you what you can and can't do when you buy your LoM, the merchants' guild can explain it to you when you buy your merchant's licence, naval officers will probably need a briefing from the officer who greets them at the start of the game.


Extra things to figure out for Build 15:
- Prevent all merchant ships from firing on their enemies, unless they are actively being attacked.
For AI attackers, this information should be available. For player attackers, this should be based on who fires the first shot.
Needs to be figured out how to make this work in the game; probably wouldn't be that simple.
- Figure out how enemy navy ships should deal with enemy nation players who do not have a LoM and aren't a pirate (e.g. honest merchant folk).
This should probably be OK, but how to establish nation relations? Would the player gain negative relation points for defending him/herself?
 
The way nations perceive your actions upon firing on a ship/capturing a ship/sinking a ship should probably be completely rewritten so that:

- Characters with .professionalnavy AND/OR a LoM gain points as before, but only with their ServedNation AND all other nations that they have a LoM from
- Any other character does NOT gain positive relation points at all as they aren't licensed to commit acts of war, but DO gain negative points with the nation you fought with
This already seems to be happening, at least to some extent. Playing as Francis Drake, I was earning plenty of points with England and by the time I returned to La Tortue I had enough to get several promotions in a row. But although I was attacking Spanish and Portuguese ships, I wasn't earning anything for France or Holland. At least, not for some time. For no apparent reason, France's relation suddenly became "Friendly" in green with a positive number which then increased. I thought it might have had something to do with completing "Girl won in a card game", though I'm not at all sure that France's relation went green right after that, and anyway Holland's relation has also just gone green and "Friendly" despite me not having done any quests for them.

- Pirate characters: Again no need to distinguish here. If you haven't officially joined them (e.g. no fake "LoM"), you gain no points with them but DO gain negative points with the other nations.
IDEA: DO improve your standings with the pirates, but not exceeding the limit where they stop being hostile, so that you can become friendly with them by acting like a pirate.
Once you're friendly, you can officially join them.
What does "not exceeding the limit where they stop being hostile" mean? If you can't earn points to get above hostile, how do you become friendly by acting like a pirate?

Extra things to figure out for Build 15:
- Prevent all merchant ships from firing on their enemies, unless they are actively being attacked.
For AI attackers, this information should be available. For player attackers, this should be based on who fires the first shot.
Needs to be figured out how to make this work in the game; probably wouldn't be that simple.
- Figure out how enemy navy ships should deal with enemy nation players who do not have a LoM and aren't a pirate (e.g. honest merchant folk).
This should probably be OK, but how to establish nation relations? Would the player gain negative relation points for defending him/herself?
Naval ships should attack enemy merchant ships. Enemy naval ships should attack you even if you're a merchant. When the navy does it as part of a war, it's called commerce raiding and it's a perfectly valid military strategy.

You should always be allowed to defend yourself against anyone who attacks you - pirate, privateer or enemy navy.

Also for Build 15: if you have multiple LoM's and you attack a ship, you get negative points with the ship's nation and its allies. That should make playing with multiple LoM's a bit more interesting, as well as make alliances different from neutrality. For the latter reason, if you get any benefit from being a naval officer or having a single LoM and being in your own nation's port, get the same benefit from being in an allied port.
 
This already seems to be happening, at least to some extent. Playing as Francis Drake, I was earning plenty of points with England and by the time I returned to La Tortue I had enough to get several promotions in a row.
Something indeed does happen for this. I just want to make sure that we check it and rewrite it as needed so that it does what we want it to. ;)

But although I was attacking Spanish and Portuguese ships, I wasn't earning anything for France or Holland. At least, not for some time. For no apparent reason, France's relation suddenly became "Friendly" in green with a positive number which then increased. I thought it might have had something to do with completing "Girl won in a card game", though I'm not at all sure that France's relation went green right after that, and anyway Holland's relation has also just gone green and "Friendly" despite me not having done any quests for them.
I think that sidequest does indeed make you quite friendly to France at the end.

What does "not exceeding the limit where they stop being hostile" mean? If you can't earn points to get above hostile, how do you become friendly by acting like a pirate?
REL_WAR is -60.0, so my thinking was that by acting like a pirate, your standing with them may increase up to -59.0 .
That is *just* above "war" and will allow you to join the pirates. If you actually do join, the number is set to 0.

Naval ships should attack enemy merchant ships. Enemy naval ships should attack you even if you're a merchant. When the navy does it as part of a war, it's called commerce raiding and it's a perfectly valid military strategy.
Good! Less changes required. :cheeky

You should always be allowed to defend yourself against anyone who attacks you - pirate, privateer or enemy navy.
My thinking is that ALL characters get negative points with the nation whose ships you sink/capture, but NOT merely attack.
So if you fire back and damage the enemies' rigging and escape or you get them to surrender, but don't take the ship for yourself, your relation with their nation does NOT change.
I think this is pretty much already the case, so no worries there.

What is to be added is that you would ONLY gain points with nations IF you have a LoM with them.
So you cannot gain points while you're a merchant only as you have no business sinking/capturing enemy ships in the first place.

Also for Build 15: if you have multiple LoM's and you attack a ship, you get negative points with the ship's nation and its allies. That should make playing with multiple LoM's a bit more interesting, as well as make alliances different from neutrality. For the latter reason, if you get any benefit from being a naval officer or having a single LoM and being in your own nation's port, get the same benefit from being in an allied port.
Make that Build 14! That is one of the main things I would like to see covered with the changes proposed in this thread.
No point in having "Neutral" and "Friendly" relations unless they actually mean something!

I like your idea of benefits in your own AND allied ports. Except I think that right now there aren't any. :facepalm
So we'd need to come up with something. That part could perhaps be a Build 15 feature then....
 
I think this is the function from PROGRAM\NATIONS\nations.c that we will want to rewrite to get the ideas suggested here working in the game:
Code:
/* Explanation:
this changes relations based on an event (sink/take ship, sack/take town, etc.).
It adds points to all nations hostile to iNation (extra points if you have LoM)
and to all governors of those hostile nations from island if near island.*/
float UpdateRMRelation(ref char, int iNation, float fPoints)
{
   int govqty = 0;
   int i = 0;

   float rel = GetActualRMRelation(iNation); // KK

   float pirmult = 1.0;
   if(iNation == PIRATE) pirmult = 1.5;

   //Add points to char's nationrelations for each nation hostile to iNation;
   //if no LoM add only 1/4. If only neutral to that nation add only 1/8.
   //if near governors, add points in same way as above; with bonus if points were from attacking pirate.
   for(i = 0; i < NATIONS_QUANTITY; i++)
   {
     if(GetNationRelation(i, iNation) == RELATION_ENEMY)
     {
       // KK -->
       if(GetActualRMRelation(i) > REL_WAR && GetActualRMRelation(i) + (fPoints * NEUTRAL_POINTS) < REL_NEUTRAL)
       {
         ChangeRMRelation(&char, i, (fPoints * NEUTRAL_POINTS));
       }
       else
       {
         if(GetActualRMRelation(i) >= REL_NEUTRAL)
         {
           ChangeRMRelation(&char, i, (fPoints * FULL_POINTS));
         }
       }
       // <-- KK
     }
   }

   //subtract points from attacked nation
   if(rel > REL_WAR) ChangeRMRelation(&char, iNation, -(sqrt(fPoints) * NEUTRAL_MULT));
   else ChangeRMRelation(&char, iNation, -fPoints);

   //return new RMRelation
   return GetRMRelation(char, iNation);
}
The above section was simplified to remove all unused parts (it looks a bit confusing in the actual file). ;)

Related #defines from globals.c:
Code:
//point multipliers
#define NEUTRAL_MULT 5
#define NEUTRAL_POINTS 0.25
#define FULL_POINTS 1.0
#define ALLIED_POINTS 0.5
 
Here is a VERY simplified version of the functional rewrite that I am preparing:
Code:
  int iNation = ENGLAND;
  for(i = 0; i < NATIONS_QUANTITY; i++)
   {
     if(GetNationRelation(i, iNation) == RELATION_ENEMY)
     {
       TraceAndLog(GetNationNameByType(iNation) + " and " + GetNationNameByType(i) + " are at war");
       TraceAndLog("Remove points!");
     }
     if(GetNationRelation(i, iNation) == RELATION_NEUTRAL)
     {
       TraceAndLog(GetNationNameByType(iNation) + " and " + GetNationNameByType(i) + " are neutral");
       TraceAndLog("Do nothing");
     }
     if(GetNationRelation(i, iNation) == RELATION_FRIEND)
     {
       TraceAndLog(GetNationNameByType(iNation) + " and " + GetNationNameByType(i) + " are allied");
       if (IsInServiceOf(i)) TraceAndLog("Add points!");
       else TraceAndLog("Do nothing");
     }
   }
For @Grey Roger's "Early Explorers" save, this returns:
Code:
England and England are allied
Add points!
England and France are neutral
Do nothing
England and Spain are at war
Remove points!
England and Pirate are at war
Remove points!
England and Holland are allied
Do nothing
England and Portugal are at war
Remove points!
Seems to be doing what I've got in mind so far. Tomorrow I'll add the actual numbers, including scaling based on the number of LoMs you have.
Plus the effect of attacking ships without having a LoM/being a pirate. Then we'll see what effect this will have on the game! :cheeky
 
First completely rewritten version is NOW AVAILABLE!
Extract attached to PROGRAM\NATIONS (make sure you have the 22 Jul 2015 Beta 3.5 WIP first!).

This ended up really quite complex and took me a good couple of hours:
Code:
float UpdateRMRelation(ref char, int iNation, float fPoints)
{
   int i = 0;
   int iActOfPiracy = iNation != PIRATE;
   float relChange = 0.0;

   // PB: Completely Rewritten -->
   for(i = 0; i < NATIONS_QUANTITY; i++)
   {
     if(GetNationRelation(i, iNation) == RELATION_ENEMY && IsInServiceOf(i))
     {
       relChange = fPoints;
       if (GetLetterOfMarqueQuantity() > 1)                       relChange = relChange * (1 - GetLetterOfMarqueQuantity()/10); // GR
       TraceAndLog("Add " + relChange + " points: You are in the service of " + GetNationNameByType(i) + ", which is at war with " + GetNationNameByType(iNation));
       ChangeRMRelation(char, i, relChange);
       iActOfPiracy = 0;
     }
     if(GetNationRelation(i, iNation) == RELATION_FRIEND)
     {
       if (i == iNation)                                 relChange = GetActualRMRelation(i) - REL_WAR + 1;
       else                                       relChange = GetActualRMRelation(i) - REL_AFTERATTACK + 1;
       if (IsInServiceOf(i))
       {
         TraceAndLog("Remove " + relChange + " points: You are in the service of " + GetNationNameByType(i) + ", which is allied with " + GetNationNameByType(iNation));
         iActOfPiracy += relChange;
         ChangeRMRelation(char, i, -relChange);
       }
       else
       {
         if(makeint(GetActualRMRelation(iNation)) > REL_WAR)
         {
           if (!IsInAnyService() && i != PIRATE)                   iActOfPiracy += relChange;
         }
         else
         {
           if(makeint(GetActualRMRelation(i)) <= REL_WAR || relChange < fPoints)   relChange = fPoints;
         }
         TraceAndLog("Remove " + relChange + " points: " + GetNationNameByType(i) + " and " + GetNationNameByType(iNation) + " are allied");
         ChangeRMRelation(char, i, -relChange);
       }
     }
   }

   if (iActOfPiracy > 0 && makeint(GetActualRMRelation(PIRATE)) < REL_NEUTRAL)
   {
     if (GetActualRMRelation(PIRATE) + iActOfPiracy > REL_NEUTRAL)             iActOfPiracy = -GetActualRMRelation(PIRATE);
     TraceAndLog("Add " + iActOfPiracy + " points to Pirates for your actions");
     ChangeRMRelation(char, PIRATE, iActOfPiracy);

     if (GetServedNation() != PIRATE && makeint(GetActualRMRelation(PIRATE)) >= REL_NEUTRAL)
     {
       TraceAndLog("Served nation set to pirate, you TRAITOR!");
       SetServedNation(PIRATE);
     }
   }
   // PB: Completely Rewritten <--

   //return new RMRelation
   return GetRMRelation(char, iNation);
}
However, I have tested this in several scenarios now and so far it has responded in ways that I would consider to be reasonable.

And having multiple LoMs reduces the points you get per nation as per @Grey Roger's suggestion.
If you commit truly nasty actions, such as attacking a nation you're friendly with, you will immediately become friendly to the pirates AND your Served Nation is set to PIRATE too.

Allies actually matter now!
If you attack a friendly nation, that nation will immediately turn hostile to you, regardless of your previous relations.
Any ally of that nation will also become Wary of you and may turn hostile if you continue to attack their ally.

Your relations with the Pirates can jump back and forth between hostile and neutral quite substantially depending on your actions.
For example, I tested the following on Grey Roger's "Early Explorers" savegame:
- Pirates are neutral (-3 points)
- Attack Holland: This was allied with England, with whom I had a LoM
- Holland turns hostile, I lose my English LoM and England becomes Wary, Pirates become Friendly and my Served Nation goes to PIRATE
- Attack pirates: Pirates turn hostile again
- Attack Portugal: This was hostile to me, but friendly to France and I had a lot of points with France
- As France is allied with Portugal, I immediately lose my points and they become Wary
- In doing this, the Pirates become friendly again
- Attack pirates: Pirates turn hostile again
- Continue attacking Portugal until France turns hostile to me too (remember the alliance!)
- Eventually I had ALL nations hostile to me, including the pirates
- Attacking non-pirate ships does give me +1 point with the pirates, so eventually they turned friendly again

Flimsy moral standard for them pirates indeed! :cheeky

In any case, there a LOT of different possible series of player actions and I hardly tested them all.
So please provide whatever comments, feedback or test results that you might have. This is a tricky one! :shock
 

Attachments

  • nations.zip
    12 KB · Views: 137
Also please check if this impacts performance in any way.
 
For now I did this all through console. Seemed fast enough.
At least this function is called only once when you kill a ship's captain, so at least it shouldn't be happening repeatedly.
Some optimization might be possible by using variables for some functions that are being called multiple times for the same purpose.
 
I remembered seeing this function at multiple places, but if it isn't called often then there is no problem.
 
I remembered seeing this function at multiple places, but if it isn't called often then there is no problem.
That's what we need to do the testing for. My first priority is getting it to functionally do what we actually want.
It took me a good several hours to get even this far, so I really hope that you and @Grey Roger will have a careful check and think about it.
Once I post a new ZIP update, I'll include this too for ingame testing of functionality and of course performance too.
 
Anyone happen to have any thoughts yet on the above changes I've made?
If you don't have time to understand the code, at least see if the sequence of events I described sounds about right to you.

This evening I'll see about adding in some comments to clarify what does what and why and hopefully allow other people to also understand what is going on here.
Plus a toggle on the TraceAndLog messages so you can disable them. Then we'll need testing while I probably try to fix those False Flags.
 
When loosing a LoM your reputation should go down too.
I'd even go as far as to say your relation for all nations has to go down a bit.

I'd also say attacking a pirate should bring down the points but not that much. Only if you joined the pirates it should go down to hostile instantly, else it should just go down a significant amount but doesn't have to become hostile automaticly, after all some infighting with pirates wouldn't be weird.
 
When loosing a LoM your reputation should go down too.
I'd even go as far as to say your relation for all nations has to go down a bit.
There is a LooseLetterOfMarque function and a LeaveService function that could be tweaked for that.
So far I have been focusing on the relation points and not added any extra reputation changes over what was already in place.
I'd leave the other nations' relations alone though. What should a neutral nation care if you lost a LoM? And a hostile one might even be happy about it!
I've ever set things so that ONLY the nation you attacked will turn hostile. You will also lose your LoM with any allies, but they turn Wary, not hostile.

Otherwise the whole situation might become a bit TOO nasty for players who make a mistake here or there.
And if a player truly wants to turn pirate, they can easily turn the other nations hostile too.
It is easier to get your relation points down than up, after all. :cheeky

I'd also say attacking a pirate should bring down the points but not that much. Only if you joined the pirates it should go down to hostile instantly, else it should just go down a significant amount but doesn't have to become hostile automaticly, after all some infighting with pirates wouldn't be weird.
I was thinking about that yesterday as well, but wasn't sure how to handle that.
Good chance that will require yet more exceptions and there already are more than I had been hoping for. :(
 
Code:
if (GetActualRMRelation(PIRATE) + iActOfPiracy > REL_NEUTRAL) iActOfPiracy = -GetActualRMRelation(PIRATE);
TraceAndLog("Add " + iActOfPiracy + " points to Pirates for your actions");
ChangeRMRelation(char, PIRATE, iActOfPiracy);

I'd say the more they like you, the fewer points should be substracted.
So Say for example (assuming 1oo is the highest relations
OLD NEW
100 85
80 60
60 30
40 10
20 0 (or minus)
or something like that

This function seems to be pretty close:
Code:
iActOfPiracy = makeint((1.0-((100.0-GetActualRMRelation(PIRATE))+15.0)/100.0) * GetActualRMRelation(PIRATE));

Might need to add something to manage it when it goes below zero ... because now if GetActualRMRelation(PIRATE) returns a negative value it will actually increase the realtion instead of decrease it. altough maybe making the first one absolute should fix it.
 
If you have no LoM or if you have two of them (e.g. Francis Drake starts with an English LoM and then buys a Dutch one as well), your relations aren't tied to those of a nation, so if you attack a ship, it affects your relations with that ship's nation and its allies. Thus, in your example, you attack a Portuguese ship and your relations with France suffer badly (drop straight to Wary). Also, since you don't have a LoM with France, you wouldn't normally accumlate points with France anyway. (I still don't know why France, and later Holland, suddenly switched from Neutral to Friendly and started accumulating points.)

If you have a single LoM, France might recognise that you're an agent of England pursuing a legitimate war against Portugal, and since it's not going to war with England to support Portugal, perhaps it shouldn't get upset with you either. Maybe only lose 1 point for this. You'll get that back soon enough if you then attack a Spanish ship as France is at war with Spain.

Pirates should perhaps not be quite so forgiving. Being a corsair, Drake starts off neutral to Pirates. If you then attack them and turn them hostile, they shouldn't immediately become friendly again after just one piratical act (your first attack on Portugal).
 
Code:
if (GetActualRMRelation(PIRATE) + iActOfPiracy > REL_NEUTRAL) iActOfPiracy = -GetActualRMRelation(PIRATE);
TraceAndLog("Add " + iActOfPiracy + " points to Pirates for your actions");
ChangeRMRelation(char, PIRATE, iActOfPiracy);

I'd say the more they like you, the fewer points should be substracted.
So Say for example (assuming 1oo is the highest relations
OLD NEW
100 85
80 60
60 30
40 10
20 0 (or minus)
or something like that

This function seems to be pretty close:
Code:
iActOfPiracy = makeint((1.0-((100.0-GetActualRMRelation(PIRATE))+15.0)/100.0) * GetActualRMRelation(PIRATE));

Might need to add something to manage it when it goes below zero ... because now if GetActualRMRelation(PIRATE) returns a negative value it will actually increase the realtion instead of decrease it. altough maybe making the first one absolute should fix it.
Where exactly did you figure your changed line of code should go?
The section you post is within this if-statement:
Code:
if (iActOfPiracy > 0 && makeint(GetActualRMRelation(PIRATE)) < REL_NEUTRAL)
So that means that GetActualRMRelation(PIRATE) DOES return a negative value and this whole thing will ALWAYS increase your relation with the pirates.
That is intentional. If you commit an act of piracy, your relation with the pirates will get better.
It just won't exceed REL_NEUTRAL (=0) as to earn points with any nation, you need to have a LoM with them.
That is now possible with the pirates too.

Note, however, that you committed enough acts of piracy (or one really big one), not only does your relation with them become Friendly, you will ALSO get your served nation set to PIRATE.
Once I have made some more changes, that will mean that if you're recognized, you'll hoist a PIRATE flag, not a personal/nation one.
It also means you may be recognized for your traitorous actions while in any non-pirate port and attacked.
Because while you may still have a LoM somewhere, you are pretty much a pirate.

If you have no LoM or if you have two of them (e.g. Francis Drake starts with an English LoM and then buys a Dutch one as well), your relations aren't tied to those of a nation, so if you attack a ship, it affects your relations with that ship's nation and its allies. Thus, in your example, you attack a Portuguese ship and your relations with France suffer badly (drop straight to Wary). Also, since you don't have a LoM with France, you wouldn't normally accumlate points with France anyway. (I still don't know why France, and later Holland, suddenly switched from Neutral to Friendly and started accumulating points.)
If you have NO LoM, then your relations are still tied to your original nation.
After all, I see no reason why an honest Dutch merchant shouldn't remain Dutch while remaining an honest merchant.
They aren't untied until you get a second LoM or start the game as Personal Nation to begin with.

If you attach Portugal, which is allied with France, then indeed France does get Wary. That is already in place now.
And indeed as you don't have a LoM with either nation, you may lose points with them, but not gain any.

If you have a single LoM, France might recognise that you're an agent of England pursuing a legitimate war against Portugal, and since it's not going to war with England to support Portugal, perhaps it shouldn't get upset with you either. Maybe only lose 1 point for this. You'll get that back soon enough if you then attack a Spanish ship as France is at war with Spain.
At the moment, France would turn Wary as soon as you attack Portugal. If you continue attacking Portugal, France might become hostile.
However, you would need to gain more than 60(hostile)-45(wary)=15 points for that.
We could change this to REL_AMNESTY (=-30) so it'll take longer to get to that point.

Note however that you will NOT get these points back with France!
You do not have a LoM with France and therefore you will NOT gain any points with them.

Pirates should perhaps not be quite so forgiving. Being a corsair, Drake starts off neutral to Pirates. If you then attack them and turn them hostile, they shouldn't immediately become friendly again after just one piratical act (your first attack on Portugal).
Your first attack on Portugal isn't an act of piracy because you have a LoM from England and therefore the attack is legal.
You would gain no points with the Pirates for that at all, though you will gain them with England and lose points with Portugal (they'll turn hostile if they weren't before).

In the sequence I describe above though, I lost that English LoM by attacking our ally Holland.
If I then attack Portugal, it IS an act of piracy as I have no legal grounds to do that.

It is a SMALL act of piracy though, which means that the points are added to the Pirates, but if they were VERY hostile before, they won't suddenly turn friendly.
Pirates immediately turning friendly only happens if you attack your served nation, its allies or any nation you aren't actually hostile with.
Those are considered BIG acts of piracy. Many small acts do eventually make a big one though.

Does any of that make sense to you guys?
 
If you have NO LoM, then your relations are still tied to your original nation.
After all, I see no reason why an honest Dutch merchant shouldn't remain Dutch while remaining an honest merchant.
He also shouldn't be attacking anyone as he has no LoM. So if he attacks a Portuguese ship while Portugal is allied to France, then at the very least Portugal and France should get upset with him.

At the moment, France would turn Wary as soon as you attack Portugal. If you continue attacking Portugal, France might become hostile.
However, you would need to gain more than 60(hostile)-45(wary)=15 points for that.
We could change this to REL_AMNESTY (=-30) so it'll take longer to get to that point.
I haven't tried any of this recently (been doing quick test runs to try out my fixes to side quests and avoiding battle to save time) but when I created that savegame, France didn't turn Wary when I attacked Portugal. I don't think I even lost 1 point. This was under an English LoM, though, and I hadn't done anything nasty to either England or Holland, so the LoM was still valid. This is what I was suggesting should still be the case - if you have a single valid LoM then your relations should be tied to those of your nation, so attacking Portugal (hostile to England) should not upset France as it's part of a war and France has chosen not to be involved (neutral to England).

Note however that you will NOT get these points back with France!
You do not have a LoM with France and therefore you will NOT gain any points with them.
That's why, if you only have a single LoM, you shouldn't lose points with France. Otherwise you'll end up hostile to France by fighting an enemy of England while France is not hostile to England.

It's also a way of making a difference between single LoM and multiple LoM's. With multiple LoM's you aren't a dedicated servant of a nation and need to be much more careful of the political situation. You may very well inadvertently make an enemy of France by attacking Portuguese ships.

Your first attack on Portugal isn't an act of piracy because you have a LoM from England and therefore the attack is legal.
You would gain no points with the Pirates for that at all, though you will gain them with England and lose points with Portugal (they'll turn hostile if they weren't before).
If your relations with a single LoM are tied to the nation of the LoM then you won't lose points with Portugal - they are indeed already hostile. Moreover, if England and Portugal then make peace, you should become neutral to Portugal too. That, I thought, is what having your relations tied to your nation means. You've been fighting for your country, but now the war is over and everything is forgiven. From that point if you attack Portuguese ships then France is entitled to get upset because you're no longer doing it on behalf of your served nation.

In the sequence I describe above though, I lost that English LoM by attacking our ally Holland.
If I then attack Portugal, it IS an act of piracy as I have no legal grounds to do that.

It is a SMALL act of piracy though, which means that the points are added to the Pirates, but if they were VERY hostile before, they won't suddenly turn friendly.
That's not what you said in the example:
- Attack pirates: Pirates turn hostile again
- Attack Portugal: This was hostile to me, but friendly to France and I had a lot of points with France
- As France is allied with Portugal, I immediately lose my points and they become Wary
- In doing this, the Pirates become friendly again
Hence my comment - they should indeed not become friendly because you just lost points with France. Which, if your new system is working properly, I wouldn't have gained in the first place. I never had a French LoM. France started off neutral at -30, rose to 0 because I was attacking Spanish ships, then stayed at 0 because I didn't have a French LoM. Then for some reason it switched to friendly and went green, and I started accumulating positive points.
 
He also shouldn't be attacking anyone as he has no LoM. So if he attacks a Portuguese ship while Portugal is allied to France, then at the very least Portugal and France should get upset with him.
Perfectly true. And they do. As Portugal is being attacked, Portugal turns immediately hostile (if they weren't already).
As France is allied, France becomes Wary and if you continue to attack Portugal, France might turn hostile too.

I haven't tried any of this recently (been doing quick test runs to try out my fixes to side quests and avoiding battle to save time) but when I created that savegame, France didn't turn Wary when I attacked Portugal. I don't think I even lost 1 point. This was under an English LoM, though, and I hadn't done anything nasty to either England or Holland, so the LoM was still valid. This is what I was suggesting should still be the case - if you have a single valid LoM then your relations should be tied to those of your nation, so attacking Portugal (hostile to England) should not upset France as it's part of a war and France has chosen not to be involved (neutral to England).
Of course it wouldn't have happened as I described for you, because my descriptions are from testing on your savegame with my rewritten code.
You didn't have that at the time because I hadn't written it yet. ;)

That's why, if you only have a single LoM, you shouldn't lose points with France. Otherwise you'll end up hostile to France by fighting an enemy of England while France is not hostile to England.
I wasn't sure how to handle this one. Indeed because it is part of a war, at least the game isn't considering it an act of piracy.
If we want France to REALLY not care, I'll have to do some more tweaking.

It's also a way of making a difference between single LoM and multiple LoM's. With multiple LoM's you aren't a dedicated servant of a nation and need to be much more careful of the political situation. You may very well inadvertently make an enemy of France by attacking Portuguese ships.
So you're saying we can check this one on the number of LoMs, eh? Not a bad idea! I like it. :cheeky

If your relations with a single LoM are tied to the nation of the LoM then you won't lose points with Portugal - they are indeed already hostile. Moreover, if England and Portugal then make peace, you should become neutral to Portugal too. That, I thought, is what having your relations tied to your nation means. You've been fighting for your country, but now the war is over and everything is forgiven. From that point if you attack Portuguese ships then France is entitled to get upset because you're no longer doing it on behalf of your served nation.
War is -60 points or lower and can go all the way down to -119 (who came up with that number???).
So England is hostile to Portugal and so are you, so you start with -60 points with Portugal.
By attacking them, you WILL lose points with Portugal and may continue to do so until you hit -119 points.
This will ensure that if you personally want to crave forgiveness with them as a Privateer, it becomes more expensive the more Portuguese ships you attack.

However, if then England and Portugal make peace, indeed your relations should be set to Neutral with Portugal too even if you were at -119 before.
This has been in place for some time now and should (hopefully?) work.

That's not what you said in the example:
Hence my comment - they should indeed not become friendly because you just lost points with France. Which, if your new system is working properly, I wouldn't have gained in the first place. I never had a French LoM. France started off neutral at -30, rose to 0 because I was attacking Spanish ships, then stayed at 0 because I didn't have a French LoM. Then for some reason it switched to friendly and went green, and I started accumulating positive points.
Indeed those points with France shouldn't be there with the new system.
But that is the save I tested with and I wanted something sensible to happen in such a case too, just in case it does happen.
Perhaps there are some situations where you might "leave good" from the service and maintain your points.
Or some quests gives you plus points for a nation you don't have a LoM with.

As you were VERY friendly with France in that instance, you lost a LOT of points and therefore gained an equal lot with the Pirates.
But if you had less points with France, the Pirates would gain less as well and may not immediately turn friendly by you doing this.
With the new system, that is a much more likely scenario to occur and this particular example should indeed not be happening.

--------------------------------------------------------------------------------------

So from the above discussion, I think the following changes are in order:
- You don't lose points with neutral nations by attacking their allies IF you have a valid reason to do so (SINGLE LoM + war on your side)
- Pirates don't immediately turn hostile when you attack them; their points will just decrease if you keep doing it

Does that sound about right?
 
Perhaps pirates could have some sort of alternate version of flag recognition? If you're on good terms with pirates (e.g. due to starting off as a corsair, or you paid the boss of Tortuga) but you're flying a national flag then they'll attack you anyway. If they then recognise you then they could choose not to attack. If they don't recognise you then they don't know it's you who sank their ship, and anyway it's the pirate captain's own fault for not being more observant, so you should only lose a point or two at most. But if they didn't attack and you then sink or capture them anyway, or if you raid one of their settlements, then you've double-crossed them and they're not going to forgive that in a hurry!

Otherwise your suggestion is fine - you just lose a few points with pirates for defeating one of their ships, which won't worry anyone except corsairs because everyone else starts off hostile to pirates anyway.
 
Otherwise your suggestion is fine - you just lose a few points with pirates for defeating one of their ships, which won't worry anyone except corsairs because everyone else starts off hostile to pirates anyway.
I'll probably stick to the suggestion from my previous post for now then. It is all complex enough as it is. :modding
 
Back
Top