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

Solved Black Pearl fog for other ships

KillPhil

Corsair
Storm Modder
Is it possible to add the fog from the Cursed Pearl to other ships too? And the other Special skills like submerge etc.?
 
Ahoy and welcome to PA! :gday

It is technically possible to add the special effects and abilities to any ship in the game.
However, it would require editing the existing code, probably to simply swap the ship which uses the abilities.
There may also be unwanted side effects, especially if you can encounter that ship at sea.

I think your best bet would be to send a PM to Pieter Boelen; he wrote the special effects code,
and could tell you how to change which ship uses what. If you ask nicely. ;)
 
Yes, it's possible to stop a ship from being encountered in the game. :yes
 
yes but i meant the option
refShip.unique = true;
I thought this tells the game that this ship won't appear a second time if it already appeared or if you own it?
 
PROGRAM\SEA_AI\AIShip.c:
Code:
	// PB: Black Pearl -->
if(sti(GetAttribute(rCharacter, "ship.type")) == SHIP_CURSED)
{
int puffs_per_second = 10;
if(SeaCameras.Camera == "SeaDeckCamera")	puffs_per_second = 1;
for (i=0; i < puffs_per_second; i++)
{
PostEvent("CreateCursedPearlFog", delay, "i", rCharacter);
delay = delay + 1000/puffs_per_second;
}
}
// PB: Black Pearl <--
Replace with:
Code:
	// PB: Black Pearl -->
if(sti(GetAttribute(rCharacter, "ship.type")) == SHIP_CURSED || sti(GetAttribute(rCharacter, "ship.type")) == "[INSERT YOUR SHIP TYPE]")
{
int puffs_per_second = 10;
if(SeaCameras.Camera == "SeaDeckCamera")	puffs_per_second = 1;
for (i=0; i < puffs_per_second; i++)
{
PostEvent("CreateCursedPearlFog", delay, "i", rCharacter);
delay = delay + 1000/puffs_per_second;
}
}
// PB: Black Pearl <--
That should work. No new game required.

refShip.unique ONLY prevents the ship's stats from being randomized based on national modifiers and does NOT prevent the ship from showing up anywhere.
For that, you need to set CanEncounter and CanBuy to false as applicable in PROGRAM\Ships\ships_init.c .

Good luck. :onya
 
okay if I add the line || sti(GetAttribute(rCharacter, "ship.type")) == "[INSERT YOUR SHIP TYPE]") and insert a ship I have a C++ Error.. doesn't matter, the game is of course still unbelievable good :)
Can the lanterns on ships be enlighted at night? that would be really nice :)

And can I switch off the "make sail" and "strike it down" voices? cause I use the sails for braking the ship faster, so I have to push S and W very often and it's getting on my nerves when there's always "strike it down, aye sir"^^
 
PROGRAM\InternalSettings.h:
Code:
#define ENABLE_EXTRA_SOUNDS 			1 		// BOOL - Enable/Disable added sound effects.
Change 1 to 0 to get rid of the additional sounds.

Did you replace "[INSERT YOUR SHIP TYPE]" with whatever ship ID you want from ships_init.c ? Out of curiosity, which one DO you want? I can set it up for you and send you the file.

For the lit lanterns, I had some thoughts but it's very complex and my experiments with it didn't work.
 
yes I replaced it.. I wanted to have a "cursed" soleil royal.. I already made a new texture for the ship, recolored the blue parts with a dark red, so the sails from the queen anne's now fit good.. I had the idea to make it for a new soleil royal, so I could still use the original texture but I wasn't sure about, so I simply changed the texture for it.
I also thought about that it would be very cool to add the bow guns from the dutchman to the cursed soleil royal^^

with the lit lanterns..
Isn't it possible to add the already existing lit lanterns from cities and decks to the ship? Okay I think if it were so easy than you would have made it already^^

EDIT: and of course thanks for the help with the sounds :)
 
