Difference between revisions of "Search"

From NetHackWiki
Jump to navigation Jump to search
(hidden monsters are unchanged in FIQhack)
m (Description: Prepositions)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{Keyboard Commands}}
 
{{Keyboard Commands}}
The '''search''' command, which is used by pressing the '''[s]''' key, causes you to search the 8 squares surrounding you for [[secret door]]s, [[secret passage]]s, [[hiding|hidden]] monsters, and hidden [[trap]]s. It may require several attempts to locate many of these: New characters still have a 22% chance of missing a door after 10 times searching the same spot. Applying a [[stethoscope]] instead can speed up things significantly.
+
:<span class="dablink">''"Searching" redirects here. For the property, see [[Automatic searching]].''</span>
  
Searching will always reveal [[hiding|hidden]] or [[invisible]] monsters which are in any square adjacent to you.
+
The '''search''' command is a feature in ''[[Nethack]]'' that searches the 8 squares surrounding [[you]] for [[secret door]]s, [[secret passage]]s, [[hiding|hidden]] or [[invisible]] monsters, and hidden [[trap]]s.
  
Your chance of success for other forms of searching is primarily dependent on [[Luck]].
+
==Description==
 +
{{for2|the source reference that dictates searching odds|{{function|detect.c|dosearch0}}}}
  
Wielding [[Excalibur]] improves your chance of finding secret doors and secret corridors based on its enchantment. Wearing any sort of lenses also improves your chance of finding these.
+
By pressing the {{kbd|s}} key, you will search each of the surrounding squares. Your chance of success in searching depends generally on [[Luck]] and any items with applicable bonuses, and varies with the dungeon features that can potentially be revealed. Successfully discovering a dungeon feature by searching [[exercise]]s [[wisdom]]. Hidden monsters are usually revealed immediately by searching, while invisible monsters found by searching will have their square marked with an {{white|I}} - beware, as they may move to another square before your next turn.
  
No other factors affect the success rate of searching.
+
As for secret doors or corridors, your search will reveal them if [[rnl]](7&nbsp;&minus;&nbsp;bonus) is zero, where the default bonus is zero, and wearing a [[pair of lenses]] increases it by 2; wielding [[Excalibur]] adds its enchantment (or subtracts it if negatively enchanted) to the bonus. This searching bonus cannot exceed 5.
  
The [[automatic searching]] property will cause you to automatically search (just like using the command, except that it does not find monsters) every turn. Some roles can gain this as an [[intrinsic]], and it is granted by wielding [[Excalibur]] or wearing a [[ring of searching]].
+
If you are adjacent to a trap, you will find it if [[rnl]](8) is zero - [[statue trap]]s will activate, but other traps will not trigger upon being revealed.
  
== Details ==
+
===Automatic searching===
 +
The [[automatic searching]] property will cause you to automatically search every turn. This search functions very similarly to the command except that it does not find monsters. Some roles can gain this property as an [[intrinsic]], and it is granted extrinsically by wielding [[Excalibur]] or wearing a [[ring of searching]].
  
{{for2|source reference|{{function|detect.c|dosearch0}}}}
+
==Strategy==
 +
Early characters may have a difficult time revealing traps and dungeon features - a new character will have a roughly 22% chance of missing a door after 10 times searching the same spot. It is common to use a [[numeric prefix]] before the search command (e.g., "22s") to maximize the chance of revealing adjacent hidden doors or passages for a new character; a character with high Luck can usually uncover secrets reliably with ten or eleven searches. Applying a [[stethoscope]] can speed up things significantly, but does not exercise wisdom.
  
=== Secret Doors and Passages ===
+
One method of efficient searching to find a hidden door leading out of a room is to select a three-square range along the wall, type "22s", then move three spaces along the wall and repeat until you find the door.
  
* Lenses give a searching bonus of +2 if you are not blind.
+
Searching is often used as an alternative to [[rest]]ing for passively regenerating HP and power, since it can exercise wisdom if you find a hidden trap or door - however, the time spent searching is proportional to your [[encumbrance]], while resting lets you wait as though you were unburdened. Searching is ideal if you are waiting in a safe area between battles and can easily become unburdened, while resting is preferable when dealing with heavier loads.
* Excalibur gives a searching bonus equal to its enchantment. (Nothing prevents this from being a penalty if Excalibur is negatively enchanted.)
 
* Your bonus cannot exceed 5.
 
* You will find a secret door or corridor if [[rnl]](7-bonus) is zero.
 
  
=== Traps ===
+
===Zen===
 +
{{main|Zen}}
 +
