foundryvtt-simple-calendar
foundryvtt-simple-calendar copied to clipboard
[FEATURE] Run Macro on Moon Phase Change
Is your feature request related to a problem? Please describe.
As a DM and worldbuilder, I would like to be able to run macros based on a certain moon phase change. For example, if a moon in my world enters the Full phase, I want to be notified with a custom chat message macro. I may want to add an Active Effect to my player actors. Or execute any other macro for any other world-specific reason.
Describe the solution you'd like
When a discrete moon changes its phase, I wish to execute a macro. This can either be: on any phase, or one or more specific phases. In worlds with multiple moons, I may wish to run different macros on different phase changes for different moons.
Additionally, I may wish to run macros on certain conditions, for example: When two selected moons are full, when one selected moon is full and another is new. The logic for this may follow something like: When Moon X enters the Y phase Check the other moons If specific/any/all moons are in Y, A, B, and/or C etc. phases Execute macro Z
Describe alternatives you've considered This could theoretically be handled with a World Script which hooks into Simple Calendar's DateTimeChange hook. The World Script could check the moon phases each day and run code when it finds certain moon phases or combinations of moon phases. It would likely need to write the previous moon phase as a flag to something like a dummy macro so it has something to compare against to determine if the moon's phase has changed. It would also need to include a switch statement when a phase change is detected to check the current phase (or combinations of phases) on discrete moon(s), and run code based on which case(s) the switch statement finds.
Additional context One novel use case for this would be within the Dragonlance setting, where the three moons have effects on spellcasters of certain alignments, in addition to special conjunction effects, such as when all three moons of Krynn are Full.