PDA

View Full Version : Calendar days do not split on week lengths leading to awful display



slitherrr
July 19th, 2021, 18:19
The first time opening this calendar, the display in the calendar element is correct--days will break every eighth day, and it looks generally like a calendar should (see first image, Cal.png).

Every time I reload the campaign after that, the display instead breaks on two-day segments, making the calendar a lot less readable (see second image, CalBad.png). I can't find any reason why it's happening--changing the lundardaycalc mainland.lua function has no effect on the UI, and I don't really see anything in any of the calendar examples in the tutorial thread (https://www.fantasygrounds.com/forums/showthread.php?47885-Fantasy-Grounds-Custom-Calendar-Tutorial) that have anything to say about this. Any ideas?

LordEntrails
July 19th, 2021, 18:28
Have you checked this thread for a fix?
https://www.fantasygrounds.com/forums/showthread.php?47885-Fantasy-Grounds-Custom-Calendar-Tutorial

I know this has come up with other custom calendars and their should be a solution in there somewhere.

slitherrr
July 19th, 2021, 19:19
I did peruse that thread (note that I link to it in the post that started this thread), this problem isn't mentioned. I can x-post to it, I suppose.

Trenloe
July 19th, 2021, 19:32
You've a typo at line 6 in mainland.lua - nDa7 should be nDay.

slitherrr
July 19th, 2021, 19:46
Thanks for that, although it doesn't appear to be causing the display issue in question.

And, frustratingly, I can't reproduce this with an empty campaign, so I can't get a clean set of steps to make the repro. It has consistently displayed this way in three different campaigns, just not a campaign I've started from scratch.

Trenloe
July 19th, 2021, 20:04
Does resetting the calendar (via the right-click menu) in a campaign that has the issue sort it out?

slitherrr
July 19th, 2021, 21:16
Oh thanks for pointing out that functionality. Resetting it did fix my locally broken campaign, which appears to have persisted on /reload both via the command and from a full restart of FGU. It appears that resetting the calendar preserves notes (which is good, that's what we want), but before I recommend this action to the GM running the campaign we're making this calendar for, are there any gotchas we should worry about, any condition that might cause the reset calendar not to recognize/preserve the notes that exist?

Trenloe
July 19th, 2021, 22:04
If the GM mistakenly selects the wrong calendar you may have issues with accessing notes. Otherwise, you should be OK.

Just in case, you can backup the campaign directory that stores the campaign database file, then try resetting the calendar.

slitherrr
July 19th, 2021, 22:21
Sounds good, we'll fiddle with this knowledge and I'll report back with success or failure.

slitherrr
July 20th, 2021, 20:10
Resetting the calendar does appear to have resolved this, without any changes to the extension/module, so anyone who runs into this problem in the future hopefully will get some use out of this thread.