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

Changing the way ships sink?

Halfman

Landlubber
Storm Modder
I would like a little more variety in the way ships sink, like capsizing and stuff. Anyone know if it is even possible to change/add sinking animations? I found a sink_effect.dll in the modules catalogue, which would be a pain if it was the determining file.
 
If they responded to gravity it would probably be a matter of placing mass at one end or another to tip it but I think the game just uses static animations (for the sinking) combined with random effects like explosions, mast damage, and cargo. I don't think you can alter it, honestly, but I could be wrong!
 
Hi,

Being that I'm the only one doing animation work here I can say that it's highly unlikely that changes could be made......reason being that I know absolutely nothing about dll files <img src="style_emoticons/<#EMO_DIR#>/no.gif" style="vertical-align:middle" emoid=":no" border="0" alt="no.gif" /> .
So untill some computer wizz kid joins up with us you'll have to settle for sinking as it is....sorry <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

<img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
damski
 
Here's some code from PotC's PROGRAM\SEA_AI\AIShip.c file:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    // set attributes for sinking effect
    rDead.Ship.Sink = "";
    aref aSink; makearef(aSink, rDead.Ship.Sink);
    aSink.Speed.y = 0.35;    // speed of sink y
    aSink.Speed.x = 0.017 * (frnd() * 2.0 - 1.0);    // speed sink angle rotate around x
    aSink.Speed.z = 0.017 * (frnd() * 2.0 - 1.0);    // speed sink angle rotate around z<!--c2--></div><!--ec2-->
So from what I understand, the sinking is done just as several speeds in several directions and would thus be quite editable.
Check your CoAS file if there's anything similar in there.
 
Toyed a bit around with tool and found the animations of the characters. Wonder if it is possible to add animations to a shipmodel?
Especially oars. Can't be done because they have no bone structure. But If a bone structure was added to, say, the man in the boat.gm which also included the oars, would it be possible to animate rowing of that boat - in theory, of course?
 
Personally I think that animation on ships doesn't work. The only animated parts, eg. sails and flags, are not modeled at all.
There's two different types of GM files, one for characters and one for ships/items/locations. I don't think the two types are interchangable.
But I HAVE been proven wrong in the past on what isn't possible with the game engine (eg. DirectSail mod and Different Flags), so don't take my word for it. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
Your work for it? <img src="style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> why the heck should I take your work for it? I don't want to take your work away just because you tell/told us what isn't possible with that engine. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

Anyways.. those ships in CoAS move slightly unrealistically on the water.. they kind of move like toy ships with going up and down on the water. What I mean is that this up and down going on the waves looks like the ship is skipping there.. it's like for example the stern goes up but while doing that there are minor amounts of skipping the process so it kinda looks like it skips from another position to another without smoothly going there. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Pah... stupid typo. <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid=":whipa" border="0" alt="whippa.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/24.gif" style="vertical-align:middle" emoid=":rofl" border="0" alt="24.gif" />
 
<!--quoteo(post=333581:date=Jun 28 2009, 11:52 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jun 28 2009, 11:52 AM) <a href="index.php?act=findpost&pid=333581"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Here's some code from PotC's PROGRAM\SEA_AI\AIShip.c file:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    // set attributes for sinking effect
    rDead.Ship.Sink = "";
    aref aSink; makearef(aSink, rDead.Ship.Sink);
    aSink.Speed.y = 0.35;    // speed of sink y
    aSink.Speed.x = 0.017 * (frnd() * 2.0 - 1.0);    // speed sink angle rotate around x
    aSink.Speed.z = 0.017 * (frnd() * 2.0 - 1.0);    // speed sink angle rotate around z<!--c2--></div><!--ec2-->
So from what I understand, the sinking is done just as several speeds in several directions and would thus be quite editable.
Check your CoAS file if there's anything similar in there.<!--QuoteEnd--></div><!--QuoteEEnd-->

Yes! It's identical. This bodes well for disaster loving me. <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

Edit: Yep, that was it. Playing around with the numbers can get you ships sinking with more drama than a diva with cement shoes. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
<!--quoteo(post=333777:date=Jun 28 2009, 03:12 PM:name=Halfman)--><div class='quotetop'>QUOTE (Halfman @ Jun 28 2009, 03:12 PM) <a href="index.php?act=findpost&pid=333777"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yes! It's identical. This bodes well for disaster loving me. <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

Edit: Yep, that was it. Playing around with the numbers can get you ships sinking with more drama than a diva with cement shoes. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

And !!! <img src="style_emoticons/<#EMO_DIR#>/bounce.gif" style="vertical-align:middle" emoid=":b:" border="0" alt="bounce.gif" /> <img src="style_emoticons/<#EMO_DIR#>/bounce.gif" style="vertical-align:middle" emoid=":b:" border="0" alt="bounce.gif" /> <img src="style_emoticons/<#EMO_DIR#>/bounce.gif" style="vertical-align:middle" emoid=":b:" border="0" alt="bounce.gif" />
 