There's two problems with the lit lanterns:
1. Making the particle effect itself display properly. My attempts so far have failed as the land effect likes to display as stupid half-transparent white/gray squares when used at sea.
2. Attaching the particle effects to a moving object that is affected by changing course, rolling, pitching, jawing, etc. This doesn't entirely work for the steamships (pay close attention at the point of original for the smoke when you speed up.
When attaching the effect to a very specific point, the inaccuracies will be even more obvious. Too bad the particle effect code relies on the static x,y,z coordinates in the game world.
I wished I knew how to make it read the coordinates of a custom locator. But apparently that is not possible at sea for ships. :modding

This should work:
Code:
if(sti(GetAttribute(rCharacter, "ship.type")) == SHIP_CURSED || sti(GetAttribute(rCharacter, "ship.type")) == "SoleilRoyal")
I hope. :facepalm

Bow guns are very easy: Copy the bow chaser locators with the TOOL and increase the number of bow chasers in ships_init.c .
 
thats too bad.. looks like you would have to rescript the whole engine or so...

and thanks for the tips with the ship :)

EDIT: My TOOL isn't able to open the .gm from the Dutchman(s).. is it also possible to edit the .gm with a HEX-Editor? I found "cannonf." in the Dutchman.gm but there's nothing in the .gm from the Soleil Royal :(
 
You don't need to copy the Dutchman's locators; they would be positioned incorrectly on the Soleil Royal, anyway.
Just open the Soleil Royal model (SoleilRoyal.gm) in TOOL and copy its existing bow chaser locators (cannonf) so that there are six of them, three on each side.
 
the locaters for the cannons are in the soleilroyalpart1.gm which actually can't be opened, too^^ I try it with a HEX-Editor
 
Ah yes, I forgot about that. :facepalm
In that case, you'll have to add four bow chaser locators to SoleilRoyal.gm, in roughly the same place as the other two on SoleilRoyal_part1.gm.
Using a HEX editor is not advised for adding locators, unless you really know what you're doing. It's good for renaming them, but I don't know about coordinates...
 
okay that would be going.. I hope this requires no textures? Because my TOOL don't show textures, unless I converted the textures to .tga :shrug
 
No, don't worry about TOOL showing no textures. The ship will still look the same in-game after changing locators.
 
eerr.. now I have a completely different problem: I think I turned into a tutorial mode.. the character-menu is switched-off, so I only can hit F2 and there is the character-register, but I cannot switch registers and if I click a skill, then a window shows up which tells me what this skill is used for.

How can I get out of this^^
 
PROGRAM\SEA_AI\AIShip.c:
Code:
    // PB: Black Pearl -->
if(sti(GetAttribute(rCharacter, "ship.type")) == SHIP_CURSED)
{
int puffs_per_second = 10;
if(SeaCameras.Camera == "SeaDeckCamera")    puffs_per_second = 1;
for (i=0; i < puffs_per_second; i++)
{
PostEvent("CreateCursedPearlFog", delay, "i", rCharacter);
delay = delay + 1000/puffs_per_second;
}
}
// PB: Black Pearl <--
Replace with:
Code:
    // PB: Black Pearl -->
if(sti(GetAttribute(rCharacter, "ship.type")) == SHIP_CURSED || sti(GetAttribute(rCharacter, "ship.type")) == "[INSERT YOUR SHIP TYPE]")
{
int puffs_per_second = 10;
if(SeaCameras.Camera == "SeaDeckCamera")    puffs_per_second = 1;
for (i=0; i < puffs_per_second; i++)
{
PostEvent("CreateCursedPearlFog", delay, "i", rCharacter);
delay = delay + 1000/puffs_per_second;
}
}
// PB: Black Pearl <--
That should work. No new game required.

refShip.unique ONLY prevents the ship's stats from being randomized based on national modifiers and does NOT prevent the ship from showing up anywhere.
For that, you need to set CanEncounter and CanBuy to false as applicable in PROGRAM\Ships\ships_init.c .

Good luck. :onya
There are now two simpler solutions:
1. Add "refShip.fog_trail = true;" in ships_init.c
2. Get yourself a cursed coin and carry that around for more than 30 days
 
Back
Top