NidToolbox: Timed Messages module 1.7.3

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.

Contains Server Timed messages module for NidToolbox Light server tool-set. Time-based messages can be set to trigger at certain hour, or every X minutes.

1573-nidtoolbox-design01-nid-64-png

Timed Messages

for NidToolbox Light

requries nid-core module available here




NEW - if you would like to have your server logo appear in the notifications area in messages that come from NidToolbox. Please join my Discord https://discord.nidaren.net/ and post them in #server-logos channel.


Create timed messages that trigger either at a specific hour or every X minutes


Support is provided as well as suggestions are accepted on my Discord here



Timed Messages module allows:

  • Easy creation, sending and display of messages that are based on specific timer.
  • Your messages can follow set time zone of your choosing, see nid-core module to see how to set own time zone.
  • Module can store multiple messages, which can all have their own timers.
  • Two types of timed messages available: Timer Messages - triggering every X minutes and Scheduled Messages - triggering at specific hour.
  • Messages accept all the formatting options and colors.
  • Messages can be displayed in game chat as well as in a PopUp window.
  • Configuration easily viewable in an "at-glance" window.


(click to enlarge)






Requirements:

As any module of NidToolbox set, it requires nid-core version 1.0.3+ module, available in the main forum thread: here


How to install:

  1. Unpack .zip archive
  2. Copy nid-timedmessages.dll to Mods\NidToolbox\Modules


Settings files:


Config files are located at:

  1. Configs\Mods\NidToolbox\TimedMessages.json - contains module settings.


Configuration:


Module operates on 24 hour clock. 5 pm is 17:00, 5 am is 5:00 :)


Timed Messages are created and configured via usage of in game commands.


After creation basic message, it is possible to edit it's full text in a configuration file, allowing for easier adding of formatting tags.


Module contains example messages that are created and activated at the plugin first load. These can be viewed for some example usage.


There are currently two timed messages types:

  • Timer Message - this message will trigger every X minutes, for example "Stay hydrated reminder" that will trigger every 30 minutes in game.
  • Scheduled Message - this message will trigger at a specific hour, for example "Restart Announcement 30 min to reboot" will trigger at 5:30 every day.


Adding new message is as simple as issuing /timer-add or /sched-add and specifying the details. For more information, check the available commands.


MANUAL CONFIG EDITS: When editing config file by hand, be careful when changing the hour and minutes attribute of the scheduled messages. Avoid leading zeros ,as the automatic config loader does not like these.

Your file will be checked when reloaded in game.


Common commands:


/timer-reload


Reloads settings of the module. Useful if you have edited the config file manually. Will check if the file is correct, before loading it into the server.


/timer-log

Enables or disables logging to log file.

/timer-log bool trueFalse

Code
/timer-log true/false


/timer-console

Enables or disables reporting in the console.

/timer-console bool trueFalse

Code
/timer-console true/false




Timer Messages commands:


/help Timer


Displays information about all commands related to Timer Messages.


/timer-Enable

Enables or disables timer messages.

/timer-Enable bool trueFalse

Code
/timer-enable true/false



/timer-ShowMsg

Displays message configuration in a separate window.

/timer-ShowMsg string title

Code
/timer-ShowMsg messageTitle



/timer-list

Lists all timer messages.

/timer-List

Code
/timer-list



/timer-Add

Adds new timer message. Timer must be given in minutes


/timer-Add string title, string msgText, float timer, bool showAsPopUp

Code
/timer-add My New Timer Message, <color=yellow>Some nice text</color>, 20, false



/timer-Del

Deletes timer Message.

/timer-Del string title

Code
/timer-Del messageTitle



/timer-Minutes

Changes the default timer of the message. This will change the default timer for the message, it will take effect once the current timer has elapsed.

/timer-Minutes string title, float minutes

Code
/timer-Minutes messageTitle, 20



/timer-Running

Changes the running timer of the timer message. This will alter the timer that message is currently under. Has no effect on the default timer.

/timer-Running string title, float minutes

