<?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%2Fskill_costs</id>
	<title>Manual:DIL Manual/skill 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%2Fskill_costs"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/skill_costs&amp;action=history"/>
	<updated>2026-11-22T22:09:05Z</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/skill_costs&amp;diff=2851&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/skill_costs&amp;diff=2851&amp;oldid=prev"/>
		<updated>2026-11-14T23:08:46Z</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;= skill_costs =&lt;br /&gt;
'''Field''' (integer, read-only; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.skill_costs[index] : integer&lt;br /&gt;
&lt;br /&gt;
Despite the name, not a price: the player's racial modifier for the skill with that index, from -3 to +3. It comes from the skill's &amp;lt;code&amp;gt;race &amp;amp;lt;race&amp;amp;gt; = &amp;amp;lt;n&amp;amp;gt;&amp;lt;/code&amp;gt; lines in &amp;lt;code&amp;gt;vme/etc/commands.def&amp;lt;/code&amp;gt;; a race without such a line gets 0. A positive modifier makes training the skill cheaper and lets it go higher; a negative one does the opposite (teach.cpp). The indexes are the &amp;lt;code&amp;gt;SKI_*&amp;lt;/code&amp;gt; constants in &amp;lt;code&amp;gt;vme/include/values.h&amp;lt;/code&amp;gt;, from 0 to &amp;lt;code&amp;gt;SKI_TREE_MAX - 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails; so does an index outside 0 to &amp;lt;code&amp;gt;SKI_TREE_MAX - 1&amp;lt;/code&amp;gt;.&lt;br /&gt;
* It depends only on the player's [[Manual:DIL Manual/race|race]]: two players of the same race get the same values.&lt;br /&gt;
* vmc accepts an assignment, but at run time it fails in every zone: 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_talent(pc : unitptr, ski : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return (&amp;quot;&amp;quot;);&lt;br /&gt;
   if (pc.skill_costs[ski] &amp;gt; 0)&lt;br /&gt;
      return (&amp;quot;Your race has a talent for &amp;quot; + skill_name(ski) + &amp;quot;.&amp;quot;);&lt;br /&gt;
   if (pc.skill_costs[ski] &amp;lt; 0)&lt;br /&gt;
      return (&amp;quot;Your race finds &amp;quot; + skill_name(ski) + &amp;quot; hard to learn.&amp;quot;);&lt;br /&gt;
   return (&amp;quot;Your race has no gift for &amp;quot; + skill_name(ski) + &amp;quot;, nor trouble with it.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Describes how a player's race affects learning a skill.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/skills|skills]]&lt;br /&gt;
* [[Manual:DIL Manual/skill levels|skill_levels]]&lt;br /&gt;
* [[Manual:DIL Manual/race|race]]&lt;br /&gt;
* [[Manual:DIL Manual/spell costs|spell_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/weapon costs|weapon_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/ability costs|ability_costs]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>