PDA

View Full Version : Exandrian Calendar - Help Please



Drazulfel
March 25th, 2020, 17:20
Hello,

I'm trying to create the Exandrian Calendar for the new Wildemount book. I'm struggling to figure out how to get the days of the week to transition correctly from month to month (ie: if the last day of month 1 is Thursday, the first day of the month 2 should be Friday).

I found the CollapseCalendar mod, which seems to be a step in the right direction... but I got a bit lost with the .lua file in the extension. Not sure how the math works. I've attached my work to this post. The calendar is fully built in the .mod. I just need assistance with that last step.

Can anyone please help me make this work?

Thank you!

Draz

LordEntrails
March 25th, 2020, 17:38
Have you seen this?
https://www.fantasygrounds.com/forums/showthread.php?47885-Fantasy-Grounds-Custom-Calendar-Tutorial

Drazulfel
March 25th, 2020, 17:59
Have you seen this?
https://www.fantasygrounds.com/forums/showthread.php?47885-Fantasy-Grounds-Custom-Calendar-Tutorial

I did see that. But with the very irregular nature of this particular calendar, I failed to work it out on my own. Months range from 27 - 32 days, 328 days in the year.

I haven't coded in over 15 years, so this is kicking my butt. I wish this calendar came w/ the official WotC mod for the book.

LordEntrails
March 25th, 2020, 18:23
Mattekure will probably see this post soon. He;s a pretty nice guy and if he has time will probably help you resolve this. You can also look on the FG or FGC Discord servers and see if someone there can help you through the LUA part.

Drazulfel
March 25th, 2020, 18:30
Mattekure will probably see this post soon. He;s a pretty nice guy and if he has time will probably help you resolve this. You can also look on the FG or FGC Discord servers and see if someone there can help you through the LUA part.

Thank you!

Drazulfel
March 25th, 2020, 23:24
Awe, close. I got it so it didn't start every month on the 1st day of the week, but the following months started 1-3 days later than they should have.

mattekure
March 26th, 2020, 18:03
Sorry I missed this thread earlier. I have something for you to try out. I have an extension that provides a generic lunar day handler, so as long as you dont have any leap years in your calendar, it should work no matter how wonky the months are.

In your calendar xml, for the lunar day handler, be sure to use "LunarWrap"

Here it is in action. I also attached the slightly tweaked calendar mod you made. just to add the correct handler.
32590

Drazulfel
March 26th, 2020, 18:54
Sorry I missed this thread earlier. I have something for you to try out. I have an extension that provides a generic lunar day handler, so as long as you dont have any leap years in your calendar, it should work no matter how wonky the months are.

In your calendar xml, for the lunar day handler, be sure to use "LunarWrap"

Here it is in action. I also attached the slightly tweaked calendar mod you made. just to add the correct handler.
32590

Ok, so...

1. From the CollapseCalendar.mod file that you sent me, change this line in db.xml ... <lunardaycalc type="string">LunarWrap</lunardaycalc>
2. Re-add the edited .xml file to CollapsCalendar.mod
3. Put the edited CollapseCalendar.mod file in the modifications folder
4. Put the Generic Lunar Day Handler.ext file as provided in the extensions folder

Should that be it?

mattekure
March 26th, 2020, 18:58
yeah, just make sure the extension is loaded. In my post I also attached a copy of your collapsecalendar.mod with the adjustments made. You can take a look to see exactly what I did in there.

Drazulfel
March 26th, 2020, 19:10
make sure the extension is loaded

SMH!

I would have had this working long ago if I wasn't a dummy. I put the extension in the folder, but didn't load it with the campaign. Argh!

Thank you so much! It's working perfectly.

LordEntrails
March 26th, 2020, 20:24
Mattekure, thanks for helping and not making me look like a liar! Hope you didn't mind me calling you out :)

mattekure
March 26th, 2020, 21:23
Mattekure, thanks for helping and not making me look like a liar! Hope you didn't mind me calling you out :)

LOL. No problem