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

Storms and Spinning Ships

Holes in sails is unrealistic, but storm winds will regularily shread sails - it's the chaffing from the guy ropes and support lines that causes it.
See, that's what I thought should happen, with ropes breaking loose and sails being torn, but what I couldn't stand was the constant barrage of random holes appearing in the sails.
It's hard to find the right balance between damage and the number of holes that appear, without compromising realism.

What would be nice is if we could use some sort of 'hole' that looked more like a 'tear' in the sail, and then things would look more believable.
The only problem would be that they'd no longer look like cannon holes. :facepalm
 
hmm. Is there a graphics file for the damage sail look? I'm not an expert on cannon ball fire on sails, but my hunch from other similar things(like hand-to-hand weapon damage/arrow damage in a target etc) and having watched cannon ball fire into balistic soap(from an archaeological program), would make me think you wouldn't always get near perfect round holes. If you can point me in the direction of the sail damage graphic file i might have a play in photoshop and see what i can come up with?
 
I'm guessing the file is 'parus_hole.tga.tx' in RESOURCE/Textures/Ships. You'll need TX Converter to switch between TX and editable TGA file types.
If it's indeed the right file, then we might be in luck, because it looks as though the 'holes' are all separately textured AND positioned on a blank sail shape.
That means that, in theory, you could put rips and tears on the sails where you'd expect them to appear due to storm damage, while maintaining the cannon holes as well.
One more thing, if you do work on it: could you increase the image resolution, maybe to at least 512x512 pixels, just to up the quality a bit?
 
I think the different types of holes are used randomly and not dependent on whether they're cannon or storm related.
 
I wasn't suggesting that they were dependent, even if it seemed like I was. :facepalm
If we could somehow use a separate texture for storm damage, then that would be perfect, but I'm not even sure if that's possible.
If we can only use the one texture, then at least we could achieve a better balance between tears and cannon holes.
 
If getting the textures seperated IS possible, it probably isn't easy... :?
 
I know... it's just the best solution I can think of. Doesn't mean it's easy to do, or even possible for that matter. :modding
 
Well i had a small break through and did get my 512x512 texture to work in game(issues with the alpha channel being the problem as usual). Certainly we can get a better balance between tears and cannon holes on the one tga.tx file, that would be the best bet, and with a little more work i'll put it up on the FTP.
 
Up-scaling the texture size shouldn't affect anything but the quality in-game, as long as the aspect ratio is the same.
I'll be interested to see what you've done once it's finished. :keith
 
Well the current texture i'm testing has some good points and bad points. The good points(and unexpected) is that sometimes you will just get a bit of a 'tear' in isolation from the rest i drew. So that can look cool, with more little rips appearing on the sails overall. The bad point is that now with more distinguishable patterns on the sails(over round holes), on multiple sails on the same ship it can look a little 'fake'. I hadn't thought about this before!

Overall i think it looks better, but you will notice the repeating patterns much more. I can't think of a way around that(maybe many more small 'rips' over the whole sail texture)?

I'll post a screen shot sometime so you can all see the proposed future sails(with more rips) to compare to the original. I've uploaded the parus_hole.tga.tx file to the ftp. It could be better, but overall i think it a decent balance between what we have now, and what we would like to see in future(seperate storm and cannon damage files etc).

SailDamage3.jpg


SailDamageFinal.jpg


SailsDamage1.jpg
 
HA! I suppose THIS is the code that causes it. Seems to be intentional too.
PROGRAM\SEA_AI\AIShip.c:
Code:
		// rotate impulse
// NK -->
/*float fRotate = stf(arCharShip.Impulse.Rotate.y) + (frnd() * 0.08 - 0.04);
if (fRotate > 0.07) { fRotate = 0.07; }
if (fRotate < -0.07) { fRotate = -0.07; }*/
float fRotate = stf(arCharShip.Impulse.Rotate.y);
if(frnd() < 0.5)
{
if(CheckAttribute(arCharShip,"stormimp"))
{
arCharShip.Impulse.Rotate.y = arCharShip.stormimp;
DeleteAttribute(arCharShip,"stormimp");
}
}
else
{
if(!CheckAttribute(arCharShip,"stormimp"))
{
switch(rand(9))
{
case 0: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
case 1: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
}
arCharShip.Impulse.Rotate.y = fRotate;
}
}
// NK <--
Try to replace with:
Code:
		// rotate impulse
