Jump to content
Sign in to follow this  
commander1985

Change Tide?

Recommended Posts

is there anyway to change the tide? Gut. noticed high tide seems to be between 0730-1400 on my Map and that infantry get drowned in swallow water in that time.

Has anyone an idea how to change that? Like maybe no high tide at all?

Share this post


Link to post
Share on other sites
is there anyway to change the tide? Gut. noticed high tide seems to be between 0730-1400 on my Map and that infantry get drowned in swallow water in that time.

Has anyone an idea how to change that? Like maybe no high tide at all?

I never thought the tide changes! and ive never seen it change anyways...

I think maybe your mistaken, even if so.. if there was a tide that changes, it would be in the Configs.cpp if anything.

:rolleyes:

Share this post


Link to post
Share on other sites
I never thought the tide changes! and ive never seen it change anyways...

I think maybe your mistaken, even if so.. if there was a tide that changes, it would be in the Configs.cpp if anything.

:rolleyes:

LOL, have a look at the broken bridge crossings on Isla Duala, and change the time by 6 hours. At high tide your vehicle will get swamped, at low tide they are crossable by vehicle.

Share this post


Link to post
Share on other sites

Of course the tide changes. But i'm afraid there's nothing we can do about it. I think it hasn't (or slightly) been modified since OFP.

From the wiki :

Formulas used in OFP for tide levels and sun and moon positions.

In early October 2002, Ondrej Spanel, BIS' lead programmer, published some snippets of C++ code used in OFP to calculate tide levels and the position of the sun and moon. Here they are, for your reference pleasure:

Tides formula:

const float maxTide=5;

Vector3 sunDir = sun->SunDirection();

Vector3 moonDir = sun->MoonDirection();

Vector3 sunTide = sunDir[1]*sunDir;

Vector3 moonTide = moonDir[1]*moonDir;

float tide01 = (sunTide.Y()+moonTide.Y())*0.5;

float tideAbs =maxTide*tide01;

Note: BI is aware that the tide formula contains an error. The correct formula should be:

float tide=(fabs(sunTide.Y())+fabs(moonTide.Y())*0.5;

BIS did not correct this, as it would make many older missions unplayable.

Sun and moon position formula:

float latitudeCoord = world ? world->GetLatitude() : -40*H_PI/180; Matrix3 moonOrbitAngle(MRotationZ,5*H_PI/180);

Matrix3 earthAxis=Matrix3(MRotationX,23*H_PI/180);

Matrix3 latitude(MRotationX,latitudeCoord); // -40 - Croatia, -90 - north pole

const float initMoonOnOrbitPos=0.5;

const float day=1.0/365;

const float lunarMonth=28*day;

float timeInYear = Glob.clock.GetTimeInYear();

float timeOfDay = Glob.clock.GetTimeOfDay();

float moonOnOrbitPos=initMoonOnOrbitPos+timeInYear*(1.0/lunarMonth);

Matrix3 moonOnOrbit=moonOrbitAngle*Matrix3(MRotationY,moonOnOrbitPos*(H_PI*2));

Matrix3 earthOnOrbit=Matrix3(MRotationY,timeInYear*(H_PI*2));

// note - midnight is on the point furthest from the sun Matrix3 midnightToCurrent=Matrix3(MRotationY,timeOfDay*(H_PI*2));

// calculate sun and moon position relative to current postion Matrix3 cameraToCosmos=earthAxis*midnightToCurrent*earthOnOrbit*latitude;

Matrix3 cosmosToCamera=cameraToCosmos.InverseRotation();

// use rotation of PI/2 to achieve this

Matrix3 normalDirection(MRotationX,-H_PI/2);

Matrix3 convert=normalDirection*cosmosToCamera;

_direction=convert*earthOnOrbit.Direction();

_moonDirection=convert*moonOnOrbit.Direction();

// reverse N-S, W-W

_direction[0]=-_direction[0];

_direction[2]=-_direction[2]; _moonDirection[0]=-_moonDirection[0];

_moonDirection[2]=-_moonDirection[2];

_direction.Normalize();

_sunDirection=_direction;

Edited by ProfTournesol

Share this post


Link to post
Share on other sites

Different dates at different times mean different tide level.

Experiement with dates and times, but ultimately you cant stop the tide changing.

Share this post


Link to post
Share on other sites

Okay thanks for your inputs mates :)

Looks like Warfare players should reconsider tactics on my map because of the weather influence^^

Share this post


Link to post
Share on other sites

Has anyone tried to change latitude / longitude ?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×