Difference between revisions of "Experience points"

From NetHackWiki
Jump to navigation Jump to search
(pothole + copyedit)
(Bump from {{nethack-360}} to {{nethack-367}})
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
In ''[[NetHack]]'', '''experience points''' or '''XP''' measure the character's progress toward gaining [[experience level]]s. A character gains an experience level when their experience crosses the next [[Experience_level#Experience_points_required_per_level|threshold]]. They are shown in the [[Status lines|status line]] when the [[Options#showexp|showexp option]] is on (default: off).
+
In ''[[NetHack]]'', '''experience points''' or '''XP''' measure the character's progress toward gaining [[experience level]]s. A character gains an experience level when they accumulate [[Experience_level#Experience_points_required_per_level|sufficient experience points]]. XP are shown in the [[Status lines|status line]] when the [[Options#showexp|showexp option]] is on (default: off).
 +
 
 +
{{Tocright}}
 +
 
 +
== Gaining experience points ==
  
 
Experience points can be gained by:
 
Experience points can be gained by:
  
* Killing monsters, with stronger monsters awarding more points.
+
* Killing monsters.
* Eating [[tripe]], yielding 1 XP (50% chance).
+
* Eating [[tripe]], yielding 1 XP, provided hero is not an [[orc (starting race)|orc]] and is not in a polyform that enjoys tripe.{{refsrc|src/eat.c|1806|nethack=3.6.7}}
* The first minor consultation from [[Oracle (monster)|the Oracle]] gives 5 XP.
+
* Consulting [[Oracle (monster)|the Oracle]], for the first major consultation and the first minor consultation.
* The first major consultation gives 55 XP or more, depending on your level.
+
* Quaffing from a [[sink]], which can give 1 XP (5% chance).{{refsrc|src/fountain.c|591|nethack=3.6.7}}
* Quaffing from [[sink]]s, which can give 1 XP (5% chance).
+
* Untrapping a [[squeaky board]] for 1 XP.{{refsrc|src/trap.c|4236|nethack=3.6.7}}
* Untrapping [[Trap#^ Squeaky board|squeaky board]]s, for 1 XP.
+
* The first [[novel]] you read gives 20 XP.{{refsrc|src/spell.c|491|nethack=3.6.7}}
* The first [[novel]] you read gives 20 XP
 
 
 
See the Oracle's article for the precise mechanics and how to optimize experience gain from consultations.
 
  
A blessed potion of gain level increases your level by 1, and gives you enough XP to put you part of the way to the ''next'' level, while an uncursed potion, a [[wraith]] corpse or a "very educational experience" with a [[foocubus]] just gives you enough XP needed to gain the one level.
+
You can also [[Experience level#Gaining levels|gain an entire experience level]], [[Experience level#Losing levels|lose an entire experience level]], and restore lost experience levels, with commensurate gains and loses in experience points.
  
When you lose a level, your XP is set to 1 less than your current level needs.
+
== Experience points from killing monsters ==
  
==Experience points from killing monsters==
+
The number of experience points obtained by killing a monster of [[monster level|level]] ML is computed as follows:{{refsrc|src/exper.c|75|nethack=3.6.7}}
  
The number of experience points obtained by killing a monster of [[monster level|level]] ML is computed as follows:{{refsrc|src/exper.c|73|nethack=3.6.0}}
+
* Start with 1 + (ML) * (ML).
 +
* Add a bonus for low [[armor class]]: +5 for AC 2, +6 for AC 1, +7 for AC 0, and +(14-2*AC) for negative AC.
 +
* Add 3 if the monster's [[speed]] is between 13 and 18, and 5 if the monster's speed is at least 19.
 +
* For each attack that the monster has, add a bonus based on [[attack type]]:
 +
** +10 for spellcasting attack type,
 +
** +5 for weapon attack type,
 +
** +3 for all other attack types, except for
 +
** +0 (nothing) for passive, claw, bite, kick and headbutt attack types.
 +
* For each attack that the monster has, add a bonus based on [[damage type]]:
 +
** +2*ML for [[magic missile]], [[fire]], [[cold]], [[sleep]], [[disintegration]], [[shock]], [[acid]], or strength-draining [[poison]];
 +
** +50 for [[drain life]], [[stoning]], or [[sliming]];
 +
** +ML for any damage type not ordinary physical and not listed in the two lines above;
 +
** +ML for an attack with maximum damage of at least 24;
 +
** +1000 for a [[sea monster]] with a [[drowning]] attack, if you do not have [[magical breathing]].
 +
* Add 7*ML if the monster is [[M2_NASTY]].
 +
* Add 50 if ML is at least 9.
  
*Start with (ML)*(ML) + 1;
+
Next, [[mail daemon]]s are a special case; they are only worth 1 experience point, overriding all the above.
*Add 3 if the monster's [[speed]] is between 13 and 18, and 5 if the monster's speed is at least 19;
 
*Add a bonus for low [[armor class]] monsters: +5 for AC 2, +6 for AC 1, +7 for AC 0, and +(14-2*AC) for negative AC;
 
*Add 1000 for a [[sea monster]] with a [[drowning]] attack, if you don't have [[magical breathing]] and are not [[polymorph|polymorphed]] into an [[amphibiousness|amphibious]] monster;
 
*Add 7*ML if the monster is [[M2_NASTY]];
 
*Add 50 if ML is at least 9;
 
*For each attack that the monster has, add a bonus based on attack type: +10 for spellcasting attacks, +5 for weapon attacks, +3 for all other attack types, except for passive, claw, bite, kick and headbutt attacks, which give no bonus;
 
*For each attack that the monster has, add a bonus based on damage type: +(50-ML) for [[sliming]], [[stoning]] or [[drain life]], and +ML for a damage type that is the same as a [[dragon]]'s breath attack ([[fire]], [[cold]], [[shock]], [[sleep]], [[disintegration]], [[magic missile]]s, [[acid]], or strength-draining [[poison]] — but ''not'' for dexterity- or constitution-draining poison);
 
*For each attack that the monster has, add a +ML bonus if the attack's maximum damage is at least 24.
 
  
If the monster has been [[Division|cloned]] or [[revive]]d, there is a penalty to experience gained based on the '''total''' number of monsters of that type that have been killed.  
+
If this monster has been [[Division|cloned]] or [[revive]]d, the total experience is reduced (but not below 1 XP).
 
{|class="prettytable"
 
{|class="prettytable"
! No. kills !! Xp penalty
+
! Kill count (including current) !! Reduced XP
 
|-
 
|-
| 1..20 || None
+
| 1 .. 20 || full xp
 
|-
 
|-
| 21..40 || xp/2
+
| 21 .. 40 || xp/2
 
|-
 
|-
| 41..80 || xp/4
+
| 41 .. 80 || xp/4
 
|-
 
|-
| 81..120 || xp/8
+
| 81 .. 120 || xp/8
 
|-
 
|-
| 121..180 || xp/16
+
| 121 .. 180 || xp/16
 
|-
 
|-
| 181..240 || xp/32
+
| 181 .. 240 || xp/32
 
|-
 
|-
| 241..255+ || xp/64
+
| 241 .. 255+ || xp/64
 
|}
 
|}
  
The result is the number of points you earn for killing the monster. [[Mail daemon]]s are a special case; they are only worth 1 experience point.
+
The result is the number of experience points you earn for killing the monster.
  
 
This calculation takes into account all attacks listed in the monster's definition from the source code, including attacks that are not implemented (such as the [[green slime]]'s passive sliming attack). The armor class and speed used in this calculation are the base values; they do not take into account the armor that the monster might have worn, or the extra speed that the monster might have had from a wand of speed monster, a monster spell, etc. On the other hand, the monster level used here is the monster's actual level at the time it was killed, not the base level or the level at which it was created.
 
This calculation takes into account all attacks listed in the monster's definition from the source code, including attacks that are not implemented (such as the [[green slime]]'s passive sliming attack). The armor class and speed used in this calculation are the base values; they do not take into account the armor that the monster might have worn, or the extra speed that the monster might have had from a wand of speed monster, a monster spell, etc. On the other hand, the monster level used here is the monster's actual level at the time it was killed, not the base level or the level at which it was created.
Line 58: Line 66:
  
 
[[Category:Your character]]
 
[[Category:Your character]]
{{nethack-360}}
+
{{nethack-367}}

Latest revision as of 07:54, 11 June 2024

In NetHack, experience points or XP measure the character's progress toward gaining experience levels. A character gains an experience level when they accumulate sufficient experience points. XP are shown in the status line when the showexp option is on (default: off).

Gaining experience points

Experience points can be gained by:

  • Killing monsters.
  • Eating tripe, yielding 1 XP, provided hero is not an orc and is not in a polyform that enjoys tripe.[1]
  • Consulting the Oracle, for the first major consultation and the first minor consultation.
  • Quaffing from a sink, which can give 1 XP (5% chance).[2]
  • Untrapping a squeaky board for 1 XP.[3]
  • The first novel you read gives 20 XP.[4]

You can also gain an entire experience level, lose an entire experience level, and restore lost experience levels, with commensurate gains and loses in experience points.

Experience points from killing monsters

The number of experience points obtained by killing a monster of level ML is computed as follows:[5]

  • Start with 1 + (ML) * (ML).
  • Add a bonus for low armor class: +5 for AC 2, +6 for AC 1, +7 for AC 0, and +(14-2*AC) for negative AC.
  • Add 3 if the monster's speed is between 13 and 18, and 5 if the monster's speed is at least 19.
  • For each attack that the monster has, add a bonus based on attack type:
    • +10 for spellcasting attack type,
    • +5 for weapon attack type,
    • +3 for all other attack types, except for
    • +0 (nothing) for passive, claw, bite, kick and headbutt attack types.
  • For each attack that the monster has, add a bonus based on damage type:
  • Add 7*ML if the monster is M2_NASTY.
  • Add 50 if ML is at least 9.

Next, mail daemons are a special case; they are only worth 1 experience point, overriding all the above.

If this monster has been cloned or revived, the total experience is reduced (but not below 1 XP).

Kill count (including current) Reduced XP
1 .. 20 full xp
21 .. 40 xp/2
41 .. 80 xp/4
81 .. 120 xp/8
121 .. 180 xp/16
181 .. 240 xp/32
241 .. 255+ xp/64

The result is the number of experience points you earn for killing the monster.

This calculation takes into account all attacks listed in the monster's definition from the source code, including attacks that are not implemented (such as the green slime's passive sliming attack). The armor class and speed used in this calculation are the base values; they do not take into account the armor that the monster might have worn, or the extra speed that the monster might have had from a wand of speed monster, a monster spell, etc. On the other hand, the monster level used here is the monster's actual level at the time it was killed, not the base level or the level at which it was created.

References