Difference between revisions of "NetHackWiki:Style guide"

From NetHackWiki
Jump to navigation Jump to search
(Capitalization)
(Article names: give example of bolding article name/abbreviation, remove irrelevant stuff about in-game messages)
Line 13: Line 13:
 
Try to be consistent with existing articles:
 
Try to be consistent with existing articles:
  
* Name most pages with lowercase letters, like [[scroll of identify]], but use uppercase for proper nouns, like [[Amulet of Yendor]].  
+
* Name most pages with lowercase letters, like [[scroll of identify]], but use uppercase for proper nouns, like [[Amulet of Yendor]]. By default, MediaWiki forces the first letter of a page name to be uppercase.
 
* Prefer singular to plural (i.e. [[Unicorn]] instead of [[Unicorns]])
 
* Prefer singular to plural (i.e. [[Unicorn]] instead of [[Unicorns]])
 
* Redirect acronyms like [[YAFM]] to pages like [[Yet Another Funny Message]]. However, [[identification]], [[scroll of identify]], and [[spellbook of identify]] can be three separate pages.
 
* Redirect acronyms like [[YAFM]] to pages like [[Yet Another Funny Message]]. However, [[identification]], [[scroll of identify]], and [[spellbook of identify]] can be three separate pages.
  
The first time the article name appears in the main text, it should be '''bolded'''. This includes the titles of any redirects redirecting to the article. In-game messages documented in a definition list will be bolded automatically:
+
The first time the article name appears in the main text, it should be '''bolded'''. This includes the titles of any redirects redirecting to the article. Example: "'''Gauntlets of power''', sometimes abbreviated to '''GoP''', ..."  
 
 
; "You feel centered in your personal space."
 
: You gained teleport control through eating a corpse, while hallucinating
 
 
 
formats into
 
 
 
; "You feel centered in your personal space."
 
: You gained teleport control through eating a corpse, while hallucinating
 
  
 
===Redirects===
 
===Redirects===

Revision as of 17:10, 19 August 2018

NetHackWiki has no formal style guide as of yet, but there are a few conventions in use. The following is a list of them. Changes should be discussed on the talk page.

NetHackWiki versus Wikihack

Please refer to this wiki as NetHackWiki. "Wikihack" is the name it was founded under.

Tone

Although NetHackWiki is a guide in addition to being an encyclopedia, articles in the main namespace should nonetheless be written in a largely encyclopedic tone. That means clearly separating facts from comments, by putting strategy tips in their own section, and comments on the talk page. Spelling and grammar should follow Americanized language rules.

Make sentences short.

Article names

Try to be consistent with existing articles:

The first time the article name appears in the main text, it should be bolded. This includes the titles of any redirects redirecting to the article. Example: "Gauntlets of power, sometimes abbreviated to GoP, ..."

Redirects

When creating a new article, redirect variations on that name to it, to avoid someone duplicating the article under a slightly different title.

For in-game messages, redirect the message (e.g. The golden haze around you disappears) to the article about the thing that caused it. If the message can have multiple causes, create a disambiguation page (e.g. Your skin feels warm for a moment).

The syntax for a redirect is like this:

#REDIRECT [[spellbook of protection]]

See metawikimedia:Help:Redirect for help creating redirects.

New articles

Do not create empty new articles or new articles that contain nothing but the {{stub}} message just in hopes of seeing someone add more content to them. Add the content yourself! A "{{stub}}"-only page is somewhat like applying a magic marker to write a blank scroll, though the scroll is already blank. If you don't know about the subject, learn about it or ask politely at the Community Portal for someone to create the article.

Capitalization

In general, if the game or the source code capitalizes something, it should be capitalized on this wiki. "Archon", "Book of the Dead", and "Moloch's Sanctum" are examples of this. Note that Archon is not a proper noun, but it should still be capitalized because NetHack always capitalizes it. Always use "Luck" when referring to the in-game attribute; use "luck" to refer to good RNG or other "out-of-game" luck.

Conversely, do not capitalize things that the game does not capitalize and treats like common nouns (most monsters and objects fall into this category). Examples include "potion of hallucination", "tiger", and "rust trap".

Headers

The highest header level that should be used is ==This==. Do not use =These=, they are reserved for the article main title only. In each article, there should be a brief introduction before going into specifics. This introduction should not have a header, like ==Introduction==, because it is obvious and because when you omit it, the introduction appears before the table of contents as it is supposed to.

Section names

Some sections are common to many articles. Try to use one of these for the section header rather than a variant like "Messages given", "Behavior in previous versions", or "External Links". Known standard sections are:

  • Generation
  • Map(s)
  • Messages
  • Strategy
  • Mythology
  • History
  • Encyclopedia entry
  • See also
  • References
  • External links

Generation should explain where and how the thing can be found or created.

The History section should be for explaining what the thing did in previous versions of NetHack. Actual history should go in Mythology (if the thing is based on real life, Origin may be a better heading).

The Encyclopedia entry should give the text of the thing's entry in the NetHack encyclopedia.

Categories

Each new article should have at least one category assigned to it; read the category tree to find an appropriate one. Remember to update that tree if you create a new category.

Tables

Many of our tables are pretty tables; the prettytable class from MediaWiki:Common.css can be used like this:

{|class="prettytable"
!Header 1
!Header 2
|-
|Cell 1
|Cell 2
|-
|Cell 3
|Cell 4
|}

to make this:

Header 1 Header 2
Cell 1 Cell 2
Cell 3 Cell 4

It's also possible to use "striped" and/or "sortable" in addition to "prettytable".

Colored NetHack glyphs

For example: A, n, D

