Template:ItemData/doc: Difference between revisionsGive feedback
Added enhanced stat function |
Gammaton32 (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
'''Basic Example:''' | '''Basic Example:''' | ||
<code><nowiki>{{ItemData|Divine Barrier| | <code><nowiki>{{ItemData|Divine Barrier|CombatBarrier}}</nowiki></code> → {{ItemData|Divine Barrier|CombatBarrier}} | ||
== 📖 Template Functions == | == 📖 Template Functions == | ||
Latest revision as of 15:08, 10 March 2026
This template allows you to display item stats automatically using the game files. It pulls data directly from Data:ItemData.json.
⚡ Quick Start
[edit source]- Go to Data:ItemData.json and find the item you want.
- Use the template with the item's name and the property you need.
Basic Example:
{{ItemData|Divine Barrier|CombatBarrier}} → 600
📖 Template Functions
[edit source]The template has different modes depending on what information you need.
Getting Properties (Default)
[edit source]This is the most common use case. Just provide the item name and the property you want.
Syntax:
{{ItemData|Item Name|PropertyName}}
Examples:
{{ItemData|Divine Barrier|CombatBarrier}}→ 600{{ItemData|Healing Rite|AbilityCooldown}}→ 70{{ItemData|Rapid Rounds|BonusFireRate}}→ 9%
Note: Properties that represent percentages (like BulletResist or BonusFireRate) automatically have a % sign added.
Getting Cost
[edit source]Shows the cost of an item in souls (automatically formatted with commas).
Syntax:
{{ItemData|cost|Item Name}}
Example:
{{ItemData|cost|Divine Barrier}}→ 6,400
Getting Type/Category
[edit source]Shows whether an item is Weapon, Vitality, or Spirit.
Syntax:
{{ItemData|type|Item Name}}
Example:
{{ItemData|type|Divine Barrier}}→ Vitality{{ItemData|type|Divine Barrier|raw=true}}→ Vitality (English version)
Checking if Active
[edit source]Returns true if the item has an active ability, false if it's passive.
Syntax:
{{ItemData|active|Item Name}}
Example:
{{ItemData|active|Divine Barrier}}→ true
Getting Component Name
[edit source]Shows the name of the item's component (if it has one).
Syntax:
{{ItemData|component|Item Name}}
Example:
{{ItemData|component|Titanic Magazine}}→ Extended Magazine
Getting Codename
[edit source]Returns the internal JSON key for an item (useful for advanced template work).
Syntax:
{{ItemData|codename|Item Name}}
Example:
{{ItemData|codename|Divine Barrier}}→ upgrade_divine_barrier
Getting Enhanced Stats
[edit source]Shows the enhanced value of a property for items in enhanced modes (e.g., Street Brawl).
Syntax:
{{ItemData|enhanced|Item Name|PropertyName}}
❌ Common Errors
[edit source]- Item Not Found.
- The item name is spelled incorrectly or doesn't exist in the data. Make sure to use the exact display name (e.g., "Divine Barrier" not "divine barrier").
- Template returns nothing
- The property doesn't exist for that item, or the property name is spelled incorrectly. Check Data:ItemData.json to see available properties.
Displays item stats and information from game files. Use Data:ItemData.json to find available properties.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Function or Item Name | 1 | Either a function name (cost, type, active, component, codename) OR the item's display name when getting properties.
| String | required |
| Item Name or Property | 2 | The item's display name (if param 1 is a function) OR the property name to retrieve (if param 1 is an item).
| String | optional |
| Raw output | raw | Only for 'type' function. Set to 'true' to get English language output instead of localized.
| Boolean | optional |