Template:Infobox Item: Difference between revisions

From OpenSpell Wiki
Jump to navigationJump to search
Created page with "<noinclude> == Usage == Place at the top of any item article. Only fill in the sections relevant to the item type. <pre> {{Infobox Item | name = Iron longsword | image = 150px | description = A sharp sword crafted from iron | cost = 200 | weight = 2 | stackable = no | tradeable = yes | members = no | equipslot = weapon | weapon_speed = 5 | req_skill = accuracy | req_level = 10 | bonus_accuracy..."
 
 
Line 1: Line 1:
<noinclude>
<noinclude>
<noinclude>
== Usage ==
== Usage ==
Place at the top of any item article. Only fill in the sections relevant to the item type.
Place at the top of any item article. Leave irrelevant parameters empty — they will show as —.


<pre>
<pre>
{{Infobox Item
{{Infobox Item
| name         = Iron longsword
| name           = iron longsword
| image       = [[File:Iron_longsword.png|150px]]
| image         = [[File:Iron_longsword.png|150px]]
| description = A sharp sword crafted from iron
| description   = A sharp sword crafted from iron
| cost         = 200
| cost           = 200
| weight       = 2
| weight         = 2
| stackable   = no
| stackable     = no
| tradeable   = yes
| tradeable     = yes
| members     = no
| equipslot     = weapon
| equipslot    = weapon
| weapon_speed   = 5
| weapon_speed = 5
| req_skill     = accuracy
| req_skill   = accuracy
| req_level     = 10
| req_level   = 10
| bonus_accuracy = 14
| bonus_accuracy = 14
| bonus_strength = 13
| bonus_strength = 13
| skill_xp     = Smithing
| skill_xp       = Smithing
| xp_amount   = 70
| xp_amount     = 70
| recipe       = 2x [[iron bar]]
| recipe         = 2x [[iron bar]]
}}
}}
</pre>
</pre>
=== All parameters ===
{| class="wikitable"
! Parameter !! Description
|-
| <code>name</code> || In-game item name
|-
| <code>image</code> || <code><nowiki>[[File:ItemName.png|150px]]</nowiki></code>
|-
| <code>description</code> || In-game examine text
|-
| <code>cost</code> || Base value in coins
|-
| <code>weight</code> || Weight in kg
|-
| <code>stackable</code> || <code>yes</code> or <code>no</code>
|-
| <code>tradeable</code> || <code>yes</code> or <code>no</code>
|-
| <code>members</code> || <code>yes</code> or <code>no</code>
|-
| colspan="2" style="background:#eaecf0;" | '''Equipment only'''
|-
| <code>equipslot</code> || weapon / helmet / chest / legs / boots / gloves / shield / neck / back / projectile
|-
| <code>weapon_speed</code> || Attack speed in ticks (weapons only)
|-
| <code>req_skill</code> || Skill required to equip
|-
| <code>req_level</code> || Level required to equip
|-
| <code>bonus_accuracy</code> || Accuracy bonus (positive or negative)
|-
| <code>bonus_strength</code> || Strength bonus
|-
| <code>bonus_defense</code> || Defense bonus
|-
| <code>bonus_magic</code> || Magic bonus
|-
| <code>bonus_range</code> || Range bonus
|-
| colspan="2" style="background:#eaecf0;" | '''Food only'''
|-
| <code>heals</code> || Hitpoints restored when eaten
|-
| colspan="2" style="background:#eaecf0;" | '''Craftable/Skilling'''
|-
| <code>skill_xp</code> || Skill that grants XP when obtained/crafted
|-
| <code>xp_amount</code> || Amount of XP granted
|-
| <code>recipe</code> || Ingredients, e.g. <code>2x [[iron bar]]</code>
|}


