Guide to Metadata

From Yogstation-13
Jump to: navigation, search
This is a guide for editing the wiki in it's current state. Things may have changed slightly, or greatly, by the time you're reading this. --Buffy2nd (talk) 09:38, 24 August 2014 (UTC)

Metadata apparently means "data about data", I'm not sure if that applies for our example, but the premise is that we used pages prefixed with the "Data:" text, to store information about jobs, items, maybe even traitor objectives, and then use other templates to pull from there and display these anywhere and everywhere. As such, you can change one item's image or brute damage and it will apply the changes on all pages.

Creating an item

First off we create the normal page of the item, like any other article, by either searching for the name and then pressing "Create the page item on this wiki" or changing the name of the current page to a non-existing page in the URL bar. This is the page that people will want to look at when looking up stuff about the item, so feel free to type here whatever you want.

To add the metadata for the item, put this at the top of the page:


MetaInfoBox is a template that creates a little infobox for the item, using it's metadata page for information. Press preview now to see it. As there's no metadata page yet, it's empty and also there's a "c" or "create" button somewhere on the top right of it. Click that and it will take you to create the metadata page, titled something like "Data:YOURITEM".

Editing the metadata

When you click the "create" button on the MetaInfoBox template, it preloads the necessary text you need for it to function, however, at the time of writing this, it defaults to the Jobs metadata syntax. Unless you're making a page for a job, that's not what you want. Delete the preloaded stuff and copy this instead:


It's probably a bit overkill using this, but generally it's best to just copy the metadata of a similar item and editing it. For example, if you're making the metadata for Sun.png Sunglasses your best bet is to copy the metadata of a close relative, such as Healthhud.png Health Scanner HUD. Sometimes there is no close relatives, in that case just use the closest you have, or a multitude of them and combine bits and pieces to make it work. For example, a backpack has slots just like a toolbox, but a toolbox can't be worn. So ideally you could look at the toolbox and see that there's a "Slot" variable, which you can use for your backpack, and there's a "wearable" variable in the Welding Helmet metadata. More importantly, the backpack belongs to the same category as the welding helmet, namely "Clothing and Accessories" which you absolutely should copy over.

Anyway, enough rambling here's an example from Science goggles.png Science Goggles:

name=Science Goggles|
category=Clothing and Accessories|
found=[[Chemistry]], [[R&D Lab]]|
used=Protects eyes from chemicals|

It's very important that there are no unnecessary blank lines between these, and also that the "|" character is at the end of each line. So if you wanted to set the "wearable" variable to "back" for a backpack, then you'd edit the line to "wearable=Back|". First is the variable name, then the "=" sign, then your content and to finish it off the "|" sign.

If done right when you hit the save page button, it should show you a neatly organized page such as this, if a variable isn't showing up, it either means you misspelled it or it doesn't exist yet. It can also happen that the category you put in isn't configured yet, so don't worry about that, if it looks broken it will get fixed, I'll make a tutorial for that as well.

More importantly, if done right, there should be a "Category specific metadata" section in the code, there you can see all the variable you may have missed to add, the variable name is between the parenthesis, and what follows is either the default value, or your custom value. Feel free to go back and add any missing pieces.

Once saved, go back to the page with the MetaInfoBox and see if it works correctly.

Don't forget to add "[[Category:Items]]" to the bottom of the page.


As long as you know how to edit stuff you'll be perfectly fine. When you see a [v•e] menu, the "e" button will bring you directly to the metadata page where you can edit it. Just keep in mind that the line must follow this syntax:

variable=Your content goes here|

The "|" must be at the end of your content. When in doubt, either contact me or look at other metadata pages for examples... The geneticist has no guides listed but the Head of Security does? Take a look at how the HoS' metadata page works and use the same for the geneticist.

Cool shit

If an item has metadata correctly set up, you can use it a few (currently just two) ways.


You can display an item such as this: Securityhud.png Security HUD by simply typing this:

{{MetaInline|Security HUD}}


Not added yet, but it's essentially the same thing as above, just without the name next to it.


Crude example: Template:Clothing_and_Accessories