[ADMN/MECH] TweakedCycle v1.1 - weather- and time-control! (multi-world!, permissions!) [1060]

Discussion in 'Inactive/Unsupported Plugins' started by TZer0, Mar 21, 2011.

  1. Offline

    TZer0

    Support for this plugin has been discontinued. If you wish to take over, please contact me.

    TweakedCycle

    PROJECT IS MOVING:
    Bukkitdev

    Downloads, v1.1, tested against 953

    Download (Dropbox)
    Download (Github)
    Source (Github)

    Supported plugins (not a requirement)

    Features

    This plugin sets one of five modes for a world (of your choice, obviously) - normal, day and night, dusk, dawn or you can create your own schedule! Normal doesn't affect the time, day resets the time to just before 14:00 every now and then, while night does the same with 02:00 and dusk and dawn.. well, you get the idea. You'll be also able to create your own cycle.
    Uses:
    • Weather-control! (see how to create a schedule)
    • Sync to real-time time!
    • Make your own cycle! (see how to create a schedule)
    • Creative-servers where you always want it to be day!
    • Survival-servers (or worlds on survival servers, for instance: questing) where you want it to be night all the time and have monsters pop up, or make the surface more of a "safe-zone" by having day all the time.
    • Keep the nether dark till we get the proper red fog (better than nothing ;))! Not needed anymore! Good job, Bukkit-team!
    Permission-nodes
    Command reference (requires op or permissions)
    Show Spoiler
    All commands start with /tc or /tweakedcycle - run without a parameter to get help ingame, () denote aliases
    • (l)ist - show available worlds (defaults to i=0 if called without the parameter)
    • (r)eload - reloads worlds
    • (s)et worldname mode - sets a mode, either normal/0, day/1, night/2, dusk/3, dawn/4, real/5 OR your own schedule name, you may use + as space in the worldname. Worldname can be multiple worlds separated by spaces, don't use quotes!
    • Cycle-creation:
      • (l)ist(s)chedules [#] - lists avilable schedules
      • (d)elete(s)chedule name - deletes a schedule
      • (n)ew(s)chedule name sched - creates a new schedule (read how to create a schedule)
      • (s)ched(r)es [#] - modifies time-resolution or shows the current one (default 15)
      • (b)road(c)ast - modifies whether the server broadcasts impending day-changes (approx. 15, 30 and 60 secs before the actual change happens)


    How to create a schedule
    Show Spoiler
    The schedule-formating is as follows:
    timeofday:length(r),timeofday:length(r)....
    timeofday is either 1,2,3,4 - day - 1, night- 2, dusk - 3, dawn - 4, you may use either words or numbers to describe time of day.
    Length is the number of schedule-ticks you want the cycle to last. If you set it to 2, it'll last two cycles, if you don't provide any number, it'll last 1 cycle, if you provide 4r, then the time of day will be reset to timeofday per schedule-tick.

    Examples:
    2:2r,1:2 - will give two night-ticks where the position of the moon is reset per tick and then two day-ticks where the sun isn't reset.
    1,2:2,3:3,4:4r - will give one day-tick, two night-ticks, 3 dusk-ticks and 4 resetting dawn-ticks.

    Weather:
    add "-[modes]" to timeofday. Available modes are s/d, t/c. s = storm, d = drought, t = thunder, c = calm. Remember: you can't have thunder without storm ;)
    Weather is relative, meaning if you do -st and then nothing, you'll have st for the next timeofday as well.

    Example usage:
    /tc ns myschedule 1-st:2,3:3,4-sc:5,2-t - this will give two ticks of day and thunderstorm, 3 ticks of dusk with the thunderstorm still going on and then 5 ticks of of rain and dawn and the at last, a tick of night with thunderstorm (inherited from the phase before).

    Fun things you can try:
    Create a raveparty!
    First: /tc sr 1
    Then: /tc ns rave 1,2,3,4
    Finally: /tc s world rave


    Changelog
    • v1.1
      • Individual schedule-resolutions
      • Real-mode (syncs to local time) + shifttime so that you can change time-zones.
      • Fixed having to reload this plugin after starting or reloading the server.
    • v1.0.2
      • Redstone and fluid-fix (thanks to @maveok who was kind enough to point out my mistake :) ) - please send me a message if this doesn't work.
    • v1.0.1
      • Fixed spaces and pluses in names
    Previous changes (open)

    • v1.0
      • Improved reliability
      • Fixed weird message-spam
      • Fixed "Using an invalid schedule-string may cause an exception."
    • v0.4.1
      • Removed empty weather-change messages (" in 15 seconds")
    • v0.4
      • Weather-control!
    • v0.3.2
      • + as space in worldname
    • v0.3.1
      • Added some nice utility to newschedule.
    • v0.3
      • Create your own cycle!
    • v0.2
      • Permissions-support.
    • v0.1:
      • Plugin released.


    May require testing
    • Doesn't work with skylands in multiverse.
    Planned features/todo
    • [High] Snow once it gets supported by the API.
    • Add your suggestion.
     
    Flamers and Marijn100 like this.
  2. Offline

    LSky

    I used this until recently. but the fact that it ruins redstone circuitry is just too much of an issue =(
     
  3. Offline

    TZer0

    Don't blame me.. blame world.setFullTime(#) :(

    Oh well, hopefully we'll get around that at some point as well.
     
  4. Offline

    alywells

    I would like my world to have a full day, and when the sun starts setting, reset the sun to dawn.
    Is that possible?
     
  5. Offline

    TZer0

    Here you go:
    Code:
    /tc sr 60
    /tc ns name 4:9
    /tc s world name
    Enjoy (what it does is to reset the time to dawn every 9 mins - tell me if the sun goes too far or not far enough)
     
  6. Offline

    alywells

    Thanks much! :D
     
  7. Offline

    TheGurw

    I'm testing it without plugins for creating worlds at the moment, and currently only have that world running. It seems to not recognize the space between Elm and Creek (not that I'm surprised, this seems to be a common issue with multiple-word commands:rolleyes:). Maybe a workaround would be to have a command to select the world you want all following TC commands to work in? At least until you set a different world, obviously. Or....would it support quotation marks maybe? I haven't tried "Elm Creek" yet, just Elm Creek. I'll try it in a bit. Working on fixing WorldGuard configuration at the moment-I seem to have broken something:oops:.
     
  8. Offline

    TZer0

    v0.3.2

    Right'o, you can use + as space in worldname. Enjoy.
     
  9. Offline

    TheGurw

    Hooray! You make an awesome plugin dev. I'd like to see more like you. You stick to a few small things and keep making them awesome. Another +3[diamond] and a [cake] to you!
     
  10. Offline

    Wayde Ultima

    I can't get this to work in 733. Is this a known issue or user-error?
     
  11. Offline

    TZer0

    Seems like user error. Tested against 733 and 735, worked on both builds.

    Remember: sometimes commands from other plugins get priority (no idea how that actually works). For instance: I can't access /tc on a server I'm maintaining since that refers to towny's "townchat".

    If you want to, I can come in on your server and see what's wrong - just pm me if you'd like me to take a look.

    Also, try the raveparty - it should generate some clear visual results.


    Code:
    /tc sr 1
    /tc ns rave 1,2,3,4
    /tc s world rave
     
  12. Offline

    Wayde Ultima

    I had the syntax wrong. My bad. Thanks for the help, though.

    Also,
    Highly anticipating this. ^^ :D
     
  13. Offline

    TZer0

    And it is up and running.

    Have fun!
     
    Wayde Ultima likes this.
  14. Offline

    alywells

    On the 4:9 schedule, redstone circuits work and liquids flow properly.
    It seems the perpetual "noon" with the built-in day schedule is what breaks those things.
     
  15. Offline

    TZer0

    Interesting.

    Adding to todo: investigate effects on redstone.
     
  16. Offline

    Azukay

    Got this just before, never seen it so far. I've only been using the updated version since today though. I'm running bukkit #733 and this plugin v0.4. The schedule I'm using is "mode:day" and "/tc sr 60".
    Code:
    2011-04-29 16:28:01 [SEVERE] java.util.ConcurrentModificationException
    2011-04-29 16:28:01 [SEVERE]     at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
    2011-04-29 16:28:01 [SEVERE]     at java.util.AbstractList$Itr.next(Unknown Source)
    2011-04-29 16:28:01 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:532)
    2011-04-29 16:28:01 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.setFullTime(CraftWorld.java:431)
    2011-04-29 16:28:01 [SEVERE]     at tzer0.TweakedCycle.TweakedCycle$Schedule.setTime(TweakedCycle.java:399)
    2011-04-29 16:28:01 [SEVERE]     at tzer0.TweakedCycle.TweakedCycle$Schedule.run(TweakedCycle.java:341)
    2011-04-29 16:28:01 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-04-29 16:28:01 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    
    Something else I noticed is that I regularly get "in 0 seconds!" in yellow (same as /tc colour) every 1-2mins.

    I hope this helps.
     
  17. Offline

    TZer0

    Whoa. Straaaange error. I'll experiment a bit to see if I can recreate this, as that is a __strange__ error. Are you sure you're not running something else which modifies time?

    Also, I'll fix the "in 0 seconds"-thing as well, but before I do so: just do "/tc bc"
     
  18. Offline

    Azukay

    As far as I can see I have nothing else that modifies time. Only a couple plugins that "look" at the time. I haven't noticed the error since my last post. Updated to Bukkit recommended #739 just then, maybe that will fix it?
     
  19. Offline

    TZer0

    Which plugin is it? I'll look into it.

    Edit: try v0.4.1 for those "in 0 seconds"-messages
     
  20. Offline

    Azukay

    v0.4.1 seems to have fixed the 0sec issue. Also updated to bukkit #740 to fix the block lag lol.
    Other plugins that probably use time elements: MonsterHunt, Vegetation. So far I have not been able to reproduce that [severe] error. It could just be some random rare chance type of things.
     
  21. Offline

    psortland

    This is by far one of the best bukkit plugins. Thank you much!
     
  22. Offline

    TZer0

    Thank you!

    Though, I must admit - it still needs some polish.
     
  23. Offline

    BigBenM

    Can't seem to find weather control ... !?
     
  24. Offline

    Azukay

    Check the info at the top, under How to create :)

    Example usage:
    /tc ns myschedule 1-st:2,3:3,4-sc:5,2-t - this will give two ticks of day and thunderstorm, 3 ticks of dusk with the thunderstorm still going on and then 5 ticks of of rain and dawn and the at last, a tick of night with thunderstorm (inherited from the phase before).
     
  25. Offline

    Dingo42

    Somehow i cant get a right cycle working. My goal is to have like 30min day and then 10min night and repeat that. nothing else
    But when i set the time resolution to 600 (600secs = 10mins) and create a shedule with like 1:3,2:1 all ill get is the default day/night ratio, just like there is no plugin.
    When i set the resolution to 30 secs and the shedule i.e. with 1:20,2:5 or somthing like that, it wont work neither :(
    when i keep the the resolution and the ticks pretty low it works. but who needs day/night changes multiple times per minute?...

    can someone tell me what am i doing wrong? :) thanks
     
  26. Offline

    TZer0

    I believe you forgot the reset-option.

    Use this for now:
    Code:
    /tc sr 60
    /tc ns myschedule 1:30r,2:10r
    /tc s world myschedule
    Doing "/tc sr 600" and then "/tc ns 1:3r,2:1r" won't help much as the time will only be reset every 600th sec. I'll fix this at some point, but use the commands above for now.
     
  27. Offline

    Dingo42

    Thank you for your awesome-fast reply TZer0 :D saved my day(and night)!
     
  28. Offline

    Zango

    How would I make it so I had day forever and no rain/snow/thunder?

    (Creative server)

    Thanks.
     
  29. Offline

    TZer0

    Try
    Code:
    /tc ns myschedule 1-st
    /tc s world myschedule
     
  30. Offline

    Zango

    That gave me a thunderstorm every 15 seconds.
     
  31. Offline

    TZer0

    Aaaah. oops. Sorry about that.
    Code:
    /tc ns myschedule 1-cd
    
    /tc s world myschedule
    Also, do /tc bc due to some bugged messages which will be cleaned up.
     

Share This Page