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

Included in Build Playing as a Pirate

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
At the moment, pirate settlements refuse to trade with you if you have a Letter of Marque. Why?

On one hand, privateering could be a patriotic way to serve your country without submitting to the navy's chain of command. On the other hand, it could be little more than a way to get a pirate some level of protection from the hangman's noose.

The Brethren of the Coast, the pirates based at Tortuga, certainly included privateers among their ranks.

Nevis pirate settlement is in the unenviable position of being literally just round the corner from a naval base. Apart from the threat of elimination by forces from Charleston, this means any privateer who can't sell his loot at the pirate settlement doesn't have very far to go for an alternative market. The ban on privateers therefore doesn't hurt the privateers, it just deprives the pirate settlement's store and shipyard of business.

So it seems to me that the ban on privateers makes no sense either historically or economically. The game now distinguishes between privateers and commissioned officers, and it's more reasonable for independent-minded settlements to resent the presence of anyone in formal armed services, so I suggest that pirate settlements refuse business with commissioned officers but resume trading with privateers.
 
Sounds ok to me.

I would like to trade with them also but that doesn't seem to work so well. It seems this black or white world doesn't always work so well for those who inhabit the grey area.
 
It used to be reputation-based where pirates wouldn't trade with you if you had a too high reputation.
That was considered to be annoying and unrealistic, so the LoM check was suggested instead.
I do think there should be *some* limit on preventing trade with the pirates even for non-navy characters.

How about if you DO have a LoM, then you must also be friendly to the pirates for them to trade with you?
That also means that if you are part of the Brethren of the Coast but also get a LoM, you can still deal with your pirate friends.

Grey areas are of course realistic and can make for good gameplay.
However, it also complicates things a lot and I do much prefer starting with simple features and expanding on them.
There is already far too much to do. :facepalm
 
PROGRAM\Characters\CharacterUtilite.c this would be my suggestion:
Code:
  if(mNation == PIRATE)
   {
     // Pirates don't do business with the navy
     if(!CheckAttribute(char, "professionalnavy"))
     {
       // If you aren't hostile with the pirates, they'll always accept you
       if(rel  >  REL_WAR)                           return true;
       // If you have no loyalties to any one nation, they'll accept you too
       if(!HaveAnyLetterOfMarque())                     return true;
     }
   }
Putting a return false; line anywhere in there should be avoided, because that prevents you from finishing quests there as well.
By only having true lines there, any trade missions can still be completed regardless of your relations.

This suggested code does allow you to do business with the pirates if you have a LoM, provided that you aren't also hostile to them.
So you'll have to make peace with the pirates somehow and then they'll know to trust you despite having a LoM.
Makes sense?
 
It sounds sensible to me. I only get LoM in a superstitious belief that having a rank is the way to get better ships. And the reward swords too.
 
It sounds sensible to me.
:doff

I only get LoM in a superstitious belief that having a rank is the way to get better ships. And the reward swords too.
It allows you to eventually purchase good ships, though if you play well, I suppose purchasing ships is something you wouldn't need to do very much.
You get the occasional ship and sword on promotion. And the land rewards have to count for something too.
So indeed I would probably immediately get a LoM as well, because why not? :wp
 
This suggested code does allow you to do business with the pirates if you have a LoM, provided that you aren't also hostile to them.
So you'll have to make peace with the pirates somehow and then they'll know to trust you despite having a LoM.
Makes sense?
Sounds reasonable. How do you make peace with the pirates?
It allows you to eventually purchase good ships, though if you play well, I suppose purchasing ships is something you wouldn't need to do very much.
You get the occasional ship and sword on promotion. And the land rewards have to count for something too.
So indeed I would probably immediately get a LoM as well, because why not? :wp
Collecting ranks is also a goal all by itself - money isn't the only reward! Not to mention collecting governors' daughters. :wp Why stop at one? LoM's, that is - by the time I'd finished playing "Tales of a Sea Hawk", I had maximum rank from England, Portugal and Holland.
 
