<?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%2Fabilities</id>
	<title>Manual:DIL Manual/abilities - 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%2Fabilities"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/abilities&amp;action=history"/>
	<updated>2026-11-22T22:13:25Z</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/abilities&amp;diff=2942&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/abilities&amp;diff=2942&amp;oldid=prev"/>
		<updated>2026-11-14T23:14:14Z</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;= abilities =&lt;br /&gt;
'''Field''' (integer, read/write; units: characters).&lt;br /&gt;
&lt;br /&gt;
 ch.abilities[i] : integer&lt;br /&gt;
&lt;br /&gt;
One of the character's abilities. &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is an &amp;lt;code&amp;gt;ABIL_&amp;lt;/code&amp;gt; constant from vme.h: &amp;lt;code&amp;gt;ABIL_MAG&amp;lt;/code&amp;gt; (0), &amp;lt;code&amp;gt;ABIL_DIV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_STR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_DEX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_CON&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_CHA&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_BRA&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ABIL_HP&amp;lt;/code&amp;gt; (7). Players raise them by training. In an NPC the zone file gives a share for each (&amp;lt;code&amp;gt;MSET_ABILITY&amp;lt;/code&amp;gt; in wmacros.h; vmc wants them to add up to 100), and vmc turns the shares into values for the NPC's level.&lt;br /&gt;
&lt;br /&gt;
The zones use them as the ability half of skill checks, and for things like carrying capacity (baseget.zon: &amp;lt;code&amp;gt;2 * pc.abilities[ABIL_STR]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It fails when &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is outside 0 to 7, and on an object, a room or null.&lt;br /&gt;
* On an NPC any program can assign it. On a player only a program in a zone with access level 0 (the fourth column of &amp;lt;code&amp;gt;vme/etc/zonelist&amp;lt;/code&amp;gt;) can; what counts is the zone of the program running on the unit, not that of a function it calls. Elsewhere vmc accepts the assignment, but at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in lvalue assignemt&amp;quot; and stops. Reading works in every zone.&lt;br /&gt;
* Stored as a 16-bit number. Bonuses from equipment and spells are affects (&amp;lt;code&amp;gt;APF_ABILITY&amp;lt;/code&amp;gt;, see [[Manual:DIL Manual/addaff()|addaff()]]) that change this value while they last. Such an affect on &amp;lt;code&amp;gt;ABIL_HP&amp;lt;/code&amp;gt; also recomputes [[Manual:DIL Manual/max hp|max_hp]]; assigning the field does not.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer carry_capacity(pc : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   return (100 + ((pc.baseweight - 100) / 2) + (2 * pc.abilities[ABIL_STR]));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
How much weight a character can carry, as in baseget.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/ability levels|ability_levels]]&lt;br /&gt;
* [[Manual:DIL Manual/ability costs|ability_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/ability points|ability_points]]&lt;br /&gt;
* [[Manual:DIL Manual/addaff()|addaff()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>