Be sure to post some of your new numbers. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
If you find several sets of numbers that have a nice result, you can add some code to it to select one of them randomly.
 
<!--quoteo(post=335390:date=Jul 6 2009, 05:06 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 6 2009, 05:06 AM) <a href="index.php?act=findpost&pid=335390"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Be sure to post some of your new numbers. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
If you find several sets of numbers that have a nice result, you can add some code to it to select one of them randomly.<!--QuoteEnd--></div><!--QuoteEEnd-->

In plain non naval terms...
Y means STRAIGHT DOWN
X means FRONT and BACK
Z means RIGHT and LEFT

The firs set of numbers are the speed (y = 0.19 x = 0.04 z = 0.04)
The second set in X and Z are rotation speed (* 1.8 - 0.0 and *0.0 - 0.2)
In X * 1.8 means the front sinks first, if you wish the back to do so, change the second value and leave the first at 0.0...
In Z * 0.2 means the ship will roll to the right, to roll to left, also, change the second value and leave the first at 0.0.


<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// set attributes for sinking effect
    rDead.Ship.Sink = "";
    aref aSink; makearef(aSink, rDead.Ship.Sink);
    aSink.Speed.y = 0.19;    // speed of sink y (original 0.35)
    aSink.Speed.x = 0.04 * (frnd() * 1.8 - 0.0);    // speed sink angle rotate around x (original 0.017 2.0 - 1.0)
    aSink.Speed.z = 0.04 * (frnd() * 0.0 - 0.2);    // speed sink angle rotate around z (original 0.017 2.0 - 1.0)<!--c2--></div><!--ec2-->

By what i've seen, these values are "exagerated" used to get a nice sinking out of a MOW, but for smaller ships the rotation should be always <= 1.0 and the Y speed <= 0.1...
Also, there is a randomness to each sink even if the values are unchanged...

I'll leave some thumbs of "Corvettero" givin'me a nice good by... could'nt help it... <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

thumbs20090708030132.jpg
 
That does indeed look really cool <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
<!--quoteo(post=335948:date=Jul 8 2009, 08:17 AM:name=SuperChango)--><div class='quotetop'>QUOTE (SuperChango @ Jul 8 2009, 08:17 AM) <a href="index.php?act=findpost&pid=335948"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Also, there is a randomness to each sink even if the values are unchanged...<!--QuoteEnd--></div><!--QuoteEEnd--><i>frnd()</i> is "float random", eg. a random number between 0.0 and 1.0, so that's where the randomness comes from.
 
<!--quoteo(post=336702:date=Jul 11 2009, 10:56 PM:name=Captain Maggee)--><div class='quotetop'>QUOTE (Captain Maggee @ Jul 11 2009, 10:56 PM) <a href="index.php?act=findpost&pid=336702"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That does indeed look really cool <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

Glad you liked it... have you try'd it on your game or seen the screenies? <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

<!--quoteo(post=336733:date=Jul 12 2009, 06:08 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 12 2009, 06:08 AM) <a href="index.php?act=findpost&pid=336733"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><i>frnd()</i> is "float random", eg. a random number between 0.0 and 1.0, so that's where the randomness comes from.<!--QuoteEnd--></div><!--QuoteEEnd-->

Sooo that's what was that frnd thingy... i've searched all over to find out what it was... xD.. tx Pieter
 
<!--quoteo(post=336773:date=Jul 13 2009, 03:23 AM:name=SuperChango)--><div class='quotetop'>QUOTE (SuperChango @ Jul 13 2009, 03:23 AM) <a href="index.php?act=findpost&pid=336773"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Glad you liked it... have you try'd it on your game or seen the screenies? <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Saw the screenies <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

At the current time I've been playing the other storylines in the Build Mod (to see what they are like and get ideas for Jack Sparrow <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />) and havn't been editing files for about a week now <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />

It does look a lot more realistic though <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
I forgot about CoAS for awhile, but I did play around a bit with the numbers.

// set attributes for sinking effect
rDead.Ship.Sink = "";
aref aSink; makearef(aSink, rDead.Ship.Sink);
aSink.Speed.y = 0.25 + (frnd() * 0.05 ); // speed of sink y
aSink.Speed.x = 0.021 * (frnd() * 2.0 - 1.0); // speed sink angle rotate around x
aSink.Speed.z = 0.04 * (frnd() * 2.0 - 1.0); // speed sink angle rotate around z

It gives, in my opinion anyway, pretty decent sinking. I made the sinking speed a bit random as well. Now the ships sink every way from straight down, capsizing, aft or stern first, and combinations thereof.

A bit over a hundred pictures of wrecks being born: http://s675.photobucket.com/albums/vv114/Halvan/?albumview=grid


Sinking005.jpg


Sinking056.jpg


Sinking074.jpg


Sinking091.jpg


Sinking112.jpg
 
I'm adding those values to the PotC Build mod; let's see what happens. :cheeky
Your album gives me a 'forbidden' error message. :facepalm
 
Back
Top