Changes

Jump to navigation Jump to search

Wurmpedia editing handbook

15,588 bytes added, 17:27, 15 September 2020
m
no edit summary
|Bold and italic text||<nowiki>'''''Bold and italic text'''''</nowiki>||'''''Bold and italic text'''''
|-
|Header level 1||<nowiki>==Header level 1==</nowiki>||== Header level 1 ==[[File:Handbook17.PNG]]
|-
|Header level 2||<nowiki>===Header level 2===</nowiki>||=== Header level 2 ===[[File:Handbook18.PNG]]
|-
|Header level 3||<nowiki>====Header level 3====</nowiki>||==== Header level 3 ====[[File:Handbook19.PNG]]
|-
|Link to Cupboard, a Wurmpedia article||<nowiki>Link to [[Cupboard]], a Wurmpedia article</nowiki>||Link to [[Cupboard]], a Wurmpedia article
|}
==Previewing Your Changes==
 
[[File:Handbook8.png]]
[[File:Handbook9.png]]
 
Showing the preview before saving a page is a great habit to get into.
 
==Using Images==
To include a file in a page, use a link in one of the following forms:
<nowiki>[[File:File.jpg]]</nowiki> to use the full version of the file
<nowiki>[[File:File.png|200px|thumb|left|alt text]]</nowiki> to use a 200 pixel wide rendition in a box in the left margin with "alt text" as description
<nowiki>[[Media:File.ogg]]</nowiki> for directly linking to the file without displaying the file
 
You can include an external image by pasting the image’s link directly into the article (no square brackets required). Note: This is not done on main namespace pages as links frequently are taken down and would leave a broken link.
 
If you would like an image uploaded to use on the Wurmpedia, simply contact a Wurmpedia Assistant, Assistant Manager, or Manager to send them the file you’d like uploaded.
 
==Creating New Articles==
 
If you need to create a new article, simply type the title into the search bar (keeping in mind that articles only have the first word capitalized, except in the case of a proper noun).
 
[[File:Handbook10.png]]
 
Search for the page. If it exists, it will take you there; if not, you will see similar pages, with a red link offering you the option to create the page.
 
[[File:Handbook11.png]]
 
Click the red link to be taken to the not yet created article, where you can begin editing.
 
==Article Content==
 
When creating a page, it can be helpful to find a similar page to kind of copy from. You don't always, and will rarely, need to create an article totally from scratch. In our Purple unicorn example, we may find useful information on the Unicorn page. If most information is the same, you could find it easier to go into the Unicorn article's Edit page, copy everything, paste it into your new article, then modify it to match the info you have about the Purple unicorn. (Note: I regret to tell you, but I don't think purple unicorns are in the works for Wurm Online at this time. I'm sorry!!!)
Or if a new tool was introduced to Wurm, you could find a similar tool page to copy from - this can give you a head start on some of the categories, materials, right-click menus, equipping information, etc.
 
[[File:Handbook13.png]]
 
If you do choose to do this when making an article, make sure that every reference to the current page (aside from <nowiki>{{PAGENAME}}</nowiki>, which will give the name of whichever page it is currently on) is changed to that of your current article. Also be sure to check the categories, as some may be in categories that are not relevant to the new article.
 
==Headers==
One useful thing that you'll find on most Wurmpedia articles is a header of links which shows what categories the item is a part of.
 
[[File:Handbook14.png]]
 
These headers are very helpful as they help the reader discover other things they can do with particular skills, or have a quick glance to see what skill the item uses.
 
[[File:Handbook15.png]]
 
TIP: I like to find a page that is similar to what I am working on and copy the header they have there. In our unicorn example, it would be:
<nowiki>[[CDB|Main]] / [[:Category:Bestiary|Bestiary]] / '''{{PAGENAME}}'''</nowiki>
==Linking Articles to Categories==
 
[[File:Handbook16.png]]
 
Categories are listed at the bottom of every article. They are useful for similar reasons as the headers by providing links to discover items related to the one the reader is viewing. The categories are a specific type of page which links to other articles, gathering articles of a certain type in one place.
 
[[File:Handbook20.png]]
 
There are many categories available for articles to be linked under, which can be seen here: https://wurmpedia.com/index.php/Special:Categories.
 
To add your article to a category, simply link to it the same way you would link to another page. For example, if linking to the category "Blacksmithing items", you would add <nowiki>[[Category:Blacksmithing items]]</nowiki> to the bottom of your article.
 
'''Fun Fact''': You can create a clickable link to get to that category page by adding a colon to the beginning. To link to the Blacksmithing items category, you would add <nowiki>[[:Category:Blacksmithing items]]</nowiki>.
 
