Manual:Game Mechanics/Levels
This page covers levels and experience, the points a player gets for each level and how training spends them, and the hit points, mana and endurance that come with them. The players' side is in help levels, help experience and help practice.
Contents
Levels
| Level | Who |
|---|---|
| 0 | a guest |
| 1 to 50 | mortal players (START_LEVEL 1, MORTAL_MAX_LEVEL 50)
|
| 0 to 199 | monsters (vmc refuses other levels) |
| 200 and up | gods: IMMORTAL_LEVEL 200, GOD_LEVEL 220, CREATOR_LEVEL 230, up to ULTIMATE_LEVEL 255
|
The constants are in vme/include/vme.h.
A player has two levels. The level stops at 50. The virtual level (vlevel in DIL) counts every level the player has raised and has no such limit; it is what the experience table and the points below follow. Below 50 the two are the same. Besides these, a player has a level in each guild: raising a level raises the level in the player's current guild too (AdvGuildLevel@guilds, see help guilds).
Experience needed
The experience needed for virtual level L (required_xp() in vme/src/common.cpp):
up to level 50: 300 × L + 200 × L² above level 50: 515,000 + 20,100 for each level above 50
| Level | 1 | 2 | 3 | 5 | 10 | 20 | 30 | 40 | 50 | 51 | 100 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Total experience | 500 | 1,400 | 2,700 | 6,500 | 23,000 | 86,000 | 189,000 | 332,000 | 515,000 | 535,100 | 1,520,000 |
| From the level before | - | 900 | 1,300 | 2,100 | 4,100 | 8,100 | 12,100 | 16,100 | 20,100 | 20,100 | 20,100 |
A new character starts at level 1 with 500 experience. help levels has the table for every level.
Raising a level
Experience alone doesn't raise a level: the player types level once they have enough (do_level() in vme/src/vmelimits.cpp). If they still have 80 or more skill points, or 40 or more ability points below virtual level 100, the game asks them to train first, and level now raises the level anyway. Training is cheapest once per level (see below), so it pays to train before each new level.
Each level raised gives:
- 80 skill points (
AVERAGE_SKILL_COST10 ×SKILL_POINT_FACTOR8), at every level; - 40 ability points (10 ×
ABILITY_POINT_FACTOR4), up to virtual level 114; after that none. With the 10 a new character starts with, that is 4,530 ability points in all; - a fresh training session: every skill and ability can be practised again at its first, cheapest price.
A god's level is never raised this way.
Experience from a kill
Killing a monster gives experience; killing a player gives none. The kill is worked out in exp_align_gain() and person_gain() in vme/src/fight.cpp:
- The base is the monster's
expvalue: 100 unless the zone sets another (-500 to 499, see Monsters). A negative value is a penalty: it skips the next three steps. - The base changes with the level difference: 15% more for each level the monster is above the killer, 15% less for each level below. Seven or more levels below gives nothing.
- In a group, everyone in the room who is in the group shares the kill: the base is multiplied by 4 / (3 + number of members).
- The result is capped at 300 + 100 for each member (400 alone, 500 for two), then multiplied by 0.8.
- Each member then gets that share, with 20% more for a good character who kills an evil monster, and 10% more for an evil character who kills a good one.
- A member more than 5 levels below the group's highest loses 7% for each level beyond those 5, at most 95%.
The level used for the killer is the highest of: the player (or the group's highest member), and anyone else who has hurt the monster (remembered for 20 minutes from its first wound). So a high-level player who helps with a blow lowers the experience for everyone. For this count a player's level includes levels they have the experience for but haven't raised yet, and it is never above 50.
Alignment changes with each kill too: killing evil makes a good character better, killing good makes them worse (change_alignment(), at most 200 points per kill).
Quests and DIL can give experience directly with experience().
Losing experience
When a player dies (death@death and lose_exp@death in vme/zone/death.zon) they lose half the experience they have above their current level, but at most half a level's worth and at least a fifth of a level's worth. Up to level 3 nothing is lost, and nothing is lost either when the loss would leave the player with 1,650 experience or less. See help death.
Training
Ability points buy abilities (strength, dexterity...); skill points buy skills, spells and weapons. A player trains with practice at a teacher of their guild (vme/src/teach.cpp).
The price
The price in points depends on how suited the player is: the sum of their race's modifier and their profession's modifier for that skill or ability (in vme/etc/abilities.def, spells.def and weapons.def; for skills in commands.def, with the command that uses them). Each practice of the same skill in the same level costs half as much again as the one before (× 1.5), and a price above 50 can't be paid. So the modifier also decides how often a skill can be practised per level:
| Race + profession | 1st | 2nd | 3rd | 4th | 5th | 6th |
|---|---|---|---|---|---|---|
| +5 or more | 5 | 8 | 12 | 17 | 26 | 38 |
| +4 | 6 | 9 | 14 | 21 | 31 | 46 |
| +3 | 7 | 11 | 16 | 24 | 36 | - |
| +2 | 8 | 12 | - | - | - | - |
| +1 | 9 | 14 | - | - | - | - |
| 0 | 10 | - | - | - | - | - |
| -1 | 13 | - | - | - | - | - |
| -2 | 16 | - | - | - | - | - |
| -3 | 19 | - | - | - | - | - |
| -4 | 22 | - | - | - | - | - |
| -5 | 25 | - | - | - | - | - |
| -6 | 28 | - | - | - | - | - |
| -7 or less | 31 | - | - | - | - | - |
(actual_cost(): 10 minus the modifier, at most 5 off; or 10 plus three times a negative modifier.) The price doesn't rise with the player's level.
A player who has belonged to more than one profession gets the best of them, with 1 taken off the first profession once there is a second, and more once there is a third.
From level 26, a practice also costs money: the teacher's price grows from its minimum to its maximum as the skill rises.
What a practice gives
- An ability rises by 1.
- A skill, spell or weapon rises by 5 while it is below 10, by 4 below 20, by 3 below 40, by 2 below 75, and by 1 from 75.
- The category above a skill, spell or weapon (such as "sword" above "long sword") is raised to half the skill, when it is less.
How far a player can train
The race and profession modifier also sets the player's potential, the highest they can train a skill or ability to (max_skill_limit()):
| Race + profession | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | +1 | +2 | +3 | +4 | +5 | +6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Potential | 0 | 15 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 105 | 108 | 110 | 111 |
Each higher modifier adds 1 more. A teacher may stop lower: each teacher has a maximum for each skill it teaches. A skill can also need a guild level, a level, or a minimum ability. Magic that changes abilities or skills (a spell such as bless or strength, or a worn item with a transfer) must be gone before the teacher will train the player.
Hit points, mana and endurance
The maximums (vme/src/vmelimits.cpp):
| Player | Monster | |
|---|---|---|
| Hit points | 3 × HPP + 20 | 3 × HPP + 10 |
| Mana | 100 + (BRA + CHA) / 2, at most 200, then changed by age | the same, without age |
| Endurance | 2 × CON + 150, then changed by age | 2 × CON + 150 |
Age changes a player's mana and endurance as a percentage of the value above. The lifespan is split into six parts, with straight lines between these points:
| Share of lifespan | 0 | 1/6 | 2/6 | 3/6 | 4/6 | 5/6 | end | past it |
|---|---|---|---|---|---|---|---|---|
| Mana | 0% | 100% | 105% | 110% | 120% | 130% | 140% | 0% |
| Endurance | 80% | 130% | 110% | 90% | 70% | 50% | 20% | 0% |
A player past their lifespan has 1 hit point at most. Gods are not affected by age. See help age, help hit points, help mana points and help endurance points.
Regeneration
Every 30 seconds a character who isn't fighting gets back (hit_gain(), mana_gain(), move_gain()):
- hit points: 1 + (3 × CON + 20) / 10 for a player, 1 + (3 × CON + 10) / 10 for a monster (1 for a player past their lifespan);
- mana: 1 + maximum mana / 10, plus (CHA - the higher of MAG and DIV) / 3, at least 1;
- endurance: 1 + maximum endurance / 10. Monsters get twice this.
Then:
- resting or sleeping adds half again, sitting a quarter;
- a room or anything around the character with
UNIT_FL_SACREDdoubles it; - a hungry or thirsty player gets 3 × min(full, 3 × thirst) added; the hunger and thirst counters are below 0 then, so this is a loss, and it can make the whole gain negative.
A fighting character gets nothing back. A character below stunned bleeds instead: 1 hit point every 30 seconds when incapacitated, 2 when mortally wounded. The DIL doing this is regenerate@update (monsters) and regen_pc@update (players) in vme/zone/update.zon. See help regenerate and help position.
Monsters
A monster has a level but no experience, practice points or training. Its level and the percentages in the zone decide its abilities and weapon and spell skills when the zone is compiled; see Monsters.