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

[WIP] Suny Day Weather Mod

Hrv123

Landlubber
Hello o/

I have almost finished weather mod for COAS, minimum or no fog depending on the time of day, really sunny days and nights full of stars (if weather is clear), you can see horizon etc.
I simply could not watch that fog any more all day :p

But I have one tiny problem before version 1.0 is ready. Actually it turned out to be a pain to solve in last two days :(

I have problem making Sun while in game 3D environment mode to act as intend from 12:00 to 18:00, that is to make it set by 18:00 (not as now 23:00) in game time.
I edited and re-edited and change/play with data again and again to force it to set earlier,in:

...Playlogic\Age of Pirates 2\Program\Weather
WhrSun.c
WhrUtils.c

...Playlogic\Age of Pirates 2\Program\Weather\init
Day.c
Evening.c
Morning.c
Nigth.c
Special.c



From 5:30 to 12:00 sun moves in game as intended, at right speed to designated
"Weathers[n].Sun.HeightAngle = " in Morning/day/evening/Night files, value per hour.
But from 12:00 its out of control haha.
Well this has become hard nought for me to crack as Im messing now two days with that issue so if anybody have any idea (solution even) where else to look/edit stuff I would appreciate it very much :)
 
Ahoy Hrv123, the fog has always annoyed me as well, but I am not much of a modder. I did a quick look in the CoAS folders though and found some other weather files in the "C:\Program Files\Playlogic\Age of Pirates 2\Program\net\client\weather" directory, you might have a look in there. There may be some more scattered about, hope that helps mate!
 
Not sure if any of these will help but here are some files and there locations. :onya

Program
Age of Pirates 2\Program\Locations\particles
Age of Pirates 2\Program\calendar


Resources
Age of Pirates 2\RESOURCE\Textures\WEATHER ------------- (TGA Files)
Age of Pirates 2\RESOURCE\INI\particles\particles ------ (Configuration File)
Age of Pirates 2\RESOURCE\INI\particles ---------------- (Configuration File)

It would be amazing if the weather could change as it does in POTC, every hour, and random so it could rain, heavy winds, slow winds etc etc. One day hopefully that will be done.
 
Thagarr/Luke159/Nixarass
Thanks guys but those files dont affect Sun.Moon object behaving as much I can see.
Hmmm, Im coming to conclusion It could be some hard coded bug and impossible to fix :despair:

Ah well, Il make ready for posting 1.0 of weather fix. Always time for 1.1 making :D
 
You perhaps already looked in these files but how about

i saw this line of code in WhrSun, Age of Pirates 2\Program\Weather
Code:
	SunGlow.Moon = aSun1.Moon;
}

if( stf(Environment.Time) < 4.5 || stf(Environment.Time) > 23.5 ) {
SunGlow.Moon = true;
SunGlow.Reflection.Texture = "weather\sun\reflection\refl_night.tga";
} else {
SunGlow.Moon = false;


And this in WhrUtils, Age of Pirates 2\Program\Weather

Code:
//navy -->
float GetSunHeightAngle(int _hour)
{
if (_hour > 5 && _hour < 13)
{
return Degree2Radian(0.0 + 12.0*(_hour-6));
}
if (_hour > 12 && _hour < 19)
{
return Degree2Radian(72.0 - 12.0*(_hour-12));
}
return -1;
}
//navy <--


Hopefully if neither of these help someone will have an idea of other files to look in if you don't already find the answer before then. :onya
 
You perhaps already looked in these files but how about

i saw this line of code in WhrSun, Age of Pirates 2\Program\Weather
Code:
	SunGlow.Moon = aSun1.Moon;
}

if( stf(Environment.Time) < 4.5 || stf(Environment.Time) > 23.5 ) {
SunGlow.Moon = true;
SunGlow.Reflection.Texture = "weather\sun\reflection\refl_night.tga";
} else {
SunGlow.Moon = false;


And this in WhrUtils, Age of Pirates 2\Program\Weather

Code:
//navy -->
float GetSunHeightAngle(int _hour)
{
if (_hour > 5 && _hour < 13)
{
return Degree2Radian(0.0 + 12.0*(_hour-6));
}
if (_hour > 12 && _hour < 19)
{
return Degree2Radian(72.0 - 12.0*(_hour-12));
}
return -1;
}
//navy <--


Hopefully if neither of these help someone will have an idea of other files to look in if you don't already find the answer before then. :onya


Yeah I edited/played with and those two cases but they do not affect actual speed/redeployment of sun.moon moving on sky, and last one case quoted definietly should hmmmm.

Atm Im playing with concept of "degree2radiant"
is that degrees (360) expressed in radian (2*Pi), as radian value in actual decimal , or transformed into decimal form from 0.0 to 1.0 as representation of 100% of radian in 90 degree. Or again value that can be writes as it is or transformed to 0.0 to 1.0 of 90 degrees. To where should decimal point go, more forvard or backward combinations Il not even start to contemplate :shock


DId anybody of you guys play POTC, is there sun on the sky and how is it modelated?
As I understand that game have same game engine, can anybody of you take a peek there, if you have it, how weather files looke there? Maybe it is posible to export data from there, the one that works hmmm :mm
 
Unfortunately my first sentence in first thread was an blatant lie. Its newer over with editing and clearing script, and Sun still fly around out of control :shrug

But some screen shots on progress.

Beta1.jpg

Beta2.jpg

Beta3.jpg

Beta4.jpg

Beta5.jpg
 
Those look AWESOME! GIMME! :b:

Stop getting so excitted its only a game. :rolleyes:

My son doesn't say can i have it he alway's say's gizzit he's almost 3 and runs around saying gizzit, gizzit. xD:

I agree from those pictures it looks sweat, i have seen in most weather files the rain has been disabled, would enabling them reactivate them, worth trying out isn't it. :will
 
Those look AWESOME! GIMME! :b:

Stop getting so excitted its only a game. :rolleyes:

My son doesn't say can i have it he alway's say's gizzit he's almost 3 and runs around saying gizzit, gizzit. xD:

I agree from those pictures it looks sweat, i have seen in most weather files the rain has been disabled, would enabling them reactivate them, worth trying out isn't it. :will

giizzit :cheeky



No you dont wont to enable rain on standard day weather pattern (morning, day, evening, night). It would be raining 24h without stop each day in each month till the end of time :woot
Scripting more storm and overcast weather pattern with different effects (for example adding weather patern of 0>2 knot wind speed with extreme fog with no rain/tornado as one new for snail ship chases for example :keith ) is the right way :)
 
Back
Top