<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fmudyear</id>
	<title>Manual:DIL Manual/mudyear - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fmudyear"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/mudyear&amp;action=history"/>
	<updated>2026-11-22T17:48:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/mudyear&amp;diff=3030&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/mudyear&amp;diff=3030&amp;oldid=prev"/>
		<updated>2026-11-14T23:19:41Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= mudyear =&lt;br /&gt;
'''Variable''' (integer, read-only).&lt;br /&gt;
&lt;br /&gt;
 mudyear : integer&lt;br /&gt;
&lt;br /&gt;
The mud year: the number of mud years since 11 August 1990, about 1261 in November 2026. A mud year is 9 mud months, 10.5 real days.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It only counts up, so it suits charges by the year: commands.zon's storage stores &amp;lt;code&amp;gt;itoa(mudyear)&amp;lt;/code&amp;gt; in an extra on the item and charges for the years passed when it is fetched.&lt;br /&gt;
* A player's age is not counted from mudyear but from real time: &amp;lt;code&amp;gt;(realtime - pc.birth) / SECS_PER_MUD_YEAR&amp;lt;/code&amp;gt;, as youth.zon does.&lt;br /&gt;
* The calendar (vme.h): an hour is 5 real minutes (&amp;lt;code&amp;gt;SECS_PER_MUD_HOUR&amp;lt;/code&amp;gt;), a day 24 hours (2 real hours), a month 14 days (&amp;lt;code&amp;gt;MUD_MONTH&amp;lt;/code&amp;gt;; the comment beside it in vme.h still says 21), a year 9 months (&amp;lt;code&amp;gt;MUD_YEAR&amp;lt;/code&amp;gt;, 10.5 real days). The count starts on 11 August 1990.&lt;br /&gt;
* The mud clock is the real clock at boot plus the game ticks since (&amp;lt;code&amp;gt;mud_date&amp;lt;/code&amp;gt; in weather.cpp). Normally it keeps pace with real time; with &amp;lt;code&amp;gt;vme -w&amp;lt;/code&amp;gt;, or after a god's &amp;lt;code&amp;gt;wtimewarp&amp;lt;/code&amp;gt;, it runs ahead, so code that waits for a time of day can be tried quickly.&lt;br /&gt;
* Written without brackets: &amp;lt;code&amp;gt;mudyear()&amp;lt;/code&amp;gt; doesn't compile. It can't be assigned.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer storage_fee(item : unitptr);&lt;br /&gt;
var&lt;br /&gt;
   e     : extraptr;&lt;br /&gt;
   years : integer;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   e := &amp;quot;$stored&amp;quot; in item.extra;&lt;br /&gt;
   if (e == null)&lt;br /&gt;
      return (0);&lt;br /&gt;
   years := mudyear - atoi(e.descr);&lt;br /&gt;
   if (years &amp;lt; 1)&lt;br /&gt;
      years := 1;&lt;br /&gt;
   if (years &amp;gt; 10)&lt;br /&gt;
      years := 10;&lt;br /&gt;
   return (years * GOLD_MULT);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The fee for an item stored with &amp;lt;code&amp;gt;addextra(item.extra, {&amp;quot;$stored&amp;quot;}, itoa(mudyear))&amp;lt;/code&amp;gt;: one gold piece a year, at least one and at most ten, as in commands.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/mudhour|mudhour]]&lt;br /&gt;
* [[Manual:DIL Manual/mudday|mudday]]&lt;br /&gt;
* [[Manual:DIL Manual/mudmonth|mudmonth]]&lt;br /&gt;
* [[Manual:DIL Manual/realtime|realtime]]&lt;br /&gt;
* [[Manual:DIL Manual/birth|birth]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>