Code
/timer-Running messageTitle, 20



/timer-PopUp

Changes the show as PopUp window attribute of the message.

/timer-PopUp string title, bool true/False

Code
/timer-PopUp messageTitle, false



/timer-Rename

Changes the title of the message.

/timer-Rename string title, string newTitle

Code
/timer-Rename oldTitle, newTitle



/timer-Text

Changes the text of the message.

/timer-Text string title, string newText

Code
/timer-Rename title, newText



/timer-Active

Activates or Deactivates the chosen timer message. Allows to disable the specific message, without disabling the whole module.

/timer-Active string title, bool true/False

Code
/timer-Active messageTitle, true



Scheduled Messages commands:



/help Sched


Displays information about all commands related to Scheduled Messages.


/sched-Enable

Enables or disables scheduled messages.

/sched-Enable bool trueFalse

Code
/sched-enable true/false



/sched-ShowMsg

Displays message configuration in a separate window.

/sched-ShowMsg string title

Code
/sched-ShowMsg messageTitle



/sched-list

Lists all scheduled messages.

/sched-List

Code
/sched-list



/sched-Add

Adds new scheduled message.

/sched-Add string title, string msgText, int hour, int minutes, bool showAsPopUp


For example: Message that is supposed to be shown at 14:02:

Code
/sched-add My New Scheduled Message, <color=yellow>Some nice text</color>, 14, 02, false



/sched-Del

Deletes scheduled Message.

/sched-Del string title

Code
/sched-Del messageTitle



/sched-Time

Changes the time at which scheduled message will trigger.

/sched-Time string title, int hour, int minutes

Code
/sched-Time messageTitle, 14, 02



/sched-PopUp

Changes the show as PopUp window attribute of the message.

/sched-PopUp string title, bool true/False

Code
/sched-PopUp messageTitle, false



/sched-Rename

Changes the title of the message.

/sched-Rename string title, string newTitle

Code
/sched-Rename oldTitle, newTitle



/sched-Text

Changes the text of the message.

/sched-Text string title, string newText

Code
/sched-Rename title, newText



/sched-Active

Activates or Deactivates the chosen timer message. Allows to disable the specific message, without disabling the whole module.

/sched-Active string title, bool true/False

Code
/sched-Active messageTitle, true
  • Version 1.7.3

    Fixed bug happening when several timed messages have exact same title.

  • Version 1.7.2

    * Updates both modules to take advantage of newly added time zone settings to nid-Core.


    + Requires nid-Core 1.7.6!


    * IMPORTANT: Requires EM-Framework 3.4.5+

  • Version 1.7.1

    * Updated project to net7.

  • Version 1.7.0

    Compatibility with Eco 9.7

  • Version 1.6.0

    * Updated module to Eco version 9.6.0


    * Updated to net6.


    * REQUIRES: EM-Framework 3.3.0-beta2 or higher

  • Version 1.5.1

    * Added magic glue to code, needed due to changes in nid-Core INidSchedulable interface.


    * Requires nid-Core 1.5.5


    * REQUIRES: EM-Framework 3.2 or higher

  • Version 1.5.0

    * (RC.4) Module output filename updated to match namespace.


    * (RC.3) Fixed issue causing format exception on some specific locale settings.


    * Timed messages module migrated to use new INidSchedulable and INidTickable and will integrate with Timed Commands module planned for the future.


    * Module updated to Eco 9.5.0


    * REQUIRES: EM-Framework 3.2.0-RC.3 or higher.

  • Version 1.1.4

    • Fixed date parse failing in some specific or custom regional settings.
  • Version 1.1.3

    • Improved scheduled messages triggering system.
    • Fixed scheduled message "Next trigger in ..." message to show proper remaining time in console and log.
    • Added option to enable and disable logging to log file.
    • Added option to enable and disable reporting in console.
  • Version 1.1.2

    Version 1.1.2

    • Compatibility patch with EM Framework 3.1.0
    • Requires EM Framework 3.1.0