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

Fix in Progress Havana ship position on exit

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Jack Rackham, if you'll be looking into rotating some locators again, do you reckon you could give that Havanna issue one last shot?
We now know that starting a New Game is required for that particular change to actually take effect.
 
Ok, I turned all Cuba locators 180 degrees - no effect. So I'm sorry this is beyond what I can do. :shrug
 
Ok, I turned all Cuba locators 180 degrees - no effect. So I'm sorry this is beyond what I can do. :shrug
Bizarre. You DID manage to sort out the same problem for Puerto Rico before.
Beats me why Cuba is being so difficult. But so be it. :facepalm

Now marked as "Abandoned Feature Request".
 
I wouldn't know why this method works for one island and not for another. :shrug
 
I remember this was a problem for San Juan.. everytime you exit from port and go to world view.. the ship is turned in opposite direction facing the port itself...
Now in Havana the same problem exists.. hope it can be considered for future updates. =)
 
@Jack Rackham already tried very hard to fix it.
We don't know why, but for some reason that refuses to work.
You'll just have to live with it as is, I'm afraid.
 
Ok, just to close this one out, I found a fix. It can probably be done in islands_init.c by adding likes like I've already done in that file a few years ago (which will probably require a new game to take effect), and it can also be done in console.c for current saved games.

Here's the console code with Havana and other changes I've made, to show you how it's done:

Code:
TraceAndLog("*** Fixing ship direction at ports");
for (i=0 ; i<ISLANDS_QUANTITY ; i++)
{
    if ( Islands[i].id == "QuebradasCostillas" )
    {
        Islands[i].reload.l1.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Nevis");
    }
    if ( Islands[i].id == "Turks" )
    {
        Islands[i].reload.l1.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Turks");
    }
    if ( Islands[i].id == "Conceicao" )
    {
        Islands[i].reload.l1.ships.l0.ay = -1.5;
        TraceAndLog("** Fixed Grenada");
    }
    if ( Islands[i].id == "Cuba" )
    {
        Islands[i].reload.l2.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Havana");
    }
}

3.0 is an arbitrary value that points more or less north... these shouldn't be exact or they'll look odd. North should be 3.14, it's in radians and 0.0 is south. Positive numbers turn the ship right, negative turn it left.

To fix this in islands_init.c, add the following line to the "Cuba" section:

Code:
rIsland.reload.l2.tex = "t1";               // existing line
rIsland.reload.l2.ships.l0.ay = 3.0;    // LDH - add this line ***
rIsland.reload.l2.goto_enable = false; // Screwface: Disable Sail-To // existing line

This will probably require a new game to take effect. I haven't tested it.

Hook
 
I wonder about the current situation:

1 is the game version based on @Levis zips going to live side-by side with the
"cleaned" latest pack?
2 where should I upload
quest updates
other mods
bugfixes
and where do they end up?
3 when is the Baker rifle put back into play?
 
1. That depends completely on @Levis

2. Same place as usual, I'd say.

3. Haven't a clue. Once I find some time again myself, I'll probably include it as I can't think of any reason not to.
 
There are going to be more of these. I've got 8 so far. Some are more necessary than others, like the ones I posted that turn the ship 180 degrees.

Code:
if ( Islands[i].id == "SaintMartin" )
{
    Islands[i].reload.l1.ships.l0.ay = 2.0;
    Islands[i].reload.l3.ships.l0.ay = -1.3;
    TraceAndLog("** Fixed Saint Martin");
}
if ( Islands[i].id == "Oxbay" )
{
    Islands[i].reload.l2.ships.l0.ay = 3.4;
    TraceAndLog("** Fixed Barbados");
}
if ( Islands[i].id == "Douwesen" )
{
    Islands[i].reload.l1.ships.l0.ay = 2.7;
    TraceAndLog("** Fixed Bonaire");
}

Hook
 
@Jack Rackham I agree. :) I've checked all the towns, I think, and some of the shores. Here are the changes for the console:

Code:
// Fix bad reload locators for several islands, wrong direction for .ay
//  Should work by fixing islands_init.c, but may not run preprocessor correctly,
//  needs to run IslandsInit() in console for changes to islands_init.c to apply
// Note:  0.1 radians is about 6 degrees
TraceAndLog("*** Fixing ship direction at ports");
for (i=0 ; i<ISLANDS_QUANTITY ; i++)
{
    if ( Islands[i].id == "QuebradasCostillas" )
    {
        Islands[i].reload.l1.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Nevis");
    }
    if ( Islands[i].id == "Turks" )
    {
        Islands[i].reload.l1.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Turks");
    }
    if ( Islands[i].id == "Conceicao" )
    {
        Islands[i].reload.l1.ships.l0.ay = -1.5;
        TraceAndLog("** Fixed Grenada");
    }
    if ( Islands[i].id == "Cuba" )
    {
        Islands[i].reload.l2.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Havana");
    }
    if ( Islands[i].id == "SaintMartin" )
    {
        Islands[i].reload.l1.ships.l0.ay = 2.0;
        Islands[i].reload.l3.ships.l0.ay = -1.3;
        TraceAndLog("** Fixed Saint Martin");
    }
    if ( Islands[i].id == "Oxbay" )
    {
        Islands[i].reload.l2.ships.l0.ay = 3.4;
        TraceAndLog("** Fixed Barbados");
    }
    if ( Islands[i].id == "Douwesen" )
    {
        Islands[i].reload.l1.ships.l0.ay = 2.7;
        TraceAndLog("** Fixed Bonaire");
    }
    if ( Islands[i].id == "Colombia" )
    {
        Islands[i].reload.l1.ships.l0.ay = 3.0;
        TraceAndLog("** Fixed Colombia");
    }
    if ( Islands[i].id == "Hispaniola" )
    {
        Islands[i].reload.l1.ships.l0.ay = 1.7;
        Islands[i].reload.l2.ships.l0.ay = 0.7;
        Islands[i].reload.l3.ships.l0.ay = -0.8;
        TraceAndLog("** Fixed Hispaniola");
    }
}

And attached is the islands_init.c file.

These are based on the Build 14 Beta 4.1 WIP: 23 September 2016 version.

Hook
 

Attachments

  • LDH Island fixes 12-11-16.rar
    6 KB · Views: 157
Just to make sure, running IslandsInit() in the console leaves preprocessor commands like "#stown_name# Port" for the labels. I'm not sure how to get around this, so if anyone knows, let me know. I could research it, but I think my time currently is better spent finding the problems. A new game should use the new .ay values properly.

I did not visit Cuzumel or Antigua, and I've only visited a few shores, so some of these may still be wrong. I haven't tried to land on Isla Mona or Petit Tabac, so those aren't tested either.

Hook
 
There is an initialize localisation function in MAXIMUS_functions.c somewhere that you probably need to run to solve that.
 
I'm not sure that all those are really necessary. The 180 degree turns at Charlestown, Cartagena and Havana are certainly worthwhile, and a 90 degree turn at Sao Jorge may be useful.

But some of the others only require small changes of heading to point you toward the exit. If you're DirectSailing then this shouldn't be a problem, and if you go straight to WorldMap then the direction to leave the port on the map doesn't always match the direction to leave the port by sailing anyway - for example, if you're leaving Port Royale, point your ship toward the tip of the starboard point of land, not toward the open sea, before switching to WorldMap.
 
Back
Top