-
Moon Phases
According to actual moon phases, the phases of New Moon, First Quarter, Full Moon, and Last Quarter, they each last for only 1 day. But for probable reasons for werewolves and mushroom farming, you have changed those phases to last 3 days for each. So that makes each of the other phases last 4 days each: Waxing Crescent, Waxing Gibbous, Waning Crescent and Waning Gibbous. But it is good to know of these changes.
-
The delay from a moon phase of a cycle to the next is 27 days and a little less than 8h. Therefore, these duration must vary, or the game would quickly run out of sync. So, it's more complicated than that. :)
-
We calculate the real-world New Moon and Full Moon dates, then make those three days long by starting one day before and ending one day after the real-world date. Then we divide all the remaining days between the other phases.
-
I've tried to calculate the in-game moon phases based on your explanation, but it looks like I'm still missing something.
If we apply it to this week, we have (all times are local EST):
- New moon was Monday, June 3rd, 06:01
- Full moon will be Monday, June 17th, 04:30
I assume the phase estimate is performed for time 00:00 of the day, so the "first" IRL day of new moon (when it's New Moon at 00:00) is June 4th, hence the days for New Moon were Monday, Tuesday and Wednesday (3rd to 5th).
Similarly, the "first" IRL day of Full Moon is Tuesday 18th, and therefore in-game Full Moon days will be from Monday 17th to Wednesday 19th.
This gives us from June 6th to 16th, included, for the other 3 phases. That's 11 days, so 3 2/3rd days = 3 days and 16 hours per phase. We then have:
- Waxing Crescent Moon starts after New Moon and lasts 3 days 16 hours, so 4 days, from June 6th to 9th included.
- First-Quarter Moon starts 3 days 16 hours after New Moon and lasts 3 days 16 hours, so from June 10th to 13th included.
- Waxing Gibbous Moon starts 7 days 8 hours after New Moon and lasts until Full Moon, from June 14th to 16th.
Total 4 + 4 + 3 = 11 days as expected.
Except today is June 12th and the game is telling me this is Waxing Gibbous Moon, 4 more days to Full. What did I miss?
-
I guess I'm mis-remembering it. Here are some illuminating comments from the code. It uses a public-domain bit of code I found (and can't find online anymore, the links are dead...) that "determines the fraction of the moon's disk that is illuminated at a given time", and also tells if the moon is waxing or waning, for a given Julian date. (Presumably at midnight, but I don't really know. The formula uses a bunch of hard-coded constants that only work at the date-level.) It's based on calculations by Jean Meeus, I think this book https://www.amazon.com/Astronomical-.../dp/0943396611. I honestly don't understand any of the moon math. :)
Using that code, my code just divvies the dates up, assigning a moon phase to each date.
// we want the "full moon" to be EXACTLY 3 days. So we find the
// most full day, and declare that day to be full, as well as the day
// before and after it.
// We do the same for the "new moon" and the two quarter-moons, also exactly 3 days.
// the dates that don't have phases yet are the "leftover" phases.
// Their length varies between 3 and 5 days depending on the month
The "leftover" phases are WaxingCrescentMoon, WaxingGibbousMoon, WaningGibbousMoon, and WaningCrescentMoon.
-
Thank you for this most accurate explanation. I expect all calculations of main phases of the moon to give the same result, approximately. So it should be possible now to know every in-game phase of the moon in advance.
-
Oh my gourd, I've been meaning to ask this but apparently I was beaten to the punch! I suspected certain phases were longer but could not determine the logic.
This will help immensely with the accuracy of my calculations. Thanks!
-
I never really looked at how the moon phases worked and science behind it. There is a 'Sidereal orbit' that is a complete 360 degrees around the earth which takes 27.322 days. There is also a 'Synodic Orbit' which is an orbit around the earth and have the moon between the earth and the sun to have a new moon, which takes 29.5 days. Since the earth is moving in an orbit around the sun, the moon has to orbit more than 360 degrees in order to have a new moon. So the Synodic orbit is the one used for the phases of the moon. A new moon is when the moon is perfect between the sun and earth and after about a month in time, the earth is in a different angle/position to the sun, so the moon must travel a little further to be perfectly between the sun and earth.
-
For those of you who don't care about calculations, this calendar follows in-game moon cycles exactly. I've been using it for over a year and have never grown the wrong mushrooms!
https://www.calendar-12.com/moon_calendar/2019/july
This month, however, is a little odd with the 4 days of full moon on the calendar. P:G will have waning gibbous on the 18th, not another full moon.
-
I've updated my Windows app to follow this algorithm more closely. It's still not perfect, unfortunately, but I gave my best shot.