int Whr_InitEvening(int n)
{
// ====================================================================
// evening, after rain, 17 - 21 hour

	int minwind, maxwind;
	int winds;
	int fog;
	string ver = ""; // KK

	// NK -->
	winds = rand(11);
	//rain = rand(8);
	fog = rand(20);

	minwind = 1 + Rand(3);
	if(winds >= 1)
	{
		minwind = 6 + Rand(4);
	}
	if(winds >= 3)
	{
		minwind = 8 + Rand(6);
	}
	if(winds >= 6)
	{
		minwind = 14 + Rand(6);
	}
	if(winds >= 9)
	{
		minwind = 20 + Rand(8);
	}
	if(winds >= 11)
	{
		minwind = 26 + Rand(10);
	}
	maxwind = minwind + 4;
	// NK <--

	if (AERO_SKIES) ver = "\AERO"; // KK

	Weathers[n].id = "Evening After Rain";

	Weathers[n].Hour.Min = 17;
	Weathers[n].Hour.Max = 22;
	Weathers[n].Lighting = "evening1";
	Weathers[n].LightingLm = "evening";
	Weathers[n].InsideBack = "e";

	Weathers[n].Storm = false;
	Weathers[n].Tornado = false;
	Weathers[n].Shark = true;
	Weathers[n].Lights = false;
	Weathers[n].Night = false;

	Weathers[n].Shadow.Density.Head = argb(255,96,96,96);
	Weathers[n].Shadow.Density.Foot = argb(255,96,96,64);

	Weathers[n].Lightning.Enable = false;
	Weathers[n].Lightning.Texture = "Weather\lightning\lightning.tga";
	Weathers[n].Lightning.FlickerTime = 32;
	Weathers[n].Lightning.SubTexX = 1;
	Weathers[n].Lightning.SubTexY = 1;

	Weathers[n].Sky.Dir = "weather\skies" + ver + "\3\\"; // KK 
	Weathers[n].Sky.Color = argb(0,255,255,255);
	Weathers[n].Sky.Rotate = 0.0;
	Weathers[n].Sky.Size = 1000.0;
	Weathers[n].Sky.Angle = 3.20;
	
	if ( fog == 20 )
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 20000.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.04;
		Weathers[n].Fog.SeaDensity = 0.04;
		Weathers[n].Fog.Color = argb(0,123,83,71);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 10000.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.04;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.04;
		Weathers[n].SpecialSeaFog.Color = argb(0,123,83,71);
	}
	else
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 300.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.002;
		Weathers[n].Fog.SeaDensity = 0.002;
		Weathers[n].Fog.Color = argb(0,123,83,71);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 200.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.002;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.002;
		Weathers[n].SpecialSeaFog.Color = argb(0,123,83,71);
	}
	
	Weathers[n].Rain.NumDrops = 2000;
	Weathers[n].Rain.Color = argb(0,73,73,73);
	Weathers[n].Rain.DropLength = 2.12;
	Weathers[n].Rain.Height = 30.0;
	Weathers[n].Rain.Radius = 20.0;
	Weathers[n].Rain.Speed = 16.0;
	Weathers[n].Rain.Jitter = 0.4;
	Weathers[n].Rain.WindSpeedJitter = 0.5;
	Weathers[n].Rain.MaxBlend = 49;
	Weathers[n].Rain.TimeBlend = 2000;

	Weathers[n].Rainbow.Enable = true;
	Weathers[n].Rainbow.Texture = "weather\rainbow\rainbow.tga";

	Weathers[n].Sun.Color = argb(0,255,188,144);
	Weathers[n].Sun.Ambient = argb(0,66,38,33);
	Weathers[n].Sun.AzimuthAngle = Degree2Radian(172.0);
	Weathers[n].Sun.HeightAngle = 0.25;
	Weathers[n].Sun.Glow.Enable = true;
	Weathers[n].Sun.Glow.Dist = 3500.0;
	Weathers[n].Sun.Glow.Size = 1250.0;
	Weathers[n].Sun.Glow.RotateSpeed = 1.0;
	Weathers[n].Sun.Glow.Texture = "weather\sun\glow\sunglow.tga";
	Weathers[n].Sun.Glow.DecayTime = 8.0;
	Weathers[n].Sun.Glow.TechniqueNoZ = "sunglow_noz";
	Weathers[n].Sun.Glow.TechniqueZ = "sunglow_z";
	Weathers[n].Sun.Glow.Color = argb(0,255,255,255);
	Weathers[n].Sun.Flare.Enable = true;
	Weathers[n].Sun.Flare.Texture = "weather\sun\flare\allflares.tga";
	Weathers[n].Sun.Flare.Dist = 3500.0;
	Weathers[n].Sun.Flare.TexSizeX = 2;
	Weathers[n].Sun.Flare.TexSizeY = 2;
	Weathers[n].Sun.Flare.Technique = "sunflare";
	Weathers[n].Sun.Flare.Scale = 2.0;
	Weathers[n].Sun.Flares.f1 = "1.0,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f2 = "0.9,20.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f3 = "0.8,30.0,2,0x0F0F0F";
	Weathers[n].Sun.Flares.f4 = "0.6,150.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f5 = "0.5,50.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f6 = "0.4,100.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f7 = "0.3,200.0,0,0x1F1F1F";
	Weathers[n].Sun.Flares.f8 = "0.2,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Overflow.Enable = false;
	Weathers[n].Sun.Overflow.Texture = "Weather\lightning\flash.tga";
	//Weathers[n].Sun.Overflow.Texture = "weather\sun\overflow\overflow.tga";
	Weathers[n].Sun.Overflow.Color = argb(0, 155, 255, 155);
	Weathers[n].Sun.Overflow.Size = 5500.0;
	Weathers[n].Sun.Overflow.Technique = "sunoverflow";
	Weathers[n].Sun.Overflow.Start = 0.8;

	Weathers[n].Sea.GF2MX.Sky.Color = argb(0,100,70,65);
	Weathers[n].Sea.GF2MX.Water.Color = argb(0,0,0,0);
	Weathers[n].Sea.GF2MX.Bump.Tile = 0.04;
	Weathers[n].Sea.GF2MX.Bump.AnimSpeed = 7.0;
	Weathers[n].Sea.GF2MX.Bump.Dir = "weather\sea\bump_g2mx\\"; 

	Weathers[n].Sea.Transparency = 0.4;
	Weathers[n].Sea.FrenelCoefficient = 0.7;
	Weathers[n].Sea.WaterReflection = 0.7;
	Weathers[n].Sea.WaterAttenuation = 0.8;
	Weathers[n].Sea.Sky.Color = argb(0,255,255,255);
	Weathers[n].Sea.Water.Color = argb(0,30,42,55);
	Weathers[n].Sea.Pena.Color = argb(0,255,150,100);
	Weathers[n].Sea.Bump.Dir = "resource\textures\weather\sea\bump_g3\\"; 
	Weathers[n].Sea.Bump.Tile = 0.04;
	Weathers[n].Sea.Bump.Ang = 1.0;
	Weathers[n].Sea.Bump.Speed = 0.01;
	Weathers[n].Sea.Bump.AnimSpeed = 15.0;
	Weathers[n].Sea.Bump.Scale = 2.0;
	Weathers[n].Sea.SunRoad.Start = 0.99;
	Weathers[n].Sea.SunRoad.Color1 = argb(0,255,77,55);
	Weathers[n].Sea.SunRoad.Color2 = argb(0,255,180,22);
	Weathers[n].Sea.SunRoad.Power = 4.0;
	// NK -->
	string direction1, direction2, direction3;

	float fWindA, fSeaA, fSeaB;
	fWindA = frand(PIm2);
	fSeaA = PIm2 - fWindA;
	if (fSeaA >= (3.0 * PId2))
	{
		fSeaB = (fSeaA + PId2 - PIm2);
	}
	else
	{
		fSeaB = fSeaA + PId2;
	}
	Weathers[n].Wind.Angle = fWindA;
	Weathers[n].Wind.Speed.Min = minwind;
	Weathers[n].Wind.Speed.Max = maxwind;

	direction1 = fts(fSeaB, 4);
	direction2 = fts((fSeaB + (PId2 / 2.0)), 4);
	direction3 = fts((fSeaB - (PId2 / 2.0)), 4);

	float myWind = maxwind;
	if (maxwind > 25.0)
		myWind = 25.0;

	float windStrength1 = myWind / 26.0;
	float windStrength2 = myWind / 30.0;
	float windStrength3 = myWind / 28.0;

	float wave1 = 5 + windStrength2 * 3;
	float wave2 = 10 + windStrength1 * 3;
	float wave3 = 10 + windStrength3 * 3;

	string seaStrength1 = fts(windStrength1, 4);
	string seaStrength2 = fts(windStrength2, 4);
	string seaStrength3 = fts(windStrength3, 4);

	string waveLength1 = fts(wave1, 4);
	string waveLength2 = fts(wave2, 4);
	string waveLength3 = fts(wave3, 4);

	string waveSpeed = "-78.00";

