Factorio:Style guide: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Create style guide)
 
(Completely overhauled style guide)
Line 1: Line 1:
This is the official Factorio style guide. Please follow this guide when creating or editing pages on this Wiki.
This is the official Factorio style guide. Please follow this guide when creating or editing pages and files on this wiki.
 
== Page creation and upcoming/outdated content ==
 
* Avoid creating unnecessary pages or subpages. If the info you are trying to add is related to an entity in-game, please place the info on that entity's page.
* See the [[Factorio:Editor noticeboard|Editor noticeboard]] for guidelines on whether the wiki is currently targeting the stable or experimental version of the game.
* [[Upcoming features]] should be referenced with a link to a comment or image posted by a member of Factorio's development staff. Please consider that the [[News|Factorio Friday Facts]] usually show plans and not confirmed changes, so information should not be treated as such.
* Pages about removed content should be marked with the <code><nowiki>{{archive}}</nowiki></code> template and not be edited any further.


== Language ==
== Language ==


* The default language is American English, however English pages may also use European English. All pages must have an English version, and should be translated English -> Other. Use of country-specific slang must be avoided, except for localization reasons.
* Edit in an “encyclopedia” style, avoiding use of the first person or any personal bias. Avoid words like I, me, you, etc. The tutorial namespace is exempt from this guideline.
* Any other language has no right to obtain a page name which collides with English.
* Correct all typos found, even if changing the sentence layout is necessary. Comprehension is important.
* No other language has the right to use a page name which means the same or something different in another language.
* Use the "Show preview" button to view your changes before saving them, to allow yourself to catch incorrect links and typos, and improper formatting. While creating multiple edits to the same page is allowed, it creates clutter on the recent changes screen and in the page history.
* Language pages when translated should use the English name with the language code appended to the end of the name. For example, "Transport belt" when translated to German should be named "Transport belt/de". If translating the page name is necessary, put an entry for it on the language's respective translation template, something like: Template:Translation/??
* The default language is American English, however English pages may also use European English. All pages must have an English version, and should be translated English -> Other. Use of country-specific slang must be avoided.
* Page names should only be capitalized at the first word, with some exceptions. Essentially, Petroleum gas, and not Petroleum Gas. This is both for readability and for the internal code of the wiki to work correctly.
* Only translate pages if you fluently speak the language you are translating to.
* Items, entities, and other in-game objects should be named and translated according to the official in-game translations.
* To automatically translate page names, infoboxes and similar templates, use [[Template:Translation]].


