-
February 11th, 2017, 04:39 #1
- Join Date
- Dec 2016
- Posts
- 25
Custom Calendar - help with lunardaycalc
Howdy folks!
New to FG and still learning the ropes, but I feel like I've searched every single calendar thread on the forums and can't quite find the answer I'm looking for.
In short: the Gregorian calendar lunardaycalc option makes a calendar work nicely with Monday the 31st coming before Tuesday the 1st of the next month etc. How do I do this with a non-Gregorian calendar?
My campaign's custom calendar has 12 months of 30 days each, with five days' worth of holidays spread between the months. Each week has only 7 days. How do I make the dates sync up properly to the week days?
Code:<Collapse> <name type="string">Calendar of Avarus</name> <setting type="string">Collapse</setting> <lunarweek> <day1 type="string">Saulesday</day1> <day2 type="string">Selensday</day2> <day3 type="string">Tyrsday</day3> <day4 type="string">Crownsday</day4> <day5 type="string">Geldursday</day5> <day6 type="string">Daliasday</day6> <day7 type="string">Ausrinesday</day7> </lunarweek> <periods> <period1> <days type="number">30</days> <name type="string">Kyzer</name> </period1> <period10> <days type="number">30</days> <name type="string">Tavalas</name> </period10> <period11> <days type="number">30</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Autumn Equinox</name> <startday type="number">21</startday> </holiday1> </holidays> <name type="string">Selene</name> </period11> <period12> <days type="number">30</days> <name type="string">Zauberyn</name> </period12> <period13> <days type="number">30</days> <name type="string">Therran</name> </period13> <period14> <days type="number">30</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Winter Solstice</name> <startday type="number">21</startday> </holiday1> </holidays> <name type="string">Morpheus</name> </period14> <period15> <days type="number">1</days> <name type="string">The Dreaming</name> </period15> <period2> <days type="number">30</days> <name type="string">Noxan</name> </period2> <period3> <days type="number">30</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Spring Equinox</name> <startday type="number">21</startday> </holiday1> </holidays> <name type="string">Kovas</name> </period3> <period4> <days type="number">1</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Rebirth</name> <startday type="number">1</startday> </holiday1> </holidays> <name type="string">Rebirth</name> </period4> <period5> <days type="number">30</days> <name type="string">Epsion</name> </period5> <period6> <days type="number">30</days> <name type="string">Amorien</name> </period6> <period7> <days type="number">30</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Summer Solstice</name> <startday type="number">21</startday> </holiday1> </holidays> <name type="string">Saule</name> </period7> <period8> <days type="number">3</days> <holidays> <holiday1> <duration type="number">3</duration> <name type="string">Midsummer Annual Holiday</name> <startday type="number">1</startday> </holiday1> <holiday2> <duration type="number">1</duration> <name type="string">Leap Year - Every Four Years</name> <startday type="number">1</startday> </holiday2> </holidays> <name type="string">Midsummer</name> </period8> <period9> <days type="number">30</days> <name type="string">Ausrine</name> </period9> </periods> </Collapse>
Many thanks!!!
-
February 11th, 2017, 13:39 #2
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
Try the attached extension & module:
-
February 11th, 2017, 17:15 #3
- Join Date
- Dec 2016
- Posts
- 25
This was perfect!!! Thank you so much
I never would've figured out the coding for the extension. Maybe now if I stare at it long enough I can reproduce it and tweak it if I need to make a new calendar for another game.
(or I'll just make months of even length )
-
February 11th, 2017, 17:40 #4
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
It doesn't handle missing leap years - it just assumes every fourth year is a leap year (which is what eventually led to the Gregorian Calendar Reform, the extra leap years made the calendar slowly move forward through the seasons). You didn't give enough details to do anything else.
-
February 11th, 2017, 17:42 #5
- Join Date
- Dec 2016
- Posts
- 25
Oh, no, I do not need realism here beyond the weekdays syncing up. This is perfect. You see, magic guarantees that the leap year fixes the calendar for eternity. (Screw you, astrophysics! )
Thanks again
-
May 2nd, 2018, 05:45 #6
- Join Date
- Apr 2018
- Posts
- 16
-
May 2nd, 2018, 12:55 #7
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
-
May 2nd, 2018, 14:25 #8
- Join Date
- Apr 2018
- Posts
- 16
-
May 2nd, 2018, 15:11 #9
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
You can always compare code; I do that occasionally to improve my own.
-
May 2nd, 2018, 15:31 #10
- Join Date
- Apr 2018
- Posts
- 16
I already did and it was very helpful! Your LUA is far more compact - you can definitely tell I was learning as I was going. However, the lunar day calc is "wrong" in the sense that you were given the wrong date reference in that thread. There's a whole thread on reddit trying to establish the timeline of CR's first campaign that goes into that in depth, but a "canon" date is Conthsen, 24 Duscar 811 PD which isn't what you were given. But aside from that, yours is far better. :-)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks