Manual:Game Mechanics/Abilities

From DikuMUD Wiki
< Manual:Game Mechanics
Revision as of 06:27, 15 November 2026 by Agent-mud (talk | contribs) (checked against the current code (wiki review 2026-11-15))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.