== Typo control ==
== Page layout guidelines and formatting ==
* Please use the "Show preview" button to view your changes before saving them, to allow yourself to catch incorrect links and typos, and improper formatting. While creating multiple edits to the same page is allowed, it creates clutter on the recent changes screen. <small>'''Note:''' Since multiple edits in one day may still happen to pages, they can be grouped on the [[Special:RecentChanges|recent changes page]] by enabling "Group changes by page in recent changes and watchlist" in the [[Special:Preferences#mw-prefsection-rc|recent changes tab]] in the user preferences.</small>
* Please correct all typos found, even if changing the sentence layout is necessary. Comprehension is important.
* Run a spell check of the article to catch spelling errors.
 
== Page layout guidelines and creation of new pages ==


* Typically, a page will start with a short intro, then the content of the page, a history section, and a "see also" section. Please follow this when creating content pages. Categories should be used sparingly.
* Typically, a page will start with a short intro, then the content of the page, a history section, and a "see also" section. Please follow this when creating content pages. Categories should be used sparingly.
* Please use sane formatting, and do not Capitalize Words Like This, or L I K E T H I S.
* Please use sane formatting, and do not Capitalize Words Like This, or L I K E T H I S.
* Do not overuse '''bold''', ''italics'', or <span style="color:#00FF00">colorful text.</span> This detracts from the effect of said text when it is actually necessary.
* Do not overuse '''bold''', ''italics'', or <span style="color:#00FF00">colorful text.</span> This detracts from the effect of said text when it is actually necessary.
* If possible, clean white-space from the ends of lines/pages. Many editors can do this for you. Emacs, Notepad++, Sublime Text, and Vim are recommended. This reduces the size of the page.
* Usually <code><nowiki>[[iron gear wheel]]s</nowiki></code> is preffered over the piped version which would be <code><nowiki>[[iron gear wheel|iron gear wheels]]</nowiki></code>.
* Avoid creating unnecessary pages. If the info you are trying to add is related to an entity in-game, please place the info on that entity's page, and so on and so forth.
* Do not create circular links, I.e. do not link a page to itself. This also means that a page should not link to a redirect that links to the page itself.
* See the [[Factorio:Editor noticeboard|Editor noticeboard]] for guidelines on whether the wiki is currently targeting the stable or experimental version of the game.
* If making a comment to other editors is necessary, place the comment in comment delimiters, <code><nowiki><!-- Comment --></nowiki></code> so it cannot be seen by users. This is can be necessary to explain the page's specific formatting, such as seen on [[News]].
* [[Upcoming features]] should be referenced with a link to a comment or image posted by a member of Factorio's development staff.
* The first instance of the page title should be '''bold'''. This should usually be in the first sentence of the article. No other instance of the page title should be bold.  To make a word or phrase bold, place three apostrophes (') on each side.
* Mod related documentation is not to be hosted on this wiki. The Official Factorio Wiki is meant for documentation of the base game only. Instead, users looking for documentation or developers looking to provide documentation should do so on their mod's entry in the mod portal, or bundle the documentation with the source code of the mod. ''This wiki does not document nor enumerate mods.''
* The first instance of an item name on a page can be linked, via double brackets (eg. <code><nowiki>[[copper plate]]</nowiki></code>). Further mentions of the same item should generally ''not'' be linked, though multiple identical links can exist if they occur far from each other and would be helpful to readers.
* Edit in an “encyclopedia” style, avoiding use of the first person or any personal bias. Avoid words like I, me, you, etc.
 
* Do not create circular links, I.e. do not link a page to itself. While this doesn't do anything, it adds noise to the page that editors have to ignore.
=== Capitalization ===
* If making a comment to other editors is necessary, place the comment in comment delimiters, <nowiki><!-- Comment --></nowiki> so it cannot be seen by users. This is only necessary to explain the page's specific formatting, such as seen on [[News]].
 
* Only the first letter and proper nouns such as "Nauvis" should be capitalized in section headings or page names.
* The in-game items, entity, and other in-game object names are common nouns and should not be capitalized unless they start a new sentence.
* Likewise, when linking to another page within a flowing text, use normal capitalization for the link, so <code><nowiki>[[iron plate]]</nowiki></code> and not <code><nowiki>[[Steam engine]]</nowiki></code>.


== The History section ==
=== The history section ===


* This Wiki uses a history section on all content pages to track when entities/items are changed in the game. To do this, the Wiki uses the [[Template:History|history]] template, which provided automatic formatting and version linking.
* This wiki uses a history section on all content pages to track when entities/items are changed in the game. To do this, the wiki uses the [[Template:History|history]] template, which provided automatic formatting and version linking.
* Bugs and bug fixes must not be placed in the update history section of a page, except for very significant instances. Instead, please document bugs in the bug sections of the official forums. However, bug fixes may be documented on [[Version history]] pages.
* Bugs and bug fixes must not be placed in the update history section of a page. Any kind of bug should be reported on the forums and has no place on the wiki unless it is deemed "not a bug" by the developers. In that case the specific behaviour should be documented on the page, but not in the history section. However, bug fixes are documented on [[Version history]] pages, since they are part of the offical changelog which is reflected on those pages.
* While a history section is not required for information pages such as [[Railway]], all content pages concerning entities or mechanics of the game should have a history, taken from the changelog file provided with a standard Factorio install. The <nowiki>{{history}}</nowiki> template will automatically link to the relevant page in [[Version history]].
* While a history section is not required for information pages such as [[Railway]], all content pages concerning entities or mechanics of the game should have a history, taken from the changelog file provided with a standard Factorio install. The <code><nowiki>{{history}}</nowiki></code> template will automatically link to the relevant page in [[Version history]].
* Trivia and general facts are allowed, as long as it does not contain personal opinion and is not conjecture.
* Trivia and general facts are allowed, as long as it does not contain personal opinion and is not conjecture. This facts should be placed in a specific "Trivia" section.


== Media ==
== Media ==


* When possible, avoid putting important text in images, as it is not search-able, and makes finding that info harder.
* When possible, avoid putting important text in images, as it is not search-able, and makes finding that info harder. The text also can not be translated, so each language would need its own version of the image.
* When uploading an image, please use a descriptive, unique name, and fill out the description box. Images given a non-descriptive name will be renamed.
* When uploading an image, please use a descriptive, unique name, and fill out the description box. Images given a non-descriptive name will be renamed.
* Item icons should be named after their English in-game name.
* When uploading an updated version of an image, use the "upload a new version of this image" link found on the old file's page. This ensures that all old instances are updated automatically.
* When uploading an updated version of an image, use the "upload a new version of this image" link found on the old file's page. This ensures that all old instances are updated automatically.
* Please mark any duplicated files for deletion with the <nowiki>{{delete}}</nowiki> template. If approved, an admin will delete them. Requests for pages in the requesting user's namespace are always granted.
* Please mark any duplicated files for deletion with the <code><nowiki>{{delete}}</nowiki></code> template. If the request is approved, an admin will delete them. Requests for deletion of pages in the requesting user's namespace are always granted.
* If uploading images that are not of Factorio, please ensure you hold rights to upload the image. We don't want to get DMCA requests.
* If uploading images that are not of Factorio, please ensure you hold rights to upload the image.
* Gifs of mechanics are allowed and encouraged.
* Gifs of mechanics are allowed and encouraged.
* Please ensure that the image you are uploading is of good quality. Use the PNG filetype when possible.
* Please ensure that the image you are uploading is of good quality. Use the PNG filetype when possible.
* See the section [[#Pictures|below]] for more info on uploading images.
* See the section [[#Pictures|below]] for more info on uploading images.
* Video guides or tutorials should not be placed in the main wiki, however links to them are allowed in the "See also" section of pages.


== Templates ==
=== Taking screenshots of the game ===
 
* Templates are to be used for formatting/common text on many pages. Do not create templates for only a few pages, except for special circumstances.
* Templates should include <nowiki>{{documentation}}</nowiki> inside of noinclude tags, and should have a /doc sub-page to describe the use of the template.
* Avoid making many sequential edits to a commonly used template. This creates strain on Wube's servers to update across all the pages. Preform edits to those templates with a single edit only. If you need to edit a protected template, please contact an admin, as these templates are especially heavily used.
* Templates should be light, contain little content, and have descriptive names.
* Templates must be created within the Template namespace. Please read up on this if you don't know what this means.
 
== Page protection ==
 
* Typically, pages with high amounts of transclusions/importance will be protected, to both protect against vandalism, and to protect the servers from load caused by edits to these pages.
* If an editor needs to make a change to one of these protected pages, please contact an admin.
* If you encounter a page that you feel should/should not be protected, please contact an admin and explain your reasoning.
* We do not protect userspace pages, nor tutorials, as it is unfriendly to those who seek to fix mistakes.
 
== Pictures ==
 
=== Picture formats ===
 
* (100 - 200) x (100-300) px
: For flowing with the text, pictures which explain the text, the browser can embed this into it's own rendering. You can put them left or right, the text should flow around.
* (400 - 600) x (100 - 600) px
: Something like a banner. A big picture which stays alone in its line. You may put simply a ":" in front of it to indent the picture and keep it away from flowing text.
* 300 x 300 px
: This is especially good for gif animations. Gif animations cannot be reduced in size, because Mediawiki re-renders the picture and the result is the first frame of the gif!
* The biggest format for flowing text should be: 600x600px
 
To re-size an image when it's put onto a page, simply provide the size as an argument to the file:
 
<nowiki>[[File:example.png|200x200px]]</nowiki>
 
=== Making pictures out of the game ===
 
Do's:


* Take pictures at day! Use night or dawn only if you need to explain something that only works at night (for example, the lights).
* Take pictures at day! Use night or dawn only if you need to explain something that only works at night (for example, the lights).
* Turn off clouds! The shadows in GIF-animations are not useful.
* Turn off clouds and smoke! The shadows distract from the actual content of the image.
* Steam/smoke is also not that useful.
* Turn on info ({{Keybinding|alt}})
* Use god mode! [http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller]. You can move anywhere on the map and your character won't be in the picture.
* Use god mode! [http://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller]. You can move anywhere on the map and your character won't be in the picture.
* You can [http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.speed slowdown the game] to find the right moment for the picture. Slowdown is also useful if you use Gifcam, which makes Screenshots in 30 frames/sec only.
* It is possible to take large screenshots using a [[Console#Large_Screenshots|console command]].
* You can also use the peaceful mode to be not disturbed by the natives.
* You can [http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.speed slow down the game] to find the right moment for the picture.
* You can stop the game in the right moment using SHIFT-SPACE key. That also blends the grid in.
* Learn how to use the [[Debug mode]] to add relevant information into the picture, such as showing rail blocks.
* Learn how to use the [[Debug mode]] to add relevant information into the picture.
* Go into the highest zoom level you possibly can without missing any vital information.
* Go into the highest zoom level you possibly can without missing any vital information.
* A good in-game picture should be rebuilt so that only the relevant entities/items are shown. Anything in the photo other than what you're trying to show/explain is unnecessary.
* A good in-game picture should be build so that only the relevant entities/items are shown. Anything in the photo other than what you are trying to show/explain is unnecessary clutter.
 
* Crop pictures to show only what you want to show.
Dont's:
 
* Don't take pictures of clutter! The only stuff in the photo should be the stuff you're trying to show. The exception to clutter: If you're showing what a fully finished factory or setup might look like.
* Don't just take a screenshot. Try to remove all unneeded information from the picture.
* Try to make a picture without the character, except if to show something; then face the character toward it.
* Try to make a picture without the character, except if to show something; then face the character toward it.


See http://www.factorioforums.com/forum/viewtopic.php?f=6&t=2472 for more.
== Templates ==


=== Taking Screenshots, animations and videos===
* Templates are to be used for formatting/common text on many pages. Do not create templates for only a few pages, except for special circumstances.
 
* Templates should include <code><nowiki>{{documentation}}</nowiki></code> inside of noinclude tags, and should have a /doc sub-page to describe the use of the template.
==== Taking Screenshots ====
* Avoid making many sequential edits to a commonly used template. This creates strain on Wube's servers to update across all the pages. Perform edits to those templates with a single edit only. If you need to edit a protected template, please contact an admin, as these templates are especially heavily used.
 
* If you want to create a template, do so in your user space. When the template is finished, an admin should be contacted. The admin(s) will then decide whether the template is necessary and move it into the template namespace if it is deemed necessary. Do not use templates that are in a user's user space on pages in the main namespace.
* It's possible to take [http://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.take_screenshot Screenshots out of the game]! The [http://www.youtube.com/watch?v=9yDZM0diiYc second trailer] is made like so. See http://www.factorioforums.com/forum/viewtopic.php?f=18&t=5591
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&t=5591 Calculate screenshot dimensions].
 
==== Optimizing the picture before upload ====


* Cut as much as possible/nice.
== See also ==
* Resolution should not normally be higher than 600x600 px. Use multiple photos or ask a trusted wiki user if you need a much larger photo.
* [[Factorio:Wiki_rules|The rules]]
* ''Do not add text to the photos'' Write any needed text outside the photo on the wiki. You cannot search text that is in a photo and users might not find what they are looking for.
* Sharpen the pictures. For the wiki it looks a lot better to sharpen the pictures once or twice.

Revision as of 18:52, 4 August 2017

This is the official Factorio style guide. Please follow this guide when creating or editing pages and files on this wiki.

Page creation and upcoming/outdated content

  • Avoid creating unnecessary pages or subpages. If the info you are trying to add is related to an entity in-game, please place the info on that entity's page.
  • See the Editor noticeboard for guidelines on whether the wiki is currently targeting the stable or experimental version of the game.
  • Upcoming features should be referenced with a link to a comment or image posted by a member of Factorio's development staff. Please consider that the Factorio Friday Facts usually show plans and not confirmed changes, so information should not be treated as such.
  • Pages about removed content should be marked with the {{archive}} template and not be edited any further.

Language

  • Edit in an “encyclopedia” style, avoiding use of the first person or any personal bias. Avoid words like I, me, you, etc. The tutorial namespace is exempt from this guideline.
  • Correct all typos found, even if changing the sentence layout is necessary. Comprehension is important.
  • Use the "Show preview" button to view your changes before saving them, to allow yourself to catch incorrect links and typos, and improper formatting. While creating multiple edits to the same page is allowed, it creates clutter on the recent changes screen and in the page history.
  • The default language is American English, however English pages may also use European English. All pages must have an English version, and should be translated English -> Other. Use of country-specific slang must be avoided.
  • Only translate pages if you fluently speak the language you are translating to.
  • Items, entities, and other in-game objects should be named and translated according to the official in-game translations.
  • To automatically translate page names, infoboxes and similar templates, use Template:Translation.

Page layout guidelines and formatting

  • Typically, a page will start with a short intro, then the content of the page, a history section, and a "see also" section. Please follow this when creating content pages. Categories should be used sparingly.
  • Please use sane formatting, and do not Capitalize Words Like This, or L I K E T H I S.
  • Do not overuse bold, italics, or colorful text. This detracts from the effect of said text when it is actually necessary.
  • Usually [[iron gear wheel]]s is preffered over the piped version which would be [[iron gear wheel|iron gear wheels]].
  • Do not create circular links, I.e. do not link a page to itself. This also means that a page should not link to a redirect that links to the page itself.
  • If making a comment to other editors is necessary, place the comment in comment delimiters, <!-- Comment --> so it cannot be seen by users. This is can be necessary to explain the page's specific formatting, such as seen on News.
  • The first instance of the page title should be bold. This should usually be in the first sentence of the article. No other instance of the page title should be bold. To make a word or phrase bold, place three apostrophes (') on each side.
  • The first instance of an item name on a page can be linked, via double brackets (eg. [[copper plate]]). Further mentions of the same item should generally not be linked, though multiple identical links can exist if they occur far from each other and would be helpful to readers.

Capitalization

  • Only the first letter and proper nouns such as "Nauvis" should be capitalized in section headings or page names.
  • The in-game items, entity, and other in-game object names are common nouns and should not be capitalized unless they start a new sentence.
  • Likewise, when linking to another page within a flowing text, use normal capitalization for the link, so [[iron plate]] and not [[Steam engine]].

The history section

  • This wiki uses a history section on all content pages to track when entities/items are changed in the game. To do this, the wiki uses the history template, which provided automatic formatting and version linking.
  • Bugs and bug fixes must not be placed in the update history section of a page. Any kind of bug should be reported on the forums and has no place on the wiki unless it is deemed "not a bug" by the developers. In that case the specific behaviour should be documented on the page, but not in the history section. However, bug fixes are documented on Version history pages, since they are part of the offical changelog which is reflected on those pages.
  • While a history section is not required for information pages such as Railway, all content pages concerning entities or mechanics of the game should have a history, taken from the changelog file provided with a standard Factorio install. The {{history}} template will automatically link to the relevant page in Version history.
  • Trivia and general facts are allowed, as long as it does not contain personal opinion and is not conjecture. This facts should be placed in a specific "Trivia" section.

Media

  • When possible, avoid putting important text in images, as it is not search-able, and makes finding that info harder. The text also can not be translated, so each language would need its own version of the image.
  • When uploading an image, please use a descriptive, unique name, and fill out the description box. Images given a non-descriptive name will be renamed.
  • Item icons should be named after their English in-game name.
  • When uploading an updated version of an image, use the "upload a new version of this image" link found on the old file's page. This ensures that all old instances are updated automatically.
  • Please mark any duplicated files for deletion with the {{delete}} template. If the request is approved, an admin will delete them. Requests for deletion of pages in the requesting user's namespace are always granted.
  • If uploading images that are not of Factorio, please ensure you hold rights to upload the image.
  • Gifs of mechanics are allowed and encouraged.
  • Please ensure that the image you are uploading is of good quality. Use the PNG filetype when possible.
  • See the section below for more info on uploading images.
  • Video guides or tutorials should not be placed in the main wiki, however links to them are allowed in the "See also" section of pages.

Taking screenshots of the game

  • Take pictures at day! Use night or dawn only if you need to explain something that only works at night (for example, the lights).
  • Turn off clouds and smoke! The shadows distract from the actual content of the image.
  • Turn on info (ALT)
  • Use god mode! [1]. You can move anywhere on the map and your character won't be in the picture.
  • It is possible to take large screenshots using a console command.
  • You can slow down the game to find the right moment for the picture.
  • Learn how to use the Debug mode to add relevant information into the picture, such as showing rail blocks.
  • Go into the highest zoom level you possibly can without missing any vital information.
  • A good in-game picture should be build so that only the relevant entities/items are shown. Anything in the photo other than what you are trying to show/explain is unnecessary clutter.
  • Crop pictures to show only what you want to show.
  • Try to make a picture without the character, except if to show something; then face the character toward it.

Templates

  • Templates are to be used for formatting/common text on many pages. Do not create templates for only a few pages, except for special circumstances.
  • Templates should include {{documentation}} inside of noinclude tags, and should have a /doc sub-page to describe the use of the template.
  • Avoid making many sequential edits to a commonly used template. This creates strain on Wube's servers to update across all the pages. Perform edits to those templates with a single edit only. If you need to edit a protected template, please contact an admin, as these templates are especially heavily used.
  • If you want to create a template, do so in your user space. When the template is finished, an admin should be contacted. The admin(s) will then decide whether the template is necessary and move it into the template namespace if it is deemed necessary. Do not use templates that are in a user's user space on pages in the main namespace.

See also