This page is used to show examples of how to create and edit wiki pages on the PCG wiki, as well as the thinking behind the way the wiki is structured. Note you need to have an account to create a new page, but you can edit any existing page anonymously.
The wikidot syntax is described in full here, and at the bottom of the edit box when you are editing a page. Wikidot has its own unique syntax that is not too dissimilar from other wiki syntax.
The best way to learn about the wiki syntax is to read and copy the source code for existing pages on the wiki. To do this, click the options button at the bottom of the page and choose view source, or start to edit an existing page as outlined below.
The main features you'll need to know for the wiki syntax is how to create links to other items within the wiki, and externally.
- You can create a link to any web page by just typing in the URL such as http://www.google.com or a mailto link by just typing in the email address as moc.elpmaxe|ylperon#moc.elpmaxe|ylperon. This will be marked up by wikidot as a link, with the text unaltered.
- To link externally, you preface the link with [ * (without the space) and follow the link with a space followed by the text you want in place, followed by a closing ]. That is Link to Google.
- To link to another page of this wiki, use three square brackets to surround the page you want to refer to. The text in the link will be preserved, unless you have a pipe (|) in which case the page to the left of the pipe will be replaced by the text to the right of the pipe. e.g. The starting page.
Note in the third example, wikidot has a special syntax where you can have a page type such as fish: as a part of the page name. This will take you to the fish:trout page, but will only display the word trout in the incoming link.
The following are examples of page types used on the PCG Wiki:
- pcg-games:game-name - Games that are procedural in nature.
- game:game-name - Games that are not procedural in nature.
- pcg-algorithm:code-name - Examples of various procedural algorithms and code.
- pcg-software:software-name - Examples of various non-game software that use procedural code. Most of these can be downloaded.
- pcg-taxonomy:taxonomy-name - The high level PCG taxonomy types used to define what differing procedural content types are.
The wikidot code also has page types starting with system: and nav: for various built in functions.
Editing an existing page
You can edit any page by clicking the edit button at the bottom of a page.
The most complex object you'll see when editing an existing page is an info box. The info box is a collection of lines of the form:
with some markup at the start and end to identify the info box used.
If the attribute is set to two @ signs, this indicates that the attribute should not be displayed for this entry. If you want to put a value in here, replace the two @ signs with the value you want and click the preview button to preview the page. If you want to hide the attribute, replace the value with two @ signs.
Important: If you want to put a link in, you'll need to make sure the last link for a particular attribute is followed by a space. If it is not, the info box will 'break' and you'll see unusual output in the preview. See bugs-and-quirks for more details.
The standard convention is for each value in an info box is to try to make this a link to another page. For instance, if you are editing a pcg-game, and you specify the license for the game as Freeware, try to use a link to the license:Freeware page e.g. Freeware instead. This will automatically populate the license:Freeware page with the game so you don't have to manually update the other pages.
Other conventions are to use a link to the person:person-name page to identify people, year:year page to identify years and day:month-day e.g. day:August 8 to identify days of the year.
The info box defines the attributes that a particular info box can display and is defined in a more complex fashion due to the peculiarities of the wikidot syntax. Refer to the existing info box examples such as pcg-game-box to see the under the hood definition.
Creating a new page
To create a new page, you have to have an account with wikidot. You can create a page in one of two ways:
- You click on a link that doesn't have an existing page for it. You can choose to create a new page from that point.
- You enter a new page name in the sidebar and click the new page button.
When you create a new page, you can take advantage of templates, which allow a large chunk of the page to be pre-written for you. The templates are usually access by choosing a page name that includes one of the special page types outlined previously. For instance, if you want to create a page for a game featuring procedural content called Spore that you have heard of, you can create a new page called pcg-games:Spore and it will automatically choose an appropriate template for the pcg-games type, usually including an info box that you can then edit as outlined above.
If the template contains the text module backlinks surrounding by two square brackets either side, then its likely that all you have to do is enter a description in the changes box, and click save. The page will be automatically populated by pages linking to it, so you don't have any further work to do.
If you have any more questions, feel free to ask on the forums.