[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

    mephistofff

    Thank you very much! But is this possible without the hard and suddenly changes?
     
  3. Offline

    TZer0

    Not really, there's no way to affect the time in a gradual way (in more technical terms: there's no efficient way to affect the delta-time for in-game-time without seriously affecting performance and stability - you can only set the time to a certain point of day, not change the scaling). The best you can do is to change the schedule to 1:19r,4:1r,2:7r,3:1r

    This will add dusk and dawn between the days and nights.
     
  4. Offline

    quickclay

    Can you shorter a cycle, like if I wanted night to only be 1/4 as long as the normal cycle? (ie; can I make the number of ticks .25)
     
  5. Offline

    TZer0

    Read How to create a schedule
     
  6. Offline

    Belmat

    The mod looks good!
    I've been looking for a way to change my cycle so it's a 20 min day and 7 min night, and this would seem to do it. But could you elaborate on just how much effect it would have on redstone wiring? People use a lot of it on my server (especially with pistons having just come out).
     
  7. Offline

    TZer0

    I believe sometimes a critical jolt of redstone-power might be undone or delayed etc. Because time suddenly flows backwards. So, I'm not sure if installing the mod on a server where people rely a lot on redstone is the best idea: sorry.

    Also, before you ask: there's no way around this issue. If there was, I would've used it ;)
     
  8. Offline

    Snickler

    lol I have a '+' in my world name, and now I can't apply the schedule.
     
  9. Offline

    TZer0

    Ahaha, oh the irony. I'll make a fix for that.

    Fixed!

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

    Snickler

    lol, thank you!
     
  11. Offline

    cisco211

    This Plugin is really awesome but it does not work if you configure a 24 hours cycle with a resolution of 60.

    For example i made 24 hours cycle which should work perfect if you start it at midnight:
    Code:
    rt0: 2:60r,2:60r,2:60r,2:60r,4:60r,4:60r,4:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,1:60r,3:60r,3:60r,3:60r,2:60r,2:60r
    (Resolution=60)

    I added this in the config.yaml file and did a /restart, but after plugin reload, your plugin did not reload :( what im doing wrong?

    BTW: the reason for making this with resolution 60 and ...type:60r... is simple, i want to keep sun/moon fixed at one place and i have rt0 to rt23 which makes easy to set the realtime shedule on each full hour. this means i dont need to wait for a specific hour, i can set it on each hour.

    EDIT: OK i found the solution, the shedule string just was to long.

    To give my post a sense...

    If you want a real 24 hour cycle set resolution to 60 and add these shedules:
    Code:
    rt0: 2:240r,4:180r,1:720r,3:180r,2:120r
    rt1: 2:180r,4:180r,1:720r,3:180r,2:180r
    rt2: 2:120r,4:180r,1:720r,3:180r,2:240r
    rt3: 2:60r,4:180r,1:720r,3:180r,2:300r
    rt4: 4:180r,1:720r,3:180r,2:360r
    rt7: 1:720r,3:180r,2:360r,4:180r
    rt8: 1:660r,3:180r,2:360r,4:180r,1:60r
    rt9: 1:600r,3:180r,2:360r,4:180r,1:120r
    rt10: 1:540r,3:180r,2:360r,4:180r,1:180r
    rt11: 1:480r,3:180r,2:360r,4:180r,1:240r
    rt12: 1:420r,3:180r,2:360r,4:180r,1:300r
    rt13: 1:360r,3:180r,2:360r,4:180r,1:360r
    rt14: 1:300r,3:180r,2:360r,4:180r,1:420r
    rt15: 1:240r,3:180r,2:360r,4:180r,1:480r
    rt16: 1:180r,3:180r,2:360r,4:180r,1:540r
    rt17: 1:120r,3:180r,2:360r,4:180r,1:600r
    rt18: 1:60r,3:180r,2:360r,4:180r,1:660r
    rt19: 3:180r,2:360r,4:180r,1:720r
    rt20: 3:120r,2:360r,4:180r,1:720r,3:60r
    rt21: 3:60r,2:360r,4:180r,1:720r,3:120r
    rt22: 2:360r,4:180r,1:720r,3:180r
    rt23: 2:300r,4:180r,1:720r,3:180r,2:60r
    
    Usage:
    Use any of these shedules in a full hour, for example if you have it 15 o'clock, do

    Code:
    /tc s WORLDNAME rt15
    I hope this is useful :)
     
  12. Offline

    TZer0

    Good you made it work. Anyways, I'm going to add some better compatibility when it comes to giving someone your config. Probably after the next update, schedule-resolutions will be schedule-specific, not one set for the server (or I'll add another - even better way of doing things) :)
     
  13. Offline

    cisco211

  14. I really like this add-on and it's very powerfull but I'm having a lot of difficulties of setting up my own shedule.
    I tried and opt for 30 min day, 8 min dusk, 14 min night and 8 min dawn. Yet my cycle only goes for a decent 10 minutes total and stays Dusk / Night. This is my schedule:
    TurokCycle - day:30;dusk:8;night:14;8dawn
     
  15. Offline

    TZer0

    Comma separates, not semi-colon.

    Try this: /tc ns TurokCycle 1:30r,3:8,2:14r,4:8

    Remember: the r's are important for the first and third phase.
     
  16. Thanks Tzero! Working like a charm. Have my diamond babies![diamond]
     
  17. Offline

    TZer0

    Np!

    Glad it works ;)
     
  18. Offline

    foxfearsome

    THANK YOU SO MUCH
    I have been searching for a mod with these commands
    this is great, thank you
     
  19. Why isn't this working in the Skylands :( ? I have used multiverse to generate the world, do i have to change something in the plugin.yml?
    Code:
    shiftTime: 0
    broadcast: true
    modes:
        myschedule: 1:10r,2:10r,3:4r,4:4r
    resolution:
        default: 15
        skyland: 60
        oddity: 15
    worlds:
        Skyland: 1:10r,2:10r,3:4r,4:4r
        Oddity: '0'
    Is this correct, i dont mind about the Oddity world, I just want that to cycle normally, but why isnt the Skyland working ? :/

    Would be awesome if you could help :D Thanks!
     
  20. Offline

    TZer0

    Skylands in multiverse has some interesting properties which will in most case result in TC not working there.

    Sorry, I don't think I'll be able to find a workaround for this.
     
  21. Ok, nvm, Thanks alot for helping, :D [cake]
     
  22. Offline

    matze134

    what means shift time in the config file?
    thx for help :D
     
  23. Offline

    TZer0

    Bleh, you shouldn't fool around in the config, you daredevil :p

    shifttime is used for shifting the time in hours backwards or forwards when using real-mode.
     
  24. Offline

    matze134

    ok ty how long is the day in the real time mode? is it 12 hours day and 12 hours night or is it more complicated?^^
     
  25. Offline

    TZer0

    It syncs 1:1 with the local real time. Go try it and check /time
     
  26. Offline

    freakyfranck

    Hi! Your plugin seems to be giving a lot of controls! I was wondering if it was possible to program weather/time schedule without entering commands like from a .yml ? Everytime you restart server you have to re-enter you schedule?

    Something simple like this would be awsome:
    worlds:

    world:
    time cycle:
    weather cycle:

    world_neither:
    time cycle:
    weather cycle:
     
  27. Offline

    Azander137

    Man, I have no idea what I'm doing with this, lol. Is there any quick way to set it up so the whole day/night cycles lasts 2 hours?
     
  28. Offline

    AlphaTech1

    I'm really looking foward to this because the rain is causing a LOAD of lag -.- but i have no idea how to install D:
     

Share This Page