<?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%2Fability_costs</id>
	<title>Manual:DIL Manual/ability costs - 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%2Fability_costs"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/ability_costs&amp;action=history"/>
	<updated>2026-11-23T21:21:17Z</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/ability_costs&amp;diff=2944&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/ability_costs&amp;diff=2944&amp;oldid=prev"/>
		<updated>2026-11-14T23:14:20Z</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;= ability_costs =&lt;br /&gt;
'''Field''' (integer, read-only; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.ability_costs[i] : integer&lt;br /&gt;
&lt;br /&gt;
The player's racial modifier for training ability &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt;: the &amp;lt;code&amp;gt;race&amp;lt;/code&amp;gt; line for the player's race in &amp;lt;code&amp;gt;vme/etc/abilities.def&amp;lt;/code&amp;gt;, for example 2 for an elf's magic and -3 for a dwarf's. Added to the profession's modifier it sets how much training the ability costs: the higher the sum, the cheaper, and below 1 the player can train it only once per level. It is not the cost itself. &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) to &amp;lt;code&amp;gt;ABIL_HP&amp;lt;/code&amp;gt; (7).&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null it fails, and also when &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is outside 0 to 7.&lt;br /&gt;
* It is 0 when the player's race is outside the table (100 or more).&lt;br /&gt;
* vmc accepts an assignment, but it never works: at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in lvalue assignemt&amp;quot; and stops.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string race_bonus(pc : unitptr, i : integer);&lt;br /&gt;
var&lt;br /&gt;
   n : integer;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   n := pc.ability_costs[i];&lt;br /&gt;
   if (n &amp;gt; 0)&lt;br /&gt;
      return (&amp;quot;+&amp;quot; + itoa(n));&lt;br /&gt;
   return (itoa(n));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Shows a player's racial modifier for an ability, with its sign.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/abilities|abilities]]&lt;br /&gt;
* [[Manual:DIL Manual/ability levels|ability_levels]]&lt;br /&gt;
* [[Manual:DIL Manual/race|race]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>