Difference between revisions of "Manual:Game Mechanics/Introduction"
m |
(checked against the current code (wiki review 2026-11-15)) |
||
| Line 1: | Line 1: | ||
| − | + | These pages explain how the game works under the surface, for builders and administrators: which numbers decide a skill, a fight or a level, and what the values you give rooms, objects and monsters do. Every formula here is taken from the server code (<code>vme/src/</code>) or from the DIL in the public zones (<code>vme/zone/</code>); the file is named where it helps. Players read the same rules from their side in the [[Manual:Help Files|help files]]. | |
| − | == | + | == Time == |
| + | The game runs in pulses of a quarter of a second (<code>PULSE_SEC</code> is 4 pulses, in <code>vme/include/vme.h</code>). DIL heartbeats and most timers in zone files are given in pulses. | ||
| − | + | {| class="wikitable" | |
| + | ! What !! How often | ||
| + | |- | ||
| + | | A combat round || every 3 seconds (<code>PULSE_VIOLENCE</code>) | ||
| + | |- | ||
| + | | Hit points, mana and endurance come back || every 30 seconds (<code>PULSE_POINTS</code>); for players at random between 25 and 35 seconds | ||
| + | |- | ||
| + | | A zone reset || every <code>lifespan</code> minutes of the zone | ||
| + | |} | ||
| − | + | == The open-ended roll == | |
| + | Most checks add a roll of 1d100 to the numbers involved. The roll is open-ended: a very high roll is rolled again and added, a very low one is rolled again and subtracted, so a result above 100 or below 1 is possible, though rare. | ||
| − | + | There are two versions: | |
| − | + | {| class="wikitable" | |
| + | ! Used by !! Rolls on upwards !! Rolls on downwards | ||
| + | |- | ||
| + | | The server's C++ code (<code>open100()</code> in <code>vme/src/skills.h</code>): melee, attack spells, shields, swimming || 99 or 100 (2%) || 1 (1%) | ||
| + | |- | ||
| + | | DIL: <code>openroll(100, 5)</code>, used by the skill checks in <code>skills.zon</code>, <code>function.zon</code> and <code>spells.zon</code> || 96 to 100 (5%) || 1 to 4 (4%) | ||
| + | |} | ||
| + | On a roll upwards, the next roll is added, and the rolling goes on as long as each new roll is again in the top range. On a roll downwards, the next roll is subtracted, and the subtracting goes on as long as that roll is in the top range. See [[Manual:DIL Manual/openroll()|openroll()]]. | ||
| − | A check | + | == The skill check == |
| + | A skill check compares a character's skill with a difficulty: | ||
| − | For example, | + | result = roll + skill - difficulty - 50 |
| + | |||
| + | The check succeeds when the result is above 0. With skill equal to the difficulty, it succeeds half the time. Each 10 points of skill above the difficulty add about 10%, each 10 below take 10% away. More than 50 apart, only the open end of the roll is left: a check 60 points too hard still succeeds about 5% of the time in DIL (2% in C++), and one 60 points too easy fails about 4% (1%). | ||
| + | |||
| + | {| class="wikitable" | ||
| + | ! skill - difficulty !! -60 !! -40 !! -20 !! 0 !! +20 !! +40 !! +60 | ||
| + | |- | ||
| + | | chance (DIL) || 4% || 10% || 30% || 50% || 70% || 90% || 96% | ||
| + | |} | ||
| + | |||
| + | For a player the "skill" in the formula is two parts skill to one part ability, for example two thirds of the search skill and one third of brain. A monster has no skills (see [[Manual:Game Mechanics/Skills|Skills]]), so it uses the ability alone. The functions are <code>skillchecksa()</code> in <code>vme/src/skills.cpp</code>, and <code>skillchecksa@skills</code> and <code>skillchecksau@skills</code> in <code>skills.zon</code>. | ||
| + | |||
| + | How much the result is above or below 0 is often used as well: how far a climber falls, how much damage a swimmer takes, how long a spell lasts. | ||
| + | |||
| + | == The opposed check == | ||
| + | When two characters compete, for example a thief stealing from a victim or a spell against its target, both sides count: | ||
| + | |||
| + | result = roll + attacker's ability + attacker's skill - defender's ability - defender's skill - 50 | ||
| + | |||
| + | Above 0 is a win for the attacker. In C++ it is <code>resistance_skill_check()</code> (<code>skills.cpp</code>); in DIL <code>skillresist@function</code>, <code>spellresist@spells</code>, <code>skillbattle1@skills</code> and <code>skillbattle2@skills</code>. | ||
| + | |||
| + | == Combat is a roll too == | ||
| + | A blow in a fight is an open-ended roll plus a bonus made of both fighters' abilities, weapon skills, weapons and armour. The result is looked up in the weapon's damage table. See [[Manual:Game Mechanics/Combat|Combat]]. | ||
| + | |||
| + | == See also == | ||
| + | * [[Manual:Game Mechanics/Levels|Levels]]: experience, practice points and training | ||
| + | * [[Manual:Game Mechanics/Abilities|Abilities]] and [[Manual:Game Mechanics/Skills|Skills]] | ||
| + | * [[Manual:Game Mechanics/Objects|Objects]], [[Manual:Game Mechanics/Rooms|Rooms]] and [[Manual:Game Mechanics/Monsters|Monsters]]: what the values in a zone do | ||
Latest revision as of 06:27, 15 November 2026
These pages explain how the game works under the surface, for builders and administrators: which numbers decide a skill, a fight or a level, and what the values you give rooms, objects and monsters do. Every formula here is taken from the server code (vme/src/) or from the DIL in the public zones (vme/zone/); the file is named where it helps. Players read the same rules from their side in the help files.
Contents
Time
The game runs in pulses of a quarter of a second (PULSE_SEC is 4 pulses, in vme/include/vme.h). DIL heartbeats and most timers in zone files are given in pulses.
| What | How often |
|---|---|
| A combat round | every 3 seconds (PULSE_VIOLENCE)
|
| Hit points, mana and endurance come back | every 30 seconds (PULSE_POINTS); for players at random between 25 and 35 seconds
|
| A zone reset | every lifespan minutes of the zone
|
The open-ended roll
Most checks add a roll of 1d100 to the numbers involved. The roll is open-ended: a very high roll is rolled again and added, a very low one is rolled again and subtracted, so a result above 100 or below 1 is possible, though rare.
There are two versions:
| Used by | Rolls on upwards | Rolls on downwards |
|---|---|---|
The server's C++ code (open100() in vme/src/skills.h): melee, attack spells, shields, swimming |
99 or 100 (2%) | 1 (1%) |
DIL: openroll(100, 5), used by the skill checks in skills.zon, function.zon and spells.zon |
96 to 100 (5%) | 1 to 4 (4%) |
On a roll upwards, the next roll is added, and the rolling goes on as long as each new roll is again in the top range. On a roll downwards, the next roll is subtracted, and the subtracting goes on as long as that roll is in the top range. See openroll().
The skill check
A skill check compares a character's skill with a difficulty:
result = roll + skill - difficulty - 50
The check succeeds when the result is above 0. With skill equal to the difficulty, it succeeds half the time. Each 10 points of skill above the difficulty add about 10%, each 10 below take 10% away. More than 50 apart, only the open end of the roll is left: a check 60 points too hard still succeeds about 5% of the time in DIL (2% in C++), and one 60 points too easy fails about 4% (1%).
| skill - difficulty | -60 | -40 | -20 | 0 | +20 | +40 | +60 |
|---|---|---|---|---|---|---|---|
| chance (DIL) | 4% | 10% | 30% | 50% | 70% | 90% | 96% |
For a player the "skill" in the formula is two parts skill to one part ability, for example two thirds of the search skill and one third of brain. A monster has no skills (see Skills), so it uses the ability alone. The functions are skillchecksa() in vme/src/skills.cpp, and skillchecksa@skills and skillchecksau@skills in skills.zon.
How much the result is above or below 0 is often used as well: how far a climber falls, how much damage a swimmer takes, how long a spell lasts.
The opposed check
When two characters compete, for example a thief stealing from a victim or a spell against its target, both sides count:
result = roll + attacker's ability + attacker's skill - defender's ability - defender's skill - 50
Above 0 is a win for the attacker. In C++ it is resistance_skill_check() (skills.cpp); in DIL skillresist@function, spellresist@spells, skillbattle1@skills and skillbattle2@skills.
Combat is a roll too
A blow in a fight is an open-ended roll plus a bonus made of both fighters' abilities, weapon skills, weapons and armour. The result is looked up in the weapon's damage table. See Combat.