Weather

DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Weather

Post by DeVeous » Fri Aug 03, 2012 11:17 am

Weather Patch Details

v1
Weather updates occur half past every 3rd vana’diel hour
Weather is immediately sent to all players in the zone
Zone weather information stored in zone_weather.sql

v2
Weather is sent to any player(s) who enters the zone for the duration of the weather
lua script function 'player:getWeather()' added, weathers in a numerical value

v3
GM command @setweather added
BUG FIX - weather updates causing significant lag spikes

v4
Beaucedine_Glacier, Xarcabard and Castle_Zvahl_Baileys has a default weather of cloudy
Beaucedine_Glacier[S], Xarcabard[S] and Castle_Zvahl_Baileys[S] has a default weather of cloudy
All Cloisters have a constant extreme weather condition base on their element

v5
Weather changes will spawn\despawn the appropriate Elementals
Selbina shares weather with Valkurm Dunes
Mhaura shares weather with Buburimu Peninsula
Ranguemont Pass shares weather with Beaucedine Glacier

v6
Weather frequency is now more accurate thanks to PrBlahBlahtson
Data for zones with Static, Shared or Default weathers; move from core to zone_weather.sql
Weather updates have been spread out to last longer
Elementals will now respawn if their weather effect is still active
Weather updates now occurs immediately after server start
Attachments
[Core]WeatherV6.patch
(41.89 KiB) Downloaded 51 times
Last edited by DeVeous on Fri Aug 10, 2012 11:40 am, edited 9 times in total.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Weather

Post by bluekirby0 » Sat Aug 04, 2012 12:12 pm

I'm about to test this, but just from your description, it will be more efficient to return a numeric value for that function and provide aliases to the numbers. For example:

Code: Select all

WEATHER_CLEAR_SKIES = 0;
WEATHER_RAIN = 1;
etc... and have player:getWeather() return the number rather than a string. You can use the aliases to keep it readable.

DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Re: Weather

Post by DeVeous » Sat Aug 04, 2012 12:52 pm

Ok, I'm working on the updating the sql with all the corrent data by zone based on the wiki, then I'll change the lua to push back a numeric value. I was thinking about making a weather.lua in globals to add more functions like player:getWeatherType(), player:getWeatherElement, and player:getWeatherColor()

Not sure if that's too much or not.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Weather

Post by bluekirby0 » Sat Aug 04, 2012 1:05 pm

Ok I came across this:

Code: Select all

switch(m_zoneID){
	case 111:
	case 112:
		m_weather = WEATHER_SNOW;
	}
The default weather condition for Xarcabard is "Cloudy". I *think* that is also true for Beaucedine Glacier (but it has been a while since I played on retail). It is true that these zones have weather effects more often than not, but the defaults should not be set to a specific elemental weather.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Weather

Post by bluekirby0 » Sat Aug 04, 2012 1:11 pm

I should also mention that cloisters always have double weather effects, so it would be good to set that as a default here and set the frequency to max (or possibly even bypass the function to change it for those zones).

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Weather

Post by bluekirby0 » Sat Aug 04, 2012 1:18 pm

Okay, some suggestions:

add a setWeather LUA binding so it can be used as a GM command for testing. If you want to see how to go ahead and make this into a GM command you can look at scripts/commands/changejob.lua for an example of how to pass it strings on the command and send numbers to the function.

The only function you absolutely need is getWeather that will return a numerical value for a weather effect. The other functions you mentioned don't sound particularly useful, but perhaps there is some context I am missing.

If you want to add some icing on the cake, you can add functions that calculate common mechanical elements relating to weather such as MAB bonus or penalties, damage bonus or penalties, etc... There are already comments all over the place that are ready to plug in such a function if it existed.

DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Re: Weather

Post by DeVeous » Sat Aug 04, 2012 4:37 pm

Edit : Removed out-dated patch
Last edited by DeVeous on Tue Aug 07, 2012 5:41 pm, edited 3 times in total.

Ayame
Posts: 129
Joined: Sat Jul 21, 2012 10:35 pm

Re: Weather

Post by Ayame » Sat Aug 04, 2012 5:03 pm

this is awsome now we gonna have weather in the game :D

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Weather

Post by PrBlahBlahtson » Sun Aug 05, 2012 12:41 am

Ayame wrote:this is awsome now we gonna have weather in the game :D
New features? New bugs to find and fix! :D

But yeah, I've kind of missed weather.

DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Re: Weather

Post by DeVeous » Sun Aug 05, 2012 9:31 am

Edit : Removed out-dated patch
Last edited by DeVeous on Tue Aug 07, 2012 5:41 pm, edited 1 time in total.

Post Reply