Difference between revisions of "NetHackWiki:Style guide"

From NetHackWiki
Jump to navigation Jump to search
(added a note about categories. sorted the items a bit: more general stuff at the beginning, more specific stuff at the end.)
(Clarify how prettytables works. The demo uses a CSS class, not the template.)
Line 2: Line 2:
  
 
== Article names ==
 
== Article names ==
 
 
Try to be consistent with existing articles:
 
Try to be consistent with existing articles:
  
Line 18: Line 17:
  
 
== Tables ==
 
== Tables ==
 +
Many of our tables are pretty tables, the prettytable class from [[MediaWiki:Common.css]] can be used like this:
  
[[Template:prettytable]] can be used like this:
 
 
<pre>
 
<pre>
{|class="prettytable"
+
{|class="prettytable"
!Header 1
+
!Header 1
!Header 2
+
!Header 2
|-
+
|-
|Cell 1
+
|Cell 1
|Cell 2
+
|Cell 2
|-
+
|-
|Cell 3
+
|Cell 3
|Cell 4
+
|Cell 4
|}
+
|}
 
</pre>
 
</pre>
 
to make this:
 
to make this:
Line 46: Line 45:
  
 
== Coloured NetHack glyphs ==
 
== Coloured NetHack glyphs ==
 
 
Use the 16-colour [[:Category:Function_templates|function templates]] for displaying individual monster symbols. They're padded, so they don't work for making ASCII screenshots. Yet.
 
Use the 16-colour [[:Category:Function_templates|function templates]] for displaying individual monster symbols. They're padded, so they don't work for making ASCII screenshots. Yet.
  
Line 58: Line 56:
  
 
== Source code ==
 
== Source code ==
 
 
When writing a piece of factual information, you may wish to document it by linking to the source code like this:
 
When writing a piece of factual information, you may wish to document it by linking to the source code like this:
  
Line 72: Line 69:
  
 
=== Annotations ===
 
=== 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.
 
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 ==
 
== Other useful templates ==
 
 
<nowiki>{{DOD}}</nowiki> should go at the bottom of every page which is based on a spoiler by Dylan O'Donnell.
 
<nowiki>{{DOD}}</nowiki> should go at the bottom of every page which is based on a spoiler by Dylan O'Donnell.
  
Line 82: Line 77:
  
 
== Namespaces ==
 
== Namespaces ==
 
 
Anything to do with NetHack belongs in the main article space. Anything to do with Wikihack belongs in the Wikihack namespace.
 
Anything to do with NetHack belongs in the main article space. Anything to do with Wikihack belongs in the Wikihack namespace.
  
 
=== User pages ===
 
=== 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 Wikihack account and put personal information on your own User page.
 
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 Wikihack account and put personal information on your own User page.
  
 
== General principles ==
 
== General principles ==
 
 
* Article pages (those in the main namespace) are not strictly NPOV (as the suitability of many strategies are a matter of opinion), but they should be broadly factual.
 
* Article pages (those in the main namespace) are not strictly NPOV (as the suitability of many strategies are a matter of opinion), but they should be broadly factual.
 
* If in doubt, consider [[Wikipedia:Wikipedia:Manual of Style|Wikipedia's policies]] on the matter; they're pretty good.
 
* If in doubt, consider [[Wikipedia:Wikipedia:Manual of Style|Wikipedia's policies]] on the matter; they're pretty good.

Revision as of 20:08, 27 June 2006

Wikihack 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.

Article names

Try to be consistent with existing articles:

The first time the article name appears in the main text, it should be bolded.

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 omitting it, the introduction appears before the table of contents as it is supposed to.

Categories

Each new article should have at least one category assigned to it.

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

Coloured NetHack glyphs

Use the 16-colour function templates for displaying individual monster symbols. They're padded, so they don't work for making ASCII screenshots. Yet.

Item pages

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

Caveat: these templates may not exist yet...

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.

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 <ref>[[bones.c#line32]]</ref>. 

which looks like this:

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

Make sure you include a <references/> tag at the bottom of the page, to create a list of footnotes:

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

{{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

Namespaces

Anything to do with NetHack belongs in the main article space. Anything to do with Wikihack belongs in the Wikihack 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 Wikihack account and put personal information on your own User page.

General principles

  • Article pages (those in the main namespace) are not strictly NPOV (as the suitability of many strategies are a matter of opinion), but they should be broadly factual.
  • If in doubt, consider Wikipedia's policies on the matter; they're pretty good.