[[File:Handbook21.png]]
 
==Babel categories==
 
'''Every article''' on the main namespace should be linked to a letter in the Babel alphabetical index. This is a series of category pages that show articles beginning with that number or letter. To link to a Babel category, simply add <nowiki>[[Category:Babel/F]]</nowiki>, where F is the letter or number you wish to add it to.
 
Side note: A namespace is a section on the Wurmpedia designed to hold specific types of articles. So far, you have worked with the Main, Category, and Template namespaces. Main namespace articles are articles that do not begin with a word and a colon; for example, the article titled "Category:Blacksmithing items" is in the Category namespace.
 
Note: Categories ''can'' be linked anywhere in an article, but are linked at the bottom in order to be consistent and easy to locate.
 
==Templates==
 
A template is a code written in the Template namespace which can be used to copy information to similar pages.
 
'''Things you can do with a template:'''
 
* Add Wiki Markup to style text, create tables, add images
* Copy information to multiple pages that use the same information
* Create "if" statements that can put certain text on a page if certain conditions are met
 
'''Why use a template?'''
 
* Saves time with creating or editing multiple pages
* If game mechanics change, you need only edit the template rather than all articles
* Ensures uniformity in layout of similar pages
* Allows for quick layout changes should they be needed or wanted
 
Templates are a great tool that should be used in most cases that 2 or more pages share information. Common templates are ItemBox and Creature. You can see the templates here: https://wurmpedia.com/index.php/Category:Template. They look scary at first, but if you take the time to break down each part, you can see each part's usage/meaning. Templates are laid out in a way that is as user-friendly as possible, and have a description of how to use them on articles.
 
In the case of our purple unicorn, we will need a creature template, which is found here: https://wurmpedia.com/index.php/Template:Creature.
 
[[File:Handbook12.png]]
 
Copy and paste from {{ to }}, then replace with your purple unicorn's information:
 
<nowiki>{{Creature
|image=PurpleUnicorn.jpg
|aggro=No
|tamable=Yes
|dommable=Yes
|groomable=Yes
|butcheringprod=[[Meat]], [[fat]], [[tail]], [[hoof]], [[gland]], [[eye]], [[hide]], [[bladder]]
|meattype=Horse meat
|ridable=Yes
|swim=Yes
|eats=Grain and seeds
|lair=[[Rainbows]]
|spawn=[[Grass]], [[Steppe]]
}}</nowiki>
 
The main thing to note is that a | line indicates a new line of information, or different options (eg: Yes|No|Unknown)
 
Creating a Template
Step 1: Choose a name for your template and go to create the page
 
 
 
Step 2: Content
We want the template to tell pages "This is a <colour> unicorn". For the basic text, you can just add it within the tags.
To make a part show user input, it needs to be within three curly brackets {{{ and }}}. In this case, we want the user to specify the colour, so we can put {{{color}}}. Now, our text will look like this:
This is a {{{color}}} unicorn.
Now, check that it works! After saving this, you can go to another article and add the template with curly brackets. In this case:
{{Unicorn}}
Using show preview, you will see your template content!
 
Great! But on this page, we want it to say "This is a purple unicorn." Since we have "color" in curly brackets, we can specify this option. To do this, you will add a new line to your template link, like so:
{{Unicorn
|color=purple}}
Now on clicking show preview, you will see:
 
 
Step 3: Include and noinclude
Any content written directly into the template will show on both the template’s page as well as any pages using the template.
Any content you want to show only on pages using this template and not the template itself should be within <includeonly> and </includeonly>. This will make your code invisible on the Template page, and only visible when the template is used.
<includeonly>
This is a {{{color}}} unicorn.
</includeonly>
 
To put information only on the Template:Unicorn page, it will need to be within <noinclude> and </noinclude> tags. This will prevent anything written in these tags from being shown on pages the template is used on. This is used to display information about your template.
<includeonly>
This is a {{{color}}} unicorn.
</includeonly>
 
<noinclude>
This template is used on Unicorn pages and displays important text that will show you what colour the unicorn is.
</noinclude>
 
It is also important to put instructions on how to use the template in the noinclude tag as well. Templates put this information within <pre> and </pre> tags, which shows the contained information in a light grey-coloured box. It also allows you to display code, which is great for giving a sample of the template for users to copy and paste so they may use it.
<includeonly>
This is a {{{color}}} unicorn.
</includeonly>
 
<noinclude>
This template is used on Unicorn pages and displays important text that will show you what colour the unicorn is.
 
<pre>
{{Unicorn
|color=
}}
</pre>
</noinclude>
 
