Thread: Barovian Calendar
-
February 12th, 2019, 12:47 #1
Barovian Calendar
I've been digging into the calendar stuff lately and noticed that it seems the barovian calendar entry may be incomplete. I know there isnt an official published standard for the barovian calendar, so its implementation is subject to interpretation.
In the calendar.mod db.xml, the barovian calendar includes the tags:
Code:<lunardaycalc type="string">barovian</lunardaycalc> and <periodvarcalc type="string">barovian</periodvarcalc>
calendar of barovia.jpgLast edited by mattekure; February 12th, 2019 at 13:20.
For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e
-
February 12th, 2019, 15:06 #2
The following lunar day calculator works for the barovian calendar as currently defined in the FG calendar.
Code:function calcBaroviaLunarDay(nYear, nMonth, nDay) local rYear = nYear%7; if (rYear % 2) == 0 then rYearDay = (rYear/2); else rYearDay = (rYear/2)+3.5; end local rMonthDays = (nMonth-1)*30; if nMonth > 10 then rMonthDays = rMonthDays + 1; end local rDay = (rYearDay + rMonthDays + nDay)%7; if rDay == 0 then return 7; end return rDay; end
Last edited by mattekure; February 12th, 2019 at 15:09.
For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks