<?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%2Frace</id>
	<title>Manual:DIL Manual/race - 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%2Frace"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/race&amp;action=history"/>
	<updated>2026-11-23T20:51:19Z</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/race&amp;diff=2941&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/race&amp;diff=2941&amp;oldid=prev"/>
		<updated>2026-11-14T23:14:11Z</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;= race =&lt;br /&gt;
'''Field''' (integer, read/write; units: characters).&lt;br /&gt;
&lt;br /&gt;
 ch.race : integer&lt;br /&gt;
&lt;br /&gt;
The character's race, a &amp;lt;code&amp;gt;RACE_&amp;lt;/code&amp;gt; constant from values.h. The player races are &amp;lt;code&amp;gt;RACE_HUMAN&amp;lt;/code&amp;gt; (0) to &amp;lt;code&amp;gt;RACE_DARK_ELF&amp;lt;/code&amp;gt; (10); monster races start at 110 (&amp;lt;code&amp;gt;RACE_KINGRAITH&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;RACE_GOBLIN&amp;lt;/code&amp;gt;, ...), and plant.h adds a few more. A zone file sets it with &amp;lt;code&amp;gt;race&amp;lt;/code&amp;gt; in an NPC. wmacros.h has tests such as &amp;lt;code&amp;gt;RACE_IS_HUMANOID(race)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RACE_IS_UNDEAD(race)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For a player the race decides the starting height, weight and lifespan (&amp;lt;code&amp;gt;vme/etc/races.def&amp;lt;/code&amp;gt;) and the racial modifiers to training costs (abilities.def and the other .def files).&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* On an object, a room or null it fails.&lt;br /&gt;
* Stored as an unsigned 16-bit number: values outside 0 to 65535 wrap around. No access level is needed to assign it.&lt;br /&gt;
* Assigning a player's race changes only the race. [[Manual:DIL Manual/reset race()|reset_race()]] then rolls height, weight, lifespan and age for the new race.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string race_greeting(pc : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.race == RACE_DWARF)&lt;br /&gt;
      return (&amp;quot;Hail, son of the mountain!&amp;quot;);&lt;br /&gt;
   if ((pc.race == RACE_ELF) or (pc.race == RACE_HALF_ELF))&lt;br /&gt;
      return (&amp;quot;Well met, child of the woods.&amp;quot;);&lt;br /&gt;
   if (RACE_IS_HUMANOID(pc.race))&lt;br /&gt;
      return (&amp;quot;Welcome, traveller.&amp;quot;);&lt;br /&gt;
   return (&amp;quot;What manner of beast are you?&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Greets a character by race, as the guild masters in guilds.zon pick words by race.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/sex|sex]]&lt;br /&gt;
* [[Manual:DIL Manual/ability costs|ability_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/reset race()|reset_race()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>