Template:ItemEntry: Difference between revisions
Apply TitleCase to name and sprite fields (via update-page on MediaWiki MCP Server) |
Add default_form:Item (via update-page on MediaWiki MCP Server) |
||
| Line 25: | Line 25: | ||
{{Documentation}} | {{Documentation}} | ||
[[Category:Data templates]] | [[Category:Data templates]] | ||
</noinclude><includeonly>{{#cargo_store:_table=Items | </noinclude><includeonly>{{#default_form:Item}}{{#cargo_store:_table=Items | ||
|name={{TitleCase|{{{name|}}}}} | |name={{TitleCase|{{{name|}}}}} | ||
|sprite={{{sprite|{{TitleCase|{{{name|}}}}}}}} | |sprite={{{sprite|{{TitleCase|{{{name|}}}}}}}} | ||
Revision as of 18:32, 30 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.
Usage
{{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
| 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
{{ItemEntry
|name=Leather Boots
|sprite=Leather Boots
|slot=Feet
|type=Light Armor,Light Boots
|armor=1
|health_regen=1
|weight=10
|rarity=common
}}
Notes
- 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