Sounds reasonable. How do you make peace with the pirates?
If you are a Rebel, then you start friendly with them straight away.
Otherwise, the Tortuga "governor" can make peace with them for a price like a "relation agent". There might be other ways as well, but I'm not sure of that.

Being friendly with the pirates is now also the only requirement for being able to officially join them (technically get a pirate LoM) and fame level is no longer factored in there.
So at least those two things are more in line with each other. But I'd like to know how that works from a gameplay perspective and what other ways there might be of becoming friendly with the pirates.
 
Perhaps have the pirate boss at Nevis require you to do a quest of some sort? Or perhaps make peace with pirates a reward for completing the "Help Turks Island" side quest? You've just helped save a pirate settlement from invasion, that has to count for something.

You'd presumably need to hoist a pirate or personal flag in order to enter a pirate settlement - even if it has no fort, e.g. Nevis, the store and shipyard will probably refuse to trade with you if you're flying a national flag, the same way a British store or shipyard will refuse to trade with you if you're flying a French flag. If you do raise a pirate flag in order to do business at a pirate settlement, will that then trigger citizens in other ports denouncing you, or does that only happen if you've changed flag in front of a ship in order to attack it?

What happens if you're flying a national flag, which you probably are if you're operating under a LoM, and pirates then attack you? Won't that cause the pirates to become hostile again?
 
Perhaps have the pirate boss at Nevis require you to do a quest of some sort? Or perhaps make peace with pirates a reward for completing the "Help Turks Island" side quest? You've just helped save a pirate settlement from invasion, that has to count for something.
Adding a new quest would be more work that I myself at least could do without.
But adding a simple line to make the pirates friendly to you in the Turks Help sidequest should be quite possible.
Especially now that that quest is available in every storyline.
I suppose that would go into PROGRAM\QUESTS\quests_side.c case "aurevoir" . (And why do "I" use FRENCH quest cases? :razz )
This might do the trick:
Code:
    case "aurevoir":
       if(AUTO_SKILL_SYSTEM)
       {
         AddPartyExpChar(pchar, "Leadership", 15000);
         AddPartyExpChar(pchar, "Sneak", 200);
       }
       else { AddPartyExp(pchar, 15000); }
       bSuppressResurrection = false;
       AddMoneyToCharacter(pchar, 40000);
       AddQuestRecord("Turkshelp", 6);
       CloseQuestHeader("Turkshelp");
       LAi_SetActorType(characterFromID("Pieter Boelen"));
       LAi_ActorRunToLocation(characterFromID("Pieter Boelen"), "reload", "reload3", "none", "", "", "Pieter_at_Douwesen", 30.0);

       SetActualRMRelation(PIRATE, REL_AFTERATTACK);                   // GR: You helped a pirate settlement
     break;

You'd presumably need to hoist a pirate or personal flag in order to enter a pirate settlement - even if it has no fort, e.g. Nevis, the store and shipyard will probably refuse to trade with you if you're flying a national flag, the same way a British store or shipyard will refuse to trade with you if you're flying a French flag.
The TradeCheck function in PROGRAM\Characters\CharacterUtilite.c uses the GetActualRMRelation function first.
So if you are genuinely friendly with a nation, they should do business with you regardless of what flag you fly.
They will check your flag only if you are actually hostile to them, with the false flag detection chance factored in.
See this stuff:
Code:
  // PURSEON -->
     if(first)
     {
       rel = GetActualRMRelation(mNation);
       if(GetNationRelation(pNation, mNation) < RELATION_ENEMY && pNation != PERSONAL_NATION)     // your flag is NOT hostile to the merchant
       {
         if(rel <= REL_WAR)                                     // but you are flying a false flag!
         {
           if (frnd() < GetChanceDetectFalseFlag() || CheckAttribute(merch,"FalseFlagDetect"))   // checks if the merchant will believe you
           {
             merch.FalseFlagDetect = true;                           // you have been caught and the merchant won't be so trusting next time
           }
           else
           {
             rel = REL_AFTERATTACK;                               // believes you, but... still takes into account your reputation!
           }
         }
         else
         {
           DeleteAttribute(merch, "FalseFlagDetect");                       // you are actually friendly
         }
       }
       else
       {
         if(rel <= REL_WAR)                                     // are you at war or not?
         {
           merch.FalseFlagDetect = true;                             // merchant KNOWS you are an enemy and remembers this
         }
         else
         {
           DeleteAttribute(merch, "FalseFlagDetect");                       // you are actually friendly
         }
       }
       merch.traderelation = rel;
     }
     else
     {
       rel = sti(merch.traderelation); // PB: Use the SAME relation for the WHOLE dialog
     }
   // <--PURSEON

