rssBetterWeather (betterweather)
Category: | script |
---|---|
Author(s): | churchill |
Downloads: | 2588 |
Rate: | You need to be logged in to vote |
Rating: | 3.6 (24 Votes) |
Description:
My first attempted resource/script - something basic, but might be useful to others.
I've noticed that most weather scripts seem to be a bit basic in that they just randomly change the weather at a fixed time. Sometimes they go one step further and change it at a random time. What this resource does is attempt to mimic weather patterns by setting today's weather but also pre-defining potential weather for 2 days ahead, for both the day and night weather.
When the weather updates each day it's based on these pre-defined "predictions". As with real weather, it's not 100% accurate - sometimes the weather prediction can be wrong for the days ahead when we actually get to tomorrow or the next day :)
It is also a little random in that it won't change at a set time every day/night.
Day time changes come into effect between 7am and midday. Night time weather comes into effect after 8pm, but before midnight.
Included in the resource is weather report window, activated by hitting F5, but that key is defineable in an optional.xml config file, if you unzip the file into a folder.
Additionally, the resource has export functions so that you can send weather descriptions (or IDs) for the days ahead to other resources. I can think of one or two examples where you might want to do that, but I'm not going to give away ideas :)
Note: it only uses one timer at any time, but is set 3 times over the course of a 24 minute day, for the midnight update, daytime update, and evening update.
Second note: I noticed while testing this that the client time seems to slowly go out of sync compared to the server time. because of this, I've added a setTime(getTime()) at the point of each update, in order to keep the server/client times in sync a bit better.
Comments welcome, either here or in the forum post here, http://forum.mtasa.com/viewtopic.php?f=91&t=23389
Please report bugs, or suggestions for improvements!...
(more)
I've noticed that most weather scripts seem to be a bit basic in that they just randomly change the weather at a fixed time. Sometimes they go one step further and change it at a random time. What this resource does is attempt to mimic weather patterns by setting today's weather but also pre-defining potential weather for 2 days ahead, for both the day and night weather.
When the weather updates each day it's based on these pre-defined "predictions". As with real weather, it's not 100% accurate - sometimes the weather prediction can be wrong for the days ahead when we actually get to tomorrow or the next day :)
It is also a little random in that it won't change at a set time every day/night.
Day time changes come into effect between 7am and midday. Night time weather comes into effect after 8pm, but before midnight.
Included in the resource is weather report window, activated by hitting F5, but that key is defineable in an optional.xml config file, if you unzip the file into a folder.
Additionally, the resource has export functions so that you can send weather descriptions (or IDs) for the days ahead to other resources. I can think of one or two examples where you might want to do that, but I'm not going to give away ideas :)
Note: it only uses one timer at any time, but is set 3 times over the course of a 24 minute day, for the midnight update, daytime update, and evening update.
Second note: I noticed while testing this that the client time seems to slowly go out of sync compared to the server time. because of this, I've added a setTime(getTime()) at the point of each update, in order to keep the server/client times in sync a bit better.
Comments welcome, either here or in the forum post here, http://forum.mtasa.com/viewtopic.php?f=91&t=23389
Please report bugs, or suggestions for improvements!...
(more)
Version history
Version | Publish Date | Changes | |
---|---|---|---|
1.0.2 | 2013-11-09 20:50:01 | Long overdue update to replace deprecated functions that no longer worked in MTA releases. | Download |
1.0.1 | 2008-08-11 00:32:59 | version 1.0.1 bug fix: pressing the report key would activate it on ALL clients, not just the person who pressed the trigger key. |
Download |
1.0.0 | 2008-08-09 14:32:32 | First public release | Download |