WeatherNews
WeatherNews
All you want to know about weather.
WeatherNews is a small simple mod that shows weather information in chat. Every time the weather changes it will pronounce to what and how long and what next if possible.
Install
To install just put the jar in the plugins folder in your bukkit installation.
Configuration
Yes I've done it. There are two systems for now but only one of them should be used. First of all here is the default configuration. And the system understands newline or line breaks if you provide them correctly through Yaml.
worldwhitelist: false worlds: - world_sample - world_other showonlogin: true stepping: - 1: minute: 1 - 60: minute: 10 - 240: minute: 30 - 360: minute: 0 hour: 1 - 11520: minute: 0 hour: 0 day: 2 unprecise: true minimumpercentage: 0.1 maximumpercentage: 1.0 exponentialmod: 2.0 modulator: 79 maximumtime: 180000 variables: DAY: "day" DAY_PLURAL: "days" HOUR: "hour" HOUR_PLURAL: "hours" MINUTE: "minute" MINUTE_PLURAL: "minutes" AND: "and" SUN: "sun" RAIN: "rain" THUNDERSTORM: "thunderstorm" CLEAR: "${header}${today}${mainclear}${nextclear}" UNCLEAR: "${header}${today}${mainunclear}${nextunclear}" UNAVAILABLE: "${header}${RED}Weather unavailable." BLACKLISTED: "${header}${RED}Sorry I can't do this." header: "${GOLD}[WeatherNews] " today: | Today the day ${TIMEDAY}. nextunclear: | After that we have something different. I will notice you then. nextclear: "After that we have ${NEXT} (${ACCURACY}%)." mainclear: | We have ${NOW} for the next ${NEXTNICE}. mainunclear: | We have at least ${NOW} for the next ${NEXTNICE} (${ACCURACY}%).
Basic
As one can see there are a number of uppercase words. Uppercase signs that these variables are used by the internal system and have a special symbolic. The system allows you to use variables in strings. It's build up like this "${variablename}". All these variables lies under the "variables" section. Anything else is just Strings and YAML.
Presets
This is a small table over all preset variable names and their usage in the "variables" section.
Variable Name | Usage |
---|---|
DAY | Set display name of singular day |
DAY_PLURAL | Set display name of plural days |
HOUR | Set display name of singular hour |
HOUR_PLURAL | Set display name of plural hours |
MINUTE | Set display name of singular minute |
MINUTE_PLURAL | Set display name of plural minutes |
AND | Set display name of and |
SUN | Set display name of sun |
RAIN | Set display name of rain |
THUNDERSTORM | Set display name of thunderstorm |
CLEAR | Will be displayed if the system know which weather will be after the current (change) |
UNCLEAR | Will be displayed if the system doesn't know which weather will be after the current (change) |
BLACKLISTED | Will be displayed if this world is blacklisted or not whitelisted |
UNAVAILABLE | Will be displayed if this world doesn't provide weather information |
ACCURACY | Get replaced by fake accuracy as percentage from 0-100 without a % |
BLACK | Sets anything after it black |
DARK_BLUE | Sets anything after it dark blue |
DARK_GREEN | Sets anything after it dark green |
DARK_AQUA | Sets anything after it dark blue (aqua) |
DARK_RED | Sets anything after it dark red |
DARK_PURPLE | Sets anything after it dark purple |
GOLD | Sets anything after it gold |
GRAY | Sets anything after it gray |
DARK_GRAY | Sets anything after it dark gray |
BLUE | Sets anything after it blue |
GREEN | Sets anything after it green |
AQUA | Sets anything after it aqua |
RED | Sets anything after it red |
LIGHT_PURPLE | Sets anything after it light purple |
YELLOW | Sets anything after it yellow |
WHITE | Sets anything after it white |
Disable login message (as requested)
Use showonlogin with true and false to change if a login message should be shown.
Whitelist and blacklist support
worldwhitelist can be used to switch between whitelisting and blacklisting. worlds contains a list of blacklisted or whitelisted worlds.
Time stepping
Stepping allows time to be displayed in steps. This is useful if you wish to hide information from your players. The system will use the entry which is the least less than the current time to the next weather change in ingame Minecraft ticks. 24000 for example is 1 day. An entry consist of up to 3 entrys of minute, hour and day. Please note that there could be strange things happening if not all three are present. This isn't true if anything is made as in the default configuration. For the minute, hour and day entrys a zero means will not show and anything over 1 means divide thou x and multiply with x in integer (natural numbers).
Fake accuracy
First of all here is the formula used to calculate the accuracy and the meaning of the variables.
t %time left for weather change. accuracy=((maximumpercentage-minimumpercentage) * exp(-2*pi*(t/maximumtime)^exponentialmod) + minimumpercentage) * 100
Variable Name | Usage |
---|---|
maximumpercentage | The absolute maximum of accuracy at t=0 |
minimumpercentage | The absolute minimum of accuracy at t=maximumtime |
maximumtime | This should be somewhere at 180000 because this is the absolute maximum time period for a weather change |
exponentialmod | This controls the flank of the function should be 2 and bigger than 1 |
modulator | This sets the amount of possible randomization. Should always be a prime and not no big specially not bigger than maximumtime |
unprecise | Enables fake news |
Most of the time changing maximumpercentage and minimumpercentage is sufficient. All of this is try and error and for your comfort changing the config will work while running Craftbukkit.
Command
There is only one command "/wnews" to show the news any time you want it. Running this command at the console will broadcast weather news to all players even if there isn't weather available.
@sdijkman1
Yes it is but the purpose of this plugin is to show weather information not to change it. I think there is already a plugin for this.
Please update to 1.2.5! :)
Does it worki with 1.2?
Is it possible to create a maximum time limit for weather,
like it can only be raining or sunny for max. 20 hours
@genesis_aix
It's based on ingame world time "World.getFullTime()". The formula is: day = (World.getFulltime()+6000) / 24000 for integers.
Where is the {day} info retrieved from?
hey how about adding http://dev.bukkit.org/server-mods/weathersync/ into the weather news. So it will show what the real life weather will be.
@gameplayer2014
File uploads needs to be validated before you can download it page updates don't.
i downloaded the wrong version (Download Link up at top right). i was like wtf. but then i went to the side bar and downloaded the correct version. works great. for now.
@Liger_XT5
It was just a renamed class in bukkit.
@Liger_XT5
yeh i had to update to 1554 and i noticed that. This is the only plugin not working in the about 30 i have.
@cky2250
I suggest using commandbook.
I'm using CB 1550 and getting an error.
2011-12-04 11:34:35 [WARNING] Task of 'WeatherNews' generated an exception
java.lang.NoClassDefFoundError Could not initialize class com.namarius.weathernews.utils.ChatUtil
at com.namarius.weathernews.NewsRunner.run(NewsRunner.java:99)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:482)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
ONLY FEEDBACK: 'Add what world(s) are allowed to show this.'
Wow just what i was looking for! Though I would still like to be able to set the weather in 1 world to always sunny, but i do not expect for this plugin to have that. If anyone knows a weather changing plugin that would be nice.
Thanks for the option for login messages! Enjoying the use of the plugin. Has really cut down on players asking to have the weather changed just because it started raining and no one knew when it would end.
I will add it.
i posted a similar comment to another plugin that never implemented it. any chance yo have a configurable chance for the forecast to be wrong? even the best weather forecasts arent perfect you know.
I like the plugin, but any way to disable the message coming up when someone joins? It interferes with the current MOTD I have on there.
@ace1177
It is based on world time. If you change the time through the time command you change the world time and so the days.
This seems interesting and i'lll add it in my next update and see how it goes.
Works great though how does it get what day it is?