• 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 Hoist The Colours: problem with cursed Crimson Blood

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
Playing "Hoist The Colours", I've been doing the "Sao Feng's Missing Bodyguards" sidequest, and intentionally let Jaoquin de Masse keep the Black Pearl so I could try out the Crimson Blood. The main story progresses, Barbossa steals the Crimson Blood, I get the Interceptor, and I go to Isla de Muerte. After the cave scene I become Barbossa in command of the Crimson Blood and I'm supposed to attack the Interceptor, now under the command of Joshamee Gibbs.

This is the cursed Crimson Blood:
cursedcrimsonblood.jpg

There are no cannons on the sides. Worse, the bow and stern guns don't fire automatically and don't have manual fire gunsights either.

The attached "compile.log" includes attribute dumps of both the cursed and standard versions of Crimson Blood - I'd put 'DumpAttribute' commands into the console.

The problem seems to be in the way the cursed Crimson Blood is set up in "PROGRAM\Ships\Ships.c". This contains an entry similar to those seen in "Ships_init.c" plus a call on 'ModifyShip', also defined in "Ships.c". But the entries in "Ships_init.c" don't tell the whole story. They specify the bow and stern cannons ("refShip.Cannons.Borts.cannonf.qty" and "refShip.Cannons.Borts.cannonb.qty"), but not the side cannons. "Ships_init.c" reads in all the ship data from those entries and then does a lot of filling in of additional details, including "refShip.Cannons.Borts.cannonl.qty", "refShip.Cannons.Borts.cannonr.qty" and all the firing data. As "Ships.c" does not do this for the cursed Crimson Blood, the ship has no left or right cannons and no idea what to do with the cannons it does have.
 

Attachments

  • compile.log
    14 KB · Views: 189
Yikes, that's not good!

Strange though; I thought it used to work.
I also thought that only the chasers needed to be defined separately and the side cannons were calculated from that.
 
The side cannons are indeed calculated separately. That's part of the filling in done later in "Ships_init.c".

I believe "Ships_init.c" was altered at some point to do all that filling in. Among other things, that's where the ship's class is set according to its crew size, overriding the "refShip.Class" setting in the ship's definition. A much earlier system, in which "refShip.Class" from the ship definition was still in use and other details were calculated somewhere other than in "Ships_init.c", might have allowed the cursed Crimson Blood to work properly
 
That does sound like a likely explanation.

Is there a way to apply that new post-processing to the Crimson Blood as well?
 
Perhaps. Another option is to simply define a new ship model. The existing "CrimsonBlood" ship model with all its associated parts comes to a total of 7MB. That's peanuts compared to some of the recent additions.

Or change "CrimsonBlood_ModifyShip" so that it modifies the attributes for the ship "CrimsonBlood" - it's not as though there are any others of that type sailing around in the "Hoist the Colours" storyline. Forget setting up a special cursed version; curse the original instead, and let Barbossa have that.
 
Another option is to simply define a new ship model. The existing "CrimsonBlood" ship model with all its associated parts comes to a total of 7MB. That's peanuts compared to some of the recent additions.
Not an option; the reason for the weird approach is because the ship ID needs to remain the same as the Pearl.
Otherwise there are no skeletons on deck at night in 3D Sailing Mode.
 
In the end, I went with the simple method of copying big chunks of "Ships_init.c" into "CrimsonBlood_ModifyShip", though simplified a bit. The original in "Ships_init.c" has to cater to every ship in the game, so it is more generalised, whereas this version is specific to the Crimson Blood. So some values can be filled in directly rather than calculated - for example, the ship is defined to have 30 guns total, 2 on bow and 2 on stern, leaving 26, which means 13 on each side.

And now all guns are present, gunsights show up, and I can give the Interceptor a broadside:
crimsonblood_interceptor.jpg
 
Another problem: the cursed Crimson Blood has a ludicrous turn rate. In the film, the Interceptor tries to evade the Black Pearl by doing a club-hauling quick turn; even if Joshamee Gibbs tried that in the game, Crimson Blood could probably out-turn it. The reason is that there's some more setting of defaults at the start and re-calculating of values at the end of "Ships_init.c" dealing with performance data. So I've copied that into "CrimsonBlood_ModifyShip" as well.
 
Back
Top