• 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

Well it set my rank to zero.
Please try again. Doing that has no business affecting any interfaces at all. o_O

Anyway, if you don't actually get your old rank back like I hoped, you can also just use this again:
Code:
ch = CharacterFromID("Treasure Pirate");
ch.skipRM = true; // PB: Skip Relations Mod
ReceiveLetterOfMarque(PIRATE);
 
@Pieter Boelen I have now redone the treasure quest, sunk the pirate ship
and nothing bad happens this time. The good relations to pirates and my
rank is untouched
FLAGS: The 'Pique' turned hostile as they have recognized us
Sea_FirstInit done
SETTING MUSIC: music_sea_battle
*** 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
 
Good! Then at least we have an OK solution that works for you.

I'll await @Grey Roger's response before adding the final fix to own game files.
Probably it'll end up being #1, which may be the better option after all...
 
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 wasn't thinking of a situation with no enemies at all, but no enemy nations, i.e. the regular nations, not including Pirates. That's easily achieved - starting as Personal, for one. Trying to set the enemy ship to a random non-Pirate nation isn't going to work if your only enemy is Pirates!

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
So long as it's only a point or two, yes. If you're a worthy pirate then you'll soon make it up by taking someone else's ship and if you're not a worthy pirate then you deserve to lose points with the Brotherhood. :rpirate Anything worse than that isn't a good idea. As for only losing a point or two for sinking any Pirate ship, not just treasure quest ships: if you make a habit of it and don't do some proper pirating then eventually your rank will go down. But the occasional "argument" with other pirates is to be expected!

Alternatively, I wonder if there's some way to check if the ship you're facing is a treasure quest opponent, then modify that condition:
Code:
if (i == PIRATE && (!IsInServiceOf(i) || <it's a treasure quest>))
 
Last edited:
I wasn't thinking of a situation with no enemies at all, but no enemy nations, i.e. the regular nations, not including Pirates. That's easily achieved - starting as Personal, for one. Trying to set the enemy ship to a random non-Pirate nation isn't going to work if your only enemy is Pirates!
I wasn't suggesting "a random non-pirate enemy nation", I was suggesting "a random enemy nation".
No reason to now have ONLY pirates there and change it to NEVER pirates.

So long as it's only a point or two, yes. If you're a worthy pirate then you'll soon make it up by taking someone else's ship and if you're not a worthy pirate then you deserve to lose points with the Brotherhood. :rpirate Anything worse than that isn't a good idea. As for only losing a point or two for sinking any Pirate ship, not just treasure quest ships: if you make a habit of it and don't do some proper pirating then eventually your rank will go down. But the occasional "argument" with other pirates is to be expected!
Very true. So option #1 may be perfectly fine.

Alternatively, I wonder if there's some way to check if the ship you're facing is a treasure quest opponent, then modify that condition:
Code:
if (i == PIRATE && (!IsInServiceOf(i) || <it's a treasure quest>)
At the moment, no that isn't possible because that function has NO CLUE about the ship you're facing. All it knows is its nationality.
I already had to get past that limitation with some very annoying coding related to the "betrayed" attribute.
Basically, "betrayed" is set sometime during the battle on the NPC, then just before running that function,
that attribute is transferred to the player because the NPC "doesn't exist" within that function. :facepalm

Eventually it would be nice to rewrite it all so that it DOES have the NPC data available as well.
Should be quite possible, but would be a decidedly larger job that just removing the "IsInServiceOf" check.

As an additional note: Combining && and || statements on the same line isn't properly supported in the PotC code and can have unexpected results.
You can get around that by using an intermediate 'bool' variable.
 
Simple version of option #1 is included in attached file. Extract to PROGRAM\NATIONS .

I think that should suffice to fix this.
 

Attachments

  • nations.c
    60.8 KB · Views: 97
Back
Top