Tutorial: Wiki Editing III

From ChatWars Wiki
Revision as of 22:02, 21 August 2018 by LuGam (talk | contribs) (Created page with "''Uh... there's nothing to see here! Move along. There's definitely no unfinished Wiki editing tutorial here! Shoo! Or not. I don't really care. Just keep in mind that this is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Uh... there's nothing to see here! Move along. There's definitely no unfinished Wiki editing tutorial here! Shoo! Or not. I don't really care. Just keep in mind that this is unfinished.


Since the last tutorial on how to edit wiki pages - specifically, regarding the new Semantic Wiki extension - we haven't been lazy. Now follows a complete tutorial on how to edit the wiki with all the fancy templates and queries and stuffs!

Why the *beautiful words* is all this hassle even needed?

It all comes down to one thing: Information duplication - or to be exact, the lack thereof. With the old system, aka: "We just make new pages and write everything we want in there - if it's an overview of a collection of other pages, the information has to be re-entered" there were many problems with errors while manually copying information, if the devs decide to change some stats or other details of the game, some pages were updated, others were forgotten - in short, there was much:

  • outdated
  • unneeded
  • and plainly wrong

information in this wiki. This entire system with properties and templates and queries and all that serves to:

  • centralize information
  • standardize the looks of tables and pages
  • makes updating information AND design of all information on the wiki MUCH easier

So there you have it - this is why this complicated system exists!

AAAAAAH! What do all these words mean?

  • Property: A value with a certain name that can be queried for. Most of the times they have a predefined type (Number or Text for example) and the wiki will yell at you for entering wrong types
  • Queries/to query: Querying for information is basically asking "Hey dear wiki, can I haz value of property XYZ?", to which the wiki will respond "Yes of course, the value is: ___" or, alternatively: " " (Yes, if you mistype/enter the wrong property name a query will result in NO OUTPUT AT ALL, so be sure to check if you have the name of the property correct). You can also query for several values at once which can either be shown as a table, a list of various kinds or with custom formatting (This custom formatting also uses templates and is the most common form you'll encounter on this wiki)
  • Template: Generally you shouldn't have to think about how the templates work, but it's still handy to know what they are: A template is a piece of wikitext that can be inserted in any article by using it's name and two curly brackets on both sides. For example the "citation needed" template can be used by writing: "{{citation needed}}" and will result in this: "[citation needed]". Those templates can either be simple ones like the Template:citation needed, or be HUGE pieces of actual code that happily fetches information from the entire wiki, parses it and displays it - the Recipe table you see on items and resources for example is a template that does just that. Most of the times the template page itself will not show what the template actually does, but instead will have a short description of it - depending on the complexity there might be additional information there.
    If a template says "designed to be used by Template XYZ", that has a reason! Most of the time there will be no documentation on how to use it, because its use is very specialised and it's already integrated in a network of other templates. BEWARE: CHANGING THOSE TEMPLATES EVEN THE SLIGHTEST BIT - EVEN JUST ADDING OR REMOVING AN EMPTY LINE - CAN RESULT IN WIDESPREAD CHANGES AND/OR ERRORS ON THE ENTIRE WIKI. If you're unsure, ask User:GrumpyGecko or User:LuGam. If THEY are unsure, better not touch it.

The juicy parts

Setting properties

Let's start small with the thing that is easiest and at the same time needed the most: setting properties.


{{#set:
| ItemID=k38
}}

That's it! Easy, isn't it?

Now, what if you want to set two properties at once?


{{#set:
| ItemID=k38
| note=Hey! I'm a handy note that tells wiki editors how finished my page is!
}}

Cool, just add another parameter - but the second parameter I chose wasn't just for demonstrating that. The "note" parameter is on

Using templates

The next step is unimaginably harder - that is, not harder at all. Nearly all templates have been made to be used without any knowledge of them whatsoever, they usually fetch all their information by themselves, you don't need to do anything except actually writing "{{NAME OF THE TEMPLATE}}". But what templates are there? And what are they for? The second part is usually described within the template, but have this handy overview:

  • Equipment - is used to make a footer that shows an navigation overview of equippable items sorted into categories. (Currently outdated?)