Use the 16-color function templates for displaying individual symbols. For monsters you should usually use {{monsym}}, or {{monsymlink}}.

To make colored ASCII screenshots, wrap the function templates in <div class="ttymap"></div>, or use User:Paxed/ReplaceCharsBlock with ruleset {{ttymap}} to allow easier editing.

While editing an article, it's possible to have a "popup" window where you can select the colored symbols with mouse; Just click the "Color symbols" link at the bottom of the page.

Item pages

Put the appropriate template out of Template:scroll, Template:potion, Template:ring, Template:wand, Template:spellbook, Template:weapon, Template:armor, Template:comestible, Template:amulet, Template:artifact, Template:artifact weapon and Template:tool at the top of the item page, or Template:item for any other type of item.

Each item page should also list the effects of the item, and any messages that item can generate. Tips and strategy relating to that item should go next, and if there is an entry from the NetHack encyclopedia, that can go at the bottom. Use potion of object detection, scroll of amnesia and scroll of genocide as guides.

SLASH'EM

Prefer "SLASH'EM" to "Slash'EM". There is no consensus on which one is "official", but we need a convention, and SLASH'EM is clearly an acronym. If a thing's behavior is slightly different in SLASH'EM, put the differences in a ==SLASH'EM== section. If a thing is totally different, or exists only in SLASH'EM, give it its own article.

Source code

When writing a piece of factual information, you may wish to document it by linking to the source code like this:

The vibrating square level is not eligible to leave bones files.{{refsrc|bones.c|36|version=NetHack 3.6.0|comment=vibrating square does not leave bones}}

which looks like this:

The vibrating square level is not eligible to leave bones files.[1]

You must include the <references/> tag at the bottom of the page like this:

==References==
<references/>

That will create a list of footnotes:

  1. bones.c in NetHack 3.6.0, line 36: vibrating square does not leave bones

The templates {{refsrc}}, {{reffunc}}, {{sourcecode}}, and {{function}} are designed for use in source code references.

Annotations

If you are a source diver, you can add annotations to any source file simply by putting your comments below the relevant line. Try to limit annotations to explanations of the source code; long discussions belong on the Talk page.

Other useful templates

Main article: NetHackWiki:Templates

{{DOD}} should go at the bottom of every page which is based on a spoiler by Dylan O'Donnell.

{{disambig}} should go at the bottom of every disambiguation page, e.g. Fire. A disambiguation page is a list of links to articles all associated with the same title.

{{stub}} can be used on a page to plea for someone to expand it. From time to time, some editors will look over Category:Stubs for articles to expand. It can take no parameters, or it can take an optional parameter explaining what needs to be expanded:

{{stub|What's the best strategy for killing the Wizard of Yendor?}}

{{merge}} is a plea for someone to merge a page with another, or several others. You should give details of which other page you mean in the parameter:

{{merge|Some of this information belongs in [[this article]].}}

{{otheruses}} is for a page whose title has multiple meanings, like Izchak. In many cases, a disambiguation page may be more appropriate, but where one meaning dominates the others, it deserves the page title. Also see the {{for}}, {{for2}} and {{distinguish}} templates.

{{main}} can be used to link to the main article for a topic, per this section:

{{main|NetHackWiki:Templates}}

Namespaces

Anything to do with NetHack belongs in the main article space. Anything to do with NetHackWiki belongs in the NetHackWiki namespace.

User pages

You can create a vanity page in the main namespace if you want to, but unless you are famous or otherwise notable it would be a better idea to create a NetHackWiki account and put personal information on your own User page.

Sign your posts

When writing on articles'/users' talk-pages or on certain community pages, sign your posts with four tildes, ~~~~. That will automatically expand to your signature with timestamp, as in "ZeroOne 17:57, 15 August 2006 (UTC)".

Dealing with unsigned comments

The templates {{unsigned}} and {{unsigned2}} can be used at the end of an unsigned comment to attach the username or IP to the comment. None of these templates automatically populate (fill in) the name or IP of the poster and the time of the post. That information is best copied from the history page and pasted into the following templates. Note: All of the unsigned templates must be substituted.

Wikimarkup Resulting code Resulting display
{{subst:unsigned|user name or IP}} {{subst:unsigned|Example}} --Preceding unsigned comment added by Example (talkcontribs)
{{subst:unsigned|user name or IP|date}} {{subst:unsigned|Example|11:15, 1 June 2005 (UTC)}} --Preceding unsigned comment added by Example (talkcontribs) 11:15, 1 June 2005 (UTC)

The template {{unsigned2}} does almost the same thing as {{unsigned}} when used with two parameters, but the ordering of the parameters is reversed. The resulting display is the same. This template may be useful when copying and pasting from the edit history, where the timestamp appears before the username.

Wikimarkup Resulting code Resulting display
{{subst:unsigned2|date|user name or ip}} {{subst:unsigned2|11:15, 1 June 2005 (UTC)|Example}} --Preceding unsigned comment added by Example (talkcontribs) 11:15, 1 June 2005 (UTC)

General principles

English syntax

Many NetHackers are not native English speakers -- that's great; everybody comes into the game with their own characteristics and intrinsics. This wiki is therefore written in eclectic, somewhat international English. But if you are writing on a public wiki, you're an advanced user of English, so you should know these things about English syntax:

  • "chance of doing" versus "chance to do": One refers to probability; the other to opportunity. "You have a chance to do X" means "you have an opportunity to do X"; e.g., you get a turn to move or you get asked to confirm a choice. "You have a chance of doing X" means "there is a certain probability that you will do X", e.g. you have a 70% probability of turning into a newt when the witch curses you.
  • ...