Difference between revisions of "Manual:Game Mechanics/Abilities"

From DikuMUD Wiki
Jump to navigation Jump to search
(checked against the current code (wiki review 2026-11-15))
 
Line 1: Line 1:
−
== Ability Description ==
+
Players and monsters have eight abilities. This page says what each one does in the code, how players raise them and how monsters get them. The players' side is in [[Help/Attributes|help abilities]] and the help page of each ability, linked in the table.
  
−
Document Name:    ability.doc
+
== The eight abilities ==
−
Version:           3.40 (1997)
+
The constants are in <code>vme/include/vme.h</code>; in DIL an ability is <code>u.abilities[ABIL_STR]</code> (see [[Manual:DIL Manual/abilities|abilities]]).
  
−
Author:           Michael Seifert
+
{| class="wikitable"
 +
! Ability !! Constant !! What it does
 +
|-
 +
| Strength ([[Help/Str|help]]) || <code>ABIL_STR</code> ||
 +
* The attack with most weapons: a weapon's attack ability is the average of three abilities set in <code>vme/etc/weapons.def</code>; for nearly all weapons that is strength, strength and dexterity.
 +
* How much a character can carry: 50 + half their own weight (at least 50) + 2 &times; STR pounds.
 +
* How well a character moves in heavy armour (see dexterity).
 +
|-
 +
| Dexterity ([[Help/Dexterity|help]]) || <code>ABIL_DEX</code> ||
 +
* The defence in melee: the attacker's attack ability is compared with the defender's dexterity, after armour has lowered it (see below).
 +
* The attack with the whip, the sickle, the bow, the crossbow and the sling (dexterity, dexterity and strength).
 +
* How many things a character can carry: 10 + DEX / 10.
 +
* Many skills: climbing, picking locks, sneaking, hiding, stealing, fleeing (with brain).
 +
* A monster's use of a shield.
 +
|-
 +
| Constitution ([[Help/Constitution|help]]) || <code>ABIL_CON</code> ||
 +
* How fast hit points come back: 1 + (3 &times; CON + 20) / 10 each 30 seconds for a player.
 +
* Endurance: at most 2 &times; CON + 150, and it comes back at a tenth of that.
 +
* The swimming check.
 +
|-
 +
| Charisma ([[Help/Chr|help]]) || <code>ABIL_CHA</code> ||
 +
* Mana: at most 100 + (BRA + CHA) / 2.
 +
* How fast mana comes back: (CHA - the higher of MAG and DIV) / 3 is added each time, so charisma above the caster's power speeds it up and below slows it down.
 +
* Skills that work on others' minds, such as soothe and ventriloquate.
 +
|-
 +
| Brain ([[Help/Brain|help]]) || <code>ABIL_BRA</code> ||
 +
* The defence against spells: the target's brain against the caster's magic or divine.
 +
* Mana, with charisma.
 +
* Searching, and other skills that need wits, such as fleeing (with dexterity).
 +
|-
 +
| Magic ([[Help/Level|help]]) || <code>ABIL_MAG</code> ||
 +
* The power of spells that draw on magic: those of sorcerers and conjurers. It decides how well the spell is cast and how strong it is.
 +
|-
 +
| Divine ([[Help/Level|help]]) || <code>ABIL_DIV</code> ||
 +
* The same for spells that draw on divine power: those of healers, druids, paladins, necromancers, dark knights and rangers.
 +
|-
 +
| Hit points ([[Help/Hits|help]]) || <code>ABIL_HP</code> ||
 +
* The maximum hit points: 3 &times; HPP + 20 for a player, 3 &times; HPP + 10 for a monster.
 +
|}
  
−
Document intended for:  World Creators
+
Each spell draws on either magic or divine (the <code>realm</code> in <code>vme/etc/spells.def</code>), so a caster needs only the one that their spells use.
  
