We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: TBD -- Update: Fri 10/20 11pm UTC - We have encountered some unexpected issues. Our staff is working around the clock to complete this process as quickly as possible. Thank you for your patience.

Template:Item infobox

From Landmark Wiki
Jump to: navigation, search
The following documentation is transcluded from Template:Item infobox/doc (edit):

This template displays an infobox for an item. If a data page for the item is found, it will use the values from the data page unless values were provided to the appropriate parameters.

Finding the data page[edit source]

The template finds a data page for an item in one of four ways:

{{Item infobox}}

When the name, datapage, and testdatapage parameters are not given values, the infobox looks for a data page in Category:Imported item data where Property:Has name is the same as the name of the page the infobox is being used on.

{{Item infobox
  |name=item name
}}

When the name parameter is given a value but datapage is not, the infobox looks for a data page in Category:Imported item data where Property:Has name has that value.

{{Item infobox
  |datapage=data subpage name
}}

When datapage is given a value, the infobox looks for that page, but will return it only if the page is in Category:Imported Landmark item data. When using this, specify only the subpage name of the data page. For example, for "Data:Items/Heartwood (558)", just specify "Heartwood (558)".

Note that an item data page should be set up with {{Item data}}, and the name parameter on that template sets the value of Property:Has name. If the name parameter doesn't get a value, Property:Has name is set to the subpage name.

{{item infobox
  |testdatapage=full data page name
}}

testdatapage works the same as datapage except that it requires the full name of the data page, including the namespace. This is useful for testing data pages set up in a user namespace.

Other values[edit source]

Some information from the imported data and must be supplied to the infobox separately, as shown below:

{{Item infobox
  |tier=item tier
  |rating=resource rating
  |found=
tier range;environment
...
  |devonly=yes or no
  |available=yes or no
}}

found works as follows:

  • The "tier range" can be specified as a single number or as a range. You can use 1 for items only found in tier 1 locations, or 1-3 for items found in tier 1 to 3.
  • The "environment" can be any of the follow: island, surface, cave, desert, old forest, tropic, or tundra.
  • You can add as many tier and environments as needed, one per line.

As an example for found:

  |found=
1;desert
1-4;cave

Setting ingame to no flags that anitem is not available in the game, even though it is in the game data. Setting available to no indicates that the item is not available to players even if it is in the game, such as something only available to gamemasters or other staff.

This can be used with any of the other parameters.

When there is no data page[edit source]

If an item doesn't have a data page for some reason, you can treat this as a normal infobox and supply the values yourself.

{{Item infobox
  |name=name of the item (optional, will use the page name when no value is provided)
  |icon=item icon filename
  |category=name of the categories, separated by commas
  |rating=the item's resource rating
  |harvesting_damage=the harvesting damage, either a single number of minimum and maximum separated by -
  |harvesting_speed=the harvesting speed, either a single number of minimum and maximum separated by -
  |harvesting_size=the harvesting size, either a single number of minimum and maximum separated by -
  |cost=the item's marketplace price *or* quantity and price separated by /
  |description=item description text
}}

Note that if a data page for the item is imported later, the values of these parameters will be ignored.

Overriding data page values[edit source]

If necessary, it is possible to override the values pulled from the data page. When data is simply outdated, it's probably better to just change it on the data page itself, as it would probably have been corrected in the next data import anyway. But if for some reason imports seem to be consistently bringing in incorrect data, you can override it by using the force parameters:

{{Item infobox
  |force_name=name of the item (optional, will use the page name when no value is provided)
  |force_icon=item icon filename
  |force_category=name of the categories, separated by commas
  |force_rating=the item's resource rating
  |force_harvesting_damage=the harvesting damage, either a single number of minimum and maximum separated by -
  |force_harvesting_speed=the harvesting speed, either a single number of minimum and maximum separated by -
  |force_harvesting_size=the harvesting size, either a single number of minimum and maximum separated by -
  |force_cost=the item's marketplace price *or* quantity and price separated by /
  |force_description=item description text
}}