Thread: Andraax' Moon Tracker Extension
-
November 25th, 2018, 03:52 #1
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
Andraax' Moon Tracker Extension
This is an extension for Fantasy Grounds that improves upon the functionality for the built-in calendar function by allowing it to track the phases for the moons in your campaign. A new button has been added to the Calendar window for configuring the moons for your campaign. Clicking this button opens up a configuration window, allowing you to add as many moons for your campaign as you wish, defining their names, phase periods, and phase shift. Once configured, clicking on any day on the calendar will display the moon phases for that day in a new panel that has been added to the calendar window.
This extension is designed to work out-of-the-box for all campaigns that use one of the pre-build calendars. For rulesets that use a custom calendar that requires registering for the CalendarManager events registerChangeCallback, registerLunarDayHandler, or registerMonthVarHandler, this extension will also work with a bit of additional configuration. From within your ruleset you will need to make sure that the above registrations occur after the extension has been loaded. A good way to do this is to register the Interface.onDesktopInit event and to register your callbacks with the CalendarManager within this function.
This extension was originally written by DMFirmy. With his permission, I have taken over the maintenance of this extension.
-
November 25th, 2018, 05:53 #2
Glory be. Moonbound fey in our modern campaign will be quite pleased at the more speedy checks on moon-phases. (We ended up using nasa's moon-phase images for a bit. )
- Obe
-
December 25th, 2018, 15:25 #3
I have been waiting for this to be updated (Yay!) thank you for getting this extension working again.
Using v.3.3.7
For rulesets that use a custom calendar that requires registering for the CalendarManager events registerChangeCallback, registerLunarDayHandler, or registerMonthVarHandler, this extension will also work with a bit of additional configuration. From within your ruleset you will need to make sure that the above registrations occur after the extension has been loaded. A good way to do this is to register the Interface.onDesktopInit event and to register your callbacks with the CalendarManager within this function.
I do have a custom calendar for my home brew world/universe, and I only one moon. For simplicity, I have a calendar of 12 months of equal length (30 days). And a period for that moon of 30 days from full moon event, to full moon event. However, the moon calendar default starts the first day of the first month, with a new moon (dark moon) event, and will not allow me to adjust that default starting moon phase to match existing cannon. Can I do this? If so how?
I understand - or I think I do - what 'period' means, however, I am not sure what 'shift' does for the configuration. Can you give examples of how you might use this extension? EDIT: I have since been able to look up the meaning of shift online - Thank-you Wikipedia. However, the issue with starting the year with a New Moon event remains.
Either way, great work. I commend you for taking up the banner from DMFirmy (who I hope has recovered from his automobile accident), and running with it.
Minor niggle - using the Theme: 5e - Wizards is causing the first editable line to be buried up in the title bar, when the configuration window opens - it was hard to see but, I found it. In the standard 'Dark Leather' Theme it is perfect. I am thinking that this might be a spacing issue?
-
December 25th, 2018, 15:53 #4
Pardon the second post - I have noticed an unusual behaviour with this extension.
When the calendar rolls over to a new year, the moon phase will jump to 'New Moon' regardless of the previous day's moon phase. Is this related to the default moon phase being set to "New Moon" for the first day of the first month?
E.G.: Last day of the the year the moon is "Waxing Gibbous", the very next hour (11pm to 12am), this would be the beginning of the first day of the following year, moon's phase is "New Moon" (Dark).
-
December 25th, 2018, 16:11 #5
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
Since it's a custom calendar, it requires a custom lunar day handler to handle proper changes when the year changes; I'm guessing you don't have one. You can use shift to adjust the new moon forward and backward in the month to match canon.
-
December 25th, 2018, 21:34 #6
- Join Date
- May 2015
- Location
- Oahu
- Posts
- 728
-
December 25th, 2018, 21:58 #7
Its code that is added as an extension to tell FG how to handle your calendar. How to roll over days and such. FG comes with the standard gregorian one, but if you are doing custom calendars, you may need to write your own to make that sort of thing work properly.
For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e
-
December 26th, 2018, 03:51 #8
-
December 26th, 2018, 08:22 #9
@GavinRuneblade What you said.
@Mattekure Ooooh... Kay... and how does one get started on making these changes? A point in the direction of the appropriate 'How too (do this thing) wiki' would be a great help - if you know that is. Could I cut/paste the Gregorian 'calendar handler' into my calendar some how? And then play with values there, to get it to work for my custom calendar?
Yes, all ridiculously amateur hour questions, I know. But, I have to start somewhere, and often that is at the beginning - if the vets can give me a leg up it would be appreciated (No, I am not so lame as to ask/beg someone to do it for me. I am willing to invest the sweat equity and bloodied fingertips of coding, to learn, and at the right time pass along that lesson to others, without snark).
Suggestions?
-
December 26th, 2018, 14:48 #10
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
Find one of the calendar extensions that I did for unusual calendars, unpack it, and look at what it does. :-)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks