Building & Scripting > Building Board

Seasons and Moon Phases

(1/3) > >>

Molly:
I managed to catch Thotter, when he peeked out of his hole, and forced him to code the DG_scripts part of seasons and Moon Phases. So all Builders will now be able to work with these variables in their zones and quests, which could add some extra spice to them.

For example Werewolvs can now turn at the appropriate time, and stay in the wolf shape as long as the full moon lasts, fruits can ripe on trees in autumn, birds can lay eggs in spring and fledlings can hatch in summer. And magic herbs for potions can be collected when the moon is in the waning crescent phase, for better effect.

Below is some code info about how ro use the new feature:

To get the current season, do %time.season%.
The seasons are:
winter (month 0-3), spring (month 4-7), summer (month 8-12) and autumn (month 13-16).
Note that the total amount of months is 17, and that summer has 5 months.
All other seasons have 4 months.

To get the current moon phase, do %time.moon%.
The moon phases are:
"full", "waning gibbous", "last quarter", "waning crescent",  "new", "waxing crescent", "first quarter" and "waxing gibbous".
For example, if something in a script should only happen if the moon is waning gibbous, do
 if %time.moon% == waning gibbous
  %echo% leprechauns take over the world
 end
Keep in mind that %time.moon% will return the current moon phase even if it's daytime.

This should be implemented fully now. (See the post in the scripting board). It has not yet been tested in praxis though, but I am about to do that soon.

Molly:
Here is some basic info about how the Time system is set up in 4D.

hour   = 0-23   /day
day    = 1-35   /month
week   = 7 days 
month  = 0-17 /year
year   = 560 days
moon phases  (see below)
seasons      (see below)

(Not sure how many weeks in a month though, but that probably doesn't matter, since they don't have names, like the days and months and years).

Moon phases:
full / waning gibbous / last quarter / waning crescent /  
new / waxing crescent / first quarter / waxing gibbous

Months and Seasons:
Winter Season: Snow / Wolf / Frost Giant / Old Forces
Spring Season: Grand Struggle / Buds / Nature / Futility
Summer Season: Dragon / Sun / Heat / Battle
Fall Season: Dark Shades / Shadows / Long Shadows / Ancient Evil / Great Evil
----

Each pulse = 0.1 second
1 tic = 72 seconds,
24 tics/day,
35 days/month = 840 T
17 months/year = 14280 T
so there are 24 tics for every mud day which equals about 29 rl minutes

Or approximately:
30 rl min   = 1 mud day   = 25 tics
1 rl hour   = 2 mud days  = 50 ticks
2 rl hour   = 4 mud days  = 100 ticks
5 rl hour   = 10 mud days = 250 ticks
10 rl hours = 20 mud days = 500 ticks

20 ticks  = 1400 seconds = 22 minutes, 8 seconds
100 ticks = 7000 seconds = 117 minutes, 4 seconds = 1 hour, 57 min
1028 tics = 20 rl hours
500 ticks = 10 rl hours
200 ticks = 4 rl hours
100 ticks = 2 rl hours

Just to complete this info, could one of you coder guys please post the names of the days in the week?

Tocharaeh:
This was the best post ever, Just sayin' :)

Prometheus:
I talked to Molly and she said it is okay to post Moon Phase days and lengths.

So here goes:
New Moon (1 to 4) (4 days)
Waxing Crescent (5 to 9) (5 days)
First Quarter (10 to 13) (4 days)
Waxing Gibbous (14 to 17) (4 days)
Full Moon (18 to 22) (5 days)
Last Quarter (23 to 26) (4 days)
Waning Gibbous (27 to 30) (4 days)
Waning Crescent (31 to 35) (5 days)

Tocharaeh:
wow, interesting. So now we are actually seeing time pass by. Neato.

Navigation

[0] Message Index

[#] Next page

Go to full version