• 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 Calibre Upgrade Fails for Shipyard Listings

Mere_Mortal

Free Like a Radical
Storm Modder
There’s this “Advanced Warship” at the shipyard, being HMS Mordaunt. In spite of being a class 3 and with a value of 500k db - it has an original maximum calibre of 4lb, upgraded to 6lb courtesy of the hull upgrade. The ship PDF clearly states it has a 24lb calibre, as does Ships_init.c. So what’s going on here, shouldn’t this have a 32lb calibre with the upgrade?

Untitled.jpg
 
Last edited:
Buy her and check her ID. Then give yourself a brand new one with console and check the calibre on that one.

Maybe the ship upgrade calibre increase doesn't work right for ships at the shipyard.
That wouldn't surprise me because some upgrades get set in a character attribute, but the shipyard owner would only be able to have one such set of attributes at the same time.
That would mean there could be some confusion between multiple ships.
 
The upgrade has seemingly been applied correctly so far, I certainly haven’t noticed any other problems. The way I see is that every ship has a calibre defined for it, in this case being 24lb... so the hull upgrade should simply increment it by one. If anything could go wrong then I’d imagine it starting out with no calibre at all and the upgrade pushing it to 4lb, but in this case it was 4lb in the first place. Dunno, I’ll make an effort to check the shipyard regularly to see if it happens again.
 
The upgrade has seemingly been applied correctly so far, I certainly haven’t noticed any other problems. The way I see is that every ship has a calibre defined for it, in this case being 24lb... so the hull upgrade should simply increment it by one. If anything could go wrong then I’d imagine it starting out with no calibre at all and the upgrade pushing it to 4lb, but in this case it was 4lb in the first place. Dunno, I’ll make an effort to check the shipyard regularly to see if it happens again.
After the fix to make that upgrade affect cannon calibre, the calibre is now stored in ch.ship.stats.MaxCalibre, right?
But what if a character has a LOT of ships? That can never happen for normal ones, but it does happen for shipyard owners.
Could then certain upgrade effects get mixed up because they're ALL stored on the SAME ch.ship.stats structure?
 
I suppose I won’t know unless I happen to see one with 4lb guns and no upgrade. I see what you’re saying, so I will keep an eye on it.
 
Now I see a standard Pinnace with 6lb calibre and the upgrade, so this is a problem because it should be 9lb->12lb.
Where do I need to be looking to sort this out? I don’t see anything useful in the shipyard file.:nerbz
 
Now I see a standard Pinnace with 6lb calibre and the upgrade, so this is a problem because it should be 9lb->12lb.
Where do I need to be looking to sort this out? I don’t see anything useful in the shipyard file.:nerbz
First thing I'd try is to remove that cannon upgrade fix we did last week, just to check if that is the reason or not.
I'm thinking it possibly could be, but I don't know that for sure at all.
 
I’ve reinstated the original line - I see a 3rd-rate with the upgrade and 24lb guns.

Then I included both lines and the Advanced Warship is back with 6-pounders.

I’m sure this’ll be really easy to fix, it’s just a matter of knowing where to look.

---------------

I think I got it this time! :yes

In ships.c and just before the loop on line #300 I added this...
Code:
   arShip.MaxCaliber = refShip.MaxCaliber
I now have a 32-pounder 4th-Rate listed. :cheeky

Since a new ship at the shipyard should always come with the default calibre, I believe this is a safe approach.

I can also see from a dump log that all of the ships in the listing now have their calibre defined under their attributes.

Images show the same listing with three different ships...

Untitled.jpg Untitled.jpg Untitled.jpg

Oh, I just noticed something. The Centurion was originally a 4th-Rate with 60 guns.
But here it has 68 guns, which would place it as a 3rd-Rate. Should this be rectified?
 
Last edited:
Are the ship "rates" not historically defined?
I assume that the Centurion used to actually be considered a Fourth Rate.
But I do not know that for sure.
 
That’s what I’m getting at; I expect the main idea for the ships is to keep them in line with historical accuracy as much as is practical (this will obviously differ in some areas for balance reasons, particularly in respect of cargo space). Yes, HMS Centurion was a 4th-Rate with a total of 60 cannon, but here it has 68 which places it as a 3rd-Rate. What’s more is that it has been given a maximum complement of 700 sailors, which in itself makes it a 2nd-Rate! I don’t know how many the original ship had, but a 60-cannon line-ship would not normally have more than 500 crew (700 would probably overburden it, and ask Mary Rose about that one). In other words, the ship in-game is not a 4th-Rate.

I don’t know how the rates are defined in-game, if they even are at all. We have the ship class but I’ve noticed that this changes depending on the time period. The init file defines the class but is that setting even used or does the code look at the number of guns?
 
If the Centurion was historically a Fourth Rate, that is the reason she has that in her type name.
The extra cannons compared to her real life counterpart are probably bow and stern chasers.
I think those were often not included in the armaments.
@Armada would know this better than me though.

The ship class attributes (renamed to "Tier" in the game because they're NOT historical classes) are determined automatically from the maximum crew numbers.
The code for this is at the bottom of ships_init.c .

We have gone back and forth on ship classifications a gazillion times.
Because there is no historical system that is truly consistent, we simplified it all the way down.

Changing the ship classifications has to end somewhere and we decided the current system is as good as it is going to get.
 
The class isn’t really an issue, but I think a 4th-Rate with 68 cannon and 650+ crew is a bit wayward. I dunno, I think Centurion has a personality disorder. xD
 
I wouldn't recommend changing the number of cannons on the model.
But if her crew number is too high compared to her historical self and other ships in the game, that should be easily changed I think.

The "Fourth Rate" text is just set in common.ini and is purely visual. Easily changed.
If she was a Fourth Rate in real life though, I would prefer having her show as that in the game as well.
 
Back
Top