See also: [[Template:Item/preload]]
See also: [[Template:Item/preload]]
Line 89: Line 36:
{{{image|}}}
{{{image|}}}
|-
|-
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Item info
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | General
|-
|-
! style="width:45%; padding:4px 8px; background:#f8f9fa;" | Description
! style="width:45%; padding:4px 8px; background:#f8f9fa;" | Description
| style="padding:4px 8px;" | ''{{{description|}}}''
| style="padding:4px 8px;" | ''{{{description|}}}''
|-
|-
! style="padding:4px 8px; background:#f8f9fa;" | Value
! style="padding:4px 8px; background:#f8f9fa;" | Value
Line 106: Line 53:
| style="padding:4px 8px;" | {{{tradeable|—}}}
| style="padding:4px 8px;" | {{{tradeable|—}}}
|-
|-
! style="padding:4px 8px; background:#f8f9fa;" | Members
| style="padding:4px 8px;" | {{{members|no}}}
|-
{{#if:{{{equipslot|}}}|
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Equipment
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Equipment
|-
|-
! style="padding:4px 8px; background:#f8f9fa;" | Slot
! style="padding:4px 8px; background:#f8f9fa;" | Slot
| style="padding:4px 8px;" | {{{equipslot}}}
| style="padding:4px 8px;" | {{{equipslot|—}}}
|-
|-
{{#if:{{{weapon_speed|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Attack speed
! style="padding:4px 8px; background:#f8f9fa;" | Attack speed
| style="padding:4px 8px;" | {{{weapon_speed}}} ticks
| style="padding:4px 8px;" | {{{weapon_speed|—}}}
|-
|-
}}
{{#if:{{{req_skill|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Requires
! style="padding:4px 8px; background:#f8f9fa;" | Requires
| style="padding:4px 8px;" | {{{req_level}}} [[{{{req_skill}}}]]
| style="padding:4px 8px;" | {{{req_level|—}}} {{{req_skill|}}}
|-
|-
}}
{{#if:{{{bonus_accuracy|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Accuracy bonus
! style="padding:4px 8px; background:#f8f9fa;" | Accuracy bonus
| style="padding:4px 8px;" | {{{bonus_accuracy}}}
| style="padding:4px 8px;" | {{{bonus_accuracy|—}}}
|-
|-
}}
{{#if:{{{bonus_strength|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Strength bonus
! style="padding:4px 8px; background:#f8f9fa;" | Strength bonus
| style="padding:4px 8px;" | {{{bonus_strength}}}
| style="padding:4px 8px;" | {{{bonus_strength|—}}}
|-
|-
}}
{{#if:{{{bonus_defense|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Defense bonus
! style="padding:4px 8px; background:#f8f9fa;" | Defense bonus
| style="padding:4px 8px;" | {{{bonus_defense}}}
| style="padding:4px 8px;" | {{{bonus_defense|—}}}
|-
|-
}}
{{#if:{{{bonus_magic|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Magic bonus
! style="padding:4px 8px; background:#f8f9fa;" | Magic bonus
| style="padding:4px 8px;" | {{{bonus_magic}}}
| style="padding:4px 8px;" | {{{bonus_magic|—}}}
|-
|-
}}
{{#if:{{{bonus_range|}}}|
! style="padding:4px 8px; background:#f8f9fa;" | Range bonus
! style="padding:4px 8px; background:#f8f9fa;" | Range bonus
| style="padding:4px 8px;" | {{{bonus_range}}}
| style="padding:4px 8px;" | {{{bonus_range|—}}}
|-
|-
}}
}}
{{#if:{{{heals|}}}|
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Food
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Food
|-
|-
! style="padding:4px 8px; background:#f8f9fa;" | Heals
! style="padding:4px 8px; background:#f8f9fa;" | Heals
| style="padding:4px 8px;" | {{{heals}}} [[hitpoints]]
| style="padding:4px 8px;" | {{{heals|—}}}
|-
|-
}}
{{#if:{{{skill_xp|}}}|
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Skilling
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Skilling
|-
|-
! style="padding:4px 8px; background:#f8f9fa;" | XP on obtain
! style="padding:4px 8px; background:#f8f9fa;" | XP on obtain
| style="padding:4px 8px;" | {{{xp_amount}}} [[{{{skill_xp}}}]] xp
| style="padding:4px 8px;" | {{{xp_amount|—}}} {{{skill_xp|}}} xp
|-
|-
}}
! style="padding:4px 8px; background:#f8f9fa;" | Recipe
{{#if:{{{recipe|}}}|
| style="padding:4px 8px;" | {{{recipe|—}}}
! colspan="2" style="background:#3a3a3a; color:#c8a96e; text-align:center; padding:4px;" | Recipe
|-
| colspan="2" style="padding:6px 8px; text-align:center;" | {{{recipe}}}
|-
}}
|}
|}
</includeonly>
</includeonly>

Latest revision as of 14:17, 28 February 2026


Usage

[edit]

Place at the top of any item article. Leave irrelevant parameters empty — they will show as —.

{{Infobox Item
| name           = iron longsword
| image          = [[File:Iron_longsword.png|150px]]
| description    = A sharp sword crafted from iron
| cost           = 200
| weight         = 2
| stackable      = no
| tradeable      = yes
| equipslot      = weapon
| weapon_speed   = 5
| req_skill      = accuracy
| req_level      = 10
| bonus_accuracy = 14
| bonus_strength = 13
| skill_xp       = Smithing
| xp_amount      = 70
| recipe         = 2x [[iron bar]]
}}

See also: Template:Item/preload