Manual:Game Mechanics/Abilities
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.
Contents
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 |
|
| Dexterity (help) | ABIL_DEX |
|
| Constitution (help) | ABIL_CON |
|
| Charisma (help) | ABIL_CHA |
|
| Brain (help) | ABIL_BRA |
|
| Magic (help) | ABIL_MAG |
|
| Divine (help) | ABIL_DIV |
|
| Hit points (help) | ABIL_HP |
|
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.