• 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/Privateer Promotion Steps

@Grey Roger: I'm doing quite a massive rewrite of NK.c to split the various elements of your promotion into separate functions.
So GivePromotionReward now calls the following new functions:
GiveSwordAndPerks, OfficerUniform4Player and GivePromotionOfficers .

These are all simplified a fair bit to reduce the amount of double code, but should do pretty much the same that they always did.
However, because they're more generic, they should work as well for all other nations.
So unless you want to change the model used for certain nations' officers, those will already be taken care of.

That means the only thing still required is the period and nation-specific ships.
I hope that makes things a bit easier to deal with in the future, because that function was getting unwieldy and huge.
 

Attachments

  • NK.zip
    21.9 KB · Views: 107
Not really. I'd figured out what the existing structure did. I'd already copied the French promotion block to Holland, changed crew clothes to be types listed as "HOLLAND" in "initModels.c", and was part way through sorting out ships. Which means next time I upload "Nk.c", you're going to have the choice between what you've done and what I've done. Please leave "Nk.c" alone if you want me to continue work on promotion tables. (Or, since you want to alter "Nk.c" anyway, I'll hand that job back to you. I know how much you enjoy it. xD)
 
See the file attached here for the full extent of what I've been up to:
http://www.piratesahoy.net/threads/build-14-beta-3-5-internal-wip-for-testing.24817/

I understand that it is annoying to have the format of the file changing in the middle of your work, so you're welcome to continue on your current version of the file.
It should be relatively easy to make your Holland changes work with the reworked functionality.
While it looks very different, it isn't as bad as it looks. Anyway, I can deal with that so you don't have to worry about it.

Mainly, I just wanted to show you what I've got there so you'll know what you don't need to do now (saves you time and effort, right?).
Since the swords, perks, officers and uniforms are now handled by different functions, those should not need a lot of further work now.
Perhaps some extra uniforms for the nations that didn't have any defined yet, but that's it.
The only biggie left are the ships.

The main reason for me doing this is to be able to do this in StartStoryline.c:
Code:
        for (int i = 0; i < PlayerRank-1; i++)
         {
           Promote(PChar, ch, sti(PChar.nation));
         }
That completely prevents us from having any doubled up "fake" promotion code in there at all, since it directly uses the real function instead.
I've also done away with the pre-defined characters for Nelson and Aubrey from the character init files; that cleans it up a bit further too.

Also, I wanted to make sure that any Select Storyline choices are reflected in the game properly and the original GivePromotionRewardFunction liked overriding all sorts of things. :facepalm
 
Looking at "GiveSwordsAndPerks", I see that pirates get "Troopers" at rank 2. Navy doesn't get it until rank 5, privateer doesn't get it until rank 7! Is there a reason for this disparity?
 
Unless I am very much mistaken, that pirate "Troopers" line was added before it was ever even possible to gain ranks with the pirates.
So I suspect the only reason for it being there at all is as a reminder that it should be somewhere.
Other than that, I can think of no specific reason and indeed it does seem out of place.
You're welcome to change it or to suggest a better rank for it. :doff
 
I was going to continue using the older version of "NK.c" while developing the Dutch promotion list, but I fouled up somewhere and it broke the game. So I copied my Dutch promotion ships so far into the newer "NK.c" and tried it out last night - not playing as a Dutch officer, just seeing if the game objected to what I'd done. It didn't. :)

And then I got a promotion ship from an English governor. Fair enough, I have an English LoM and a suitable rank, but I'm not a naval character. It seems that the check for the "professionalnavy" attribute has been removed from the promotion ship code (and for the French promotion ship code too). Privateers will now get all the promotion ships due a naval character. (Well, English and French ones will. I didn't leave out the check, so Dutch privateers won't get promotion ships. Tough. xD)
 
