Two places for the following changes:
// fWeatherSpeed = stf(Weather.Wind.Speed); // original code
fWeatherSpeed = GetWeatherSpeed(); // LDH 05Feb17
------------
New Function:
//// LDH 05Feb17 calculate weatherspeed with wind speed increase
float GetWeatherSpeed()
{
float fWindIncrease, fLoWind, fHiWind, fTemp;
fWindIncrease = MakeInRange(-1.0, 10.0, WIND_INCREASE);
if (fWindIncrease >= 0.0)
{
return stf(Weather.Wind.Speed) + fWindIncrease;
}
else
{
fLoWind = MakeInRange(2.0, 26.0, LOWEST_WIND);
fHiWind = MakeInRange(4.0, 28.0, HIGHEST_WIND);
if (fLoWind > fHiWind)
{
fTemp = fLoWind;
fLoWind = fHiWind;
fHiWind = fTemp;
}
if (fLoWind+2.0 > fHiWind) fHiWind = fLoWind + 2.0;
return Bring2Range(fLoWind, fHiWind, 2.0, 18.0, stf(Weather.Wind.Speed));
}
}
----------------------
The constants are set in the settings file used to change mod options.
#define WIND_INCREASE -1.0 // FLOAT - -1.0 - increase wind speed by this amount, 0.0 is default game
// Valid values 0.0 to 10.0, and -1.0
// Recommended value = 10.0 or 5.0 if ships are too fast
// If this number is set to -1.0, the following values will be used instead
// NOTE: Settng more than 16 knots difference between low and high
// is allowed, but may produce undesired results at wind extremes
// unless CLASS_EFFECT_OF_WIND is set very low
#define LOWEST_WIND 19.0 // FLOAT - 12.0 - the lowest wind speed you will see (default game 2.0)
// Valid values 2.0 to 26.0
// Recommended value 12.0
#define HIGHEST_WIND 23.0 // FLOAT - 23.0 - the highest wind speed you will see (default game 18.0)
// Valid values 4.0 to 28.0
// Recommended value 23.0
----------
There is also a GetAverageWindSpeed() function which is used to determine speed difference between classes of ships.