Help:Style guide

From PZwiki
(Redirected from Help:Style guide)

The purpose of this page is to provide general stylistic guidelines to follow when editing PZwiki. Wikipedia comes with a great general style guide, so this page will only contain rules and guidelines specifically for PZwiki. A wiki's purpose is to document facts; thus, you should avoid any opinionated or speculative information.

LightBulbBlue.png
If you have any questions, suggestions, or complaints, please leave a comment on the discussion page. Please do not introduce or alter guidelines on this page without consensus.

Page titles

Pages must have appropriate titles.

  • Pages about items, tiles, locations, and other game mechanics should be titled exactly how the name appears in-game, if possible.
    • This includes, but is not limited to, capitalization, spelling mistakes, and British vs American English differences (the default game language being American English).
    • This does not include pages that aggregate multiple items, though the name that is as close as possible to the in-game items should be chosen and appropriate redirects should be made for each item.
  • Pages about in-game characters should contain their first and last names, rather than their nickname. For example, rather than Bob or Baldspot, the page would be called Bob Smith.
    • Of course, appropriate redirects can and should be created for these names.
    • The exception to this guideline is if the full name is not known, in which case only the first or last name known is required; otherwise, use the nickname.
  • If multiple items of the same title appear, parentheses can be used to indicate its type and a disambiguation page can be created, for example Water Bottle (disambiguation).

Redirects

A redirect can be created if it fits one of the following criteria:

  1. Previous in-game names, such as "Empty Sand Bag" for "Sack".
  2. Alternate spelling of the title, such as "Duffelbag" for "Duffel Bag".
    1. This includes differences between British and American English, such as "Tyre" for "Tire".
    2. This also includes first names or aliases for devs, such as "Chris" or "Lemmy" for "Chris Simpson".
    3. This also includes names and nicknames for in-game characters, such as "Bob" or "Baldspot" for "Bob Smith".
  3. Alternate capitalization or form, such as "Baseball bat" for "Baseball Bat".
  4. Non-English titles redirecting to a subpage, such as "Кастрюля" for "Cooking Pot/ru. For details, please refer to Translations below.

Translations

PlushSpiffo.pngThis page is about rules for translations. For instructions on how to translate, see Help:Translations.
  • The default language is English; therefore, all pages should have an English version and then be translated from English to the desired language.
  • Names of items, tiles, locations, and other game mechanics should be translated according to the official in-game translations.
  • Pages in languages other than English should be a subpage of the English version with the language code, e.g., /fr for French, and NOT the translated version, e.g., Items/fr instead of Objets (the latter one should be a redirect).
    • The displayed page title can be changed by adding {{DISPLAYTITLE:Objets}} to the page. Replace Objets with the page title you wish to display.
  • Generally, {{ll}} and {{lcs}} templates should be avoided used in the middle of the page, and instead be reserved for templates and pages that are transluded, but may be helpful in other places, such as tables and see also sections as well as extra categories at the bottom of the page. Main page and community portal are also exceptions, using those templates heavily. This hopefully allows for easier and faster translations for the translators.

Writing

A standard writing style needs to be maintained for ease of reading and consistency across pages.

  • Pages outside the Guides section should be written without referring to the reader directly.
  • Abbreviations are to be avoided.
  • Emphasis should be made via italics, not bold or CAPS.
  • Try to proofread your own articles if possible.
Incorrect
DO NOT place the generator inside the house. The generator will degrade your health very quickly because of the its exhaust. If you happen to have done so, go outside ASAP to stop the damage, but the house won't be safe until the generator is turned off.
Correct
Players should not place the generator inside the house as it will degrade a character's health very quickly, because of its exhaust. If the player happens to have done so, going outside will stop the player from taking damage, but the house will not be safe until the generator is turned off.
  • Information about modifications should not be part of an article unless the article itself is about a mod.
  • American English should be used when possible. While core The Indie Stone developers are from the UK and some old or internal item names can still be in British English, the game takes place in the US and American English was chosen the default language for the game and the wiki.
  • There is also a slight preference towards Oxford spelling (-ize suffixes) and Oxford (serial) commas, though it's not strictly enforced.

