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

Ships and Ports in the Deck Scene

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
See attached picture. I have NO idea why this happens, but it looks cool. I went to my ship's deck and I can see my own ship from my own ship's deck. Interesting. <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
I wonder if we could somehow use this to our advantage. Provided we can get <i>another</i> ship there instead of my own. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

Imagine sailing around and encountering a friendly ship, then using a sort-of "instant boarding" command that would enable you to talk with the other ship's captain. You'd be teleported to the other ship's deck and there you could talk with the other ship's captain and crew and you'd see your own ship lying right next to the other ship. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

Also Thomas the Terror suggested we do some experimenting with generating a 3D port environment around your ship's deck when you're at anchor. Imagine achoring in port, going to your ship's deck and actually seeing the port from your ship's deck with other ships moored around you! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
I found out what is going on. When loading from a shore/port location to my ship's deck, the game simply forgets to remove the ships it loaded in previously. See these pictures for Oxbay and Redmond port respectively.
[attachment=1460:Bootjes.jpg] [attachment=1461:Redmond_Port.jpg]
I am using CouchcaptainCharles' Redmond port locator changes, which puts the ships alongside the jetties. As can be seen on the second screenshot, taken when moored in Redmond, the ships are moored in the deck scene exactly the same way as they are in Redmond port. Further proof: When going from 3D sailing mode to deck in port, there are no ships, when going from port to deck, there ARE ships.

Also: Behold the floating French fantom flag of doom: <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
[attachment=1462:Franse_Spookvlag.jpg]
 
<img src="http://i93.photobucket.com/albums/l68/Thomas_the_Terror/RedmondDeck.jpg" border="0" class="linked-image" />

Redmond port permanent added to the deck location. Now we only have to find out how we can switch the superimposed models according to the port we are moored in, and to prevent that we get a town location on sea.
 
man, this is so cool! <img src="style_emoticons/<#EMO_DIR#>/smile2.gif" style="vertical-align:middle" emoid=":))" border="0" alt="smile2.gif" /> since when does the ship look so fancy, pieter? i've never seen all those pulleys and high-quality furled sail textures before.
 
There are several new ship decks in the Alpha 8 WIP versions. I think they were made by the Russians. Thomas the Terror retextured them, making them look much better. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

I'm trying to get the town models used properly. I CAN switch between Oxbay and Redmond through the console. Now I need to make it happen automatically. Should be possible; I just haven't yet figured out how. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
this is actually all quite overwhelming. there's so much gameplay potential in this, and it just appeared all at once. <img src="style_emoticons/<#EMO_DIR#>/smile2.gif" style="vertical-align:middle" emoid=":))" border="0" alt="smile2.gif" />
 
Gameplay potential? It's just appearance. It has no actual influence on gameplay. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Definitly does. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
Just for fun, here's some of my development screenshots. <img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />
First I was trying to add the new Antigua around my ship's deck. My ship ended up right in the middle of town. Some Tool-work still required. Unfortunately I am no Tool-star. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
Also everything appeared too bright at night, but that is now fixed by adding the town's .col files as well. <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />
 
looks like a horrible anchorage accident. <img src="style_emoticons/<#EMO_DIR#>/smile2.gif" style="vertical-align:middle" emoid=":))" border="0" alt="smile2.gif" />
 
Holy crap! Check out THIS screenshot! Is that cool or is that COOL??? <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /> <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
The ships that appeared by accident now appear to be properly moored in port!
Unfortunately I think that when moving the port model around, the ships won't be properly moored on their spots anymore. That is unfortunate. But this screenshot proves it IS possible. So we'll just need to figure out how to get it working properly.

BTW: Thanks to Pirate_KK, I now have some code that chooses the correct town model based on the port where you are. Now I have to make it do this automatically so that I don't need to execute the console manually. Problem I'm still having: The town model won't yet disappear when not in port.
 
