Joshua Stream Pre
Page 8 of 8 First ... 678
  1. #71
    mattekure's Avatar
    Join Date
    Feb 2018
    Location
    Virginia, USA
    Posts
    1,045
    The following functions seem to work and align the Golarian calendar with the ones I found online. I've attached the mod/ext I used for testing. This was the online calendar I compared against. https://dungeonetics.com/calendar/

    Code:
    function calcGolarionLunarDay(nYear, nMonth, nDay)
    	local nZellerYear = nYear;
    	local nZellerMonth = nMonth;
    	if nMonth <  then
    		nZellerYear = nZellerYear - 1;
    		nZellerMonth = nZellerMonth + 12;
    	end
    	local nZellerDay = (nDay + math.floor(2.6*(nZellerMonth + 1)) + nZellerYear + math.floor(nZellerYear / 8) -1)  % 7;
    	if nZellerDay == 0 then
    		return 7;
    	end
    	return nZellerDay;
    end
    
    function calcGolarionMonthVar(nYear, nMonth)
    	if nMonth == 2 then
    		local nYear = DB.getValue("calendar.current.year", 0);
    		if (nYear % 8) == 0 then
    			return 1;
    		end
    	end
    	return 0;
    end
    Attached Files Attached Files
    Last edited by mattekure; November 24th, 2020 at 20:21.

  2. #72
    Ok, I've pushed the changes in the CoreRPG ruleset; and the included calendar module. You'll have to reset the calendar; and add it back from the calendar module again.

    Regards,
    JPG

  3. #73
    Sulimo's Avatar
    Join Date
    Dec 2014
    Location
    Pacific Time Zone
    Posts
    293
    I have a couple of questions.

    I mostly have a calendar mod done. I managed to get 4 of the 5 calendars the way I want them.

    I used the generator/converter that was linked a few pages back.

    I am trying to create the Shire Calendar from the Lord of the Rings.

    Every year always starts of Saturday, and ends on Friday.

    There are 4 holidays, 1 Yule (the last day of the year), 2 Yule (the first day of the year), 1 Lithe (day before Midyear's Day), 2 Lithe (day after Midyear's Day).

    There are up to two days in the middle of the year. The first is Midyear's Day, the second is called Overlithe and only occurs on Leap Years.

    I have the calendar setup except for being able to setup Midyear's Day and Overlithe (for Leap Years) to not appear as actual days of the week.

    So for example, 1 Lithe would be on Friday, and 2 Lithe would be on Saturday. Midyear's day would fall in between the two Lithe days, but is not is not assigned to a day of the week. Overlithe is the same for leap years.

    Can this be done?



    Another issue I am having is that it is not setting days properly. Months always start on the same day instead (Saturday) of progressing like expected, so for example 1 Yule is on a Saturday, Afteryule 1 is a Sunday (or should be). If I set it as Gregorian, it oddly skips a day between each the end of each period/month and the next, basically going from Saturday to Monday in the example of 1 Yule and Afteryule.

    I'm not sure how to address this issue.
    Not all who wander are lost.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DMsGuild

Log in

Log in