PotBS Wiki
Advertisement

Semantic MediaWiki is a powerful, yet complicated, way to sort, categorize and display data.

I recently replaced the Template:Infobox_Mission with a new version, Template:Missioninfo. Template:Missioninfo automatically adds a lot of stuff to Missions - Categories and Properties.

All Missions have, of course, the Category Mission and the Property Is a::Mission. They also have a is level::<level> Property and 0 or more Involves::<NPC> properties. To find missions they also get a is located in::<port> Property. Trying to get more information for displaying missions, the new template currently adds:

  • Involves - currently mission npcs, this should change
  • is level - level of mission
  • is located in - location of mission
  • mission type - ship, avcom, etc.
  • requires mission - prerequisite mission required
  • requires nation - nation required

Semantic MediaWiki can use these properties to query records. For example, on the Marsh Harbour page you'd like to show missions located here. So you add an ask-query to the page:

{{#ask: mainlabel=Mission Name 
| [[is a::Mission]] [[is located in::Marsh Harbour]]
| ?Is level=Level 
| ?Requires mission=Prerequisite
| ?Requires nation=Nation
| ?Involves=NPCs
| ?Mission type=Type
| sort=is level
| format=table
| limit=5
}}

which results in:

The query description has an empty condition.

Limit 5 used here for readability. Furthermore, you can pipe the results via format=template in a custom template.

So it will be my next goal to add as much information as possible and useful to a mission. We should do the same for ships, too, as the shiplists in the wiki have to be updated manually at the moment - which is plain stupid when Semantic MediaWiki is up to the task.

Advertisement