This mod is turning out quite brilliantly! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
This is the code I have now (can be added to any file; I have it in NK.c):<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void SetDeckPortBackground()
{
    ref pchar = GetMainCharacter();
    ref deck = &Locations[FindLocation(GetCharacterShipQDeck(PChar))];
    string loc_id = deck.reload.l4.go;
    switch(loc_id)
    {
        case "Redmond_port":    deck.models.always.back1 = "..\..\Town_Redmond\Port\RedPort"; break;
        case "Oxbay_port":        deck.models.always.back1 = "..\..\Town_Oxbay\Port\oxport"; break;
        case "Antigua_port":    deck.models.always.back1 = "..\..\AOPtowns\towns\StEustatius\StEustatius";
                                deck.models.always.back2 = "..\..\AOPtowns\towns\StEustatius\StEustatiusAdd"; break;
        case "Antigua_shore":    deck.models.always.back1 = "..\..\Outside\Shore_6\shore06"; break;
        case "Cayman_Port":        deck.models.always.back1 = "..\..\Town_FalaiseDeFleur\port2\ffport02"; break;
        case "Cayman_Shore_01":    deck.models.always.back1 = "..\..\Outside\Shore_7\shore07"; break;
        case "Cayman_Shore_02":    deck.models.always.back1 = "..\..\Outside\Shore_1\Shore01"; break;
        DeleteAttribute(deck,"models.always.back1");
        DeleteAttribute(deck,"models.always.back2");
    }
}<!--c2--></div><!--ec2-->
And in PROGRAM\SEA_AI\BOAL_Deck.c:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//Çàãðóçèòü ëîêàöè| àáîðäàæà
void Deck_LoadLocation(string locID) // KK //MAXIMUS
{
    SetDeckPortBackground(); // PB
    ReloadProgressStart();<!--c2--></div><!--ec2-->
What it does now:
When visiting your ship's deck, depending on your ship's location, the appropriate port or shore is shown around your ship. Not all locations have been added yet, but that is only a matter of time. When you are at sea, there is no town or shore shown around the ship. Originally I was putting copies of the location GM and COL files into the ship's deck folders, but that is now no longer required. We can just use the original files. So NO increase in download size either! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

What is not working right yet:
The port or shore is generated literally around the ship, which usually puts the ship IN the buildings or rocks, rather than on a more appropriate spot. Only in Redmond port is the ship generated in a reasonable spot. The problem is obvious: The location is generated at it's (0,0,0) point, which is not nescessarily a good point for a ship to anchor. Possible solution: Move the GM model around using Inez Dias' tool.

As shown on earlier screenshots, ships from ports are also copied over into the deck scene. Unfortunately when moving the port model around, the ships remain on their original spots, which makes usually makes them appear inside the town, rather than where they should appear. Ideal solution: Move the actual port's (0,0,0) point around, along with all locators, collision information, walk data, etc. Not sure if we can do that with Inez Dias' tool though.

The appearance of the ships in the deck scene seems to be a bug anyway. It definitly looks cool, but I don't it's supposed to happen at all. So what we could do is to try and fix this bug, then add actual proper ship locators to the deck scene instead and generate the ships around the deck in the same way as in ports.
 
<img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> Damn you´re good! DAMN you´re good! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

Unfortunately, your genius wont allow me to get the details around syncronizing the models to turn alltogether, but thats all fine and dandy! The debugging forecast says dark clouds and fog with dull weather, but the sun is still shining above it all for the coders to look forward to!

Looking forward to beat the crap out of this one´s (hopefully minor) flaws! <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
At the moment, the only real problem are graphical glitches. MAJOR graphical glitches with the ship appearing in the middle of town and inside the rocks, but just graphical glitches nonetheless. Code-wise everything seems to work as intended. Which is more than I dared hope to achieve in the few hours we worked on this one. I'm pretty sure we can work out the graphical problems as well. It will be a lot of work to move each town model and each shore model around, but it IS possible, so in the end we'll get a pretty good result, I think. <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
I am busy with it. Moved almost every STOCK town model + the copied towns (like havana) except for oxbay (doesn't open in TOOL). This is going to be so cool! <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Apparently Oxbay Port and Antigua refuse to be opened in Inez Dias' Tool, so we can't fix those yet. Hopefully somebody who CAN open these files could give us a hand with them. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
I might post this as well. Ship deck assignment list as made by Thomas the Terror and me:
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><b>ShipDeck1</b>
Qdeck (stock game deck - 3 masts)
- Brig
- Barque
- Yacht
- Xebec
- Schooner
- Lugger

<b>ShipDeck2</b>
Udeck1 (AoP 3 masts narrow)
- Lineship
- Frigate
- Warship (Fearless)

<b>ShipDeck3</b>
Udeck2 (AoP 3 masts wide)
- Manowar
- Battleship

<b>ShipDeck4</b>
deckLow (1 mast sloop)
- Sloop
- Tartane
- Galeoth
- War Tartane
- Gunboat

<b>ShipDeck5</b>
deckMedium (3 masts merchant)
- Fleut
- Caravel

<b>ShipDeck6</b>
deckBig (3 masts frigate/corvette)
- Frigate
- Corvette
- Pinnace
- Galleon<!--QuoteEnd--></div><!--QuoteEEnd-->
 
it looks ok. are you sure you've got them all listed there?

oh: you forgot the warship, the gunboat, and the war tartane (which is two-masted).
 
They're not all listed there; it's just a pretty general list.
Warhip/Fearless gets ShipDeck2, War Tartane and Gunboat get ShipDeck4.
 
Back
Top