• 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 Naval Officer: Receive New Ship after Capsizing

Captain Tiems

Landlubber
thanks, really helpful. But when do you get promoted? and maybe a small thing, my ship capsized, so now i'm forced to capture ships as a tartane until i get promoted.
 
thanks, really helpful. But when do you get promoted?
You have to continue gaining points, but it may take a while.
Refer to this still-open bug tracker issue: http://www.piratesahoy.net/threads/nation-points-for-promotion.25454/

and maybe a small thing, my ship capsized, so now i'm forced to capture ships as a tartane until i get promoted.
Happened in a storm? That is intentional; you have to keep your roll angle under control.
 
But a non-naval character can then buy (or, if he's lucky, capture) a better ship. Is there a way to arrange for a naval character who has lost his ship this way to get a court-martial, demotion and a replacement ship suitable to his new lower rank? Otherwise a naval officer who has this happen is pretty well finished.
 
But a non-naval character can then buy (or, if he's lucky, capture) a better ship. Is there a way to arrange for a naval character who has lost his ship this way to get a court-martial, demotion and a replacement ship suitable to his new lower rank? Otherwise a naval officer who has this happen is pretty well finished.
Sounds doable, buy would of course require some effort.
We'd first need to rewrite the SetRank function to match your points properly on a demotion too; I was planning on getting this done soon anyway.
Then probably a dialog option to be added to governor_dialog.c to check if you are a naval officer and sailing a tartane and mention the court-martial and subsequent demotion through that.
Another call to Promote with the lower rank number which then does use GivePromotionReward for the ship but skips on the swords, perks and officers (because you should already have those).

Perhaps you or @Levis would be interested to set up part of that as well? I think Levis wanted to make use of demotions too, so we might as well get that working properly.
 
Then probably a dialog option to be added to governor_dialog.c to check if you are a naval officer and sailing a tartane and mention the court-martial and subsequent demotion through that.
It might be better to include something in the capsize code to take note of the fact if you're a naval officer. A high ranking officer who can re-arrange his fleet could intentionally give himself a tartane and should not be demoted for capsizing his ship as a result. Why he'd want to do that, I don't know, but you never know what some players will do...
 
It might be better to include something in the capsize code to take note of the fact if you're a naval officer. A high ranking officer who can re-arrange his fleet could intentionally give himself a tartane and should not be demoted for capsizing his ship as a result. Why he'd want to do that, I don't know, but you never know what some players will do...
My thinking was to just put in a line of dialog along this lines of "Governor, I seem to have lost my ship" that is only available when you are sailing the "Tartane1" you get after capsizing and surviving.
It is then player choice to select that option or stick to his little tub. So the demotion wouldn't be automatic, just like the promotion option isn't either.
 
So I think we should try to tackle this soon.
When capsizing and and still managing to get to land I think you should get a new ship from the navy. But should you get the ship you had before or should you get something weaker (say 1 rank lower).
I think to explain this right to players we should start a quest the moment you capsize and lose your ship while being in the navy, saying something like you should go to the governor, which will then give you a new one...
 
This is a tricky one. The ship given must be period and nation-correct. These are at the moment defined in NK.c for the promotion rewards.
I can't remember how it is set up now, but if we ensure it can be called separately WITH a rank number, that might solve the problem.
Then at least on a demotion, as would be due here, you can be given the ship from your LAST rank instead of your current one.

This gets nasty with the ranks where you get a companion ship instead of one of your own, though. :facepalm
 
To complicate matters a bit more, when Jack Aubrey is promoted to Post Captain or Horatio Nelson is promoted to Rear Admiral, they get nothing...
 
It would be possible if we rewrote the promotions so it would be stored in a way we could look it up
Say something like this:

Promotions.(rank).(period).ship = ...
etc

This would mean the promotion function just has to look up the right rank and period (you could use a default period if the period isn't avaible).
This way you could do a look up back trough the ranks to see which ship was last given.
But this would require some rewriting, and I don't know if it's worth it. I think it could give some advantages having it like this instead of all kind of cases, becaues this would be easier to edit etc also.

If we don't want to do this I'd say we should just give back the ship you had. So when capsizing we store the ship you had and when you talk to the governor you get it back. Maybe add some kind of 'fine' so you are pentaltized.
 
It would be possible if we rewrote the promotions so it would be stored in a way we could look it up
Say something like this:

Promotions.(rank).(period).ship = ...
etc

This would mean the promotion function just has to look up the right rank and period (you could use a default period if the period isn't avaible).
This way you could do a look up back trough the ranks to see which ship was last given.
But this would require some rewriting, and I don't know if it's worth it. I think it could give some advantages having it like this instead of all kind of cases, becaues this would be easier to edit etc also.
I thought about that, but that doesn't support giving specific characters a different set of ships. And how would that code know that the ship is to be given to the player or a companion?
Also, this:
To complicate matters a bit more, when Jack Aubrey is promoted to Post Captain or Horatio Nelson is promoted to Rear Admiral, they get nothing...
The current system is really very simplistic and quite cumbersome, really. But it is also flexible to do whatever it is that we want.

Would be nice if we could write a function with MULTIPLE output variables.
Then you put in a nation, period and rank and it outputs ship type, name, national design and a boolean to say whether the ship is to be given to the player or to be added as a companion.
That would also allow that function to be called from the Select Storyline Interface so ALL navy officers can show the ship they get there instead of saying blank "Navy Assignment" so players have to see what they get after the game started.
But then... If for a certain promotion a companion ship is given, then it needs to ALSO output the player ship from whatever previous rank applies.
Because we want to know what ship the PLAYER is commanding at a certain rank; the companions are merely a bonus. Perhaps two separate functions?

Hopefully you have some clever ideas on this one. If we can think of a better system, that might prove quite useful.
 
I think this would work.
We have a file promotions.c which has an init function which sets up the object promotions.
In here you have for example this:

Promotions.(nation).(rank).(period).ship = SHIPID
Promotions.(nation).(rank).(period).ship.to = "officer"
Promotions.(nation).(rank).(period).ship.name = "Dreadnaught"
Promotions.(nation).(rank).(period).officer = OFFICERID
Promotions.(nation).(rank).(period).officer.name = "Piet Paulusma"
etc

For the promotion function you should have different functions.
Say for example:

ref GetPromotionShip(int RANK, int NATION, int PERIOD)

it will return the ship.
you can also have

ref GetPromotionOfficer(int RANK, int NATION,int PERIOD)

That will return an promotion officer
and so on for other kind of promotion rewards

Next to that we could have an function being:

GetAssignedShip(int RANK, int NATION, int PERIOD, int OFFSET)

This function search trough the ranks going down to the last assigned ship. If you give in an offset it will skip so many, So say you say offset is 1 it will go 1 further down etc.

This shouldn't be to hard to program. You can then add these functions to the way the promtions are set up now. and if we want we could make it a generic function even without all the cases, and only use some special cases for special things (like a quest start or something like that).
 
How do we deal with character-dependent stuff? Just add some exceptions somewhere else?
I do think something like this should be possible, but it would need some good thinking through to ensure we maintain the same functionality we have now.
It certainly would be much easier to mod in the future with something like this.
 
How do we deal with character-dependent stuff? Just add some exceptions somewhere else?
I do think something like this should be possible, but it would need some good thinking through to ensure we maintain the same functionality we have now.
It certainly would be much easier to mod in the future with something like this.

Promotions.(characterID).(nation).(rank).(period).ship

The functions first search if there is one for this specific character. If not it will take Promotions.default.(nation).(rank).(period).ship

The same goes for all other things. It first looks if there is a specific one if not it takes default (which should always be avaible).
 
Thinking about it more I think the characterID should be moved to after period. Because that would make the search a lot easier.
 
Another thought. Is a naval officer who gets his ship capsized going to be demoted and given a lesser ship, or is he going to be given the same type of ship as he had but with a different name? If he gets demoted and a lesser ship then:

Commodore Jack Aubrey is in command of HMS Bellona, capsizes it in a storm, and returns to Kingston in a tartane. He's demoted to Post Captain, which has no assigned ship for him at all so presumably your function is smart enough to go to the next one down, the frigate HMS Surprise which he normally receives upon promotion to Commander. In due time he rises back up to Commodore, and is assigned to HMS Bellona. That's the ship he previously lost in a storm...
 
Thinking about it more I think the characterID should be moved to after period. Because that would make the search a lot easier.
It'll have to be character name as the player ID is always "Blaze".

Commodore Jack Aubrey is in command of HMS Bellona, capsizes it in a storm, and returns to Kingston in a tartane. He's demoted to Post Captain, which has no assigned ship for him at all so presumably your function is smart enough to go to the next one down, the frigate HMS Surprise which he normally receives upon promotion to Commander. In due time he rises back up to Commodore, and is assigned to HMS Bellona. That's the ship he previously lost in a storm...
I suppose we could then skip the Bellona and you'll be stuck with the Surprise for that much longer.
 
Back
Top