If you do raise a pirate flag in order to do business at a pirate settlement, will that then trigger citizens in other ports denouncing you, or does that only happen if you've changed flag in front of a ship in order to attack it?
The "being recognized ashore" feature is now triggered ONLY if you change flags while in sight of a ship that subsequently turns hostile to you.
Basically, they don't appreciate you suddenly turning hostile to you. Either you're hostile from far away or you remain friendly all the way.
Otherwise they will consider it a "betrayal" and you may be attacked for it in ports of the most recent nation that you betrayed in that way.
However, this does not apply to pirates. Refer to this code in PROGRAM\BATTLE_INTERFACE\BattleInterface.c:
Code:
    if(Ship_GetDistance2D(pchar, chr) <= visibility_range)
     {
       //If you hoist an enemy flag close to other ships, they will remenber you and recognise you next time
       if(CheckAttribute(Pchar,"flagchanged") && GetNationRelation(sti(pchar.nation), sti(chr.nation)) == RELATION_ENEMY)
       {
         chr.recognized = 1;
         chr.EnemyShipName = Pchar.Ship.Name;
         chr.EnemyShipType = Pchar.Ship.Type;
         // PB: Only do this close to enemy ships
         if(sti(chr.nation) != PIRATE) PChar.traitor = chr.nation; // marker for recognizing feature
       }
     }

What happens if you're flying a national flag, which you probably are if you're operating under a LoM, and pirates then attack you? Won't that cause the pirates to become hostile again?
At the moment, I do not think so. Same what we were talking about earlier with France being friendly to Hornblower for helping Virginie.
If you then attack French ships under English flags, they shouldn't turn hostile to you.

At the moment, if you fire at ships that are FRIENDLY to you at sea, then their nation turns hostile and you lose reputation.
But if those ships are already hostile, then you just get a battle without substantial changes in nation relations.
So if your flag is already hostile to them, nothing special will happen.
 
Adding a new quest would be more work that I myself at least could do without.
Not necessarily a whole new type of quest. But perhaps he could send you on an escort, ship-hunting or fetch quest?

At the moment, I do not think so. Same what we were talking about earlier with France being friendly to Hornblower for helping Virginie.
If you then attack French ships under English flags, they shouldn't turn hostile to you.

At the moment, if you fire at ships that are FRIENDLY to you at sea, then their nation turns hostile and you lose reputation.
But if those ships are already hostile, then you just get a battle without substantial changes in nation relations.
So if your flag is already hostile to them, nothing special will happen.

Yes, I thought I'd read that. Yet default hostile relation is -60, but after attacking French ships while flying the British flag, Hornblower's relation to France changed to further negative. Only a point per battle, but it added up. Ditto for Holland, Spain and Pirates. In other games, I've had Pirates end up at -120, and I only use national flags. (I'll need to see what happens if I raise a false French flag and then go looking for something British or Portuguese. In a normal game that ought to cost me my British LoM, but Hornblower doesn't have one. :D)
 
Not necessarily a whole new type of quest. But perhaps he could send you on an escort, ship-hunting or fetch quest?
Doing nothing takes less time and effort than doing something. And I don't have much time and effort to spare.
So if we can get away with doing nothing, that would be my personal preference.... :wp

At the moment, it is already possible to become friendly with the pirates and join them in Free Play.
So the functionality is already there. It could be improved upon for sure, but perhaps that should be combined with some possible "navy missions" kind of feature later on?
I don't know when or if that will ever happen though.

