Difference between revisions of "MSGTYPE"

From NetHackWiki
Jump to navigation Jump to search
(Rewrites for 3.6.1: is now an official option, fix up examples and organize into sections)
 
Line 1: Line 1:
{{see also|Options#MSGTYPE}}
+
'''MSGTYPE''' is an [[option]] introduced in [[NetHack 3.6.0]] which adds configuration [[option]]s allowing the user to change how messages are displayed. For specific messages, it can force a <tt>--More--</tt> prompt, prevent messages from printing repeatedly, or prevent unimportant messages from printing at all.
  
{{patch
+
Prior to 3.6.0, it existed as a [[patch]] against [[NetHack 3.4.3]]. [http://bilious.alt.org/?397 You can get it as a patch here.]
|name=messagetype
 
|author=Pasi Kallinen
 
|download=http://bilious.alt.org/~paxed/nethack/nh343-msgtype.diff
 
|bilious=397
 
}}
 
 
 
{{todo|MSGTYPE was added to NetHack 3.6.0}}
 
 
 
'''MSGTYPE''' is a [[patch]] for NetHack 3.4.3 which adds configuration [[option]]s allowing the user to change how messages are displayed. [[Nethack.alt.org]] and [[UnNetHack]] have it applied.
 
 
 
For example whether a message always waits for <tt>--MORE--</tt>, or if it's never shown, or if it's never shown more than once in a row.
 
 
 
Potential uses are:
 
* to call attention to delayed instadeaths.
 
* an automatic Elbereth spellchecker,
 
* to miminize <tt>--MORE--</tt>'s to page through. No more redundant or blatantly obvious messages,
 
* focus attention on the important parts of battle by removing the less serious "spam",
 
* to kill typeahead in dangerous or conduct-wrecking situations,
 
* reduce typing work a la "You carefully open your bag" {{kbd|space}}.
 
You might want different configurations for different stages of the game.
 
  
 +
== Format ==
 
The format is
 
The format is
 
  MSGTYPE=foo "string to match"
 
  MSGTYPE=foo "string to match"
Where "foo" is one of "hide", "stop" or "norep", and the string to match is a message to be matched, with '*' and '?' wildcard expansion.
+
Where "foo" is one of "hide", "stop" or "norep", and the string to match is a message to be matched. Regular expressions are supported.
  
 
*"hide" hides the message, so it's never shown.
 
*"hide" hides the message, so it's never shown.
*"stop" always prompts for --MORE-- after the message.
+
*"stop" always prompts for <tt>--More--</tt> after the message.
 
*"norep" shows the message, but not again if no other message is shown in between.
 
*"norep" shows the message, but not again if no other message is shown in between.
*"show" shows the message, each time. This is the default.
+
*"show" shows the message, each time. This is the default, and probably never needs to be explicitly configured.
 +
 
 +
When multiple string expressions match a message, the last matching rule is used. Thus, put the general cases first, and exceptions below.
 +
 
 +
== Uses ==
 +
MSGTYPE can be used to:
 +
* call attention to delayed instadeaths.
 +
* kill typeahead in dangerous or conduct-wrecking situations.
 +
* focus attention on the important parts of battle by removing the less serious "spam".
 +
* reduce the amount of spaces you need to type for common actions.
 +
* ignore functionally useless common messages.
 +
<!-- "automatic Elbereth spellchecker" used to be on this list but I wasn't able to find an example of how this could be done -->
  
The last matching rule is used. Put the general case first, exceptions below them.
+
You might want different configurations for different stages of the game.
  
 +
== Examples ==
 
  # displacing pets
 
  # displacing pets
  MSGTYPE=hide "You displaced *"
+
  MSGTYPE=hide "You swap places with .*"
 +
 +
# unclogging the screen
 +
MSGTYPE=hide "Your tentacles suck the .*"
 +
 
  # items on floor
 
  # items on floor
  MSGTYPE=norep "You see here a *"
+
  MSGTYPE=norep "You see here a.*"
  MSGTYPE=norep "You see here an *"
+
   
 
  # delayed instadeaths
 
  # delayed instadeaths
  MSGTYPE=stop "The couatl swings itself around you!"
+
  MSGTYPE=stop "The .* (grabs|swings itself around) you!"
MSGTYPE=stop "The electric eel swings itself around you!"
 
MSGTYPE=stop "The giant eel swings itself around you!"
 
MSGTYPE=stop "The kraken swings itself around you!"
 
MSGTYPE=stop "The python grabs you!"
 
 
  MSGTYPE=stop "You don't feel very well."
 
  MSGTYPE=stop "You don't feel very well."
 
  MSGTYPE=stop "You are turning a little green."
 
  MSGTYPE=stop "You are turning a little green."
Line 60: Line 53:
 
  MSGTYPE=stop "Your consciousness is fading."
 
  MSGTYPE=stop "Your consciousness is fading."
 
  MSGTYPE=stop "You feel deathly sick."
 
  MSGTYPE=stop "You feel deathly sick."
  MSGTYPE=stop "You feel much worse."
+
  MSGTYPE=stop "You feel (much|even) worse."
  MSGTYPE=stop "You feel even worse."
+
   
  #Things that aren't dangerous by themselves but could kill you if you don't notice.
+
  # Things that aren't dangerous by themselves but could kill you if you don't notice.
 
  MSGTYPE=stop "You fail to cast the spell correctly."
 
  MSGTYPE=stop "You fail to cast the spell correctly."
  MSGTYPE=stop "You see here a cockatrice corpse."
+
  MSGTYPE=stop "You see here a c(hi|o)ckatrice corpse."  
MSGTYPE=stop "You see here a chickatrice corpse."
 
 
  MSGTYPE=stop "You are beginning to feel weak."
 
  MSGTYPE=stop "You are beginning to feel weak."
 
+
 
+
# Don't speed past wrest message when wresting
"Stop" will also kill typeahead if you use the tty interface. For example, this will make it harder to miss the [[vibrating square]] due to inattentiveness:
+
MSGTYPE=stop "You wrest .*"
 
+
 +
# Don't miss the vibrating square
 
  MSGTYPE=stop "You feel a strange vibration under your *."
 
  MSGTYPE=stop "You feel a strange vibration under your *."
 
  MSGTYPE=stop "You feel a strange vibration beneath you."
 
  MSGTYPE=stop "You feel a strange vibration beneath you."
  
[[User:Tjr|Tjr]] has a much more [https://alt.org/nethack/userdata/t/tjr4/tjr4.nh343rc involved sample config], [https://alt.org/nethack/userdata/s/scorchgeek/scorchgeek.nh343rc scorchgeek's rcfile] is also very good source of ideas.
+
[[Category:Options]]
 
+
{{nethack-361}}
[[Category:Patches]]
 

Latest revision as of 17:12, 18 September 2018

MSGTYPE is an option introduced in NetHack 3.6.0 which adds configuration options allowing the user to change how messages are displayed. For specific messages, it can force a --More-- prompt, prevent messages from printing repeatedly, or prevent unimportant messages from printing at all.

Prior to 3.6.0, it existed as a patch against NetHack 3.4.3. You can get it as a patch here.

Format

The format is

MSGTYPE=foo "string to match"

Where "foo" is one of "hide", "stop" or "norep", and the string to match is a message to be matched. Regular expressions are supported.

  • "hide" hides the message, so it's never shown.
  • "stop" always prompts for --More-- after the message.
  • "norep" shows the message, but not again if no other message is shown in between.
  • "show" shows the message, each time. This is the default, and probably never needs to be explicitly configured.

When multiple string expressions match a message, the last matching rule is used. Thus, put the general cases first, and exceptions below.

Uses

MSGTYPE can be used to:

  • call attention to delayed instadeaths.
  • kill typeahead in dangerous or conduct-wrecking situations.
  • focus attention on the important parts of battle by removing the less serious "spam".
  • reduce the amount of spaces you need to type for common actions.
  • ignore functionally useless common messages.

You might want different configurations for different stages of the game.

Examples

# displacing pets
MSGTYPE=hide "You swap places with .*"

# unclogging the screen
MSGTYPE=hide "Your tentacles suck the .*"

# items on floor
MSGTYPE=norep "You see here a.*"

# delayed instadeaths
MSGTYPE=stop "The .* (grabs|swings itself around) you!"
MSGTYPE=stop "You don't feel very well."
MSGTYPE=stop "You are turning a little green."
MSGTYPE=stop "Your limbs are getting oozy."
MSGTYPE=stop "Your skin begins to peel away."
MSGTYPE=stop "You are turning into a green slime."
MSGTYPE=stop "You are slowing down."
MSGTYPE=stop "Your limbs are stiffening."
MSGTYPE=stop "It constricts your throat!"
MSGTYPE=stop "You find it hard to breathe."
MSGTYPE=stop "You're gasping for air."
MSGTYPE=stop "Your blood is having trouble reaching your brain."
MSGTYPE=stop "You can no longer breathe."
MSGTYPE=stop "You're turning blue."
MSGTYPE=stop "Your consciousness is fading."
MSGTYPE=stop "You feel deathly sick."
MSGTYPE=stop "You feel (much|even) worse."

# Things that aren't dangerous by themselves but could kill you if you don't notice.
MSGTYPE=stop "You fail to cast the spell correctly."
MSGTYPE=stop "You see here a c(hi|o)ckatrice corpse." 
MSGTYPE=stop "You are beginning to feel weak."

# Don't speed past wrest message when wresting
MSGTYPE=stop "You wrest .*"

# Don't miss the vibrating square
MSGTYPE=stop "You feel a strange vibration under your *."
MSGTYPE=stop "You feel a strange vibration beneath you."

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

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

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