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

Unique Ship Cannons not Firing AND Vanderdecken Buyable Steamships

Right, here are some test results:

1) When I give myself the Cursed Pearl with the console, ALL the cannons fire!

2) When I execute the code to give Barbossa his own ship, he FINALLY fires a full broadside at me!! (never been so happy to be fired at :cheeky )
(I have a lot of savegames, seeing as I have that weird problem with quest triggers, so conveniently I had one right before encountering the Pearl at Martinique)
Thanks for checking that. That confirms some of my expectations, though I still don't know what to make of it. :wacko:

Right, here are some test results:I should also mention that when I encountered the Mefisto in the sidequest, she fired all her guns no problem... yet she is 'unique'...
You're absolutely right; she IS set as "unique". I can't really make any sense of that. At least not yet. :modding
 
Another point about Mefisto-
Despite the randomization, the one you can buy from Vanderdecken still fires all cannons...
Which is strange as the other 'unique' ships don't. :?
 
I can further confirm that if you buy either the "Mefisto" or "Santiago" from Vanderdecken,
despite the fact that they DO have the "unique" attribute, their cannons fire perfectly fine!

Additionally, applying the "Reinforced Hull" upgrade to the "Mefisto" does NOT mess up her cannons.
I'm beginning to wonder if it's a HP thing! :shock
 
I'm beginning to wonder if it's a HP thing! :shock
Perhaps not HP... but SP!
What do these ships which DON'T work have in common:
1) They are 'unique'
2) They have SP of 999999!!

Maybe THIS is the problem? :shrug
 
It's definitly one of the two. I just changed these two lines for the "CursedDutchman":
Code:
	refShip.HP				= 1000; // PB: was 100000
refShip.SP				= 9999; // PB: was 999999
Bought her from Vanderdecken, NO cannon problems!!!
Now we just need to figure out which of the two it is and what is the highest value we can set it to without going nuts.

If you want to experiment with this yourself:
1. Make the change in ships_init.c
2. Start the game and load a savegame with you in front of Vanderdecken
3. Press F11 (Reinit) for the change to take effect
4. Buy the ship you just modified and see what happens

Edit: It is HP. With this code, the cannons do still fire:
Code:
	refShip.HP				= 1000; // PB: was 100000
refShip.SP				= 999999;
 
At last, we're getting somewhere! :onya

Perhaps the 999999 is causing a problem, as it's the highest possible 6-digit value?

EDIT:
OK in that case it's not the sails.
Right I'll have a play-around with some ships to see what happens.
 
How much HP does "cursedutchman" have when added via the console, then? She seemed to do reasonably well against 2 frigates, a 3rd rate and Speightstown fort (lost an inperceptible amount of hull before I ran out of powder...)

Which looks similar to the values given by the shipyard...
 
Through console, she gets the same amount of HP that is set up in the ships_init.c file: 100000
When buying from Vanderdecken, apparently some randomization is going on, but the value is going to remain thereabouts anyway.

I'm steadily increasing the HP of the CursedDutchman, starting at 10000, and at 45000, only about 6 fire.
Why it is related, I truly do not know. But it appears that if the value is low enough, no weird effects take place whatsoever.
If it's too high, weird stuff does start happening. But ONLY if buying from Vanderdecken OR getting the "Reinforced Hull" upgrade.

Bizarre, no? The solution is simple though: don't set the HP value too high. :modding
So what sounds fair for the cursed ships? The HMS Endeavour has 14000 HP points.
100000 (Beta 1 default) is too much. Apparently 45000 is too much too.
 
Very bizarre!
Anyway, I changed the CursedPearl's HP to 20000, and even after hitting F11, the one encountered in the storyline won't work.
However, neither will one I had already bought from Vanderdecken, in another savegame. But a newly purchased version WILL work. :)
(Perhaps that's why- I probably need to start a new game for the quest ships to work?)

PS: I reckon 20000 seems a decent number... but the Man-o-war has around 27000, so should the cursed ships be stronger (e.g 30000) or if not, equal?
 
However, neither will one I had already bought from Vanderdecken, in another savegame. But a newly purchased version WILL work. :)
A reinit doesn't work on ships you already have, so that doesn't sound too surprising.