Capitals

  • Words should only be capitalized at the start of a sentence or if the word is a proper noun. This includes general places' names, as well as items, tiles, skills, occupation, and traits names, as they are common nouns. This, however, received a brief discussion, so an exception for these may be done at one point in the future.
    • Exceptions to this rule are page titles and when items are in lists/tables, as well as under "See also" sections.
    • This includes section headings, such as "See Also", which should be "See also".

Preferred code style

While not strictly enforced, there is a preferred code style for wikitext and some HTML/CSS elements that might differ in other wikis.

These preferences are not yet set in stone and may change in the future, but are listed here to avoid needless changes and possible edit warring. If you think that something is wrong about it, or want to discuss it, feel free to do so on the discussion page or come talk with admins and other editors on the #pzwiki_editing channel at the official The Indie Stone Discord server.

Here's the list of the current preferences when it comes to the wikitext - these changes may sometimes be made alone or alongside other changes, or done automatically by some bots.

  • Spaces between equal (=) signs and the header, as well as list signs such as * or # are currently omitted, however the default tools (summary for file uploads and the current editing toolbar) add them.
  • An extra new line is added after each paragraph before the next header, but no extra line is added right underneath the header.
    • Whenever two headers are directly underneath each other, no new line is added in between of them.
  • A capital letter is used for {{Templates}} and [[Links]] including [[Interwiki:]] ones such as [[Wikipedia:]] unless it's an abbreviation, such as {{ll}}, {{tll}}, [[mw:]] or a link that is visible in text, c.f., Capitals section.
  • Each template is kept in a new line, this is most obvious for the pages' headers.
    • When an infobox ends, the infobox' template closing tag }} is kept as a sole one in a line, then the text follows in the next line.
    • Be extra careful to avoid two newlines in transcluded templates, as that might cause creation of an extra new paragraph!
  • Extra tabs and spaces are generally omitted at the beginning of the line, though there are some templates that have them for readability.
  • <pre>...</pre> tags in the Code section are kept alone in separate lines.
  • File: prefix in the gallery is omitted.
  • Underscores are generally changed to spaces, except when they're a part of an item name (see naming conventions section) or a _Model.
  • An empty line is kept between navbox and categories.
  • {{PAGENAME}} and similar magic words should not be used outside of templates, instead page name should be copied for clarity sake.

There are also no strong preferences for CSS/HTML, but some include:

  • ; sign at the end of each CSS attribute.
  • Spaces between attributes and properties.
  • 6-letter lowercase hexadecimal colors.
  • Slight preference towards CSS style="width" instead of HTML width attribute.

File uploads

Everyone has the freedom to upload a new file, so long as it complies with the wiki rules. However, for images to be used outside the user pages, some guidelines are there to assure the quality and avoid needless duplication.

File dimensions

Item icons, tiles, images, and interface elements should be uploaded at the resolution they appear in-game, e.g., 32 × 32 pixels for items. For example, all items, with minor exceptions caused by the game differences, should be at a 32 × 32 pixel resolution. Do not upload a scaled version; icons will get properly upscaled automatically in infoboxes to the desired sizes with the "pixelart" class, which currently is 128 pixels wide for icons, maintaining their pixelated look.

As of build 41.78.16 there are currently 6 item icons that have wrong dimensions. These icons are present as such in the original game files, likely as a mistake, but these stay at uneven dimensions:

This is the same for some interface icons, such as the time buttons.

Item model images should ideally be uploaded at 400 × 400 pixels, and are scaled to 200 pixels wide.

Do not crop empty spaces for icons and models; that way, the alignment of the image will be better.

Single tile icons (ground) should be at a 128 × 64 pixel resolution for 2x textures, 64 × 32 for 1x textures, or a multiple of these. An exception to this rule is the uploading of certain furniture tiles as sticking to their standard resolution can result in large amounts of empty space.