Searching is a critical skill for any [[zen]] conduct player, as until they can obtain a source of [[telepathy]], movement will prove dangerous without a way to detect monsters; moving blindly will anger a peaceful creature if you attempt to walk onto their square without seeing them, even when using the safe-move function ({{kbd|m}}).
  
* You will find a trap if [[rnl]](8) is zero.
+
Zen players should search after almost every step they take, which can reveal the position of monsters nearby and allow you to navigate safely around them - safe-moving into a square marked with {{white|I}} will give the normal response if a peaceful or tame monster is occupying it ("Pardon me, <foo>."), or simply move onto that square if it is empty. Searching while blind will also "map" the level for you much faster, since it reveals the squares surrounding you.
* This will activate statue traps (exercising wisdom), and reveal other traps.
 
  
=== Searching Chances ===
+
===Probabilities===
 
+
The table below displays your chances of searching success, based on your current [[Luck]] and whether you are using any equipment which aids searching.
Your chances of searching success based on your current [[Luck]] and whether you are using any equipment which aids searching.
 
  
 
{|class="prettytable"
 
{|class="prettytable"
 
!rowspan="2"|Luck
 
!rowspan="2"|Luck
 
!rowspan="2"|Traps
 
!rowspan="2"|Traps
!colspan="3"|Secret Doors/Corridors
+
!colspan="3"|Secret doors & corridors
 
|-
 
|-
 
!Normal
 
!Normal
Line 41: Line 41:
 
!+5 Excalibur
 
!+5 Excalibur
 
|-align="right"
 
|-align="right"
|&lt;-2
+
|&le;&nbsp;&minus;3
 
|&lt;0.24%
 
|&lt;0.24%
 
|&lt;0.27%
 
|&lt;0.27%
Line 47: Line 47:
 
|&lt;0.94%
 
|&lt;0.94%
 
|-align="right"
 
|-align="right"
| -2 to 2
+
| &minus;2 to 2
 
|12%
 
|12%
 
|14%
 
|14%
Line 82: Line 82:
 
!rowspan="2"|Luck
 
!rowspan="2"|Luck
 
!rowspan="2"|Traps
 
!rowspan="2"|Traps
!colspan="3"|Secret Doors/Corridors
+
!colspan="3"|Secret doors & corridors
 
|-
 
|-
 
!Normal
 
!Normal
Line 88: Line 88:
 
!+5 Excalibur
 
!+5 Excalibur
 
|-align="right"
 
|-align="right"
|&lt;-2
+
|&le;&nbsp;&minus;3
 
|>1247
 
|>1247
 
|>1108
 
|>1108
Line 94: Line 94:
 
|>317
 
|>317
 
|-align="right"
 
|-align="right"
| -2 to 2
+
| &minus;2 to 2
 
|23.43
 
|23.43
 
|19.86
 
|19.86
Line 124: Line 124:
 
|1
 
|1
 
|}
 
|}
==FIQhack==
 
Searching in [[FIQhack]] functions in a considerably different way than in vanilla NetHack. In FIQhack, searching may detect secret doors, secret passages, and hidden traps up to 5 tiles away. With non-negative luck, searching will always reveal any hidden doors or passages that are adjacent to you, but the effectiveness decreases as the distance from the player increases.
 
  
Base search formula: x/20*(3 ^ distance) capped at 5 tiles away (x/1620, i.e. 1/81 with the base search rate)
+
==FIQHack==
 +
In [[FIQHack]], searching functions in a considerably different manner than in vanilla ''NetHack''. Searching may detect secret doors, secret passages, and hidden traps up to 5 tiles away - with non-negative Luck, searching will always reveal any hidden doors or passages that are adjacent to you, but the effectiveness decreases as the distance from the player increases.
  
x is 20 + Luck + Ring enchantment*5 + 5 with lenses, lower cap is 1, no upper cap.
+
The base formula for searching in FIQ hack is: {{sfrac|<var>x</var>|20 &times; 2<sup>(distance &minus; 1)</sup>}} capped at 5 tiles away ({{sfrac|<var>x</var>|320}}, i.e. {{sfrac|16}} with the base search rate)
  
If this check passes, doors and corridors will always be revealed, meaning at base Luck and no negatively enchanted rings of searching, you will always find secret doors and corridors. Traps must, in addition to this, pass another check -- x/6 -- where x is 1 normally or 2 + Ring enchantments with the extrinsic searching.
+
<var>x</var> is 20 + Luck + (ring enchantment &times; 5), plus 5 with lenses. This value is no lower than 1 and has no maximum.
  