Anyway, I changed the CursedPearl's HP to 20000, and even after hitting F11, the one encountered in the storyline won't work.
(Perhaps that's why- I probably need to start a new game for the quest ships to work?)
Possibly; see above. If you're willing, could you please start a new game and try?
(I'm trying to find some jump-start code to put you right there, but am having some troubles with that because of my stupid Windows search engine)

BTW: Isn't the Black Pearl when you encounter her at Martinique "friendly" to you? If so, how do you check if she fires her cannons?
Or are you talking about the final fight already?

Also, I just found this code in relation to using the artefact at the end of the Standard storyline. It could possibly mess things up again. :modding
In fact, I'm not even quite sure what it's supposed to be for. Seems to set the Black Pearl's HP to the combined HP of your own squadron. :wacko:
Code:
int iHP1, iHP2, iHP3;
iHP1 = 0;
iHP2 = 0;
iHP3 = 0;
if (GetCompanionIndex(pchar,1) > 0)
{
ipassenger = GetCompanionIndex(pchar,1);
iHP1 = makeint(characters[ipassenger].ship.hp);
}
if (GetCompanionIndex(pchar,2) > 0)
{
ipassenger = GetCompanionIndex(pchar,2);
iHP2 = makeint(characters[ipassenger].ship.hp);
}
if (GetCompanionIndex(pchar,3) > 0)
{
ipassenger = GetCompanionIndex(pchar,3);
iHP3 = makeint(characters[ipassenger].ship.hp);
}
// PS -->
//iPassenger = pchar.ship.type;
pchar.ship.hp =  GetCharacterShipHP(PChar); //ShipsTypes[iPassenger].HP;
// PS <--

characters[GetCharacterindex("Barbossa")].ship.hp = makeint(pchar.ship.hp) + iHP1 + iHP2 + iHP3;

PS: I reckon 20000 seems a decent number... but the Man-o-war has around 27000, so should the cursed ships be stronger (e.g 30000) or if not, equal?
Preferrably more than any non-supernatural ship, including Man-o-wars.

Which one has 27000 HP? I can't find that value anywhere in my ships_init.c .
Though quite possibly that is because I use Oberleutnant's version of the file and not the Build 14 Beta 1 version...
 
Maybe the incredibly thick, heavy hull is preventing the cannon crews from opening the gun ports (they're not strong enough...)

Considering the fact that you have to pay 1 million+ for the cursed ships, and all you really get in return is that stupidly high hull (plus some odd sailing characteristics) it seems only fair to give them more than the mundane ships.
 
Indeed. Though they also tend to be fairly fast for ships that size; especially the Flying Dutchman (against the wind) and Black Pearl (with the wind).

(I'm trying to find some jump-start code to put you right there, but am having some troubles with that because of my stupid Windows search engine)
With thanks to Captain Maggee, execute this code through the console:
Code:
			Pchar.quest.Seen_Black_Pearl.win_condition.l1 = "location";
Pchar.quest.Seen_Black_Pearl.win_condition.l1.location = "FalaiseDeFleur";
Pchar.quest.Seen_Black_Pearl.win_condition = "Seen_Black_Pearl";
Now sail to Martinique and she should be there waiting for you without going through the whole story.
 
Even at a HP of 30000, she still doesn't (Always? Randomization???) fire all cannons. :modding
I wonder if there's some code in place that takes HP into account when it comes to cannons firing.
There IS some fancy code in some spots; might need to search for that... :?
 
This might have something to do with the whole problem:
http://forum.piratesahoy.net//topic/13282-some-notes-on-setting-the-ships-crew-numbers/
First, it requires 1% of your ship's HP in crew to sail the ship.
 
BTW: Isn't the Black Pearl when you encounter her at Martinique "friendly" to you? If so, how do you check if she fires her cannons?
Or are you talking about the final fight already?
Apparently not- she always fires at me at Martinique (bearing in mind I was using my personal flag at the time)

Which one has 27000 HP? I can't find that value anywhere in my ships_init.c .
Though quite possibly that is because I use Oberleutnant's version of the file and not the Build 14 Beta 1 version...
From what I can tell (in the new ships_init file used to fix the steamships issue), each 'manowar' has a HP in the range of 26000-27500.

PS: I'll use the code you provided and test the Pearl at Martinique in a new game.
 
Apparently not- she always fires at me at Martinique (bearing in mind I was using my personal flag at the time)
Then some code is not doing what it should. :modding

From what I can tell (in the new ships_init file used to fix the steamships issue), each 'manowar' has a HP in the range of 26000-27500.
Then it IS because I'm using Oberleutnant's file.
 
Breaking news:
Having used the console's jump-start to the Pearl encounter at Martinique, she finally fires all guns properly! :onya
(despite not being supposed to attack me anyway)
 
That is after lowering her HP value and with the two files I posted, right?
 
That is after lowering her HP value and with the two files I posted, right?
Yes (sorry for being too vague again)
So now, I guess I just need to lower the HP values for the other 'cursed' ships...
 
Here's an excerpt from PROGRAM\SEA_AI\AICannon.c:
Code:
	int CanQty = GetCannonCurQuantity(&aCharacter);		// LDH crew adjusted cannon quantity, not all cannons will fire - 12May09
float CrewRequired = CrewPerGun * CanQty;
CrewRequired = CrewRequired / 2.0;		// We're only loading one broadside at a time.  We can adjust this later if needed.

int CrewQuantity  = GetCrewQuantity(aCharacter);
if (USE_MINSAILCREW)
{
int MinSailCrew = GetCharacterShipHP(aCharacter)/100;	// crew needed for sailing, intentionally not using mininum crew here
if (MinSailCrew == 100000/100) MinSailCrew = 100;		// Black Pearl is a special case
CrewQuantity -= MinSailCrew;
}
if (CrewQuantity < CrewPerGun) CrewQuantity = CrewPerGun;		// detail one gun crew from the MinSailCrew

if (CrewRequired > CrewQuantity)
{
//		if (CrewQuantity > CrewPerGun)		// avoids division by zero as well
//		{
fReloadTime *= (CrewRequired / CrewQuantity);	// half the required crew takes twice as long to load
//		}
//		else
//		{
//			fReloadTime *= (CrewRequired / CrewPerGun);		// detail one gun crew from the MinSailCrew
//		}
}
if (fReloadTime > 600.0) fReloadTime = 600.0;	// cap it at 10 minutes, will be adjusted below
Reading the comments, I get the impression that this DOES have something to do with our problems.
Will look into this properly some time later...
 
Back
Top