PDA

View Full Version : DMFirmy's Moon Tracker Extension



DMFirmy
December 2nd, 2014, 12:57
Updated extension available here: https://www.fantasygrounds.com/forums/showthread.php?46672-Andraax-Moon-Tracker-Extension&p=415433#post415433

——————————————————

I have just uploaded the initial release for my new Moon Phase Tracker extension to my website. The download page can be found here (https://dmfirmy.com/downloads/dmfirmys-moon-tracker-extension-fantasy-grounds)

The source code is also available on my GitHub Repository (https://github.com/DMFirmy/Moon-Tracker) page.

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.

819481958196

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.

damned
December 2nd, 2014, 13:49
Well done.

DMFirmy
December 2nd, 2014, 14:42
I guess it is worth noting that even though this extension is fully functional and I have made it publicly available, I still have a ton of other ideas for this extension and I will continue to actively develop it for some time. Some planned features include adding the ability to export moon configurations, improving the performance for the phase calculations for calendars that have a long history (for example, in my own campaign the current year is 129,599 of the 12'th age, and calculating the epochday parameter with a value of 4.66556e+007 can be SLOW), and improved integration with the calendar event system to allow events to record the current moon phase.

In future versions of this extension, I am contemplating the idea of adding a system for tracking the orbital positions of the moons and the sun to calculate eclipses, but this will be a pretty large enhancement that will require me to really put some thought into its design.

kane280484
June 23rd, 2015, 22:18
Can't download. Does any1 have this ext file and is willing to share?

DMFirmy
June 24th, 2015, 13:09
Recently I suffered a terrible car accident, and my website had been down while I am out of work for recovery. The full extension source is still available on GitHub though, and hopefully I will get the site back up around the first of the month.

kane280484
June 24th, 2015, 13:21
Sorry to hear that, I wish you successful and fast recovery and good health.

damned
June 24th, 2015, 14:05
DMFirmy - wishing you a speedy recovery and lots of support from friends and family.

Oberoten
June 24th, 2015, 14:42
Here is to a speedy, complete and as painfree as possible recovery.

- Obe

dr_venture
June 26th, 2015, 04:44
Attached is the latest version from the DMFirmy's GitHub page... dunno if I named it properly, but it'll work until the author has recovered enough to upload his own. Best wishes for a speedy recovery, DMFirmy!

Raunalyn
September 2nd, 2015, 14:37
I just downloaded this yesterday and applied it to my Dragonlance game (magic is greatly affected by the phases of the moon).

Absolutely LOVE this extension. Well done, and I hope you are doing better.

DMFirmy
September 2nd, 2015, 14:44
Thank you all for the well wishes, my recovery is coming along quite nicely. I have been back at work for a few weeks and finally managed to get my site back online. Hopefully I will find a bit of time to dive back into working on my campaign and some additional extension content over the next couple of weeks. I appreciate the good tidings from all!

Tabarkus
January 1st, 2016, 18:04
I have a question on this extension. When I use the calendar it shows my players the months and days of the calendar I have chosen for my game (one of the default ones) but it does not show them the phases of the moons. Can this information be transmitting to the players? Do they have to have the extension as well?

CelticKnight
January 10th, 2016, 17:03
Hello,

Anyone else having issues with the moon setup interface where the input labels are skewed into the scroll title bar, making reading them difficult?

Thank you

GainunX
June 28th, 2017, 19:12
I do not know if I understood something wrong, but it seems that there is no way to determine manually which phase the moon should be on a specific day. That is a problem because, in Forgotten Realms, on the 1st of every month the moon is full. This determines the date of holidays throughout the year. However, the ext always starts the month with the new moon. It seems that the developer no longer offers support, but it would be interesting if someone modified it to implement the option to manually determine the phase of the moon on particular days.

Trenloe
June 28th, 2017, 20:11
However, the ext always starts the month with the new moon.
That's what the "shift" parameter is for. This is the number of days that the moon phase is shifted.

With shift = 0 then you will get "New Moon" on the very first day when the calendar started - "day 0".

There are 8 phases to the moon in this extension: "New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous", "Full Moon", "Waning Gibbous", "Last Quarter", "Waning Crescent". These are divided among the days of the moons "cycle" setting. If the cycle was 32 there would be exactly 4 days per each moon phase.

So, for example, if you wanted day 0 to be a "full moon" (which is the 5th moon phase in the extension's lost of phases), with a cycle of 32 days, you'd set phase to be 17 to have day 0 be the first of the four day "full moon" phase to 14 if you wanted day 0 to be the last day of the four day "full moon" phase.

Changing this extension to manually determine the phase of the moon on particular days would basically break all of this code - as it relies on moons having a set cycle and not jumping all over the place.

According to the Forgotten Realms wiki here: https://forgottenrealms.wikia.com/wiki/Sel%C3%BBne_(moon) The moon has a set cycle of 30 days, 10 hours, and 30 minutes (30.4375). It is full on 1/1/1372 DR and every 4 years after. And "Selūne was generally full around the first day of each month, give or take a day" - not exactly full on the beginning of each month.

So, you could set up a moon with period = 30.4375 and shift = 6, and this should work fine if the calendar is correct. Unfortunately, the Forgotten Realms calendar that comes with FG does not have the leap day (Shieldmeet) implemented (it mentions it in the name if you click on Midsummer). So it won't work 100% with the default Forgotten Realms calendar in FG.

For it to work (with my limited testing) in the Forgotten Realms calendar module that comes with FG use: Period = 30.41666 and Shift = 14.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=19589

GainunX
June 28th, 2017, 20:27
For it to work (with my limited testing) in the Forgotten Realms calendar module that comes with FG use: Period = 30.41666 and Shift = 14. [/IMG]

This worked enough! I even tried to change the "shift" parameter, but I could not understand exactly how it worked. Thanks for the explanation!

Andraax
June 28th, 2017, 20:46
Does the Forgotten Realms calendar have an extension that can implement the leap day? If not, I can write one and it will work 100% correctly.

Trenloe
June 28th, 2017, 21:00
Does the Forgotten Realms calendar have an extension that can implement the leap day? If not, I can write one and it will work 100% correctly.
I don't know if there is an extension. The only leap information available within the CoreRPG ruleset is for a Gregorian lunar cycle see the onInit function in scripts\manager_calendar.lua for the setup for the "gregorian" lunardaycalc set in the calendar module.

Andraax
June 28th, 2017, 22:46
OK, here is a modified Forgotten Realms calendar. You must load the extension first, then reset the calendar, open the module, and load the new calendar. This will display Shieldmeet every 4 years, and using the moon settings in the attached image, you should get a full moon around the first of every month as you desire.

https://s3.silent-tower.org/images/screenshot0144.png

GainunX
June 28th, 2017, 23:17
OK, here is a modified Forgotten Realms calendar. You must load the extension first, then reset the calendar, open the module, and load the new calendar. This will display Shieldmeet every 4 years, and using the moon settings in the attached image, you should get a full moon around the first of every month as you desire.

This is more than I wanted =)
Thanks! You guys are incredible

Laramie Wall
June 30th, 2017, 13:59
This is excellent. I run a HackMaster game, who's world has 3 moons. This makes my outdoor encounters etc SO much easier to manage. Thanks!

bnickelsen
July 4th, 2017, 15:23
Is this 3.3.x Compatible?

Andraax
July 4th, 2017, 15:34
Is this 3.3.x Compatible?

Works for me. Did you try it?

bnickelsen
July 4th, 2017, 15:46
Just installed the FG update to 3.3.x and thus running through all the extensions and reinstalling. It is really time consuming to go through each one, one at a time and try to guess if it going to work. It would be nice if the admins would monitor these extension and add a line that at least says "no known issue in current release.

Trenloe
July 4th, 2017, 18:06
It is really time consuming to go through each one, one at a time and try to guess if it going to work. It would be nice if the admins would monitor these extension and add a line that at least says "no known issue in current release.
We do provide updates - but it relies on the extension developers providing compatibility information or problems raised by the community members for moderators to be able to provide accurate information.

We can't possibly do these checks ourselves on every extension out there - that would be a massive undertaking and impossible to check 100% compatibility in some cases.

The fact of the matter is that many community extension developers move on and so their extensions won't get updated and will be incompatible either now or in the future. Maintenance of some extensions get picked up by other devs, and sometimes the functionality gets rolled into the base FG code, but many end up falling by the wayside. It's a shame, but that's how it works...

The assumption is that if an extension doesn't specifically say it's compatible with the latest version is that it hasn't been tested and is therefore assumed to be can run it if you want, but be aware that you may either get errors or some functionality in the extension and/or ruleset won't work properly. If you have issues, remove all extensions and do some testing to see which extension is causing the issue.

JimSocks
August 6th, 2017, 02:57
This extension really helps me keep track of my player afflicted with Lycanthropy!

paladiusdarkhelm
September 9th, 2017, 17:41
I see comments that indicate you can track multiple moons on the calendar with this extension. This may be a silly question, but does this also track suns or is there another extension out there that does?

Thank you!

Andraax
September 9th, 2017, 21:14
Only suns that orbit your fantasy world... :-)

Try Dulux-Oz's extensions.

CelticKnight
September 9th, 2017, 22:12
I see comments that indicate you can track multiple moons on the calendar with this extension. This may be a silly question, but does this also track suns or is there another extension out there that does?

Thank you!

You can edit the code for the extensions to specific names and to reflect suns, including any calendar you may have. It is moderately simple and there are tutorials online.

paladiusdarkhelm
September 10th, 2017, 00:06
Super! Thank you.

grisix
April 30th, 2018, 08:27
OK, here is a modified Forgotten Realms calendar. You must load the extension first, then reset the calendar, open the module, and load the new calendar. This will display Shieldmeet every 4 years, and using the moon settings in the attached image, you should get a full moon around the first of every month as you desire.

https://s3.silent-tower.org/images/screenshot0144.png

I have not been able to see the 2nd day after midsummer in 1372DR after doing what was indicated.. is there is an update needed?

Andraax
April 30th, 2018, 13:04
I have not been able to see the 2nd day after midsummer in 1372DR after doing what was indicated.. is there is an update needed?

Nope, works fine. I did test viewing the calendar without the extension loaded (first step in the instructions) and it doesn't show up then. So, looks like you're not loading the extension.

grisix
May 3rd, 2018, 02:30
Nope, works fine. I did test viewing the calendar without the extension loaded (first step in the instructions) and it doesn't show up then. So, looks like you're not loading the extension.

Yes it does work fine... My bad. I was loading the extension but I had a duh! moment, because I never looked for the second Harptos Calendar entry and was still selecting the first one over and over again... Thanks for the help!

Ikael
July 4th, 2018, 19:55
This extension seems to have issues with v3.3.6 CoreRPG, any chances to see it patched up?

Andraax
July 4th, 2018, 20:53
Give this a try (not completely happy with it, but it seems to work...)

skj310
July 31st, 2018, 22:19
Howdy Moon Tracker extension people.

Updated to official 3.3.6 this morning and I too noticed a fail on the calendar. Disabling the moon tracker ext would bring things back to normal.

Here is what i notice when enabling your extension and opening the calendar, which was fine prior to upgrade as I'd just been working on it, I get the following error:

Script Error: (string "utility/scripts/calendar_period_list.lua"):39: attempt to call field 'getStartDayOfMonth' (a nil value)

Using the previous posts attachment has fixed the error .. but i thought i'd share, just in case it helps you clear up the "not completely happy with it" comment.

skj310
July 31st, 2018, 22:22
Ok ... scratch that ... i've noticed am not able to add calendar entries with the patched extension above. No error messages.

Andraax
July 31st, 2018, 23:40
I'll work on it over the next few days as the original developer seems to have dropped support.

Just checked - the original developer (DMFirmy) has not had any activity on the forums for nearly 2 years.

damned
August 1st, 2018, 00:27
Ive emailed DMFirmy to get permission to use one of his scripts. He does generally reply to email.

Andraax
August 1st, 2018, 16:47
I just heard from DMFirmy and he's given me permission to update his extension. When I have it ready, I'll create a new thread so I can update the initial post as I release updates in the future.

paladiusdarkhelm
August 1st, 2018, 16:56
Super news, Andraax. Thank you very much!

InnocentSoul
August 15th, 2018, 07:40
I look forward to this as well as I have been using this extension for my campaign since I started using Fantasy Grounds. DMFirmy, if you do ever see this, thank you for the great extension. It works perfectly for my campaign. Andraax, thank you for continuing his work.

ssostac1
August 15th, 2018, 17:46
I too am looking forward to this. I have a character with lycanthropy in my campaign, and this extension is invaluable to me. It is the main reason I have not yet upgraded to 3.3.6, and I probably will not upgrade until this extension is compatible. Thank you DMFirmy for creating this wonderful tool for GMs, and a thank you to Andraax for working on making it compatible with 3.3.6.

GainunX
August 15th, 2018, 20:48
for those who play in Forgotten Realms and are without how to track the moon's phases, this tool can help: https://archive.wizards.com/default.asp?x=dnd/frx/20050525x

seycyrus
August 28th, 2018, 02:15
Andraax, Is this still on your radar?

Andraax
August 28th, 2018, 02:29
Yes. I got distracted, but I'm going to work on it again this week.

paladiusdarkhelm
September 7th, 2018, 21:51
Excellent! Will this update end up starting up in a new thread?

Asgurgolas
October 21st, 2018, 15:18
Still no news? >_>

Caethial
November 13th, 2018, 16:00
unfortunately, this is causing errors now when opening Calendars in 3.3.6

Script Error: [string "utility/scripts/calendar_period_list.lua"]:39: attempt to call field 'getStartDayOfMonth' (a nil value)

Andraax
November 25th, 2018, 02:53
Everyone interested in this extension, please see this post. (https://www.fantasygrounds.com/forums/showthread.php?46672-Andraax-Moon-Tracker-Extension&p=415433#post415433)

Thaynor
June 2nd, 2020, 17:19
I have a question on this extension. When I use the calendar it shows my players the months and days of the calendar I have chosen for my game (one of the default ones) but it does not show them the phases of the moons. Can this information be transmitting to the players? Do they have to have the extension as well?

Did this ever get an answered?

Zacchaeus
June 2nd, 2020, 18:43
Since thee author of this extension hasn't been around for three years or so it is unlikely to get answered.

I don't know this extension but one thing I can say is that the players don't need the extension - only the DM.

Thaynor
June 2nd, 2020, 19:00
Thanks, Unfortunately it's not showing the moon phases on the players side. I haven't been able to find anything that addresses this. Or another extension for moons.
DM View
36398

Player View
36399

Kelrugem
June 3rd, 2020, 08:47
Thanks, Unfortunately it's not showing the moon phases on the players side. I haven't been able to find anything that addresses this. Or another extension for moons.
DM View
36398

Player View
36399

Did you see the first link in the first post? :) https://www.fantasygrounds.com/forums/showthread.php?46672-Andraax-Moon-Tracker-Extension&p=415433#post415433 :)

Thaynor
June 3rd, 2020, 14:32
Thanks Kelgrugem, Same Moonphase tracker. I should have probably posted this question of on that thread.

jerrie
June 4th, 2020, 02:31
What an interesting idea.. if you had a game where the players were, hags, vampires, moon elves, etc. the moon could be a prominent character/entity.

LordEntrails
June 5th, 2020, 04:04
What an interesting idea.. if you had a game where the players were, hags, vampires, moon elves, etc. the moon could be a prominent character/entity.
Or DragonLance, where wizards power is affected by the phase of the moon.

Thaynor
June 5th, 2020, 04:30
This is an awesome extension. I just wish the players could see the phases.

mjdawn
October 28th, 2020, 12:50
It looks like in the past, a version of this extension corrected the Calendar of Harptos and added the missing leap year day, Shieldmeet. Is anyone aware of this being addressed with the Forgotten Realms calendar?

BlueTressym
November 2nd, 2020, 02:53
I can't get this to work. I'm getting an error when I add a moon (Selūne, as I'm trying to set up an FR campaign in 5E after being away from D&D for several years).

Script executioner error: [string"button_moon"]14: attempt to call field 'populateMoonPhaseDisplay' (a nil value)

I have no idea what this means - except that something's gone wonky - or how to fix it :(

Can anyone help?

CelticKnight
November 3rd, 2020, 07:55
I made one for Dragonlance awhile back but have no clue where I put the file.

I wish I could help. If I had more time I could look at the code. I am sure someone more knowledgeable could help.

Broken.Arrow
January 6th, 2022, 03:09
Not sure if this is the best place but the Moon Tracker extension is using deprecated code. See below:

[1/5/2022 6:44:49 PM] [ERROR] Script execution error: [string "scripts/manager_moon.lua"]:16: attempt to call field 'registerLaunchMessage' (a nil value)
[1/5/2022 6:44:50 PM] s'DesktopManager.registerContainerWindow - DEPRECATED - 2021-10-15 - Use DesktopManager.registerSidebarStackButton(tButton, bFront) instead.'
[1/5/2022 6:44:50 PM] s'DesktopManager.registerStackShortcuts - DEPRECATED - 2021-10-15 - Use DesktopManager.registerSidebarStackButton(tButton, bFront) instead.'

damned
January 6th, 2022, 12:03
Try this instead? https://forge.fantasygrounds.com/shop/items/172/view

Broken.Arrow
January 8th, 2022, 14:30
Thanks

nephranka
June 14th, 2023, 20:50
The Moon Tracker ext is throwing an error when you open the calendar since the new update.

[6/14/2023 3:27:31 PM] [ERROR] Script execution error: [string "..oreRPG-Moon-Tracker:..ts/calendar_log.lua"]:23: attempt to index global 'currentmonth' (a nil value)
[6/14/2023 3:27:31 PM] [ERROR] window: Control (button_moon) anchoring to an undefined control (dateframe) in windowclass (calendar_main)
[6/14/2023 3:27:31 PM] [ERROR] window: Control (button_moon) anchoring to an undefined control (dateframe) in windowclass (calendar_main)
[6/14/2023 3:27:32 PM] [ERROR] window: Control (button_moon) anchoring to an undefined control (dateframe) in windowclass (calendar_main)
[6/14/2023 3:27:32 PM] [ERROR] window: Control (button_moon) anchoring to an undefined control (dateframe) in windowclass (calendar_main)

bmos
June 15th, 2023, 00:45
EDIT: Can a mod close this thread? There's a newer thread listed in the first post.

Trenloe
June 15th, 2023, 13:06
Closing thread. Refer to post #1 for the link to a more up to date thread.