//	Weathers[n].Sea.Harmonics.h1 = direction1 + ",10.0000,1.0000,0.00,0.00";
	Weathers[n].Sea.Harmonics.h1 = direction1 + "," + waveLength1 + "," + seaStrength1 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h2 = direction2 + "," + waveLength2 + "," + seaStrength2 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h3 = direction3 + "," + waveLength3 + "," + seaStrength3 + ",0," + waveSpeed;
	// NK <--
	
	n++;

// ====================================================================
// evening, red sky, 19 - 22 hour
	
	// NK -->
	winds = rand(11);
	//rain = rand(8);
	fog = rand(20);

	minwind = 1 + Rand(3);
	if(winds >= 1)
	{
		minwind = 6 + Rand(4);
	}
	if(winds >= 3)
	{
		minwind = 8 + Rand(6);
	}
	if(winds >= 6)
	{
		minwind = 14 + Rand(6);
	}
	if(winds >= 9)
	{
		minwind = 20 + Rand(8);
	}
	if(winds >= 11)
	{
		minwind = 26 + Rand(10);
	}
	maxwind = minwind + 4;
	// NK <--

	Weathers[n].id = "Red Sky";

	Weathers[n].Hour.Min = 18;
	Weathers[n].Hour.Max = 22;
	Weathers[n].Lighting = "evening2";
	Weathers[n].LightingLm = "evening";
	Weathers[n].InsideBack = "e";

	Weathers[n].Storm = false;
	Weathers[n].Tornado = false;
	Weathers[n].Shark = true;
	Weathers[n].Lights = false;
	Weathers[n].Night = false;

	Weathers[n].Shadow.Density.Head = argb(255,96,96,96);
	Weathers[n].Shadow.Density.Foot = argb(255,96,96,64);

	Weathers[n].Lightning.Enable = false;
	Weathers[n].Lightning.Texture = "Weather\lightning\lightning.tga";
	Weathers[n].Lightning.FlickerTime = 32;
	Weathers[n].Lightning.SubTexX = 1;
	Weathers[n].Lightning.SubTexY = 1;

	Weathers[n].Sky.Dir = "weather\skies" + ver + "\4\\"; // KK 
	Weathers[n].Sky.Color = argb(0,255,255,255);
	Weathers[n].Sky.Rotate = 0.0;
	Weathers[n].Sky.Size = 1000.0;
	Weathers[n].Sky.Angle = 0.0;
	
	if ( fog == 20 )
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 20000.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.04;
		Weathers[n].Fog.SeaDensity = 0.04;
		Weathers[n].Fog.Color = argb(0,123,83,71);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 10000.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.04;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.04;
		Weathers[n].SpecialSeaFog.Color = argb(0,123,83,71);
	}
	else
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 400.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.0015;
		Weathers[n].Fog.SeaDensity = 0.0015;
		Weathers[n].Fog.Color = argb(0,123,83,71);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 300.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.0015;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.0015;
		Weathers[n].SpecialSeaFog.Color = argb(0,123,83,71);
	}
	
	Weathers[n].Rain.NumDrops = 0;
	Weathers[n].Rain.Color = argb(0,73,73,73);
	Weathers[n].Rain.DropLength = 2.12;
	Weathers[n].Rain.Height = 30.0;
	Weathers[n].Rain.Radius = 30.0;
	Weathers[n].Rain.Speed = 18.0;
	Weathers[n].Rain.Jitter = 0.4;
	Weathers[n].Rain.WindSpeedJitter = 0.5;
	Weathers[n].Rain.MaxBlend = 49;
	Weathers[n].Rain.TimeBlend = 2000;

	Weathers[n].Rainbow.Enable = false;

	Weathers[n].Sun.Color = argb(0,255,141,55);
	Weathers[n].Sun.Ambient = argb(0,66,33,33);
	Weathers[n].Sun.AzimuthAngle = Degree2Radian(180.0);
	Weathers[n].Sun.HeightAngle = 0.20;
	Weathers[n].Sun.Glow.Enable = true;
	Weathers[n].Sun.Glow.Dist = 3500.0;
	Weathers[n].Sun.Glow.Size = 1250.0;
	Weathers[n].Sun.Glow.RotateSpeed = 1.0;
	Weathers[n].Sun.Glow.Texture = "weather\sun\glow\sunglow.tga";
	Weathers[n].Sun.Glow.DecayTime = 8.0;
	Weathers[n].Sun.Glow.TechniqueNoZ = "sunglow_noz";
	Weathers[n].Sun.Glow.TechniqueZ = "sunglow_z";
	Weathers[n].Sun.Glow.Color = argb(0,255,255,255);
	Weathers[n].Sun.Flare.Enable = true;
	Weathers[n].Sun.Flare.Texture = "weather\sun\flare\allflares.tga";
	Weathers[n].Sun.Flare.Dist = 3500.0;
	Weathers[n].Sun.Flare.TexSizeX = 2;
	Weathers[n].Sun.Flare.TexSizeY = 2;
	Weathers[n].Sun.Flare.Technique = "sunflare";
	Weathers[n].Sun.Flare.Scale = 2.0;
	Weathers[n].Sun.Flares.f1 = "1.0,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f2 = "0.9,20.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f3 = "0.8,30.0,2,0x0F0F0F";
	Weathers[n].Sun.Flares.f4 = "0.6,150.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f5 = "0.5,50.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f6 = "0.4,100.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f7 = "0.3,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f8 = "0.2,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Overflow.Enable = false;
	Weathers[n].Sun.Overflow.Texture = "Weather\lightning\flash.tga";
	//Weathers[n].Sun.Overflow.Texture = "weather\sun\overflow\overflow.tga";
	Weathers[n].Sun.Overflow.Color = argb(0, 255, 255, 255);
	Weathers[n].Sun.Overflow.Size = 5500.0;
	Weathers[n].Sun.Overflow.Technique = "sunoverflow";
	Weathers[n].Sun.Overflow.Start = 0.84;

	Weathers[n].Sea.GF2MX.Sky.Color = argb(0,70,40,30);
	Weathers[n].Sea.GF2MX.Water.Color = argb(0,0,0,0);
	Weathers[n].Sea.GF2MX.Bump.Tile = 0.04;
	Weathers[n].Sea.GF2MX.Bump.AnimSpeed = 7.0;
	Weathers[n].Sea.GF2MX.Bump.Dir = "weather\sea\bump_g2mx\\"; 

	Weathers[n].Sea.Transparency = 0.4;
	Weathers[n].Sea.FrenelCoefficient = 0.7;
	Weathers[n].Sea.WaterReflection = 0.7;
	Weathers[n].Sea.WaterAttenuation = 0.8;
	Weathers[n].Sea.Sky.Color = argb(0,255,255,255);
	Weathers[n].Sea.Water.Color = argb(0,30,42,55);
	Weathers[n].Sea.Pena.Color = argb(0,255,100,70);
	Weathers[n].Sea.Bump.Dir = "resource\textures\weather\sea\bump_g3\\"; 
	Weathers[n].Sea.Bump.Tile = 0.04;
	Weathers[n].Sea.Bump.Ang = 1.0;
	Weathers[n].Sea.Bump.Speed = 0.01;
	Weathers[n].Sea.Bump.AnimSpeed = 20.0;
	Weathers[n].Sea.Bump.Scale = 2.0;
	Weathers[n].Sea.SunRoad.Start = 0.993;
	Weathers[n].Sea.SunRoad.Color1 = argb(0,200,44,44);
	Weathers[n].Sea.SunRoad.Color2 = argb(0,255,128,55);
	Weathers[n].Sea.SunRoad.Power = 2.0;
	// NK -->

	fWindA = frand(PIm2);
	fSeaA = PIm2 - fWindA;
	if (fSeaA >= (3.0 * PId2))
	{
		fSeaB = (fSeaA + PId2 - PIm2);
	}
	else
	{
		fSeaB = fSeaA + PId2;
	}
	Weathers[n].Wind.Angle = fWindA;
	Weathers[n].Wind.Speed.Min = minwind;
	Weathers[n].Wind.Speed.Max = maxwind;

	direction1 = fts(fSeaB, 4);
	direction2 = fts((fSeaB + (PId2 / 2.0)), 4);
	direction3 = fts((fSeaB - (PId2 / 2.0)), 4);

	myWind = maxwind;
	if (maxwind > 25.0)
		myWind = 25.0;

	windStrength1 = myWind / 26.0;
	windStrength2 = myWind / 30.0;
	windStrength3 = myWind / 28.0;

	wave1 = 5 + windStrength2 * 3;
	wave2 = 10 + windStrength1 * 3;
	wave3 = 10 + windStrength3 * 3;

	seaStrength1 = fts(windStrength1, 4);
	seaStrength2 = fts(windStrength2, 4);
	seaStrength3 = fts(windStrength3, 4);

	waveLength1 = fts(wave1, 4);
	waveLength2 = fts(wave2, 4);
	waveLength3 = fts(wave3, 4);

	waveSpeed = "-78.00";

//	Weathers[n].Sea.Harmonics.h1 = direction1 + ",10.0000,1.0000,0.00,0.00";
	Weathers[n].Sea.Harmonics.h1 = direction1 + "," + waveLength1 + "," + seaStrength1 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h2 = direction2 + "," + waveLength2 + "," + seaStrength2 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h3 = direction3 + "," + waveLength3 + "," + seaStrength3 + ",0," + waveSpeed;
	// NK <--
	
	n++;

// ====================================================================
// evening, crimson sky, 17 - 21 hour
	
	// NK -->
	winds = rand(11);
	//rain = rand(8);
	fog = rand(20);

	minwind = 1 + Rand(3);
	if(winds >= 1)
	{
		minwind = 6 + Rand(4);
	}
	if(winds >= 3)
	{
		minwind = 8 + Rand(6);
	}
	if(winds >= 6)
	{
		minwind = 14 + Rand(6);
	}
	if(winds >= 9)
	{
		minwind = 20 + Rand(8);
	}
	if(winds >= 11)
	{
		minwind = 26 + Rand(10);
	}
	maxwind = minwind + 4;
	// NK <--

	Weathers[n].id = "Crimson Sky";

	Weathers[n].Hour.Min = 17;
	Weathers[n].Hour.Max = 21;
	Weathers[n].Lighting = "evening3";
	Weathers[n].LightingLm = "evening";
	Weathers[n].InsideBack = "e";

	Weathers[n].Lights = false;
	Weathers[n].Night = false;

	Weathers[n].Storm = false;
	Weathers[n].Tornado = false;
	Weathers[n].Shark = true;

	Weathers[n].Shadow.Density.Head = argb(255,96,96,96);
	Weathers[n].Shadow.Density.Foot = argb(255,96,96,64);

	Weathers[n].Lightning.Enable = false;
	Weathers[n].Lightning.Texture = "Weather\lightning\lightning.tga";
	Weathers[n].Lightning.FlickerTime = 32;
	Weathers[n].Lightning.SubTexX = 1;
	Weathers[n].Lightning.SubTexY = 1;

	Weathers[n].Sky.Dir = "weather\skies" + ver + "\2\\"; // KK
	Weathers[n].Sky.Color = argb(0,255,200,210);
	Weathers[n].Sky.Rotate = 0.0;
	Weathers[n].Sky.Size = 1000.0;
	Weathers[n].Sky.Angle = 0.0;
	
	if ( fog == 20 )
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 20000.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.04;
		Weathers[n].Fog.SeaDensity = 0.04;
		Weathers[n].Fog.Color = argb(0,76,60,73);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 10000.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.04;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.04;
		Weathers[n].SpecialSeaFog.Color = argb(0,76,60,73);
	}
	else
	{
		Weathers[n].Fog.Enable = true;
		Weathers[n].Fog.Height = 200.0;
		Weathers[n].Fog.Start = 0.0;
		Weathers[n].Fog.Density = 0.0015;
		Weathers[n].Fog.SeaDensity = 0.0015;
		Weathers[n].Fog.Color = argb(0,76,60,73);
		
		Weathers[n].SpecialSeaFog.Enable = true;
		Weathers[n].SpecialSeaFog.Height = 200.0;
		Weathers[n].SpecialSeaFog.Start = 0.0;
		Weathers[n].SpecialSeaFog.Density = 0.0015;
		Weathers[n].SpecialSeaFog.SeaDensity = 0.0015;
		Weathers[n].SpecialSeaFog.Color = argb(0,76,60,73);
	}
	
	Weathers[n].Rain.NumDrops = 0;
	Weathers[n].Rain.Color = argb(0,73,73,73);
	Weathers[n].Rain.DropLength = 2.12;
	Weathers[n].Rain.Height = 30.0;
	Weathers[n].Rain.Radius = 30.0;
	Weathers[n].Rain.Speed = 18.0;
	Weathers[n].Rain.Jitter = 0.4;
	Weathers[n].Rain.WindSpeedJitter = 0.5;
	Weathers[n].Rain.MaxBlend = 49;
	Weathers[n].Rain.TimeBlend = 2000;

	Weathers[n].Rainbow.Enable = false;
	Weathers[n].Rainbow.Texture = "weather\rainbow\rainbow.tga";

	Weathers[n].Sun.Color = argb(0,255,141,55);
	Weathers[n].Sun.Ambient = argb(0,70,50,65);
	Weathers[n].Sun.AzimuthAngle = Degree2Radian(172.0);
	Weathers[n].Sun.HeightAngle = 0.24;
	Weathers[n].Sun.Glow.Enable = true;
	Weathers[n].Sun.Glow.Dist = 3500.0;
	Weathers[n].Sun.Glow.Size = 1250.0;
	Weathers[n].Sun.Glow.RotateSpeed = 1.0;
	Weathers[n].Sun.Glow.Texture = "weather\sun\glow\sunglow.tga";
	Weathers[n].Sun.Glow.DecayTime = 8.0;
	Weathers[n].Sun.Glow.TechniqueNoZ = "sunglow_noz";
	Weathers[n].Sun.Glow.TechniqueZ = "sunglow_z";
	Weathers[n].Sun.Glow.Color = argb(0,255,255,255);
	Weathers[n].Sun.Overflow.Enable = false;
	Weathers[n].Sun.Flare.Enable = true;
	Weathers[n].Sun.Flare.Texture = "weather\sun\flare\allflares.tga";
	Weathers[n].Sun.Flare.Dist = 3500.0;
	Weathers[n].Sun.Flare.TexSizeX = 2;
	Weathers[n].Sun.Flare.TexSizeY = 2;
	Weathers[n].Sun.Flare.Technique = "sunflare";
	Weathers[n].Sun.Flare.Scale = 2.0;
	Weathers[n].Sun.Flares.f1 = "1.0,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f2 = "0.9,20.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f3 = "0.8,30.0,2,0x0F0F0F";
	Weathers[n].Sun.Flares.f4 = "0.6,150.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f5 = "0.5,50.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f6 = "0.4,100.0,1,0x0F0F0F";
	Weathers[n].Sun.Flares.f7 = "0.3,200.0,0,0x0F0F0F";
	Weathers[n].Sun.Flares.f8 = "0.2,200.0,0,0x0F0F0F";

	Weathers[n].Sea.GF2MX.Sky.Color = argb(0,110,80,90);
	Weathers[n].Sea.GF2MX.Water.Color = argb(0,0,0,0);
	Weathers[n].Sea.GF2MX.Bump.Tile = 0.04;
	Weathers[n].Sea.GF2MX.Bump.AnimSpeed = 7.0;
	Weathers[n].Sea.GF2MX.Bump.Dir = "weather\sea\bump_g2mx\\"; 

	Weathers[n].Sea.Transparency = 0.4;
	Weathers[n].Sea.FrenelCoefficient = 0.7;
	Weathers[n].Sea.WaterReflection = 0.7;
	Weathers[n].Sea.WaterAttenuation = 0.8;
	Weathers[n].Sea.Sky.Color = argb(0,255,200,210);
	Weathers[n].Sea.Water.Color = argb(0,30,42,55);
	Weathers[n].Sea.Pena.Color = argb(0,255,150,100);
	Weathers[n].Sea.Bump.Dir = "resource\textures\weather\sea\bump_g3\\"; 
	Weathers[n].Sea.Bump.Tile = 0.04;
	Weathers[n].Sea.Bump.Ang = 1.0;
	Weathers[n].Sea.Bump.Speed = 0.01;
	Weathers[n].Sea.Bump.AnimSpeed = 20.0;
	Weathers[n].Sea.Bump.Scale = 2.0;
	Weathers[n].Sea.SunRoad.Start = 0.99;
	Weathers[n].Sea.SunRoad.Color1 = argb(0,255,88,44);
	Weathers[n].Sea.SunRoad.Color2 = argb(0,255,200,55);
	Weathers[n].Sea.SunRoad.Power = 3.0;
	// NK -->

	fWindA = frand(PIm2);
	fSeaA = PIm2 - fWindA;
	if (fSeaA >= (3.0 * PId2))
	{
		fSeaB = (fSeaA + PId2 - PIm2);
	}
	else
	{
		fSeaB = fSeaA + PId2;
	}
	Weathers[n].Wind.Angle = fWindA;
	Weathers[n].Wind.Speed.Min = minwind;
	Weathers[n].Wind.Speed.Max = maxwind;

	direction1 = fts(fSeaB, 4);
	direction2 = fts((fSeaB + (PId2 / 2.0)), 4);
	direction3 = fts((fSeaB - (PId2 / 2.0)), 4);

	myWind = maxwind;
	if (maxwind > 25.0)
		myWind = 25.0;

	windStrength1 = myWind / 26.0;
	windStrength2 = myWind / 30.0;
	windStrength3 = myWind / 28.0;

	wave1 = 5 + windStrength2 * 3;
	wave2 = 10 + windStrength1 * 3;
	wave3 = 10 + windStrength3 * 3;

	seaStrength1 = fts(windStrength1, 4);
	seaStrength2 = fts(windStrength2, 4);
	seaStrength3 = fts(windStrength3, 4);

	waveLength1 = fts(wave1, 4);
	waveLength2 = fts(wave2, 4);
	waveLength3 = fts(wave3, 4);

	waveSpeed = "-78.00";

if(REALISTIC_WAVES == 1)
{
//Note on the piece of code below: each line, numbered 1, 2 and 3, are each separate "generators" of waves, each controlling the different aspects of the harmonica model. The first line controls the height, direction and speed of the wave. The second line controls the direction, speed and height of the entire surface. The third line controls the direction, height and speed of each wave. The value changed is "waveLength#" (waveLength1 is equal to 20 right now, wavelength2 is equal to 0.01, and wavelength3 is equal to 10). For example, setting the second and third line to 0.01 (minimum value) while keeping the first line as the same number would make the waves go in a single direction, without changing shape or breaking. Setting all numbers for "generators" to an equal value would create perfect hamonic waves. If you are not satisfied with the waves in this mod, please modify the the values that right now say "20", "0.01" and "10"
//	Weathers[n].Sea.Harmonics.h1 = direction1 + ",10.0000,1.0000,0.00,0.00";
	Weathers[n].Sea.Harmonics.h1 = direction1 + "," + 20 + "," + seaStrength1 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h2 = direction2 + "," + 0.01 + "," + seaStrength2 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h3 = direction3 + "," + 10 + "," + seaStrength3 + ",0," + waveSpeed;
}
else
{
//	Weathers[n].Sea.Harmonics.h1 = direction1 + ",10.0000,1.0000,0.00,0.00";
	Weathers[n].Sea.Harmonics.h1 = direction1 + "," + waveLength1 + "," + seaStrength1 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h2 = direction2 + "," + waveLength2 + "," + seaStrength2 + ",0," + waveSpeed;
	Weathers[n].Sea.Harmonics.h3 = direction3 + "," + waveLength3 + "," + seaStrength3 + ",0," + waveSpeed;
}
	// NK <--
	
	n++;

	return n;
}
