Details

Last Updated
2 weeks ago
First Uploaded
2 weeks ago
Downloads
125
Likes
1
Size
134KB
Dependency string
cheesasaurus-EventScheduler-1.2.0
Dependants

EventScheduler

Enables server operators to schedule recurring Events.

Installation

Scheduling an event

An Event is really just a series of chat commands to be executed on a schedule.

Events are set up in BepinEx/config/EventScheduler/events.jsonc

Example:

{
    // Chat commands have to be executed by a user, so we specify which user
    "executingAdmin": {
        "steamId": 123456
    },

    // List of all events
    "events": [

        // an event to reset shards every 2 weeks
        {
            // after you've decided on an eventId, it shouldn't be changed
            "eventId": "Bi-Weekly Shard Reset",
            "schedule": {
                // when the first run of the event should happen
                "firstRun": "2069-12-15 20:00:00",

                // how frequently the event should run
                "frequency": "2 weeks",

                // In case the event is overdue: allow running it late, but not too late.
                // This could happen if the server was down/restarting when the event was supposed to run.
                // If it's too late, the event will be skipped until the next valid time slot.
                "overdueTolerance": "5 minutes",
            },
            "chatCommands": [
                // a series of chat commands to be executed each time the event runs
                ".shards-reset",
                ".buff all rage 2h",
                ".buff all witch 2h",
            ]
        },

        // an event to give players a gift every hour
        {
            "eventId": "Hourly lumber gift",
            "schedule": {
                "firstRun": "2069-12-15 20:00:00",
                "frequency": "1 hour",
                "overdueTolerance": "1 minute",
            },
            "chatCommands": [
                ".giveToAll wood 9",
            ]
        },

    ]
}

Configuration changes are automatically applied; no need to restart the server every time.

Note that all chat commands shown above are only examples. The actual commands available depend on which mods you have installed.

Frequency and overdueTolerance

The expected format is {integer} {unit}

Valid units are: weeks, days, hours, minutes, seconds

examples:

  • 2 weeks
  • 1 week
  • 30 days
  • 1 day
  • 5 hours
  • 1 hour
  • 90 minutes
  • 1 minute
  • 30 seconds
  • 1 second

Chat commands

  • .testRunEvent "Hourly lumber gift"
    • Do an immediate test run of the event with id "Hourly lumber gift"

Support

Join the modding community.

Post an issue on the GitHub repository.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.