• 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 Play as Pirate: Not Gaining Promotions

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
I have now taken 3 forts for the Pirates, but no promotions,
so I think its time to start a new game.
 
@ANSEL: I made a new thread for this issue here, because definitely something strange happened that isn't meant to.
 
In PROGRAM\NATIONS\nations.c please find:
Code:
void LooseLetterOfMarque(int iNation)
{
   ref PChar = GetMainCharacter();
   if (!IsInServiceOf(iNation)) return; // PB: Only do this if you HAVE something to lose
   string sNation = ""+iNation;
   if (iNation >= 0 && iNation < NATIONS_QUANTITY) // PB: Only do this if you HAVE something to lose
   {
   //   TraceAndLog("Loose Letter of Marque from " + GetNationNameByType(iNation));
     DeleteAttribute(PChar, "nations."+sNation+".LoM");
     if (ProfessionalNavyNation() == iNation) DeleteAttribute(PChar, "professionalnavy"); // PB: No more navy
   }
   SetServedNation(PERSONAL_NATION);   // PB: Cancel your original served nation
   HoistFlag(GetServedNation());     // PB: Hoist a new appropriate flag
}
Remove the // in front of that TraceAndLog line.

After that, continue playing like you did before, but keep an eye out for that log message.
If it shows up, I'd like to know the exact circumstances.
That would give me more information on where to look for the culprit.
 
@Pieter Boelen Well now I dont know if I should use the console command
and get my letter of Marque back or just go on with the trace and log on
as it was before?
 
@Pieter Boelen Well now I dont know if I should use the console command
and get my letter of Marque back or just go on with the trace and log on
as it was before?
Do both. At the moment in your savegame, you don't have a "Pirate Letter of Marque", which is why you aren't getting points with them.
The console command corrects that so you get your "point gaining" back.

Then the TraceAndLog from above post should notify you if you somehow lose it again.
I don't know how that happened and it is definitely unintentional, so I need to figure out the circumstances that caused it.

But you can't lose your "Pirate LoM" if you don't first have one to lose, so that is why the console command is needed to set that right again.

Does that make sense...?
 
The promotion system is working again as you see at the Pic. seadogs2_0000.jpg
 
That's more like it! :woot

Do keep an eye out for it stopping to work again.
Need to figure out how and when that happens....
 
Do keep an eye out for it stopping to work again.
Need to figure out how and when that happens....
I found the problem! This is the treasure quest pirate ships, they will be hostile
to you and you loose the LOM fighting them.
*** Group_UpdateGroup: begin id: Treasure Pirate ***
*** Group_UpdateGroup: Ships quantity in group: 1 ***
*** Group_UpdateGroup: No other ships to change commander to ***
Type: Pirate Ship. Points: 1.2123
Loose Letter of Marque from Pirate
 

Attachments

  • compile.log
    122.6 KB · Views: 129
Ahaaaa, that is a seriously good find, @ANSEL! :onya

What were your relation points before and after sinking that ship?
 
I think I understand exactly what is going on and it is because of this line of code:
Code:
if (i == PIRATE && !IsInServiceOf(i))           relChange = fPoints;     // The pirates aren't too concerned with you attacking other pirates
The idea is that the pirates aren't too concerned with you attacking other pirates, but still DON'T like it if you're actually part of the Brotherhood.
So you if you are part of the Brotherhood, then you still get kicked out.

Of course since Treasure Quests ALWAYS have a "pirate" as enemy ship (never another nation) and they're always hostile, that is a Catch 22.
And an unfair one at that.

There are several solutions I could think of:
1. Remove that "IsInServiceOf" check so that even you ARE in the Brotherhood, the pirates are STILL not so fussed about you attacking other pirates
2. Exempt the "Treasure Quest Pirate" from the "nation relations" system altogether, so you never get plus nor minus points for them at all
3. Replace the "Treasure Quest Pirate" with an enemy belonging to a random enemy nation

I'm not sure which of those three is the best solution though.
I kind-of like it always being a PIRATE involved in Treasure Quests, so that rules out #3.

