Question re: game_weather

Couple (easy) questions regarding the weather table…

I wanted to see what it would look like to have snow falling in Stormwind, Elwynn or Redridge so I figured I’d add the weather to the table. While doing so, I came up with the following questions / observations:

[ol][li]The fields (and wiki) seem to be mislabled[/li] [ul]The fields and wiki definitions are things such as “spring rain”, “spring snow”, “summer rain”, “summer snow”, etc.

[li]These used to be "light rain", "heavy rain", "light snow", "heavy snow", etc. which made more sense because the server doesn't really know what season it is. It just rolls a chance between (eg) a light mist or a downpour but you can get any result regardless of the "season".[/li]	[/ul]

[li]What happens to subzones when you change their parent zone?[/li] [ul]There is an entry for Goldshire
[li]There is an entry for Elwynn Forest[/li] [li]If I add snow to Elwynn Forest, do I have to add snow to Goldshire too in order to get it to snow or will the parent zone cascade down to the child zones?[/li] [/ul]
[/ol]
Thanks!

I have modified the weather system (Weather.cpp) for me quite heavy to make it more dynamic. And have added a lot of weather zones into the table too.

But why do you think the core doesn’t know the season ?

There is a calculation for that:

//78 days between January 1st and March 20nd; 365/4=91 days by season
// season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html
time_t gtime = sWorld->GetGameTime();
struct tm ltime;
ACE_OS::localtime_r(&gtime, &ltime);
uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4;

static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };

TC_LOG_INFO("misc", "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);

And subzones are inherited by their parent zone.

But I would recommend to redesign the weather table in that way that there are more than 4 weather seasons possible. If you make it right you can have endless weather seasons. For ex. 1 weekend a very strong snowfall. You could enable such a weather season with a GM command. Like game events.

By “the server doesn’t really know what season it is” I meant that it doesn’t seem to be very accurate.

Anyway, I guess I just find the weather a bit odd. You step out of a major storm in Elwynn into bright sunshine in Stormwind…

I have done that in real life.

TC doesn’t have a weather zone for Stormwind by default. I made one with similar weather like in Forest of Elwynn.

But in general it’s not possible to code similar weather changes in neighbour zones. That’s the 3 zones problem.

Guess you have 3 players in 3 zones: Stormwind (sun), Elwynn (snow), Duskwood (rain).

If both players enters from Stormwind and Duskwood into Forrest of Elwyn, you would have at the same time to modify the weather from sun->snow and from rain->snow.

The only possible way would be if you change the weather individual for each player at zone change. However, most players are not interested in weather at all /emoticons/default_smile.png

Not necessarily. Stormwind is in Elwynn (according to the map) so its weather patterns should change to match those of Elwynn. It’s similar to people flying into LAX from three different temperate zones. They all end up experiencing the same weather.

Since you have to cross Elwynn to get to Stormwind (unless you hearth) then the weather transition should be fairly understandable.

But you can add into game_weather the zone 1519 (Stormwind) with the weather data of Elwynn (zone 12).

Im my table I have 70 weather zones. Much more than in TC.