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

Raise - Lower sails without step?

Joe Dagger

Freibeuter
Storm Modder
So you can raise or lower the sails by pressing the W and S key by default. If sails are totally reefed then hit S twice you get full sails it simply takes some time for the crew to do so.

It's a digital process I'd like to have an analogue option too, so as long as you keep the W key pressed the sails are set so you have much more control over the amount of sail that is set you could as well raise like 75% of your sail or 32% instead of the always 50% or 100% for instance. This would give you much more control over the speed of your vessel especially in combat when there's a strong wind.

My full idea is like this. Keeping the W and S for the sails as we have now but also deploy a shift key with this [or something else]. So while you press down shift+S together the sails are set as long as you press those keys down if you release them the process stops.

Is that even possible? I don't think so... what do you think?
:cheers

cheers
Joe
 
So you can raise or lower the sails by pressing the W and S key by default. If sails are totally reefed then hit S twice you get full sails it simply takes some time for the crew to do so.

It's a digital process I'd like to have an analogue option too, so as long as you keep the W key pressed the sails are set so you have much more control over the amount of sail that is set you could as well raise like 75% of your sail or 32% instead of the always 50% or 100% for instance. This would give you much more control over the speed of your vessel especially in combat when there's a strong wind.

My full idea is like this. Keeping the W and S for the sails as we have now but also deploy a shift key with this [or something else]. So while you press down shift+S together the sails are set as long as you press those keys down if you release them the process stops like.

Is that even possible? I don't think so... what do you think?
:cheers

cheers
Joe

Man I would love that!!! That would make things way more realistic. I can just imagine the great screenshots possible with that.

MK
 
Very difficult if not impossible at all.

1) The C-script code works based in three sail states. There are a lot of code constructions based on this fact; changing all of them is not a simple thing and, moreover, I'm not sure how the engine works internally: if it works on a trhee state basis we can't change the sails to vary continuously without breaking who knows how many things. (Ironically, there are some clues that may be the engine uses a continuous approach).

2) The game doesn't use key modifiers but for fencing. There is not a simple way to code modified-key commands; may be there is no way to. No without some devilishly tricks anyway.

3) We can't change the ships sails animation (not really important, but another limitation).

Cheers.
buho (A).
 
There is a tiny hope eh? But I guess we won't see that feature then, thanks buho for explaing the code aspect of things, I was afraid it's something that might not be accomplished at all..

I wouldn't see a problem with the sails animation though since the animation works on every ship it's not like "plop" and sails are set we have an animation that smoothly shows the progress so I guess that isn't the issue with an analogue sail setting.

But it is a huge issue to actually see this feature ingame ah well one can dream *smiles*.
:sail
 
This might make it easier, but still very implausible:

For those of you who don't know, Sails are not really reefed like that. The sail's yard is lowered with the sail for this kind of an effect:
NORTHATLANTICGALE_sm.jpg

607973473160102172452.jpg

For the sake of time I won't give a full explanation, based on what was said above.

Edit: And when the sails are completely taken in they aren't reefed, but furled. The process of reefing uses the reeflines on the sail to reduce its area, while furling uses separate gaskets (actually short ropes) attached to the yard to completely remove the sail's area. Reefing is meant more to stop rigging from breaking from the tension created from the wind than to reduce speed. Sorry if I sound like an ass, I mean well. (at is point I would insert a smiley face thing, but I think that those are a little bit silly.)

On a different note, it might be possible to change the current sail settings to make them more realistic. (I'd be happy to help with that) Instead of sailing through a gale with all your most delicate sails set, It would be far better to have an option where you are only using tops'ls, a stays'l or two, the spanker, and one or two heads'ls.
 
On a different note, it might be possible to change the current sail settings to make them more realistic. (I'd be happy to help with that) Instead of sailing through a gale with all your most delicate sails set, It would be far better to have an option where you are only using tops'ls, a stays'l or two, the spanker, and one or two heads'ls.
Hmm that would be a very good approach... though I guess it's even more tagged as not possible than my previous idea, since we have many different ships in different classes to round it up every ship would need a new define on the sail and in must be programmed for each file the keys for raising lower sails for this to work. Beside it's a good question if the game actual would use such a change.... for sure a huge project.

I'm no coder, but considering the rescources we have it's close to not doable I guess.

My previous idea while not accurate had a very slim chance of beeing doabe why this better idea most probably can't be achived. I would be happy if I would be wrong and we see it one day accomplished.
 
Just swapping the top and bottom sails might be possible; I think that requires some locator name swapping in the rigging, but nothing else. Provided it works.

Setting sails independently will require modifications to the source code PLUS rigging locator changes in every ship model.
Lots of work and Pirate_KK still doesn't have the source code 100% ready to go. :facepalm
 
Just curious. How does the game currently calculate ship speed based on the sail settings.

Does it have separate equations for each setting, or does it use a multiplier of sort.

Cause if it uses a multiplier, you could probably give the input % to anything you want and it would still do a correct calculation (ignoring visuals of course)
 
I think it's a hardcoded 50% for half sails and 100% for full sails, since I don't recall seeing anywhere the speed value is set; might be mistaken though.

On the other hand, for the PotC Build Mod steamships, I've found that changing rCharacter.Ship.Impulse.Rotate.z allows you to add a non-wind-dependent speed burst.
You can make this speed burst either SailState dependent or manually controllable; both methods are used in the below sample code from PROGRAM\SEA_AI\AIShip.c:
Code:
	// PB: Steam Ships -->
if(SteamShip(rCharacter))
{
if(!IsMainCharacter(rCharacter))
{
switch(sti(rCharacter.LastSailState))
{
case 0:
rCharacter.Ship.Power = 0;
break;
case 1:
rCharacter.Ship.Power = 50;
break;
case 2:
rCharacter.Ship.Power = 100;
break;
}
}
if(GetCargoGoods(rCharacter, GOOD_PLANKS) > 0 || !IsMainCharacter(rCharacter))
{
ref MyShipType = GetShipByType(GetCharacterShipType(rCharacter));
aref arship; makearef(arship, rCharacter.ship);
float PowerScalar = stf(GetAttribute(rCharacter,"Ship.Power"))/100;
float SpeedRateScalar = stf(GetLocalShipAttrib(arship, MyShipType, "SpeedRate"))/10
float DamageScalar = makefloat(GetCurrentShipHP(rCharacter)) / makefloat(GetCharacterShipHP(rCharacter));
float SailCompensation = 1.0;
if(sti(rCharacter.LastSailState) == 0)	SailCompensation = 0.5;
rCharacter.Ship.Impulse.Rotate.z = 0.2 * PowerScalar * SpeedRateScalar * DamageScalar * SailCompensation;

fX = 0; fY = 0; fZ = 0;
if(CheckAttribute(rCharacter,"Ship.pos.x")) fX=stf(rCharacter.Ship.pos.x);
if(CheckAttribute(rCharacter,"Ship.pos.y")) fY=stf(rCharacter.Ship.pos.y);
if(CheckAttribute(rCharacter,"Ship.pos.z")) fZ=stf(rCharacter.Ship.pos.z);

if(fX != 0 && fY != 0 && fZ != 0)	StackSteam(rCharacter, makeint(abs(stf(GetAttribute(rCharacter,"Ship.Power")))/12.5));
}
}
// PB: Steam Ships <--
SailCompensation is because the results otherwise don't make sense. :facepalm
rCharacter.Ship.Power can be set elsewhere through keyboard controls for the player character.

The above could theoretically be put to use for an idea like the above that ignores the visuals.
I wouldn't expect the visuals to be possible without working with the source code.
 
Back
Top