Template:Infobox Location

From RuneRealm Wiki
(Redirected from Template:Infobox island)
Jump to navigation Jump to search
Template:Infobox Location
? (edit)
Released? (edit)
Members? (edit)
Map
? (edit)
Template documentation
This documentation is transcluded from Template:Infobox Location/doc. [edit] [history] [purge]
Template:Infobox Location invokes function main in Module:Infobox Location using Lua.
Template:Infobox Location invokes Module:Infobox Location using Lua.


Standard infobox parameters

This infobox uses Module:Infobox, which provides a number of standard parameters.

Versioning

This infobox supports switching between multiple versions. Each version needs to have a name defined in a parameter called version#, numbered sequentially starting from 1. For all parameters that have different values, a number can be appended to the end of each parameter name to define the value for each version. Parameters without a version number will be shared between all versions.

For example, if the name of version 2 is called "Bob", you should define |name2 = Bob.

Linking

You can link to a page and have an alternative infobox appear by using a hash value, as if you were linking to a section. The hash value is the version name, as defined by the relevant version# parameter. For example, to link to the variant of a switch infobox with |version3 = Quest, you can use [[Example#Quest]].

Alternative versions are not visible or accessible when Javascript is disabled.

defver

If defver is defined, the infobox will switch to the specified version when the page is loaded. For example, |defver = 4 will automatically select the 4th infobox version.

smwname

This overrides the name of the Semantic MediaWiki subobject that the infobox will set the parameters into. By default, an infobox with multiple versions will save properties into subobjects with the same name as the version name. This parameter only needs to be set if the version name is different from the desired subobject name, or if an unversioned infobox needs to set properties of a specific subobject (for example, when versioned and unversioned infoboxes of different types, like Item and Bonuses, are used on the same page).

This is necessary when a version name would otherwise be an invalid SMW subobject name. The value of smwname is also not permitted to be an invalid subobject name. A subobject name must not violate the following rules:

  • The first 5 characters of the name must not contain a period (.).
  • The name must not be the number zero (0).
  • The name must not be the empty string.


If the infobox does not have multiple versions, SMW properties would normally be set on the page itself. Setting smwname overrides this default behaviour and the properties will be only be set to the specified subobjects and not the page itself.

Multiple subobjects can be specified by separating the subobject names with the broken bar character (¦). The properties will be set in all of the subobjects specified.

For example, if the infobox has |version2 = H.A.M. member, this would cause an invalid subobject name due to having a period within the first 5 characters. The infobox should therefore override the smwname using |smwname2 = HAM member or something similar.

Suppressing SMW

Setting |smw = No will suppress all SMW output for the infobox.

Setting |smwX = No will suppress all SMW output for version number X.

__dump__

This parameter is used only for debugging an infobox. If __dump__ is present with any value then a string version of the infobox object is dumped to the page, rather than displaying the infobox as normal. This should only be used when previewing the page and must never be saved in a mainspace page. Setting this adds Category:Dumping infoboxes to the page.

Specifically, this shows the result at the time the infobox is converted to a string. This will always occur when the module finally returns, but may instead occur earlier in the code. The object is dumped using mw.dumpObject(box). Dumping will not prevent a script error occurring.


Parameters

name

Name of the location.

image

An image of the location.

release

Date the location was released.

update

Update post associated with the release date.

aka

(Optional) Alternate names for the location.

members

Whether or not the location is members only.

floors

(Optional) Number of floors, omit if 1 or non applicable.

location

(Optional) Name of the surrounding area. Examples:

  • For cities, this would be the region the city is located in.
  • For buildings, this would be the name of the city that contains the building.
  • For islands, this would be the name of the sea containing the island.

capital

(Optional) The capital of the location. Typically only used when type is region.

requirement

(Optional) Requirements for entering the location. This will primarily be used for Guilds that have some skill or quest requirement before entry.

race

(Optional) Race of NPCs residing within the location.

wilderness

(Optional) Range of wilderness levels that the location spans.

teleport

(Optional) Possible teleports to the location.

music

(Optional) Music track that plays at this location.

diary

(Optional) The achievement diary at this location.

map

A map of the location. Should either be a map image or an interactive mapframe.

type

(Optional) The location type. Used for adding specific categories to pages. Multiple types can be provided, separated by commas. Allowed values are:

  • agility course
  • building
  • settlement
  • dungeon
  • mine
  • river
  • mountain
  • volcano
  • realm
  • island
  • hunter area
  • windmill
  • woods
  • region

Quick copy

{{Infobox Location
|name = 
|image = 
|release = 
|update = 
|aka = (Optional)
|members = 
|floors = (Optional)
|location = (Optional)
|capital = (Optional)
|requirement = (Optional)
|race = (Optional)
|wilderness = (Optional)
|teleport = (Optional)
|music = (Optional)
|diary = (Optional)
|map = 
|type = (Optional)
}}