[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

    sefiam

    Damn cant wait till they support Australia, I guess in the meentime Ill set it to a random location and not tell anyone :p

    PS: What happens when a cyclone hits where my weather is coming from? [creeper][creeper][creeper]
     
  3. Offline

    TerraPlay

    Pleeeeease add customizable forecast-messages, my members on our german server are confused :/ This would make it the best plugin ever and i don't think it's that difficult to change it! ;)
     
  4. Offline

    cppchriscpp

    You'd think that, wouldn't you? Unfortunately I can't find an easy way to get the entire thing to translate. All I could get is to change current conditions into german, and even that was a tad hackish. If you want that version, change the rss.wunderground.com to deutsch.wunderground.com in your URL. Beyond that there is not much I can do; there is no easy translation method. I think your best option is just going to be turning off the actual forecasting part of the plugin, and just letting the weather synchronize silently.

    Sorry that I couldn't give you a better answer.

    Edit: customizable how?
     
  5. Offline

    TerraPlay

    Well. I just want customizable messages, so I could change "Chance of rain" to anything i want, even into something that doesn't make any sense. And if the chance says "Low", all I want is to have an option to change "Low" to something else. Let me explain it to you:

    There is a property file that could look like this:
    Code:
    #message formats for chances of rain
    chances_message=Chances of Rain
    low=Low
    high=High
    
    Then you grab the chance of rain from wunderground.com. I don't know what you get, but let's imagine it says "Low". After that you just check if the chance of rain you grabbed is "Low" and if this is true, you grab the message format "low" from the property file. Otherwise, if it's "High" you take the message format "high" from the file.

    So I can translate parts of it on my own. Hope you understand what I mean.
     
  6. Offline

    cppchriscpp

    Well I understand what you mean, but it's not that simple. The rss simply gives me a forecast. It can contain anything, and it does give me anything. The stuff in it varies by location, and is not nearly as consistent as one might expect. As such, there's not really a good way to go about doing this. I'd say I could try piping it through the google translate API or something, but that's going away soon. That would also be a ton of extra work. I don't think I can help you much, sorry.
     
  7. Offline

    TerraPlay

    It's okay, anyway thanks =)!
     
  8. Offline

    Kostronor

    Hey, sadly, since c818 it does not update anymore, we are having sunshine the whole day and it rains so much:D
    I love this plugin, so please, would you consider checking this :)
     
  9. Offline

    cppchriscpp

    Just tested it with a thunderstorm and left it running until it ended. This was using the newest build (818) and the latest version of the plugin. It worked fine. Sorry, but your problem is elsewhere.
     
  10. Offline

    Kostronor

    damn it :D
    but thanks for testing
     
  11. Offline

    Tealk

    is possible to use Celsius?
     
  12. Offline

    cppchriscpp

    Yep, just change the ?units=something at the end of your RSS feed's URL to ?units=metric.

    Like it says in the first post ;)
     
  13. Offline

    Tealk

    i have a bu, on server join i become 2 messages
    [​IMG]
     
  14. Offline

    cppchriscpp

    That's weird; can anyone else recreate it?

    Please provide the information about your setup from the first post...
     
  15. Offline

    Tealk

    Code:
    # WeatherSync configuration file
    
    # How frequently to update the weather, in minutes.
    updatetime: 5
    
    # Which world to update the weather on, in multiworld setups.
    world: world
    
    # RSS File to get the weather from.
    # To get this, get your weather on http://wunderground.com, and
    # find the rss link for your location. It should be towards the top on
    # the right.
    # Note: The old format should still work, but is unsupported.
    rssfile: http://rss.wunderground.com/auto/rss_full/global/stations/10870.xml?units=metric
    
    # Whether to show the weather/forecast to users on join.
    # (Formatting of this may be possible in the future; request it if
    # you're interested!)
    forecast-on-join: true
    
    # Whether to show the forecast when weather changes.
    show-forecast: false
    
    # Whether to have debug mode on.
    # You'll want this off for most servers, but turn it on if you have problems and
    # it will give you extra information about what is going wrong.
    # Please turn this on if you have issues, and report any unusual output.
    debug: false
     
  16. Offline

    cppchriscpp

    From the first post.
     
  17. Offline

    sefiam

    Hey it seems to work for me in Australia now AWESOME!!!
    Epic plugin thanks [diamond][diamond][diamond]
     
  18. Offline

    4am

    I would like the automatic forecast in the chat back! Why would it be a problem for multiworld?
     
  19. Offline

    cppchriscpp

    Looking back, it won't be that hard. I'll see when I can make time to add this back, and additionally try for multiworld support. I'm finally getting used to working a full work day now, but I'm still pretty drained most days.
     
  20. Offline

    4am

    Yeah that's why my projects are all stalled before they get off the ground. That and administrating a server at the same time with no help (it's very small - still trying to work out an optimal setup) I get about 45 minutes a day to sit down with everything:eek:

    Thanks for all the work you put into this!
     
  21. Offline

    TelephoneKiosk

    Does this work for 860?
     
  22. Offline

    cppchriscpp

    As stated in the release notes for 860, it contains no breaking changes. So yes, this works with it.
     
  23. Offline

    EpicKris

    Would like customisable formatting for this plugin. Works great though, many thanks!
     
  24. Offline

    Thomas1907

    Hi i have a problem in this plugin in my server ,, i think.
    it doesnt rain everywhere in my server so thats weird, i want it to rain everywhere.
    I se this version on Bukkit 935 and it does work but doesnt rain everywhere... how to fix this
     
  25. Offline

    cppchriscpp

    Sorry, that's minecraft. If you've heard about biomes, you're seeing the effect of them. They make different weather in different areas. Some get rain, some get snow, and deserts get no weather at all. Nothing I can do to change that.
     
  26. Offline

    Thomas1907

    Ok, but the rain doesnt even move? can i change anywhere so that it rains everywhere
     
  27. Offline

    cppchriscpp

    No, the rain does not move -- it does not move in normal minecraft, and I have no way of making it move. No, there is nothing you can change to make it rain everywhere.

    This is a basic gameplay mechanic, and there is little I can do about it. Sorry.
     
  28. Offline

    Thomas1907

    No problem still thanks
     
  29. Offline

    Comrade Dmitri

    Looks damn cool. Testing it out now.
     
  30. Offline

    Cha0sPudd1ng

    Hi,

    I have real-world Weather installen on my server whit bukkit build 1000 an it works fine. :)
     
  31. Offline

    cppchriscpp

    Glad to hear it's working for you, and thanks for posting. It seems I forgot to update the title -- sorry about that. I appreciate your telling me.
     

Share This Page