Manual:DIL Manual/mudmonth

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 23:19, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

mudmonth

Variable (integer, read-only).

mudmonth : integer

The month of the mud year, 0 to 8. A mud month is 14 mud days, 28 real hours.

Notes

  • The seasons, as the weather uses them (weather.cpp): months 0 to 2 are winter, 3 and 4 spring, 5 and 6 summer, 7 and 8 autumn. The air pressure of every zone drifts toward a level set by the season: lowest in winter (25 below the zone's base), then autumn, spring, and highest in summer (20 above), so winter brings the most rain and summer the clearest skies.
  • The time command (commands.zon) names the months: Month of Winter, of the Winter Wolf, of the Frost Giant, of the Spring, of Futility, of the Sun, of the Heat, of the Long Shadows, of the Ancient Darkness. A list like that, indexed with mlist.[mudmonth], gives the name.
  • The calendar (vme.h): an hour is 5 real minutes (SECS_PER_MUD_HOUR), a day 24 hours (2 real hours), a month 14 days (MUD_MONTH; the comment beside it in vme.h still says 21), a year 9 months (MUD_YEAR, 10.5 real days). The count starts on 11 August 1990.
  • The mud clock is the real clock at boot plus the game ticks since (mud_date in weather.cpp). Normally it keeps pace with real time; with vme -w, or after a god's wtimewarp, it runs ahead, so code that waits for a time of day can be tried quickly.
  • Written without brackets: mudmonth() doesn't compile. It can't be assigned.

Example

dilbegin string season();
code
{
   if (mudmonth <= 2)
      return ("winter");
   if (mudmonth <= 4)
      return ("spring");
   if (mudmonth <= 6)
      return ("summer");
   return ("autumn");
}
dilend

Gives the season's name, with the months the weather uses.

See also