For other images, other than the main page, try to upload the highest non-scaled resolution available, as the downscaling is handled by MediaWiki.

Naming conventions

  • Item icons should be named the same as they are within the game code, which can be found within the script files found in ProjectZomboid > media > scripts and under Icon or when exported by TileZed.
    • Although items are technically stored as "Item_…", the "Item_" is currently omitted for most files; this may change in the future.
    • Items that aren't named within these text files, such as cooked food, can be found within the UI1.xml or UI2.xml files, which are found with the image files.
  • Item models can be named either the model file name or the model texture file name, with _Model added to the end. Example: File:BaseballBat_Model.png.
  • Tiles/furniture should be named after tile IDs. Items that take multiple tiles should be combined with +; if the tiles use the same ID, their beginnings can be omitted. Example: File:Appliances_cooking_01_25.png or File:Location_shop_generic_01_80+81+82.png.
  • Interface icons should generally be named as they appear in game files when exported by TileZed.
  • Animated images, whether they be a GIF or PNG file, should have _Anim at the end so they can easily be identified an animated image rather than relying on the file extension itself. Example: File:BottleOfGasoline_Anim.png.
  • If an old or alternative version of an image is to be uploaded, or the name collides with another name, users are free to use a suffix of their choosing, as currently there's no strict naming convention about it. Currently, some old icons are uploaded with the -old suffix.
    • Due to limitations of the MediaWiki software, underscores are changed to spaces and first letter of the file is always converted to uppercase; this should be kept in mind when uploading images.

Categories

Article layout

Header/Navbar

The header/navbar displays a navigation bar, when the article was last updated, and a background for the article. Due to current wiki policy, articles that are about an in-game item or mechanic must include a version category based on when they were last updated in the wiki. This allows us to track which articles may be outdated.

Message boxes

Message boxes can be anything from a mbox, which alerts both readers and editors of something important about the article, to a disambiguation link, which is used to present a link to what the reader may have been searching for instead.

Infobox

This section is for the infobox which will be positioned on the right-side of the page. The infobox provides a quick summary of important points and are easy-to-read.

Introduction

  • This section should contain a brief introduction to the subject in question.
  • It should begin with an indefinite article ('a' or 'an'), followed by the singular form of the subject in bold and lowercase.
    • An exception is if the in-game name of the item/object/mechanic is pluralized or contains a proper article, in which case 'a' or 'an' should be removed.
    • If the item/object/mechanic is a proper noun, then it should be written in uppercase.
  • Links to other pages within the wiki should be added where appropriate.

Table of contents

A table of contents (TOC) is automatically added to articles with at least 4 sections. It is positioned on the left-side above the first section by default.

  • If the TOC is not needed then it can be removed with: __NOTOC__
  • Alternatively, the TOC can be positioned manually with: __TOC__
  • It can also be forcefully positioned to left or right with the {{toc}} (default is left) and {{toc|right}}.

Article sections

Each section should ideally be written in this order:

  • Overview or Mechanics: This section should only be included if there is a significant amount of detail that needs to be covered and cannot be placed in the introduction.
  • Usage: This section should contain all the uses for the item. Topics can be separated into additional sections if required, no matter how little information there might be.
  • Crafting: All the crafting recipes the item is involved in should be included in this section.
  • Distribution: How/where the item/object is distributed should be included within this section. This can be broken down further into "buildings" and "vehicles" if necessary.
  • Gallery: An assortment of relevant images, organized within the <gallery></gallery> container.
  • Trivia: A list of interesting facts directly related to the subject of the article. Try not to duplicate information already included in the other sections of the page, and avoid points that may be considered common sense.
  • Code: Code directly related to the subject found in .txt files should be placed here.
  • See also: Links to any articles that may be related to the subject of the article and weren't mentioned in the article should be listed here.
  • References: A list of any references used to support statements they were used to make in the article. Read more about citing sources.

Navigation footer

Many articles will require having a navigation footer, recognized as a navbox, which lists all similar items/objects.