Jump to content

Template:ItemEntry: Difference between revisions

From Apogea Wiki
Dane (talk | contribs)
Use PAGENAME for name field - ensures consistency with page title (via update-page on MediaWiki MCP Server)
Dane (talk | contribs)
Skip Cargo storage and form in non-mainspace (fixes doc pages appearing in tables) (via update-page on MediaWiki MCP Server)
 
Line 25: Line 25:
{{Documentation}}
{{Documentation}}
[[Category:Data templates]]
[[Category:Data templates]]
</noinclude><includeonly>{{#default_form:Item}}{{#cargo_store:_table=Items
</noinclude><includeonly>{{#ifeq:{{NAMESPACE}}||{{#default_form:Item}}{{#cargo_store:_table=Items
|name={{PAGENAME}}
|name={{PAGENAME}}
|sprite={{{sprite|{{PAGENAME}}}}}
|sprite={{{sprite|{{PAGENAME}}}}}
Line 47: Line 47:
|description={{{description|}}}
|description={{{description|}}}
|rarity={{{rarity|}}}
|rarity={{{rarity|}}}
}}{{#ifeq:{{NAMESPACE}}||[[Category:Items]]}}</includeonly>
}}[[Category:Items]]}}</includeonly>

Latest revision as of 21:17, 31 January 2026

This template defines the table "Items". View table.

Documentation
stores item data to the Cargo Items table. Pages using this template are automatically added to Category:Items.
{{ItemEntry
|name=Item Name
|sprite=Sprite Name
|slot=Equipment Slot
|type=Type1,Type2
|weight=10.5
|rng=2
|damage=10
|health=5
|mana=5
|ability=3
|magic=2
|armor=5
|defense=3
|move_speed=1
|attack_speed=2
|size=6
|container=8
|health_regen=1
|mana_regen=1
|description=Item description text
|rarity=common
}}

Parameters

[edit source]
Parameter Type Description
name String Item name (required)
sprite String Sprite filename (defaults to name if omitted)
slot String Equipment slot (e.g., Weapon, Feet, Head)
type List Item types, comma-separated (e.g., Light Armor,Light Boots). Creates a category for each type.
weight Float Weight in oz
rng Integer Attack range
damage Integer Damage value
health Integer HP bonus
mana Integer MP bonus
ability Integer Ability bonus
magic Integer Magic bonus
armor Integer Armor value
defense Integer Defense bonus
move_speed Integer Movement speed bonus
attack_speed Integer Attack speed bonus
size Integer Equip size (1-10)
container Integer Container slots
health_regen Integer HP regeneration bonus
mana_regen Integer MP regeneration bonus
description Text In-game item description
rarity String Item rarity (common, uncommon, rare, epic, legendary)

Example

[edit source]
{{ItemEntry
|name=Leather Boots
|sprite=Leather Boots
|slot=Feet
|type=Light Armor,Light Boots
|armor=1
|health_regen=1
|weight=10
|rarity=common
}}
  • Use with {{Infobox Item|Item Name}} to display the item infobox
  • After adding or modifying entries, you may need to purge the page or recreate the Cargo table
  • Omit parameters that don't apply to the item
The above documentation is transcluded from Template:ItemEntry/doc. Edit