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

Confirmed Bug Vanderdecken: Teleportation from Isla de Muerta to Jamaica

Bathtub-pirate

Sailor
Storm Modder
I had something happening, where I am not sure if this was a bug or intended. When using the services of Vanderdecken (the shipwright) on the Isla Muerta (ship repair), I teleported directly on deck, ready to leave shore ..... only to realize that my ship was in the Kingston Harbor. So my ship basically teleported from the Isla Muerta to Jamaica, which actually was really conveniant for me. But it doesn't seem right. Or is it?
 
Definitely not right. Which exact modpack version are you running?
 
In that case, I wonder if anyone can confirm.

If I recall, I needed to link Vanderdecken with an existing shipyard to avoid errors and choose Jamaica.
This might be an unintended side-effect.
 
Seems like an obvious tie. The fact that I "went to deck" from his cabin alone didn't cause it. I tested this later and my ship stayed, where it was supposed to be. It seems that me having my ship repaired there caused this effect. Since it is standard procedure that a ship ends up in the corresponding port of the ship yard, that it is reapired in, this connection appears to be the cause.
 
Since it is standard procedure that a ship ends up in the corresponding port of the ship yard, that it is reapired in, this connection appears to be the cause.
You are probably right. And in that case, I've got some ideas on how to fix it.
Either:
- Disable the teleport for Vanderdecken only
- Disable ship repair at Vanderdecken

What option would be best?

But I have not the faintest clue if and when I might have time to actually do that.
 
The cause is in PROGRAM\Locations\init\IslaDaMuerte.c:
Code:
    locations[n].id = "IslaDeMuerte_Cabin";
   locations[n].id.label = "Captain's Cabin";
   locations[n].filespath.models = "locations\Inside\ShipyardPirates";
   locations[n].image = "Inside_ShipyardPirates.tga";

   //Town sack
   Locations[n].townsack = "Redmond"; // PB: Otherwise Vanderdecken doesn't sell ships
The PROPER solution would be to create a new Isla Da Muerte TOWN.
But a town on that island doesn't make a whole lot of sense to me.

Alternatively, try adding this line in PROGRAM\INTERFACE\shipyard.c:
Code:
// KK -->
void SetFleetAtShipyard()
{
   if (VanderdeckenShipyard()) return; // PB: Abort this if you're at Isla da Muerte
   if(DEBUG_SHIPYARD_INTERFACE) trace("SetFleetAtShipyard");
   ref mchref = GetMainCharacter();
   ref rTown = GetCurrentTown();
   if (CheckAttribute(rTown, "boarding.l1")) {
       SetCharacterShipLocation(mchref, rTown.boarding.l1);
       mchref.location.from_sea = rTown.boarding.l1;
       PlaceFleetNearShore(mchref.location.from_sea);
   }
}
// <-- KK

This happens if you do any repairing.
 
The cause is in PROGRAM\Locations\init\IslaDaMuerte.c:
Code:
    locations[n].id = "IslaDeMuerte_Cabin";
   locations[n].id.label = "Captain's Cabin";
   locations[n].filespath.models = "locations\Inside\ShipyardPirates";
   locations[n].image = "Inside_ShipyardPirates.tga";

   //Town sack
   Locations[n].townsack = "Redmond"; // PB: Otherwise Vanderdecken doesn't sell ships
The PROPER solution would be to create a new Isla Da Muerte TOWN.
But a town on that island doesn't make a whole lot of sense to me.

Alternatively, try adding this line in PROGRAM\INTERFACE\shipyard.c:
Code:
// KK -->
void SetFleetAtShipyard()
{
   if (VanderdeckenShipyard()) return; // PB: Abort this if you're at Isla da Muerte
   if(DEBUG_SHIPYARD_INTERFACE) trace("SetFleetAtShipyard");
   ref mchref = GetMainCharacter();
   ref rTown = GetCurrentTown();
   if (CheckAttribute(rTown, "boarding.l1")) {
       SetCharacterShipLocation(mchref, rTown.boarding.l1);
       mchref.location.from_sea = rTown.boarding.l1;
       PlaceFleetNearShore(mchref.location.from_sea);
   }
}
// <-- KK

This happens if you do any repairing.

I have been wondering about the longevity of the location.from_sea attribute since that is what shows the shore label when you are supposedly on a deck at sea. However in this case setting it to something appropriate for Isla da Muerte could place the fleet where it ought to be, I haven't checked where it is set on arriving or yet where to wipe it (perhaps at the transition to another island zone or on entering the map?)
 
However in this case setting it to something appropriate for Isla da Muerte could place the fleet where it ought to be
In this case, I suspect 'GetCurrentTown()' might complicate matters there.
That one is going to return Jamaica...
 
Yeh, fair enough :yes
That said... there are always around these things.
For example something like this:
Code:
// KK -->
void SetFleetAtShipyard()
{
   if(DEBUG_SHIPYARD_INTERFACE) trace("SetFleetAtShipyard");
   ref mchref = GetMainCharacter();
   if (VanderdeckenShipyard())
   {
      SetCharacterShipLocation(mchref, "IslaDeMuerte_shore_02");
      mchref.location.from_sea = "IslaDeMuerte_shore_02"
      PlaceFleetNearShore("IslaDeMuerte_shore_02");
   }
   else
   {
      ref rTown = GetCurrentTown();
      if (CheckAttribute(rTown, "boarding.l1")) {
          SetCharacterShipLocation(mchref, rTown.boarding.l1);
          mchref.location.from_sea = rTown.boarding.l1;
          PlaceFleetNearShore(mchref.location.from_sea);
      }
   }
}
// <-- KK
Haven't tested that though.
It's ugly coding and I'm not sure it's worth it...
 
Back
Top