PDA

View Full Version : Another Custom Calendar thread...



Three of Swords
January 27th, 2018, 19:50
As a potential new FG DM, I'm verifying I can port my homebrew world to this platform.

As with most custom worlds, mine has a unique calendar. It's a simple system, but after a couple of hours of research and various experiments, I've come to the conclusion I can't do it solely through XML editing.

I attached an edited image of how I'd like one month to appear.

Can anyone help out?

Text description:

12 months
No leap year
30 days per month
7 days per week
holidays fall between weeks on the 15th and 30th of every month


Attempts:

I tried making two weeks of 15 days per month, but that broke the calendar formatting (it only handles up to 11 days w/o formatting issues). I would be fine w/ this solution if it's easier, though I prefer the solution in the image.
I thought of making two 14-day periods per month with holidays between them, but then the date reset to the first each period, which doesn't work.



Thanks for any input.

Andraax
January 27th, 2018, 20:55
I've experimented a bit and see no way to do this with the current code. The calendar functions only call the lunar date function for the first day of the month, then assume all subsequent days follow.

Three of Swords
January 27th, 2018, 21:02
Thanks for looking, Andraax!

As part of my research, I've seen you make custom calendars for several others. So I know you know what you're talking about.

Any way to make 15-day weeks format properly?

Moon Wizard
January 27th, 2018, 21:08
Yeah, there are several assumptions used by the calendar code in order to make it display and work easily for the most common cases. One is that weeks are always the same size, so your 15-day weeks are a reasonable option.

The formatting issue is due to the fact that only one calendar entry can be shown per line; and the the way that the calendar interface and the FG layout engine work causes them to layout differently based on whether there is one entry per line or multiple entries per line. The calendar interface was built assuming more than one entry per line.

So, your workaround is fairly straightforward, use the 15-day calendar you already built, and resize the calendar window to be wide enough to show more than one month entry. The calendar size is saved between sessions, so you should only need to resize once. (see attached image)

Cheers,
JPG

Andraax
January 27th, 2018, 21:44
Moon got the response in before me, but I was going to say the same thing. Here's my version:

https://s3.silent-tower.org/images/calendar.JPG

Three of Swords
January 28th, 2018, 00:33
I can't believe it was that I didn't make it wide enough. I figured there were line-breaks in the code, so the fact that it placed the day numbers immediately after the day names meant it was a problem.

Thank you, both of you!