mrgeneralq / sleep-most

Control the amount of percentage of sleeping players required to make it day. 100K+ downloads on spigot!
https://www.spigotmc.org/resources/sleep-most-1-14-4-configurable-messages-and-percentage.60623/
28 stars 11 forks source link

Dynamic Sky Light & Time of Day Length #182

Open iomatix opened 7 months ago

iomatix commented 7 months ago

Day/Night Cycle Length

Is it possible to modify this plugin to support settings for Day and Night length, something along these lines?

Sky Light parameter for map's compatibility

Also would be great if weather and time of a day/night cycle would affect server's side sky_lighting for integration with map's plugins like BlueMap

Screen: image

iomatix commented 7 months ago

Additionally, there will be a need for configuration of the animation length, allowing it to adapt to the new day/night lengths.

mrgeneralq commented 7 months ago

Hello @iomatix

This is a nice suggestion. But this can also be very challenging. How would sleep most need to behave when the night is getting skipped?

I will wait for your feedback and we can discuss if this will be picked up in a future update.

Kind regards

Quinten

iomatix commented 7 months ago

I'll describe how I've set it up on my server. I needed three plugins to achieve the desired effect, including plugin with this specific configuration.

Sleep-Most:

  world:
    enabled: true
    calculation-method: percentage
    percentage-required: 0.75
    players-required: 5
    mob-no-target: false
    use-exempt: true
    use-afk: true
    use-bossbar: true
    use-sound-night-skipped: true
    use-sound-storm-skipped: true
    use-title-night-skipped: true
    use-title-storm-skipped: true
    exempt-creative: false
    exempt-spectator: true
    prevent-sleep: false
    prevent-phantom: false
    nightcycle-animation: true
    storm-sleep: true
    skip-delay: 0
    heal: true
    feed: false
    skip-night-sound: ui.toast.challenge_complete
    skip-storm-sound: entity.wither.spawn
    reset-time-since-rest: false
    non-sleeping-clock-animation: false
    allow-kick: false
    disable-daylight-cycle-gamerule: false
    gsit-sleep: false
    insomnia-chance: 0.15
    phantom-reset-audience: sleepers
    non-sleeping-sound: true
    clock-animation: false
    exempt-flying: false
    non-sleeping-title: true
    dynamic-animation-speed: false
    exempt-below-y: -1
    gsit-hook: true
    allow-sleep-cmd: false
    insomnia-milk: true
    longer-night-duration: 320
    skip-storm: true
==========================
time:
  night-start: 12542
  night-end: 23850
==============================
# specify the speed/ticks for the animation
# DEFAULT: 85 (recommended)
nightcycle-animation-speed: 8

CustomTime:

    day:
      multiplier: 0.3333333333333333
      desc: 0.5 hours
    night:
      multiplier: 0.16666666666666666
      desc: 1.0 hours

SMPTweaks:

disable_night_skip: true # Sleeping will not skip the night

How does it work?

  1. Sleep-Most determines when to initiate its animation, speeding up the world's time.
  2. Custom-Time regulates the duration of the day/night cycle in relation to real-world timing (measured in hours).
  3. SMPTweaks disables the vanilla night-skipping mechanic, eliminating a "true" vanilla-like night skip.

What's the effect?

With the above settings, allowing players to decide when to start skipping the night becomes possible. For instance, if, let's say, 75% of the player base lies down in their beds, time starts to speed up, but the night is no longer skipped conventionally. Instead, the animation speed is set to, for example, 8 ticks. Consequently, the night is skipped based on the animation speed rather than the vanilla skipping mechanic. This effect adds a truly immersive experience for all players, whether they are sleeping or not and want to engage in nighttime activities.

What's to improve?

Thanks to the above: Sleep-Most as the ultimate mechanism for accelerating time if the required number of players is in beds. This would enable them to skip both day and night cycles.

The Goal!

🛏️ The goal is to craft the ultimate sleep plugin solution of all time.

Thank you!

Thank you to the plugin creator for crafting such a fantastic tool for Minecraft servers.

☕ Kind Regards, iomatix.

mrgeneralq commented 5 months ago

Hello @iomatix

I don't often see suggestions worked out in detail as much as this. Would you be open to discuss this in discord?

Discord: MrGeneralQ

Would love to furhter talk and discuss with you on this.

Kind regards

Quinten