Yes, I thought I'd read that. Yet default hostile relation is -60, but after attacking French ships while flying the British flag, Hornblower's relation to France changed to further negative. Only a point per battle, but it added up. Ditto for Holland, Spain and Pirates. In other games, I've had Pirates end up at -120, and I only use national flags.
There is probably a +1/-1 relation change for every ship you sink/capture. I never quite looked into that.
So I'm not sure how exactly that works and whether sinking enemies of the pirates would actually make you more friendly/less hostile to them.
Perhaps the pirates are again an exception there and that does work for other nations, but not for them.
In any case, this is a very gradual change as opposed to "instantly turning hostile".
 
PROGRAM\NATIONS\nations.c find:
Code:
if(CheckAttribute(pchar, "professionalnavy"))   // For Commissioned Naval Officers
Replace with:
Code:
if(ServedNation != PERSONAL_NATION)         // For any player that serves a specific nation
That should link the player nation relations to the changing nation relations for pretty much ALL characters.
I think there is no actual harm in doing this, is there?

One thing that will need to be done at a later stage is to change ServedNation to PERSONAL_NATION if you get TWO LoMs.

And I'm not sure of what to do with hoisting a Personal Flag yet. That will need some further thought and development, I suppose.
 
Does this not erode some of the distinction between naval and other character types? One of the defining features of a naval officer was that his relations are tied to those of his nation.

For myself, I'm not too bothered, since I always fly someone's national flag anyway and expect to be treated according to that flag, unless I'm recognised. But I can predict objections from players who don't want to be tied to any single nation. Perhaps break the link if you hoist a Personal flag.