[[Automatic searching]] no longer always happens. The autosearch rate is 1/3 with the intrinsic, or (3 + net ring enchantment)/6 of the time with the extrinsic. With a ring of searching enchanted to +2 or greater, you will usually detect traps before stepping on them, reducing your need to search manually.
+
If this check passes, doors and corridors will always be revealed, meaning at base Luck and no negatively enchanted rings of searching, you will always find secret doors and corridors. Traps must, in addition to this, pass another check: {{sfrac|<var>x</var>|6}}, where <var>x</var> is 1 normally or 2 + ring enchantment with the extrinsic searching.
  
At +3 ring enchantment, you find traps 5/6 of the time when next to it (about 1/2 of the time you'll spot a trap two tiles away, with base luck), 6/6 at +4. Further enchantment only helps you detect hidden and secret things from a greater distance.
+
Automatic searching is not longer constant, and instead occurs at a rate of {{sfrac|3}} with the intrinsic property, or {{sfrac|3 + total ring enchantment|6}} of the time with the extrinsic property. With a ring of searching enchanted to +2 or greater, you will usually detect traps before stepping on them, reducing your need to search manually.
  
Finding hidden monsters work exactly the same as in vanilla. Automatic searching will not help you find hidden monsters, nor will they be revealed further away than next to you.
+
A +3 ring of searching with base Luck will find traps {{frac|5|6}} of the time when you are next to it, and about half the time you will spot a trap two tiles away. A +4 ring base Luck will always find traps next to you - further enchantment only helps you detect hidden and secret things from a greater distance.
  
Note that an object with the searching [[Object properties|object property]] does '''not''' gain additional effectiveness from enchantment, but merely grants the [[automatic searching]] extrinsic. They do, however, still gain the benefit of having extrinsic automatic searchin rather than intrinsic, meaning it procs more often and finds trap more realibly (searches 3/6 of the time instead of 2/6, and find traps 2/6 of the time rather than 1/6).
+
Finding hidden monsters works exactly the same as in vanilla - automatic searching will not help you find hidden monsters, nor will they be revealed further away than next to you.
 +
 
 +
An object with the searching [[object property]] does ''not'' gain additional effectiveness from enchantment, but merely grants the [[automatic searching]] extrinsic. They do, however, still gain the benefit of having extrinsic automatic searching rather than intrinsic, meaning it processes more often and finds trap more reliably (i.e. it searches half of the time instead of {{frac|3}}, and finds traps {{frac|3}} of the time rather than {{frac|6}}).
 +
 
 +
==References==
 +
<references/>
 +
{{nethack-360}}
 
[[Category:Commands]]
 
[[Category:Commands]]
{{nethack-360}}
 

Latest revision as of 07:41, 28 August 2023

Keyboard commands
~ ! @ # $ % ^ & * ( ) _ = +
Q W E R T Y U I O P { } |
q w e r t y u i o p [ ] \
A S D F G H J K L : "
a s d f g h j k l ; '
Z X C V B N M < > ?
z x c v b n m , . /
q w e r t u i o p Alt
a s d f j l Alt
c v n m ? Alt
A C R T O Alt
a c d o p r t [ Ctrl
"Searching" redirects here. For the property, see Automatic searching.

The search command is a feature in Nethack that searches the 8 squares surrounding you for secret doors, secret passages, hidden or invisible monsters, and hidden traps.

Description

For the source reference that dictates searching odds, see dosearch0 in detect.c.

By pressing the s key, you will search each of the surrounding squares. Your chance of success in searching depends generally on Luck and any items with applicable bonuses, and varies with the dungeon features that can potentially be revealed. Successfully discovering a dungeon feature by searching exercises wisdom. Hidden monsters are usually revealed immediately by searching, while invisible monsters found by searching will have their square marked with an I - beware, as they may move to another square before your next turn.

As for secret doors or corridors, your search will reveal them if rnl(7 − bonus) is zero, where the default bonus is zero, and wearing a pair of lenses increases it by 2; wielding Excalibur adds its enchantment (or subtracts it if negatively enchanted) to the bonus. This searching bonus cannot exceed 5.

If you are adjacent to a trap, you will find it if rnl(8) is zero - statue traps will activate, but other traps will not trigger upon being revealed.

Automatic searching

The automatic searching property will cause you to automatically search every turn. This search functions very similarly to the command except that it does not find monsters. Some roles can gain this property as an intrinsic, and it is granted extrinsically by wielding Excalibur or wearing a ring of searching.

Strategy

Early characters may have a difficult time revealing traps and dungeon features - a new character will have a roughly 22% chance of missing a door after 10 times searching the same spot. It is common to use a numeric prefix before the search command (e.g., "22s") to maximize the chance of revealing adjacent hidden doors or passages for a new character; a character with high Luck can usually uncover secrets reliably with ten or eleven searches. Applying a stethoscope can speed up things significantly, but does not exercise wisdom.

One method of efficient searching to find a hidden door leading out of a room is to select a three-square range along the wall, type "22s", then move three spaces along the wall and repeat until you find the door.

Searching is often used as an alternative to resting for passively regenerating HP and power, since it can exercise wisdom if you find a hidden trap or door - however, the time spent searching is proportional to your encumbrance, while resting lets you wait as though you were unburdened. Searching is ideal if you are waiting in a safe area between battles and can easily become unburdened, while resting is preferable when dealing with heavier loads.

Zen

Main article: Zen

Searching is a critical skill for any zen conduct player, as until they can obtain a source of telepathy, movement will prove dangerous without a way to detect monsters; moving blindly will anger a peaceful creature if you attempt to walk onto their square without seeing them, even when using the safe-move function (m).

Zen players should search after almost every step they take, which can reveal the position of monsters nearby and allow you to navigate safely around them - safe-moving into a square marked with I will give the normal response if a peaceful or tame monster is occupying it ("Pardon me, <foo>."), or simply move onto that square if it is empty. Searching while blind will also "map" the level for you much faster, since it reveals the squares surrounding you.

Probabilities

The table below displays your chances of searching success, based on your current Luck and whether you are using any equipment which aids searching.

Luck Traps Secret doors & corridors
Normal Lenses +5 Excalibur
≤ −3 <0.24% <0.27% <0.38% <0.94%
−2 to 2 12% 14% 20% 50%
3 to 5 25% 28% 40% 99%
6 to 8 37% 42% 59% 99%
9 to 11 49% 56% 78% 99%
12 to 13 61% 70% 98% 99%

To find a given trap or secret door, the number of trials to be 95% certain of success:

Luck Traps Secret doors & corridors
Normal Lenses +5 Excalibur
≤ −3 >1247 >1108 >787 >317
−2 to 2 23.43 19.86 13.43 4.32
3 to 5 10.41 9.12 5.86 1
6 to 8 6.48 5.5 3.36 1
9 to 11 4.45 3.65 1.98 1
12 to 13 3.18 2.49 1 1

FIQHack

In FIQHack, searching functions in a considerably different manner than in vanilla NetHack. Searching may detect secret doors, secret passages, and hidden traps up to 5 tiles away - with non-negative Luck, searching will always reveal any hidden doors or passages that are adjacent to you, but the effectiveness decreases as the distance from the player increases.

The base formula for searching in FIQ hack is: x20 × 2(distance − 1) capped at 5 tiles away (x320, i.e. 116 with the base search rate)

x is 20 + Luck + (ring enchantment × 5), plus 5 with lenses. This value is no lower than 1 and has no maximum.

If this check passes, doors and corridors will always be revealed, meaning at base Luck and no negatively enchanted rings of searching, you will always find secret doors and corridors. Traps must, in addition to this, pass another check: x6, where x is 1 normally or 2 + ring enchantment with the extrinsic searching.

Automatic searching is not longer constant, and instead occurs at a rate of 13 with the intrinsic property, or 3 + total ring enchantment6 of the time with the extrinsic property. With a ring of searching enchanted to +2 or greater, you will usually detect traps before stepping on them, reducing your need to search manually.

A +3 ring of searching with base Luck will find traps 56 of the time when you are next to it, and about half the time you will spot a trap two tiles away. A +4 ring base Luck will always find traps next to you - further enchantment only helps you detect hidden and secret things from a greater distance.

Finding hidden monsters works exactly the same as in vanilla - automatic searching will not help you find hidden monsters, nor will they be revealed further away than next to you.

An object with the searching object property does not gain additional effectiveness from enchantment, but merely grants the automatic searching extrinsic. They do, however, still gain the benefit of having extrinsic automatic searching rather than intrinsic, meaning it processes more often and finds trap more reliably (i.e. it searches half of the time instead of 13, and finds traps 13 of the time rather than 16).

References


This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.