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

Mooring ships at the jetty

<!--quoteo(post=240525:date=Feb 23 2008, 03:20 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Feb 23 2008, 03:20 PM) <a href="index.php?act=findpost&pid=240525"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Santo Domingo is based on Greenford port, right? So if somebody can do Greenford, we'd have Santo Domingo as well. Or the other way around. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Right ! I could moor the light galleon <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
It just requires some moving of the ship locators in the port GM file. It's actually quite easy: You can sidestep to where you want the ships to be berthed, then use this code in console.c to find the correct coordinates:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        ref lcn = &Locations[FindLocation(pchar.location)];
        float x,y,z,ay,xx,zz,xz,zx;
        GetCharacterPos(GetMainCharacter(), &x, &y, &z);
        GetCharacterAy(pchar, &ay);
        xx = -sin(ay - PId2);
        zz = xx;
        xz = -cos(ay - PId2);
        zx = -xz;
        Logit("Location id: "+pchar.location)
        Logit("Your Coords x: " + x+"  y: "+y+"  z: "+z );
        Logit("Viewangle ay: "+ay+"; xx= "+xx+" xz= "+xz+" zx= "+zx+" zz= "+zz);
        Logit("Curlocator: "+chrWaitReloadLocator);<!--c2--></div><!--ec2-->
Then you can put those coordinates into the GM file as x, y and z of the locator.
 
Thanks Pieter <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Be sure to tell me if you need some more help. I replaced a ship locator once, so I know how to do it a bit. And Thomas the Terror did it for Douwesen, so he also knows. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
This mod, combined with the fact that Manowars really ARE huge gives...:
[attachment=1902:Huge_Manowar.jpg]
 
Not good.

There must be a way to improve the loading ships code to make him class-dependent.


By the way... I've played with some values in PROGRAM/Locations/Locations_loader.c for fun : <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->rCharacter.Ship.stopped = true;
rCharacter.Ship.Speed.z = 0.0;<!--c2--></div><!--ec2-->
I've changed them to <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->rCharacter.Ship.stopped = false;
rCharacter.Ship.Speed.z = 1.5;<!--c2--></div><!--ec2-->
You imagine the result :
Hey! Where's my ship going?!? Mr Gibbs!!! Wake up!
(far away, onboard the ship that is disappearing at the horizon) Barbossa : hehe, got you Jack Sparrow. Now the Pearl's mine!

I wonder, is this already used in one quest? Or is somebody working on it?
 
so the ship moves away when the player is in port? awesome! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> as long as it's facing in the direction of the sea.
 
Wow; the ships really DO move in the port. I always did wonder what that attribute was for. I even saw two ships pass through each other and I hear the raise/strike sail commands from my own ship. There must be SOMETHING we can do with that! Shame we're not yet done with the At World's End quest. <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid=":razz" border="0" alt="razz.gif" />
 
How would you use it? When ship sails away and her captain is left in port one thing which could be done is to shout: 'Come back you scurvy dogs!!!'

pirate_kk
 
It works for other ships than the player ship as well, so perhaps we could show some traffic sailing past the port? Or perhaps it'd even be possible to trigger the sailing away through some code in the dialog. Then you could have a conversation with a character in port, then he'd run up the jetty and then his ship sails away. Or perhaps when the Flying Dutchman would be anchored in port, that ship would sail away after having done what it came to do. And of course the end scene of At World's End if we ever get to that.
 
That would work but only if we could give a ship coordinates where she should sail to ensure that she won't run through land... Which won't be fun.

As for those ships at jetty, I think we have access to a boxsize attribute which is in some proportion to linear size of a given ship. We could use it to decide if the ship can be moored at jetty or further from coast. We could also use it to properly align ships near jetties so they'll stay in proper distance and not get on land or on pier.

pirate_kk
 
True. Still, might be something worth pondering about. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
maybe a random ship in port should sail away once the player enters a port. it would make the harbor seem a little more active. of course, it's a bit of a bugger when this is the player's ship.
 
That's not a bad idea. Would look nice. Especially if there's a random delay before the ship leaves, so it's not always the same. The only problem would be ships sailing through the land or something like that. Unless the ships can actually evade crashing into the land. I might have imagined it, but I thought I saw ships changing course from the shore.
 
they have, but they usually hit the land anyway because they're so darned stupid. they also tend to sail backwards into land because they think they're sailing away from it because their bow is pointing out to sea. they're completely oblivious of the wind.
 
They have what? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
In the port scene as well? Because that's what I was talking about. Do the ships change course when sailing in the port scene? I think I saw that they did, but I might've imagined it.
 
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Unless the ships can actually evade crashing into the land. I might have imagined it, but I thought I saw ships changing course from the shore.<!--QuoteEnd--></div><!--QuoteEEnd-->No I don't think they do that. Try Octopus Beach at Falaise de Fleur and you'll see... Your ship goes right through the sand and the rocks.
But I think we just have to worry about the starting locator, more precisely about the angle the ship is given. (rCharacter.Ship.Ang.y = GetAngleY(stf(locator.vZ.x),stf(locator.vZ.z));) Because the code isn't very elaborated, the ship just goes strait ahead. If she face the sea, there won't be any problem. Adding some ship traffic, in some big ports like Redmond for exemple - that could be an idea.


<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->I hear the raise/strike sail commands from my own ship.<!--QuoteEnd--></div><!--QuoteEEnd--> Yes Pieter, the 'make sail!' sound as well with the 'make all sail!' log message! I had not noticed them at first! Funny that it is triggered, isn't it?
 
Back
Top