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

Solved Leadership and fleet sizes

Hurray, it works now. :cheers

I can change officers how I like now. However, when I try to assign my first mate it isn't giving my your new prompt (When ransacking a ship after boarding), it will only warn me of officers that can't pilot the target ship.

When I transfer ships on land it also allows me to assign the first mate as a captain without giving me the prompt. However, once the first mate is assigned captain it won't let me switch with anyone else without giving me your new prompt. So again, it's gotten a bit reversed :p

Here are my skills and my first mate's skills
 

Attachments

  • Me.jpg
    Me.jpg
    911 KB · Views: 211
  • FirstMate.jpg
    FirstMate.jpg
    886.3 KB · Views: 223
I just had a look at the file and messed around with it a bit. It seems to work now. I don't know how to make if check if the officer is currently the first mate or not though...

I don't know anything about coding so this is probably a terrible way of doing it but... give it a try. Edited line 129.
 

Attachments

  • transfer_characters.c
    20.9 KB · Views: 210
I just had a look at the file and messed around with it a bit. It seems to work now. I don't know how to make if check if the officer is currently the first mate or not though...

I don't know anything about coding so this is probably a terrible way of doing it but... give it a try. Edited line 129.
What did you fix here?
 
What did you fix here?

I changed it to compare the leadership level of the officer you are switching with the level needed to command a fleet. So it warns me if I assign an officer with high leadership that I might not be able to command a fleet afterwards. I don't know how to make it check if that officer you are assigning is currently the first mate though.
 
hmmm.....I see what you are doing but I don't know for sure this is always going to work.
I think you should check for the character instead and see if he has the right skills. Then it will probally always work.

Change the newCompanion to refMyCharacter and see if it also works.

I can't test it now.
 
Oh, yes. I see what you mean. It needs to compare the leadership of the officer to the character?

Is there a way to check the current skills of the party as a whole?

Edit: Changing it to refMyCharacter resulted in being able to switch out all officers without any prompts
 
Last edited:
As far as I know checking the player is the best way to see what the party can do
 
Let's get this fixed now :).

What should be compared with each other. Could you help me figure out which values we need to compare. If you can show them ingame or say what they are called I can see if I can find them in the code.
 
The code needs to check if the player's leadership level is less than 5 and if the officer being switched is the first mate. If both are true then it can run the code for the prompt?
 
If your leadership is above 5 (I guess this needs to be the level on which you can command a fleet) then it shouldn't prompt right? I think I checked it wrong. i checked if you can sail the ship but it should be compared with this indeed.
It should check for first mate because this one contribute to leadership right? But maybe we change this, so it should check for all contributing leaderships right? The total have to be above 5.
 
I think only the first mate contributes leadership? Not sure though.

The level of ship you can sail is tied to both leadership and sailing so it would be better to use just the leadership value.

The variable(?), or whatever this is, is the amount of leadership needed to command a fleet "FLEETCOMMAND_MIN_LEVEL" so it could just be "(player's leadership) < FLEETCOMMAND_MIN_LEVEL"
 
I think only the first mate contributes leadership? Not sure though.

The level of ship you can sail is tied to both leadership and sailing so it would be better to use just the leadership value.

The variable(?), or whatever this is, is the amount of leadership needed to command a fleet "FLEETCOMMAND_MIN_LEVEL" so it could just be "(player's leadership) < FLEETCOMMAND_MIN_LEVEL"
I will see for this soon.
For now its only the first mate yet. But if we decide to change this I don't want to change this again so it has to be made in a way it works always ;).
 
You could change the prompt to say that it "may" affect the player's ability to command a fleet? and just keep it checking all officers?
 
It seems to be working for checking the player's leadership but it doesn't seem to be checking the officers. I get the prompt on every officer regardless of their leadership level. If I boost my leadership up then I don't get the prompt for any officers.

It needs to check the leadership of the player first. Then IF the the leadership of the player is less than FLEETCOMMAND_MIN_LEVEL it will run a check on the leadership of the officer being selected against FLEETCOMMAND_MIN_LEVEL. That way the prompt should only appear when the player's leadership is lower than 5 and when the officer's is higher than 5.

EDIT: I changed it a bit and this version seems to work. Can you give it a check?
 

Attachments

  • transfer_characters.c
    21.1 KB · Views: 184
Last edited:
First this wont work either. But I can fix that.

But the characters leadership is changed if he has officers. They contribute to his leadership so it should work. If you remove a officer then the leadership of the character will drop if he was boosted by the officer.
The officer is already checked in the first if statement. There they check if he is able to sail the ship.

I don't see why you should check the officer if he has the level required to command a fleet because this officer is going to another ship. And as far as I know. YOU must have the required level to be able to command a fleet.

If you don't have any officers left you should be getting the prompt or if they aren't passengers because you will have leadership below the needed leadership so it gives the prompt.
 
Oh, I think you're right with the characters skills. But the point is the character's leadership will only drop AFTER the officer has been switched. So if you're just checking the main character then the prompt won't appear because the skill changed after the checks took place. So doesn't that mean the officer needs to be checked?

Actually, I take back what I said about character skills. When I test your version it's giving me the prompt for every officer I try to switch. My leadership is 3-3 at the time and I was being boosted by the first mate. When I use cheat mode to boost my leadership to 9-9 then I don't get any prompt at all for any officers. Even though my character's leadership is 3-3 it will not give me a prompt about being too low to start a fleet from ransack_main.c .
 
So I guess it does sort of work but it takes the unboosted value and it has to take the boosted value?
If I understood the code right the officer is first removed and then there is a check. if it isn't right the officer is put back.
 
Last edited:
Back
Top