[MISC] WeatherSync v2.0_1 - The real-world weather - Now with multiworld and more! [1337-1597]

Discussion in 'Inactive/Unsupported Plugins' started by cppchriscpp, Apr 22, 2011.

  1. Offline

    cppchriscpp

    Moving to BukkitDev! Click here!

    WeatherSync - The real-world weather in Minecraft
    Version: 2.0_1

    Important note for those upgrading from 1.2: Your old configuration files will not work as-is. You'll need to copy over the new config file, and move over any old settings that still apply.

    This plugin keeps the weather in the worlds on your server synchronized with the real-world weather in a location you specify. It does this by connecting to weather underground every few minutes (configurable; 5 minutes by default) and parsing the weather. This means if it's raining outside, it will be raining in minecraft. This is also true of thunderstorms.

    You will want to configure it before you try to use it; otherwise it will synchronize your default world (named "world") with the weather in San Francisco, California. (Used for testing.)

    This should work for any place you can get an RSS feed with weather in it from WeatherUnderground. See the directions below for how to find this, and if it does not work, feel free to ask for help. Please be sure to provide the URL you are using!

    RSS feeds are now the only way to synchronize with this plugin. Old location information will be ignored by the plugin as of version 1.3.

    You can now view the forecast with the /forecast command, which is available to all users. It will also show the current weather. This command can be disabled, if desired.

    As a warning, I have not been able to test this to the level I test most things due to the nature of it. Please let me know if/when you have issues.

    Download (Source code is in there too!)

    Future Features:
    • Heavy/severe thunderstorms? (Sorry guys, there's no chance I'm going to have time for this. Maybe another plugin can hook into thunderstorms and make this happen, if it doesn't already exist.)
    • unit selection (determined by rss feed; see the ?units=metric/english at the end? change that)
    • None; I implemented everything else here! :)
    Time synchronization:

    Some people in this thread expressed interest in having the real world time on their servers alongside this. I was going to code this myself, however there is something out there already that can do this. Check out RealTime by Mechestrial for this!

    FINDING THE RSS FEED

    How to find your RSS feed (open)
    This plugin now asks you to provide the URL to an RSS feed to get the weather. The old method will not work past version 1.2. The method to get the URL to your RSS feed is as follows:

    Navigate to http://wunderground.com, and find your location.

    Around the height of the title of the page on the far right is an RSS icon. You need to get the URL of this -- right click it and copy the link address. It should look like:
    Code:
    http://rss.wunderground.com/auto/rss_full/global/somestuff.xml?units=english
    Take this entire thing, and put it in the worlds section of your config file.

    If you have problems finding this, just ask. My explanation here is not that good.


    FOR ALL ISSUES AND BUG REPORTS

    Due to how this thread has been going, I am going to require all reports to include this information, or your bug report may be ignored.
    • An extremely detailed description of the problem.
    • That you have turned debug mode on in the config file, and then caused the problem to happen-- this will provide me with helpful insights into what is going wrong.
    • Your configuration file
    • The major error that occurred
    • The rest of the server.log surrounding that error. If you aren't sure, just give me the whole thing.
    • Any errors a client might have seen
    • Anything you think might have gone wrong -- your insights often lead me to the problem quickly; even if you are wrong.
    • Your build of craftbukkit
    • Any changes in your setup that preceeded the problems (installed plugins, mainly)
    • Your system information (Some of this is in /debug info)
      • (Ideally, just include all output from these two commands.)
      • Operating system
      • Java version
      • Any wrapper software you might be using
      • A list of plugins you use (As reported by /plugins or "plugins" at the server command line)
    • Any other details that could be relevant.
    Yeah, I know it's a lot and it's kind of a pain in the rear. Some of it won't be useful in some situations, but I only get a very little time to work on this now, and I really don't like having to put that time to waste just because I don't have all the information I could about what went wrong.

    Changelog:

    Version 2.0_1
    • Fixed a dumb mistake causing some users to get the forecast for the last day available instead of the first.
    Version 2.0
    • Multiworld support!!!!111 (Sorry; had to do it.)
    • Re-enabled messages to users on the weather changing
    • Redid the configuration file for multiworld and some other stuff
    • Customization options for messages; you can now set what the plugin sends to users!
    Version 1.3
    • Never existed; I jumped straight to 2.0. Not sure what I was on when I put this version here. >_>
    Version 1.2
    • Fixed (hopefully) the bug with weather not updating once and for all. The weather will be FORCIBLY updated every time the weather is checked.
      • Note that client desynchronization issues may still occur. If you disconnect and reconnect and the weather is correct again, there is nothing I can do to fix this, sorry.
    • Changed the default method of specifying location to an RSS feed. Let's see how this can break things D:
    • Accidentally removed the show-forecast option which shows when the weather changes in chat. Did anyone actually use this? Redoing it for multiworld is going to be a massive pain if people want it.
    • Fixed broken forecasts
    Version 1.1_3
    • Fixed debug mode -- anyone who had problems please try again and report your issues again. Sorry for the inconvenience; it was my fault.
    Version 1.1_2

    • Fixed the weather randomly changing bug. Really this time! (I think)
    Version 1.1_1

    • Program now accepts blank configuration options correctly
      • (This fixes the null pointer issues.)
    Version 1.1

    • Weather forecasting (w/ forecast command)
    • Ability to show forecast on join
    • Debug mode that will display what the weather is on start and when it changes (new config option -- use this to report bugs!)
    • More failure-checking in the forecast changes.
    • Support for weather stations
    • Fixed threading/recursion..
    • Clarified config files.
    • Fixed various bugs
      • Weather duration not being set (cause of random weather at times)
      • Improper string conversion (That boolean bug that someone had on page 4)
      • (More that have been forgotten since being fixed..)
    Version 1.0

    • Initial release
     
    JonasD, zhuowei, Stoepsel and 5 others like this.
  2. Offline

    netslug

    Very cool concept!
     
    arpey and Nqoba like this.
  3. Offline

    Arcwolf

    wow... thats cool... too bad I live in a drought area.. :( guess I'm setting this to like the amazon rain forest or something lol ... doesnt rain here, but by god it will rain in minecraft!
     
  4. Offline

    chernobyl360

    omg this crazy! im definitely adding this!
     
  5. Offline

    Ozonepheonix

    Wondering if this will work for Canada, where i live And my server is based, im asking because the testing area was in the US
     
  6. Offline

    cppchriscpp

    Yes, US Canada and UK are supported. I use weatherunderground as a source, so anyplace that they support is supported by this.

    Glad people are liking it.
     
  7. Offline

    Aramillio

    can you force it to snow in non-snowy biomes. cause that would rock
     
  8. Offline

    Ozonepheonix

    Great, will add this when craftbukkit updates!
     
  9. Offline

    Aramillio

    also, you should add a real-world time mapping to it so i dont have to ^_^
     
  10. Offline

    cppchriscpp

    No way to do that currently, but I did look into it. My code does have a special scenario set aside for snow. If this changes, It'll support that, but for now rain/thunder/clear is gonna have to cut it.

    Oddly enough, this idea did occur to me. I might do it if anyone else wants it. I've already got the program threaded to do the weather stuff; I could have this thread or perhaps another keep the main server on track. Let me know if you're interested in this functionality; it'd take a little time but it definitely fits with the nature of this plugin.
    To the rest of you guys, thanks for the positive commentary; it's always welcome.
     
  11. Offline

    Aramillio

    Well like i said, if you dont, i will ^_^ but i dont really want to >_> i was actually going to start work on this very same plugin this weekend :)
     
  12. Offline

    Ozonepheonix

    Any chance of adding moar types of weather like hail that damages you .5 hearts every five seconds or raining fish?

    Edit-maybe you could team up with another plugin developer to acheive it?
     
  13. Offline

    bradgillap

    This is awesome! I can't wait to add this to my server after stable release.
     
  14. Offline

    Tmidog69

    Very Cool Plugin, Cant wait to see other plugins from you.
     
  15. Offline

    LtTy12

    One of my new favorite plugins.
     
  16. Offline

    chernobyl360

    anyway to Broadcast the days weather? for example

    Todays Weather -Chance of Snow /heavy continous rain/heavy lightning
    or
    Weather Warning Forecast- Seek Shelter in a stone home! Heavy Lightning is seen moving into your area Seek Shelter!
     
  17. Offline

    blindsarcasm

    I didn't copy over the source file.

    I live in Sydney

    12:13:37 [SEVERE] null loading WeatherSync v1.0 (Is it up to date?)
    java.lang.NullPointerException
    at com.bukkit.cppchriscpp.WeatherSync.WeatherSync.onEnable(WeatherSync.java:70)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:584)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

    Ill try the default

    Retested: Only America Works, tried asian countries as well.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  18. Offline

    cppchriscpp

    Theoretically but it would be a ton of code and add a ton of lag. Annoy Notch/Mojang about adding more weather types to the actual game and it would be easy. Hail would be kind of weird, since it would just look like rain/snow. As for raining fish, that would just be weird, and possibly inefficient. A bit weird too; I think this is turning into a realistic plugin, and raining fish doesn't happen much. It also isn't supported by the source I'm using for weather.
    I could do that; I'll consider it for a feature when I have a bit of time to devote to this. It'll be a toggleable option, naturally. That also gave me another idea; I could possibly add severe storms which would involve heavy lightning, and could have a chance of lightning striking near the player or on him every few seconds.

    You don't need the source; you need the build of craftbukkit stated in the topic. It won't work with anything before 709, I believe. (It might work with 707 or so, but this won't be supported. This doesn't work with any of the RBs as of yet.)


    US, EU, CA only. This was stated in an earlier post, but I'll add it to the first post to clarify more.
     
  19. Offline

    blindsarcasm

    I read that, sorry if I didn't explain more clearly, I was trying to confirm that it does not work for any other countries, as before you stated that it may work with other countries.
     
  20. Offline

    cppchriscpp

    Oh, okay. Thanks then.
     
  21. Offline

    MrKlassic

    will places outside canada usa and europe work?
     
  22. Offline

    PatrickFreed

    This is brilliant.
    +1 to the weather broadcast
     
  23. Offline

    bastion

    How do I sync more than one world.
     
  24. Offline

    cppchriscpp

    You don't yet. I'll add that to the list of features for the future.
     
    blindsarcasm likes this.
  25. Offline

    grizzlymann

    Anyone have a good location to set this to? Weather is a little too boring here.
     
  26. Offline

    ichingpow

    Haha I thought of this yesterday and combine this with RealTime would be awesome.
     
  27. Offline

    Icalasari

    Damn, any chance of this being made into a single player version?

    Bet not, but still, would be awesome
     
  28. Offline

    oliverw92

    Yay you did it :D (Was talking to on IRC yesterday about this). Now all you need to do is
     
  29. Offline

    overlordror

    We use RealTime on our server and we're going to implement this as well. Should be neat, considering all the people who play on the server live roughly in the same time zone.
     
  30. Offline

    Adondriel

    Lol weather underground isn't the best to use for weather, as my science teacher points out to us. It has many bad mistakes on it, and it doesn't go through a real person before they put it on the internet, almost anything else is better.
     

Share This Page