// NK -->
/*float fRotate = stf(arCharShip.Impulse.Rotate.y) + (frnd() * 0.08 - 0.04);
if (fRotate > 0.07) { fRotate = 0.07; }
if (fRotate < -0.07) { fRotate = -0.07; }
float fRotate = stf(arCharShip.Impulse.Rotate.y);
if(frnd() < 0.5)
{
if(CheckAttribute(arCharShip,"stormimp"))
{
arCharShip.Impulse.Rotate.y = arCharShip.stormimp;
DeleteAttribute(arCharShip,"stormimp");
}
}
else
{
if(!CheckAttribute(arCharShip,"stormimp"))
{
switch(rand(9))
{
case 0: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
case 1: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
}
arCharShip.Impulse.Rotate.y = fRotate;
}
}*/
// NK <--
If I am correct, this should put an end to rotating in storms altogether.
Please test and let me know how it works and whether this does any harm to gameplay if disabled.

I've tested this about a half dozen times now, and the only thing i've noticed it do is stop the 'ship spinning left' bug, and no other side effects. I've not seen if this stops the odd 'NPC's spinning left on rare occasions' bug, as i can't see how they could effect one another(on sea and on land), but it may well? Anyway a great find Pieter, and it now enables you to steer where you want during storms. :doff

If you do this edit by hand just pay especial attention to the /* symbols and don't forget to delete the one at the end of 'line 3' as well as adding it near the end!!! That caught me out for a bit ;)

Maybe later the code can be checked out to see why it always span to the left? I can see some type of 'lack of control' being good during a storm, but the trick is in getting the 'some' part of that just right.
 
A smiley face? :)) I didn't notice that.


The storms are better now. I haven't capsized yet, but typically, by the time the ship gets turned into the waves the crew is seasick and some cargo has gotten tossed overboard too. :eww Oh, and the sails are shredded. So I added in Armada's little tweak as well. That helps some.



Those sails are on the FTP huh?
 
You won't 'always' get the full smilie face - those shots are the same ship(same sail damage) with a different angle. I've had just the smile wihout the hooked nose bit before ;)

And yes they are on the ftp in my graphics/completed folder - there is a text file to accompany it with instructions on where it goes exaclty(RESOURCE\Textures\Ships iirc). Anyway without a way to read 'types' of sail damage and two seperate textures(one for wind/storm damage and one for cannon/combat damage) it will never be perfect.

I'd love for the 'storm damage' texture to be big long strips running mostly vertically down the length of sail, so you get a real 'feathered' ripped up look, mixed in with some less uniform tears as well :yes

I opted for a 'chaos' type pattern with much less of the uniform round cannon holes. I'm not convinced you would see that many of them, some cannon ball would tear rather than cut out a perfect holes everytime. I could probably add more small debris effects(tiny holes 1x1 pixel size) and maybe a few of the longer 'smile' type slashes, but well, it will do for now if people want something a little different to look at :mm
 
you know, from the way a sail is sewn, i'd expect a lot of slightly wide vertical tears. it's a bit of a midway between cannonball holes and storm damage, and it could be caused by both.
 
I've tested this about a half dozen times now, and the only thing i've noticed it do is stop the 'ship spinning left' bug, and no other side effects.
That's exactly what it is supposed to do! :woot
 
Do we know why they never span to the right? looking at the code is that a typo near the end?

case 0: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
case 1: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;

Shouldn't one of those be a different/opposite value maybe? I like the idea of some loss of control in storms(now for example you can just set your course and let go the controls, your ship will stay on course despite the storm, and while that is a refreshing change from the annoying spinning left bug, it does feel a little relaxed for a storm event? Anyway food for thought and maybe a code guru can work out what was wrong with the code to cause that bug? IF it worked as intended and caused some random lack of control to the left or right during a storm, then awesome, we should put it back in the mix :yes
 
That does indeed look like the cause for the "always to the left" error.
It seems the code DID do what it was supposed to, but it seemed to do what it does a bit too strongly.
Does anyone remember if the same issue applied to, say, Build 13? Because that code WAS already in there.

I'm thinking maybe the Willemstad Builders' Trials, which made huge changed to ships' inertia values, made this effect far more pronounced.
If that is the case, this problem should not occur for players using Arcade Game Mode.
And the fix would probably just require decreasing those fRotate values to something that works better in Realistic Game Mode.

I do indeed like the concept of the mod, but the uncontrollable spinning went a bit far. :facepalm
 
Ok, so if i changed this:

case 0: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;
case 1: arCharShip.stormimp = fRotate; fRotate -= 0.02; break;

To this:

case 0: arCharShip.stormimp = fRotate; fRotate = 0.02; break;
case 1: arCharShip.stormimp = fRotate; fRotate = -0.02; break;

Would that look about right?

And maybe i need to change this at the start of this section:

/*float fRotate = stf(arCharShip.Impulse.Rotate.y) + (frnd() * 0.08 - 0.04);
if (fRotate > 0.07) { fRotate = 0.07; }
if (fRotate < -0.07) { fRotate = -0.07; }*/

To remove the previous /* and */ tags? Where they early attempts to stop the bug or just not needed?

Edit on that last, NO those opening lines need to stay commented out or you get a CTD on running the game! I'll report back if the other change does make this part work as it was planned.

:sail
 
Back
Top