How is ServedNation defined? Presumably initially it's whatever nation you pick (or are assigned, if you choose a specific named character or are playing a storyline). If you buy a LoM from another nation, does ServedNation then change? What happens at each stage of the following sequence:
1. Start off a free-play character at a British colony. (Presumably ServedNation is Britain?)
2. Buy a French LoM. (Now ServedNation is France?)
3. Tell a French governor that you no longer serve France. (So currently you serve no nation - are you now PERSONAL_NATION, still French, or revert to British?)
4. Buy a Dutch LoM. (Presumably ServedNation is now Holland?)
5. Buy a Spanish LoM as well. (Presumably you now become PERSONAL_NATION as you have two LoM's.)
6. Tell a Dutch governor that you no longer serve Holland, so you now only have one LoM. (Spanish, so do you remain PERSONAL_NATION or does ServedNation become Spain?)

What happens if you actively betray your ServedNation, e.g. start off as British and then start sinking British ships without a LoM from a hostile power? Perhaps that ought to make ServedNation become Pirate. So should hoisting Pirate flag. And once ServedNation is Pirate, there's no going back. (It would be too easy if all you need to do is crave forgiveness from one nation, buy a LoM to make that your ServedNation, and automatically get free forgiveness from anyone allied or neutral to that nation.)
 
This does affect you because while you may use a certain nation's flag, it may be false depending on relation changes.

Navy officer is quite different anyway, so I think with this change included it'll still be different enough.

What happens when you get and lose LoMs would need looking at.
At the moment your served nation changes to the one the latest LoM you got.
Leaving or betraying isn't taken into account yet.

Technically this shouldn't have a huge influence on the game as it only affects the occasional relation change.
But we might be able to make use of it later when the False Flag code is to be fixed.
 
How is ServedNation defined? Presumably initially it's whatever nation you pick (or are assigned, if you choose a specific named character or are playing a storyline). If you buy a LoM from another nation, does ServedNation then change? What happens at each stage of the following sequence:
1. Start off a free-play character at a British colony. (Presumably ServedNation is Britain?)
2. Buy a French LoM. (Now ServedNation is France?)
3. Tell a French governor that you no longer serve France. (So currently you serve no nation - are you now PERSONAL_NATION, still French, or revert to British?)
4. Buy a Dutch LoM. (Presumably ServedNation is now Holland?)
5. Buy a Spanish LoM as well. (Presumably you now become PERSONAL_NATION as you have two LoM's.)
6. Tell a Dutch governor that you no longer serve Holland, so you now only have one LoM. (Spanish, so do you remain PERSONAL_NATION or does ServedNation become Spain?)

What happens if you actively betray your ServedNation, e.g. start off as British and then start sinking British ships without a LoM from a hostile power? Perhaps that ought to make ServedNation become Pirate. So should hoisting Pirate flag. And once ServedNation is Pirate, there's no going back. (It would be too easy if all you need to do is crave forgiveness from one nation, buy a LoM to make that your ServedNation, and automatically get free forgiveness from anyone allied or neutral to that nation.)
I have done some serious thinking of this in the train today and have come up with a system that appears to work.
Original code:
Code:
void SetServedNation(int iNation)
{
   ref PChar = GetMainCharacter();
   PChar.ServedNation = iNation;         // PB: Make sure this sticks
}

int GetServedNation()
{
   ref PChar = GetMainCharacter();
   if(!CheckAttribute(PChar, "ServedNation"))
   PChar.ServedNation = PERSONAL_NATION;     // PB: Don't serve anyone until you get a LoM (prevents missed attribute error)
   return sti(PChar.ServedNation);         // PB: Make sure this sticks
}
New code:
Code:
void SetServedNation(int iNation)
{
   ref PChar = GetMainCharacter();
   int NumLoMs = 0;                           // Count number of LoMs
   bool BecomePirate = iNation == PIRATE;                 // Enforce becoming a pirate upon joining them
   for (int i=0; i<NATIONS_QUANTITY; i++)                 // Check all nations
   {
     if (HaveLetterOfMarque(i))                     // If you have a LoM
     {
       NumLoMs = NumLoMs + 1;                     // Add one to the counter
       iNation = i;                         // Set served nation to THIS instead
       if (i == PIRATE)   BecomePirate = true;           // If you once joined the pirates, you remain a pirate even if you have another LoM
     }
   }
   if (BecomePirate)       iNation = PIRATE;             // Make sure you remain a pirate if appropriate
   else
   {
     if (NumLoMs > 1)     iNation = PERSONAL_NATION;         // If you have multiple LoMs, you don't serve any specific nation
   }
   PChar.ServedNation = iNation;                     // Make sure this sticks
   TraceAndLog("Player now serves " + GetNationDescByType(iNation));
}

int GetServedNation()
{
   ref PChar = GetMainCharacter();
   if(!CheckAttribute(PChar, "ServedNation"))
     PChar.ServedNation = PERSONAL_NATION;               // Don't serve anyone until you get a LoM (prevents missed attribute error)
   return sti(PChar.ServedNation);                     // Make sure this sticks
}
Additionally, the following additional calls are added:
- SetServedNation(iNation) when you get a LoM
- SetServedNation(PERSONAL_NATION) when you leave a nation's service on GOOD terms
- SetServedNation(PIRATE) when you leave a nation's service on BAD terms

This means that:
- If you serve the pirates, GetServedNation always returns PIRATE even if you have other LoMs
- If you have multiple LoMs, then GetServedNation returns PERSONAL_NATION (unless you're a pirate)

As for your sequence of events:
1. Start as English character, so Served Nation = ENGLAND
2. Buy a French LoM, Served Nation changes to FRANCE (because you didn't have an English LoM)
3. Leave service of France on good terms, Served Nation changes to PERSONAL_NATION
4. Buy a Dutch LoM, Served Nation = HOLLAND (because you had no LoMs left)
5. Buy a Spanish LoM, Served Nation = PERSONAL_NATION (because this is your second LoM)
6. Leave service of Holland on good terms, Served Nation changes to Spain (because that is your only LoM)

Throwing some pirating in there:
7. Buy a Dutch LoM again, Served Nation = PERSONAL_NATION (because this is your second one again)
8. Leave service of Spain on BAD terms, Served Nation = PIRATE (because bad terms, not HOLLAND because pirate takes precedence over LoMs)
9. Buy a French loM again, Served Nation = PERSONAL_NATION (now Dutch + French LoM and didn't truly serve PIRATE)
10. Join pirates, Served Nation = PIRATE
11. Get whatever other LoMs you want, Served Nation remains PIRATE
12. Leave pirates on good terms, Served Nation back to PERSONAL_NATION
or
12. Leave pirates on BAD terms, Served Nation remains PIRATE
13. Get another LoM, Served Nation back to PERSONAL_NATION (because you didn't truly serve PIRATE anymore)

Does any of that make sense?

Note that at the moment it doesn't matter at all if you serve PIRATE or PERSONAL_NATION because in both cases your relations don't change when other nations' relations change.
However, if we make further use of this in the future, then this might become more important of course.
 
I've also been giving it a bit more thought. How about defining a new attribute - perhaps call it "loyal". By default you're a loyal subject of your starting nation and your relations follow those of that nation. Buying a LoM transfers your allegiance to the nation which issued it. Buying a second LoM loses the attribute. Hoisting a Personal or Pirate flag, or joining the Pirates, loses the attribute. Betraying your nation loses the attribute and makes your nation hostile (the Rebel character type is assumed to have already done this).

Leaving the service of a nation on good terms keeps the attribute - as far as everyone knows, you're still honourable and that was the nation you were last known to have served. You're basically back to where you were at the start of the game.

Once you've lost the attribute, it's gone forever. That's for the benefit of players who don't want to be permanently tied to a nation. Hoist your Personal flag once, you're now independent, and your relations are dictated purely by your own actions. (Maybe add some dialog to governors so that you can regain it if you want, at a price - perhaps you can choose to pay extra for a LoM, or decline payment for the next ship-hunting quest.)

You could then have benefits and liabilities associated with being loyal. As a benefit, a LoM could cost less if you're loyal. As a liability, if you attack a ship of your own nation then it immediately becomes hostile and you become Pirate. There could be other benefits and liabilities...

Character type Rebel, and anyone who starts off by selecting Personal or Pirate as the starting nation, doesn't get the "loyal" attribute. And the Standard storyline could be modified so you lose it when Silehard denounces you as a traitor, then regain it when the replacement governor sets everything straight.
 
I'm not sure of linking anything to the act of hoisting a flag. After all, if you do it way out at sea, there is nobody to see you do it.
It is possible to check if another ship actually sees you change flags and that is actually already done to set a "traitor" attribute.
At the moment that is used to trigger you being recognized for what you did while ashore in a town of the nation you "betrayed".

With the system I suggested above, pretty much if your ServedNation is PIRATE then you're not loyal and if it is anything else, then you are.
It would be quite easy to change it so that once you do get your ServedNation set to PIRATE, you can never set it back.
While that does sound potentially too harsh from a gameplay perspective, of course a pardon for pirates was historically hardly ever issued.

For now I would want to make something that sounds reasonable based on the systems that are already in place.
However, when I finally get round to checking the False Flag Detection code, perhaps I can also try to do a more substantial reworking of this system.
At the moment there are a lot of semi-individual sections of code that are related to this, which makes the behaviour needlessly complex and untransparent. :facepalm
 
It's not a matter of whether anyone sees you raise a Personal flag; it's supposed to be for the benefit of players who don't want to be tied to a nation and to give them an easy way out. What's important is that you and your crew have seen it, so you'll no longer take any notice if your (former) ServedNation declares war on someone, you won't be fighting in that war.

But if linking it to raising a flag will cause problems, it might be enough if the "loyal" attribute is set to false if you pick PERSONAL as your nation in the storyline options selection screen. That way you don't need to pick PIRATE (hated by all other nations) and can still have the option not to be tied to any nation.

For a Pirate to regain "loyal" status should certainly be more difficult than for someone who lost it either by declaring himself Personal or by buying multiple LoM's. Ideally you'd only be accepted if you haven't attacked any of this nation's ships, but that probably can't be checked in this game. Maybe require that you're famous enough, have reputation Hero, or both of the above. You have to be something special if the governor is to take you seriously - basically, you're trying to be like Henry Morgan.
 
Back
Top