“If” Statements
 
 
What is an if statement ?!
For those who are not familiar with coding, an if statement is something that is used to do a certain thing if the statement is true, and something else if it is false. For example:
If 1+1=2: Say yes
If 1+1=3: Say no
If this was your code, it would result in Say yes.
 
How do I make an if statement?
In templates, we sometimes want to add an if statement so that we can make the template work in many different articles. For example, in the Fence template, here is a sample of an if statement:
{{#if:{{{gate|}}}|[[Iron fence gate]]|[[Iron fence]]}}
 
Let's break this down and see what is going on here!
First, your if statement needs to be inside 2 curly brackets: {{ and }}.
If statements are started by typing #if:
If statements will have a true and a false side to them, respectively. To separate what will happen in each case, you use vertical bars |.
{{#if:<what you're checking>|<what happens if it's true>|<what happens if it's false>}}
 
The thing you want to check with your if statement will go after the colon. In this case, we are checking the argument called "gate". Arguments are used in 3 curly brackets {{{ and }}}. If you want to look for something specific, you will need to use a different kind of if statement, #ifeq: which we will discuss shortly. In this case, the statement is checking for whether the argument "gate" is defined with anything at all, so there is nothing to the right of the bar.
{{#if: {{{gate|}}} |<what happens if it's true>|<what happens if it's false>}}
For the true/false sections, you can place text that will be displayed if the if statement reaches that section. In this example, if it is true the page will display [[Iron fence gate]], which is a link to the Iron fence gate article.
Tip: You can place if statements within if statements for more complex scenarios. For example, maybe you want an if statement that does something like this:
[picture of if tree i guess]
But let's not get ahead of ourselves. Getting started with if statements is enough on your plate!
If a variable = something specific:
The next if statement we should talk about is the #ifeq statement. This is used when you want to ask if something matches something else. In our case, we will just about always use it to ask if an inputted variable is something specific. For example, you may have "material" as a variable in your template, where a user would put what material it is made of. Let's say you want the page to display that a pottery bowl is used in cooking if the material given is "clay", and otherwise display "Cannot be used in cooking."
{{#ifeq:{{{material}}}|clay|A pottery bowl is used in cooking.|Cannot be used in cooking.}}
This statement will give either one or the other, depending on what material is given. Notice that the variable named "material" is enclosed in three curly brackets, and then has three sections divided by vertical bars after it, whereas the #if statement we looked at a moment ago only had two sections. This format adds a section after the variable where you can tell the statement what you are checking the variable for. After that, the last two sections are the same: what to display if it is true, then what to display if it is false.
Switches - The Multi-Scenario “if” Statement
A switch is a type of if statement in which you can define multiple things that may be contained within an argument, and what will happen in each case.
You may wish to use a switch when you want to display a different line of text depending on what is entered.
For example, your argument may be "server", with options being Xanadu, Pristine, Exodus, Celebration, Deliverance, Chaos, Release, and you may wish to provide a different map link depending on which server is inputted. Here is what it would look like:
{{#switch: {{{server}}}
|Xanadu = link to Xanadu map
|Pristine = link to Pristine map
...
}}
Like with if statements, you need to have #switch: contained within curly brackets. Right after that, indicate your argument name within 3 curly brackets. Next, you will have a vertical bar followed by the text you want to match in that argument. Follow that with an equal sign, and then the text you want to display on the page if that instance is true.
NOTE: Your display text cannot contain any vertical bars in a switch because the switch searches for the bar to look for the next case you are asking for. Vertical bars will most commonly be found in a table, which begins with {|. You can either put the information in another template and call that template to be inserted, or use HTML code instead.
Tables
The MediaWiki Wiki says that it is best to avoid table making unless needed due to the complication of table code... but I say tables make some wiki pages so much prettier to look at, and can make information easier to present. Maybe just try to get it right the first time so you don't have to edit it later! Or, if you're brave enough, maybe you can come up with a template to make tables easier!
Table Construction Markup
Let's start with the markup. The following table is taken from mediawiki.org.
{|
table start, required
|+
table caption, optional; only between table start and table row
|-
table row, optional on first row—wiki engine assumes the first row
!
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
|
table data cell, optional. Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|}
table end, required
Unfortunately, each of these codes do have to go on a new line, which can make your article look really complicated, especially if you create bigger tables.
Using these codes get you the layout of a table without any borders, backgrounds, or anything - just text.
 
 
This *could* be useful in some cases, but generally when making a table, you'll probably want it to look like a table and not just a bunch of floating words. For example, on the Animals article, there is a giant table that looks like this:
editor
7,290

edits

Navigation menu