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

New Horizons in Maelstorm (2.8)

@The Nameless Pirate I meant, that I initialy copied the locater positions from the Wicked Wench to the Black Pearl(s), but they didn't match :p The two outer lanterns on the Pearl(s) are a bit more inwards in the z-direction

@Pieter Boelen that code comes from GOF / ERAS II and checks if the new weather condition requires to switch off / on the lanterns while in 3D - right now it only checks on scene load. I guess I could move that piece of code into the NH-Weather-Update code (so the code that reinits the weather after an ingame-hour passes), but I couldnt find it so far:boom:

Even some added brigs and sloops dont have locators right now, but I will just go through them all and add them where they are missing. The good thing is, as you already said, the locators dont harm the 2.0 engine, so I guess, once I am done with that I could just upload all the edited models for packing them into the build?

Oh, btw; can I somehow create a log through the console which ship-models are in a location right now, so it will be easier for me to track down models without locators yet?
 
There is virtually no difference. ;)
True, other than the lanterns and a type of rope not supported in PotC. :yes

@The Nameless Pirate I meant, that I initialy copied the locater positions from the Wicked Wench to the Black Pearl(s), but they didn't match :p The two outer lanterns on the Pearl(s) are a bit more inwards in the z-direction
In the newest version of NH the models are exactly the same, minus the textures.
This wasn't always the case as the Wicked Wench didn't have a figure head for example.
upload_2020-10-7_20-29-54.png

It seems for some reason the older model didn't differ only on the texture and figurehead.

Even some added brigs and sloops dont have locators right now, but I will just go through them all and add them where they are missing. The good thing is, as you already said, the locators dont harm the 2.0 engine, so I guess, once I am done with that I could just upload all the edited models for packing them into the build?
Well, if you are going to do this I would suggest using the ship models from Storm Engine 2.0 NH.
There are various ships that have been improved since the version that runs on Maelstrom.

Though I don't see a reason to include them on SE 2.o NH, unless a way to use lanterns on ships in SE 2.0 is found, it won't make any difference.

Oh, btw; can I somehow create a log through the console which ship-models are in a location right now, so it will be easier for me to track down models without locators yet?
Not sure, but if I were you I would just make a list of the models I added locators to.
If you add them to another model, or you encounter one that already has them; you add it to that list.
 
Ahh could be that the GOF Wicked Wench differs slightly from the NH

Well true, I should probably download the latest Build soon.

My hope would be to get the two versions as close as possible tho, thats why I suggested that. It does no harm for you ;)
 
My hope would be to get the two versions as close as possible tho, thats why I suggested that. It does no harm for you ;)
If you use the latest files then it would indeed not do any harm.
Plus it will be helpful if someone wants use a ship model they found on SE 2.0 NH on a newer game.
 
Last edited:
@Pieter Boelen that code comes from GOF / ERAS II and checks if the new weather condition requires to switch off / on the lanterns while in 3D - right now it only checks on scene load. I guess I could move that piece of code into the NH-Weather-Update code (so the code that reinits the weather after an ingame-hour passes), but I couldnt find it so far:boom:
The PotC weather code has been quite substantially rewritten since the original game.
I'm surprised swapping out the file from CoAS doesn't crash the game altogether.
But could very well be that a fair bit of functionality isn't fully operational...

This bit in PROGRAM\Weather\WhrWeather.c looks like an "hourly update trigger":
Code:
    // LDH 17Feb09 -->
   int theHour = MakeInt(GetHour());
   Trace("** Whr: CreateWeatherEnvironment - iCurWeatherhour = " + iCurWeatherhour + ", theHour = " + theHour);
   if (iCurWeatherhour != theHour || gWeatherOvrd || gWeatherInit || CheckAttribute(&WeatherParams, "update"))
   {
       if (theHour != 0 && iabs(iCurWeatherhour-theHour) > 1 && !gWeatherOvrd)
           gWeatherInit = 1;   // all new weather if enough time passes
       Whr_Generator();
       iCurWeatherHour = theHour;
       if(CheckAttribute(&WeatherParams, "update")) DeleteAttribute(&WeatherParams, "update"); // screwface
       // PB: Slow down game to normal speed when you are caught in irons -->
       // But only ONCE after the weather change and not ALL the time
       pchar.timescale_reset = true;
       // PB: Slow down game to normal speed when you are caught in irons <--
   }
   // LDH <--
It was completely mod-added, so is likely not at all coded the same as the later games.

Even some added brigs and sloops dont have locators right now, but I will just go through them all and add them where they are missing. The good thing is, as you already said, the locators dont harm the 2.0 engine, so I guess, once I am done with that I could just upload all the edited models for packing them into the build?
Should be no problem. :onya

h, btw; can I somehow create a log through the console which ship-models are in a location right now, so it will be easier for me to track down models without locators yet?
I could figure out a way. But perhaps you're already helped with some console code that is already there:
Code:
       /*
           if(!Checkattribute(pchar,"cheatship")) Pchar.cheatship = 0;
           int con = sti(Pchar.cheatship);
           if(con<SHIP_TYPES_QUANTITY)
           {
               GiveShip2Character(pchar,ShipsTypes[con].id,"Test Ship",-1,ENGLAND,true,true);
               Pchar.cheatship = con +1;
           }
           TraceAndLog("*************************** Ship : " + ShipsTypes[con].id + " , Index : " + con + " ");
       */
If you activate that, every time you press F12, you will be given the next ship listed in ships_init.c .
Reload to worldmap, wait for night (if necessary), then reload back to 3D Sailing Mode and you'll see if the lights work or not.