Deliberately attacking pirates while being WITH the pirates is questionable.
Could be fun to allow that, because you could have a LoM and be part of the Brotherhood and "play both sides".
But that might be a bit weird as well.

#2 definitely has the least effect throughout the game. Just means that if you have a LoM, you still get no points for capturing/sinking a Treasure Quest Pirate.
But you don't do a treasure quest "for the crown" anyway. And pirate ships are generally tiny and worth only 1 point. So no big loss.

So I'm inclined to go with option #2. But you are the one actually playing as a pirate, so what do you reckon?
 
Before +187 After -61.
Wow, all the way to hostile? I had expected only down to zero.
But looking at that code again, yes it would do exactly what you describe.
I am misremembering my own code. :facepalm

Anyway, please check my post above for several potential solutions.
I just need to know which one is "best" and then I can solve it in no-time. :doff
 
Well if we wont pirates still involved it must be number 2. Sometimes you are
attack by pirates on the shore to in treasure quest, what happens then?
I have also noticed some pirates near the coast with a red pirate flag,is
that an other group of pirates than the brotherhood one.
This group with the red flag is observed when im not running a treasure quest,
they appears now and then.
 
What happens ashore doesn't really affect nation relations.

Pirates at sea are generated in groups, just like all other ships.
But different groups of Pirates can get different flags.
There are a whole bunch of designs that they can use, though most are indeed Black.
This is purely visual though and does not affect the game.
 
Of course since Treasure Quests ALWAYS have a "pirate" as enemy ship (never another nation) and they're always hostile, that is a Catch 22.
And an unfair one at that.

There are several solutions I could think of:
1. Remove that "IsInServiceOf" check so that even you ARE in the Brotherhood, the pirates are STILL not so fussed about you attacking other pirates
2. Exempt the "Treasure Quest Pirate" from the "nation relations" system altogether, so you never get plus nor minus points for them at all
3. Replace the "Treasure Quest Pirate" with an enemy belonging to a random enemy nation

I'm not sure which of those three is the best solution though.
I kind-of like it always being a PIRATE involved in Treasure Quests, so that rules out #3.
Besides, making it a random enemy nation won't work if for any reason you have no enemy nations.

I'd favour 1 for two reasons. One is that pirates aren't all one nation, friendly to each other. Normally the Brotherhood doesn't like its members fighting each other, but where treasure is concerned, it's every pirate for himself. The second reason is that the other pirate started the fight, so if anyone is a traitor to the Brotherhood, it's him, not you.
 
@ANSEL: You can execute this through console:
Code:
   ch = CharacterFromID("Treasure Pirate");
   ch.skipRM = true; // PB: Skip Relations Mod
   SetRank(PChar, PIRATE, GetOldRank(PChar, PIRATE));
Those first two lines are solution #2 (if you want #1 instead, then modify that line I mention in post #11 above).

The third line is similar to the "ReceiveLetterOfMarque" one I gave you last time, but this one will hopefully restore your previous rank as if nothing happened.
No guarantees that will work, but it's worth a try. :doff

Besides, making it a random enemy nation won't work if for any reason you have no enemy nations.
Having no enemies at all does have a tendency to cause trouble.
Can't remember who it was, but somebody managed that and it caused the game to CTD on generating Escort Quests.
I solved that particular example now, but I don't dare guarantee that everything is now OK.

I'd favour 1 for two reasons. One is that pirates aren't all one nation, friendly to each other. Normally the Brotherhood doesn't like its members fighting each other, but where treasure is concerned, it's every pirate for himself. The second reason is that the other pirate started the fight, so if anyone is a traitor to the Brotherhood, it's him, not you.
I'm a bit torn between #1 and #2. #1 definitely has a much larger effect on the game, which could indeed be a good thing.

You mention here that "where treasure is concerned, it's every pirate for himself", but that if-statement doesn't have a clue if it was a Treasure pirate or not.
So it would end up affecting ALL pirates. So basically you could be in the Brotherhood and yet capture/sink pirates at random.
Sure, your points will go down if you do that, but it is still quite possible.

Do you reckon that is OK? If so, that is also fine by me. :woot
 
Back
Top