Template:InfoboxItem/doc: Difference between revisions

From August Wiki
Jump to navigation Jump to search
Created page with "== InfoboxItem Module Variables == === Basic Information === * '''itemName''' - The name of the item * '''image''' - Filename for the item's image * '''alsoCalled''' - Alternative names for the item === Requirement Variables === * '''strength''' - Strength requirement to use the item * '''attack''' - Attack requirement to use the item * '''prayer''' - Prayer requirement to use the item * '''defence''' - Defence requirement to use the item * '''magic''' - Magic requirem..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== InfoboxItem Module Variables ==
=How to use this Template=
==Syntax==
To make an entry for an Item, use the Template call <pre>{{InfoboxItem}}</pre>
 
Inside of the template you'll enter parameters to fill in the template with the appropriate information.
== InfoboxItem Template Variables ==


=== Basic Information ===
=== Basic Information ===
Line 43: Line 48:
* Properties section (only shown if at least one property exists)
* Properties section (only shown if at least one property exists)
* Values section (only shown if at least one value exists)
* Values section (only shown if at least one value exists)
==Example==
Below is an example of the syntax, and the resulting table that is created.
<pre>
{{InfoboxItem
| itemName = Dragon warhammer
| image = Dragon_warhammer.png
| alsoCalled =
| strength = 90
| tradeable = Yes
| tier = 90
| equipable = Yes
| stackable = No
| noteable = Yes
| examineText =
| value =
| highAlch =
| lowAlch =
| weight =
}}
</pre>
{{InfoboxItem
|left
| itemName = Dragon warhammer
| image = Dragon_warhammer.png
| alsoCalled =
| strength = 90
| tradeable = Yes
| tier = 90
| equipable = Yes
| stackable = No
| noteable = Yes
| examineText =
| value =
| highAlch =
| lowAlch =
| weight =
}}
[[Category:Templates]]

Latest revision as of 02:50, 16 March 2025

How to use this Template

Syntax

To make an entry for an Item, use the Template call

{{InfoboxItem}}

Inside of the template you'll enter parameters to fill in the template with the appropriate information.

InfoboxItem Template Variables

Basic Information

  • itemName - The name of the item
  • image - Filename for the item's image
  • alsoCalled - Alternative names for the item

Requirement Variables

  • strength - Strength requirement to use the item
  • attack - Attack requirement to use the item
  • prayer - Prayer requirement to use the item
  • defence - Defence requirement to use the item
  • magic - Magic requirement to use the item
  • ranged - Ranged requirement to use the item

Property Variables

  • tradeable - Whether the item can be traded
  • tier - The tier/quality level of the item
  • equipable - Whether the item can be equipped
  • stackable - Whether multiple items can stack in inventory
  • noteable - Whether the item can be converted to a note
  • examineText - Text displayed when examining the item

Value Variables

  • value - Base value of the item
  • highAlch - High alchemy value
  • lowAlch - Low alchemy value
  • weight - Weight of the item

Local Variables (Internal)

  • hasRequirements - Boolean indicating if any requirement exists
  • reqFields - Array of requirement field names
  • hasProperties - Boolean indicating if any property exists
  • propFields - Array of property field names
  • hasValues - Boolean indicating if any value exists
  • valueFields - Array of value field names
  • displayName - Formatted display name for certain fields

Format Note

The infobox is organized into sections:

  • Basic information (always shown if provided)
  • Requirements section (only shown if at least one requirement exists)
  • Properties section (only shown if at least one property exists)
  • Values section (only shown if at least one value exists)

Example

Below is an example of the syntax, and the resulting table that is created.

{{InfoboxItem
| itemName = Dragon warhammer
| image = Dragon_warhammer.png
| alsoCalled = 
| strength = 90
| tradeable = Yes
| tier = 90
| equipable = Yes
| stackable = No
| noteable = Yes
| examineText = 
| value = 
| highAlch = 
| lowAlch = 
| weight = 
}}
Dragon warhammer
Requirements
Strength 90
Properties
Tradeable Yes
Tier 90
Equipable Yes
Stackable No
Noteable Yes