I once added this for a very similar job (probably when we added the "flag" and "penn" locators to the masts).
Because it goes in order, you don't have to depend on the random chance that affects ships in port.
This also bypasses all Period restrictions, so once you've reached the end of the list, you know for sure you got them all.

Alternatively, find this in PROGRAM\Locations\locations_loader.c:
Code:
       if (b < iNumJettyShips && JettyShip(Characters[i]))
       {
           iShipsType[locNumShips] = 2;
           DeleteAttribute(GetCharacter(i),"sailaway");
       //   Logit("ship #" + locNumShips + ": Ships Jetty: " + b + " character ID: " + Characters[i].id + " ship type: " + Characters[i].ship.type);
           b++
       }
       else
       {
           iShipsType[locNumShips] = 1;
       //   Logit("ship #" + locNumShips + ": Ships Other: " + o + " character ID: " + Characters[i].id + " ship type: " + Characters[i].ship.type);
           o++
       }
Replace those // Logit lines with TraceAndLog and you'll get on-screen messages AND compile.log entries for all ships in the shore port scene.

This was originally added for another purpose, which is why the code surrounding it is for determining where to moor ships (on a player locator; out at sea; or moored alongside a jetty).
But it should work for your purpose too, I think. :doff
 
Did @Armada make ships for both PotC and CoAS?
I uploaded the models for use in either game, though I only included ShipsInit entries for PotC as I didn't have access to CoAS at the time.

The Corvette also includes "Sail0" locators on the yards, which as far as I understand are for limiting how far the sail can billow in CoAS and newer, but have no effect in PotC.

There is virtually no difference. ;)
Apart from the aforementioned locators, the SailorsPoints files, the ShipsInit entries and the repainting system... sure, there's no difference. :razz
 
Well I just added this single void in the WhrWeather.c , it only crashed the game like 3 times before I correctly merged the code, but like I said, it doesnt do what it should.

I already thought that this
Code:
  int theHour = MakeInt(GetHour());

was the trigger for the update, but wasnt sure. I will try to add the update for the ship lights in this function and see what happens. If I am not completely mistaken, if I merge this right, it should update the weather.lights attribute everytime it updates the weather

oh yeah right thats missing in the 2016 console version, but I can add it again. Will help a lot thanks :)

Like @The Nameless Pirate suggested, I will wait with further locator editing until I got all your updated models. I got until the Fleuts and fleuts of war so far, so I edited the barques, the brigs, the brigantine, the edinbourgh trader and the fleut1+2 and fleut-of-wars .. do you know if you changed those models since 2016?
 
I uploaded the models for use in either game, though I only included ShipsInit entries for PotC as I didn't have access to CoAS at the time.

The Corvette also includes "Sail0" locators on the yards, which as far as I understand are for limiting how far the sail can billow in CoAS and newer, but have no effect in PotC.


Apart from the aforementioned locators, the SailorsPoints files, the ShipsInit entries and the repainting system... sure, there's no difference. :razz

I am pretty sure the Sailo-locator gets recognized correctly in Maelstorm tho
 
Like @The Nameless Pirate suggested, I will wait with further locator editing until I got all your updated models. I got until the Fleuts and fleuts of war so far, so I edited the barques, the brigs, the brigantine, the edinbourgh trader and the fleut1+2 and fleut-of-wars .. do you know if you changed those models since 2016?
Can't say for sure unfortunately.
But it should be easy to see once you download the latest version of NH and compare it to the one Maelstrom uses.

I am pretty sure the Sailo-locator gets recognized correctly in Maelstrom tho
This should indeed be the case, they get recognized by SE 2.8, so Maelstrom should also recognize them.
 
I already thought that this
Code:
int theHour = MakeInt(GetHour());
was the trigger for the update, but wasnt sure. I will try to add the update for the ship lights in this function and see what happens. If I am not completely mistaken, if I merge this right, it should update the weather.lights attribute everytime it updates the weather
'GetHour()' just returns the current time.
'iCurWeatherhour' is (I think) the time when the weather was set.
If this time is different from the current hour (because it was an hour ago that the weather was updated), then it is time for another update.
The actual update is done by 'Whr_Generator();' .

Like @The Nameless Pirate suggested, I will wait with further locator editing until I got all your updated models. I got until the Fleuts and fleuts of war so far, so I edited the barques, the brigs, the brigantine, the edinbourgh trader and the fleut1+2 and fleut-of-wars .. do you know if you changed those models since 2016?
Probably not...
We don't edit the main hull GM files very often.
Only when detail is added; and occasionally when rigging is updated.

To check, compare the "Build Info.txt" of the latest release with the one you're working on.

Edinburg Trader = repainted Bounty, by the way; so if you didn't do her yet, you can copy-paste.
 
ok thanks for the info @Pieter Boelen , I will try to add the "lights-check" there.

Well I just downloaded the latest build, which means

a) I can soon try to see what happens if I replace the Maelstorm NH version one by one with the current version

b) I will add the loactors in the current files, but I think the models I edited so far should be the very same

I will keep you updated of all the errors that happen when updating the code ;)
 
ok thanks for the info @Pieter Boelen , I will try to add the "lights-check" there.

Well I just downloaded the latest build, which means

a) I can soon try to see what happens if I replace the Maelstorm NH version one by one with the current version

b) I will add the loactors in the current files, but I think the models I edited so far should be the very same

I will keep you updated of all the errors that happen when updating the code ;)

Is the version you are working on the one available to download on itch.io for the Maelstrom engine? After very many years I thought of this game again and saw the Maelstrom engine and it certainly excites me to see someone working on a port of NH.
 
Back
Top