−
=== Short Description ===
+
The formulas for mana, endurance and regeneration, and how age changes them, are on [[Manual:Game Mechanics/Levels#Hit points, mana and endurance|Levels]]. How abilities and skills combine in a check is on [[Manual:Game Mechanics/Introduction|Introduction]]: for a player a skill check counts two parts skill and one part ability; a monster, which has no skills, uses the ability alone.
−
This  document  describes  how the  various  abilities affect skills and game play for both players and monsters.
 
  
−
Abilities are in the range of [0..199]
+
=== Armour and dexterity ===
 +
Armour heavier than clothes lowers a character's dexterity in a fight (<code>effective_dex()</code> in <code>vme/src/skills.cpp</code>). Each piece worn on the body, head, legs, feet, hands or arms takes off a share of a penalty that depends on the kind of armour, and the share is the part of the body it covers (body 22, legs 18, arms 15, head, hands and feet 3 each, out of 64):
  
−
=== [STR] Strength ===
+
{| class="wikitable"
−
Strength determines:
+
! Armour !! Full penalty !! What lessens it
−
* How hard a character can hit with a weapon (or hand). The strength is basically added to the weapon attack skill and looked up on a table.
+
|-
−
* How much weight a character can carry.
+
| clothes || 0 ||
 +
|-
 +
| soft leather || 10 || (STR + 4 &times; DEX) / 5
 +
|-
 +
| hard leather || 20 || (STR + 2 &times; DEX) / 3
 +
|-
 +
| chain || 40 || (2 &times; STR + DEX) / 3
 +
|-
 +
| plate || 100 || STR
 +
|}
 +
For a player, the value in the last column is averaged with their skill in that kind of armour (armor soft leather, armor hard leather, armor chain, armor plate). That value, up to 100, takes off up to half the penalty. A suit of plate on every part of the body thus costs between 50 and 100 points of dexterity. See [[Help/Armour|help armour]].
  
−
=== [DEX] Dexterity ===
+
== Players ==
−
Dexterity determines:
+
A new character starts with a few points in each ability, set by race in <code>pcinitabils@basis</code> (a human has 4 in each). From then on abilities are raised by training: each practice adds 1 and costs ability points, of which a player gets 40 a level up to virtual level 114 (see [[Manual:Game Mechanics/Levels#Training|Levels]]). The price and the highest value a player can reach both depend on their race and profession: the modifiers for each ability are in <code>vme/etc/abilities.def</code>, for example a sorcerer has +3 in magic and a fighter -7. With race and profession adding up to 0 the limit is 80, with +2 it is 100, with +5 it is 110.
−
* A reduction in the damage when attacked (subtracted from strength / skill of opponent).
 
−
* A factor in deciding if a PC successfully uses a shield. 100% factor for NPCs.
 
−
* A PC factor in sneaking, hiding and stealing etc.- 100%for NPCs.
 
−
* A factor in how much a PC can hold.
 
  
−
=== [CON] Constitution ===
+
Magic raises abilities above that for a while: spells such as strength, and items worn with a transfer (below).
−
Constitution determines:
 
−
* How fast hit points are gained.
 
−
* How fast Endurance points are gained.
 
  
−
=== [CHA] Charisma ===
+
== Monsters ==
−
Charisma determines:
+
A monster's abilities are not given as values. The zone gives each ability a percentage, the eight adding up to 100, and vmc turns them into values from the monster's level when it compiles the zone. A monster of a higher level gets more points. See [[Manual:Game Mechanics/Monsters#Abilities|Monsters]].
−
* How fast Mana points are regained. Gain rate is relative to the MAG or DIV power of the character.
 
−
* Reduction/Increase on prices in standard shops.
 
−
* Who is hit by aggressive monsters, not yet decided if this will be people with high or low charisma. It ought to be high, but that would be disadvantageous.
 
  
−
=== [BRA] Brain ===
+
== Items that change abilities ==
−
Brain is a combination of Intelligence, Wisdom, Awareness  and Perception. Brain Determines:
+
A worn or wielded item can raise or lower an ability with <code>STR_TRANSFER(n)</code>, <code>DEX_TRANSFER</code>, <code>CON_TRANSFER</code>, <code>CHA_TRANSFER</code>, <code>BRA_TRANSFER</code>, <code>MAG_TRANSFER</code>, <code>DIV_TRANSFER</code> and <code>HIT_TRANSFER</code> (<code>vme/include/wmacros.h</code>). ''n'' is on the bonus scale from -7 to +7 (<code>BONUS_JUNK</code> to <code>BONUS_ARTIFACT</code> in <code>vme/include/values.h</code>); vmc refuses other values. When the item is loaded, the server turns it into the change in the ability (<code>bonus_map_b()</code> in <code>vme/src/common.cpp</code>):
−
* A defense factor when spells are cast against you (Exactly like dexterity for warriors).
 
−
* A 50% factor for PC's in discovering theft. 100% for NPC's.
 
−
* A 50% factor for PC's in discovering sneaking. 100% for NPC's.
 
−
* A 50% factor for PC's in discovering hidden. 100% for NPC's.
 
  
−
=== [MAG] Magical Essence ===
+
{| class="wikitable"
−
The  Energy  from which Magic Users draw their power.  Magical Essence determines:
+
! n !! -7 !! -6 !! -5 !! -4 !! -3 !! -2 !! -1 !! 0 !! +1 !! +2 !! +3 !! +4 !! +5 !! +6 !! +7
−
* A 50% factor in power for all magic user spells.
+
|-
−
* A 50% factor in success/reduction for all saving versus all spells.
+
| Ability || -10 || -8 || -6 || -5 || -4 || -2 || -1 || 0 || +1 || +2 || +4 || +5 || +6 || +8 || +10
−
* A "level" limitation for which spells can be learned by PC's.
+
|}
 +
Now and then an item comes out a point better or worse: a value that isn't 0 gets the open-ended roll divided by 100 added. See [[Manual:Game Mechanics/Objects#Magic items|Objects]].
  
−
=== [DIV] Divine Contact ===
+
<pre>
−
The  contact which is established between the priest  and his God.
+
ring_of_might
−
* A 50% factor in power for all cleric spells.
+
names {"ring of might", "ring"}
−
* A 50% factor in success/reduction for all saving throws versus all spells.
+
title "a ring of might"
−
* A "level" limitation for which spells can be learned by PC's.
+
descr "A heavy iron ring lies here."
−
 
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_FINGER}
−
=== [HPP] Hit points points [sic] ===
+
STR_TRANSFER(BONUS_GOOD)
−
Hit-point-points are used to buy more hit points. For each HPP bought  the  characters  hit points (HP) is increased  by  a certain number (which varies according to size of HPP).
+
weight 1
 +
cost 2 GOLD_PIECE
 +
end
 +
</pre>
 +
This ring gives +2 strength while it is worn. The transfer macros also set <code>UNIT_FL_MAGIC</code>.

Latest revision as of 06:27, 15 November 2026

Players and monsters have eight abilities. This page says what each one does in the code, how players raise them and how monsters get them. The players' side is in help abilities and the help page of each ability, linked in the table.

The eight abilities

The constants are in vme/include/vme.h; in DIL an ability is u.abilities[ABIL_STR] (see abilities).

Ability Constant What it does
Strength (help) ABIL_STR
  • The attack with most weapons: a weapon's attack ability is the average of three abilities set in vme/etc/weapons.def; for nearly all weapons that is strength, strength and dexterity.
  • How much a character can carry: 50 + half their own weight (at least 50) + 2 × STR pounds.
  • How well a character moves in heavy armour (see dexterity).
Dexterity (help) ABIL_DEX
  • The defence in melee: the attacker's attack ability is compared with the defender's dexterity, after armour has lowered it (see below).
  • The attack with the whip, the sickle, the bow, the crossbow and the sling (dexterity, dexterity and strength).
  • How many things a character can carry: 10 + DEX / 10.
  • Many skills: climbing, picking locks, sneaking, hiding, stealing, fleeing (with brain).
  • A monster's use of a shield.
Constitution (help) ABIL_CON
  • How fast hit points come back: 1 + (3 × CON + 20) / 10 each 30 seconds for a player.
  • Endurance: at most 2 × CON + 150, and it comes back at a tenth of that.
  • The swimming check.
Charisma (help) ABIL_CHA
  • Mana: at most 100 + (BRA + CHA) / 2.
  • How fast mana comes back: (CHA - the higher of MAG and DIV) / 3 is added each time, so charisma above the caster's power speeds it up and below slows it down.
  • Skills that work on others' minds, such as soothe and ventriloquate.
Brain (help) ABIL_BRA
  • The defence against spells: the target's brain against the caster's magic or divine.
  • Mana, with charisma.
  • Searching, and other skills that need wits, such as fleeing (with dexterity).
Magic (help) ABIL_MAG
  • The power of spells that draw on magic: those of sorcerers and conjurers. It decides how well the spell is cast and how strong it is.
Divine (help) ABIL_DIV
  • The same for spells that draw on divine power: those of healers, druids, paladins, necromancers, dark knights and rangers.
Hit points (help) ABIL_HP
  • The maximum hit points: 3 × HPP + 20 for a player, 3 × HPP + 10 for a monster.

Each spell draws on either magic or divine (the realm in vme/etc/spells.def), so a caster needs only the one that their spells use.

The formulas for mana, endurance and regeneration, and how age changes them, are on Levels. How abilities and skills combine in a check is on Introduction: for a player a skill check counts two parts skill and one part ability; a monster, which has no skills, uses the ability alone.

Armour and dexterity

Armour heavier than clothes lowers a character's dexterity in a fight (effective_dex() in vme/src/skills.cpp). Each piece worn on the body, head, legs, feet, hands or arms takes off a share of a penalty that depends on the kind of armour, and the share is the part of the body it covers (body 22, legs 18, arms 15, head, hands and feet 3 each, out of 64):

Armour Full penalty What lessens it
clothes 0
soft leather 10 (STR + 4 × DEX) / 5
hard leather 20 (STR + 2 × DEX) / 3
chain 40 (2 × STR + DEX) / 3
plate 100 STR

For a player, the value in the last column is averaged with their skill in that kind of armour (armor soft leather, armor hard leather, armor chain, armor plate). That value, up to 100, takes off up to half the penalty. A suit of plate on every part of the body thus costs between 50 and 100 points of dexterity. See help armour.

Players

A new character starts with a few points in each ability, set by race in pcinitabils@basis (a human has 4 in each). From then on abilities are raised by training: each practice adds 1 and costs ability points, of which a player gets 40 a level up to virtual level 114 (see Levels). The price and the highest value a player can reach both depend on their race and profession: the modifiers for each ability are in vme/etc/abilities.def, for example a sorcerer has +3 in magic and a fighter -7. With race and profession adding up to 0 the limit is 80, with +2 it is 100, with +5 it is 110.

Magic raises abilities above that for a while: spells such as strength, and items worn with a transfer (below).

Monsters

A monster's abilities are not given as values. The zone gives each ability a percentage, the eight adding up to 100, and vmc turns them into values from the monster's level when it compiles the zone. A monster of a higher level gets more points. See Monsters.

Items that change abilities

A worn or wielded item can raise or lower an ability with STR_TRANSFER(n), DEX_TRANSFER, CON_TRANSFER, CHA_TRANSFER, BRA_TRANSFER, MAG_TRANSFER, DIV_TRANSFER and HIT_TRANSFER (vme/include/wmacros.h). n is on the bonus scale from -7 to +7 (BONUS_JUNK to BONUS_ARTIFACT in vme/include/values.h); vmc refuses other values. When the item is loaded, the server turns it into the change in the ability (bonus_map_b() in vme/src/common.cpp):

n -7 -6 -5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5 +6 +7
Ability -10 -8 -6 -5 -4 -2 -1 0 +1 +2 +4 +5 +6 +8 +10

Now and then an item comes out a point better or worse: a value that isn't 0 gets the open-ended roll divided by 100 added. See Objects.

ring_of_might
names {"ring of might", "ring"}
title "a ring of might"
descr "A heavy iron ring lies here."
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_FINGER}
STR_TRANSFER(BONUS_GOOD)
weight 1
cost 2 GOLD_PIECE
end

This ring gives +2 strength while it is worn. The transfer macros also set UNIT_FL_MAGIC.