Page 2 of 2

Re: Check future full moon

Posted: Mon Oct 05, 2020 3:34 pm
by Ralzar
Ah, yeah that's how werewolfs work in vanilla.

Daggerfall Calendar

"Every 32 days there is a full moon, especially relevant for shape-shifters since they will turn into their were-form and will stay in that form until midnight of the next day. Hence a Lunar Transition is every 8 days, which is interesting if this effect is used when enchanting items.

It must be noted that there are two moons affecting the game, they are time shifted by 4 days. That means four days after a full moon there is a second full moon, since Nirn has two moons (Masser and Secunda).

The first full moons in the game are on the 21st and 25th of Morning Star 3E 405 the next are on the 23rd and 27th of Sun's Dawn 3E 405 and so on."


This... is not what the DFU code does right?

Re: Check future full moon

Posted: Mon Oct 05, 2020 4:07 pm
by pango
Thanks for the info!

So the code should be something like

Code: Select all

            // Find the lunar phase for current day
            int moonRatio = (DayOfYear + Year * 360 + offset) % 32;
(21 + 405 * 360 + 3) % 32 == 0
(25 + 405 * 360 - 1) % 32 == 0

So this should work as intended

Re: Check future full moon

Posted: Mon Oct 05, 2020 5:39 pm
by pango
I submitted a PR

Re: Check future full moon

Posted: Mon Oct 05, 2020 7:36 pm
by Ralzar
Cool.

So, if that PR gets merged, to get the day before I should do

(21 + 405 * 360 + 4) % 32 == 0
(25 + 405 * 360) % 32 == 0

Re: Check future full moon

Posted: Mon Oct 05, 2020 9:27 pm
by pango
... or compute moonRatio exactly the same way as GetLunarPhase(), and check if it's 31

Re: Check future full moon

Posted: Mon Oct 19, 2020 9:01 am
by Ralzar
Just wanted to pop in and say the change works perfectly as far as I can tell and my mods warning about full moon now triggers correctly.