And then I got a promotion ship from an English governor. Fair enough, I have an English LoM and a suitable rank, but I'm not a naval character. It seems that the check for the "professionalnavy" attribute has been removed from the promotion ship code (and for the French promotion ship code too). Privateers will now get all the promotion ships due a naval character. (Well, English and French ones will. I didn't leave out the check, so Dutch privateers won't get promotion ships. Tough. xD)
Ah, good catch! While I did put the check in the new sub-functions, I probably forgot to add it to the main one.
I had the intention to also make a separate function for the actual fleet ships,
but then reconsidered because it would have needed two outputs* and I don't think you can do that in PotC.

EDIT: Yep, that's confirmed. Extra line required:
Code:
  // Fleet
   if (!CheckAttribute(pchar, "professionalnavy")) return; // only for navy characters
   switch(LocationNation)

* = I wanted to make a function that returns the ship type AND name so that it can be called from within the Select Storyline interface.
However, now that the interface just displays no ship at all with the text "Navy Assignment",
the interface isn't technically wrong and therefore I don't care about making it more fancy. :wp
 
Last edited:
Unless I am very much mistaken, that pirate "Troopers" line was added before it was ever even possible to gain ranks with the pirates.
So I suspect the only reason for it being there at all is as a reminder that it should be somewhere.
Other than that, I can think of no specific reason and indeed it does seem out of place.
You're welcome to change it or to suggest a better rank for it. :doff
I put it up for discussion in case anyone had a good reason for keeping it as is, or suggesting alternative values. Whatever I do to it, everyone else will either need to live with or change again, the latter making my work then a bit redundant. ;)

My thoughts, then:
"Troopers", alias "Landing Party", has two effects. The original effect from the stock game is to reduce the strength of a fort. A naval officer might learn how to do this as part of military training; privateers and pirates would have to learn the hard way.

The second effect, probably the more significant for most players, is to attack unfortified settlements. This is a very powerful ability resulting in lots of money and relationship points with your nation. The text for the unlock indicates that it is a matter of the governor trusting you; he'd be more likely to trust a genuine commissioned officer than a privateer. Pirates have the problem that about the only place they can use "Troopers" is Aruba; all other unfortified settlements that I can think of belong to Pirates. Still, the cash reward for doublecrossing the Brotherhood has to be pretty tempting, not to mention booting out the current boss and declaring yourself the new Big Bad Boss by installing your own governor and personal flag. The boss pirate really has to trust you not to do that before he'll let you have the perk.

So I'd be inclined to leave naval officers getting the unlock at rank 5 and have both privateers and pirates get it at rank 7. (Of course, you still need to be high enough character level to be able to take the perk anyway, as well as have enough ability points to afford it.)
 
Sounds OK to me. Can you include that change when you post your NK.c updates?

I'm hoping to suspend my further PotC work for today. Need some rest... :wp
 
An added note there is that Holland and Portugal are a bit different from the other nations.
This is because they don't have ships larger than Tier 3 in Early Explorers and Napoleonic.
Not entirely sure how you will need to treat that, but if you use the Select Storyline filters then you will notice this effect.
"Ships_init.c" gives no decent size warships for Holland during the "Revolutions" and "Napoleonic" periods. But looking at http://threedecks.org and doing a search for ships by nation Holland, there are several ships of the line in the Napoleonic period, including the 74 gun third rate Vrijheid (Jan de Winter's flagship in the Battle of Camperdown in 1797) and 80 gun second rate Admiraal Zoutman. In the absence of anything legal for Holland, and since Holland gets to share some British designs such as "RN_Surprise", I'm going to hijack the "RN_SuperiorWarship" and give it to "Commandeur" during "Napoleonic". Then "Schout-bij-Nacht" can get a companion with a "SuperFrigate" (the Iceni Queen turns out to be legal for various nations and Holland did apparently have some fourth rate frigates). "Vice-Admiraal" can have a "FR_Bellona", unless you think someone else's colour scheme would be appropriate, but during Napoleonic times Holland was the Batavian Republic, a French client state. (France helped itself to several Dutch ships of the line in 1810, the Admiraal Zoutman being one of them.)
 
It just occurred to me that the navy ship progressions are pretty crucial now! If you select a generic navy officer, then you don't start with a ship.
And if the relevant nation doesn't have the ship progression set, then you don't get a ship either. :facepalm

Anyway, that'll be sorted soon when all nations have this completed. :doff
 
I have already changed the rank at which pirates get "Troopers". Nobody seemed to have any objection to the change.

I've still to sort out the details for the higher Dutch ranks, then I'll post my current version of "NK.c". This will include the check that you are in fact a commissioned officer before giving you the rewards for a commissioned officer, the change to when pirates get "Troopers", and full promotion rewards for French and Dutch.
 
The Dutch Navy is now looking for recruits.

There aren't many heavyweight ships for the Dutch in the later time periods, so at higher ranks you're more likely to get an extra companion ship. The best time periods to play a Dutch officer are probably "Spanish Main", "Golden Age of Piracy" and "Colonial Powers", for which there are several nice Dutch-specific ship types and you should have opportunities to play them all.

Names are mostly taken from http://threedecks.org/, matched where possible to something vaguely similar, e.g. frigates get names of real frigates, ships of the line get names of real ships of the line, etc. There are a few exceptions - an Adjutant Onderofficier will get something cheesy, and a Terry Pratchett reference managed to sneak in somewhere. xD
 

Attachments

  • NK.zip
    22.3 KB · Views: 96
There are a few exceptions - an Adjutant Onderofficier will get something cheesy, and a Terry Pratchett reference managed to sneak in somewhere. xD
LOL! This particular mod is a great way of having some good old-fashioned fun! :woot
 
And now I have a little job for you. Make a playable character, full name "Michiel De Ruyter". Depending on rank, the ship should be:
1: KetchNavy Den Graeuwen Heynst
2: Cutter1 Groene Leeuw
3: NL_Derfflinger Haas
4: NL_NeptunusE Neptunus
5: NL_Fleut50 Witte Lam

He should be set in the "Spanish Main" period. I'm going to try out my latest version of "NK.c" tonight just to check that I haven't made a typo which causes it to crash the game, otherwise it will now look for a character named "Michiel De Ruyter", but only in "Spanish Main". If I've done this right, playing him in any other time period will just give him the same ships as any other Dutch officer, partly because the real Michiel De Ruyter didn't exist in other time periods, and partly because if he does manage time travel then he can commandeer something relevant to the time rather than bring an outdated ship with him. xD
 
Do you know a character model to use for him?
Starting date could be anything in The Spanish Main of course, but have you found a particularly relevant early date in his carreer during your research by any chance?

Do you already have those ships linked to those ranks in The Spanish Main?
That is what we did for Nelson: Simply have the Nelson ship progressions be the default ones for his time period.
 
No idea about dates. Wikipedia mentions the first two ships, giving no details about Den Graeuwen Heynst at all and putting him in Groene Leeuw in 1633 and 1635. threedecks.org doesn't list anything at all before Haas in 1641 and Neptunus in 1652. Take your pick. ;)

Yes, those are the ships I've set for De Ruyter in the new version of "NK.c". I've given him ship names according to what I found in Wikipedia and threedecks.org, and tried to get reasonable matches where ship data is available - it just so happens that several of them are the same type as any other Dutch officer will get at the same rank. But they're getting whichever names I picked out of threedecks.org, whereas De Ruyter is at least getting the right ship names, though not at the correct ranks - threedecks.org shows him to have been Schout-bij-nacht when he got the Haas, which is the second highest rank in the "NK.c" list! I wonder if the Dutch renamed their ranks. De Ruyter subsequently got the third rate ship of the line Huis te Kruiningen at rank Kaptein, presumably our Kapitein ter Zee, which is only level 7 whereas Schout-bij-nacht is level 9. Anyway, I've given him NL_Fleutwar Huis te Kruiningen at rank Kapitein-Luitenant because otherwise I can't fit the rest of the more interesting ships into what ranks remain above that.

As for a model, have we anything that looks like this?

220px-Bol%2C_Michiel_de_Ruyter.jpg
 
Back
Top