Template:Item: Difference between revisions

Template page
Created page with "<noinclude>{{Item/doc}}</noinclude> <includeonly>{{ #ifeq: {{PAGENAME}} | {{{name}}} | Category:Item {{ #switch:{{{type}}} | adventuring = Category:Adventuring Gear'''Type:''' Adventuring Gear | wonderous = Category:Wonderous Item'''Type:''' Wonderous Item | weapon = Category:Weapon'''Type:''' Weapon | potion = Category:Potion'''Type:''' Potion | [[Category:{{{type}}}]]'''Type:''' {{{type}}..."
Tag: wikieditor
 
No edit summary
Tag: wikieditor
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Item/doc}}</noinclude>
<noinclude>{{Item/doc}}</noinclude>
<includeonly>{{
<includeonly>{{
    #ifeq: {{PAGENAME}} | {{{name}}}  
#ifeq: {{PAGENAME}} | {{{name}}}  
    | [[Category:Item]]
| [[Category:Item]]
    {{
{{
        #switch:{{{type}}}  
    #switch:{{{type}}}  
        | adventuring = [[Category:Adventuring Gear]]'''Type:''' Adventuring Gear
    | adventuring = [[Category:Adventuring Gear]]
        | wonderous = [[Category:Wonderous Item]]'''Type:''' Wonderous Item
    | armor = [[Category:Armor]]
        | weapon = [[Category:Weapon]]'''Type:''' Weapon
    | dagger = [[Category:Dagger]]
        | potion = [[Category:Potion]]'''Type:''' Potion
    | focus = [[Category:Spellcasting Focus]]
        | [[Category:{{{type}}}]]'''Type:''' {{{type}}}
    | headgear = [[Category:Headgear]]
    }}
     | potion = [[Category:Potion]]
     {{
    | shield = [[Category:Shield]]
        #switch:{{{rarity}}}
    | wand = [[Category:Wand]]
        | common = [[Catgory:Common Item]]'''Rarity:''' <span class="item common">Common</span>
    | weapon = [[Category:Weapon]]
        | uncommon = [[Category:Uncommon Item]]'''Rarity:''' <span class="item uncommon">Uncommon</span>
    | wondrous = [[Category:Wondrous Item]]
        | rare = [[Category:Rare Item]]'''Rarity:''' <span class="item rare">Rare</span>
    | [[Category:{{{type}}}]]
        | epic = [[Category:Epic Item]]'''Rarity:''' <span class="item epic">Epic</span>
        | legendary = [[Category:Legendary Item]]'''Rarity:''' <span class="item legendary">Legendary</span>
        | [[Category:{{{type}}}]]
    }}
}}
}}
----
{{
    #switch:{{{rarity}}}
    | common = [[Category:Common Item]]
    | uncommon = [[Category:Uncommon Item]]
    | rare = [[Category:Rare Item]]
    | very rare = [[Category:Very Rare]]
    | epic = [[Category:Epic Item]]
    | legendary = [[Category:Legendary Item]]
    | [[Category:{{{rarity}}}]]
}}
}}
<div class="item">[[:Category:{{
#switch:{{{type}}}
    | adventuring = Adventuring Gear{{!}}Adventuring Gear
    | armor = Armor{{!}}Armor
    | dagger = Dagger{{!}}Dagger
    | focus = Spellcasting Focus{{!}}Spellcasting Focus
    | headgear = Headgear{{!}}Headgear
    | potion = Potion{{!}}Potion
    | shield = Shield{{!}}Shield
    | wand = Wand{{!}}Wand
    | weapon = Weapon{{!}}Weapon
    | wondrous = Wondrous Item{{!}}Wondrous Item
    | {{{type}}}
}}]], {{
    #switch:{{{rarity}}}
    | common = <span class="item common">Common</span>
    | uncommon = <span class="item uncommon">Uncommon</span>
    | rare = <span class="item rare">Rare</span>
    | very rare = <span class="item rare">Very Rare</span>
    | epic = <span class="item epic">Epic</span>
    | legendary = <span class="item legendary">Legendary</span>
    | {{{rarity}}}
}}{{#if:{{{attunement|}}}|<nowiki/> <span class="item attunement">Attunement{{#ifeq:{{{attunement}}}|caster|<nowiki/> <span class="small italic">(by a spellcaster)</span>}}</span>|}}
</div><hr>
</includeonly>
</includeonly>

Latest revision as of 02:16, 24 January 2024

Usage

{{item
|name={{subst:PAGENAME}}
|type=
|rarity=
|attunement=
}}

Important

The |name= parameter must be the same as the page name (underscore excluded, space works):

Item Page URL: https://rp.klanen.org/wiki/kfp/Item_Name
Template Parameter: |name=Item Name

The following |type= are recognized:

|type=adventuring
|type=armor
|type=dagger
|type=focus
|type=headgear
|type=potion
|type=wand
|type=weapon
|type=wondrous

Others can be used, but categories will be weird.


the following |rarity= are recognized and automatically colored according to rarity standards:

|type=common
|type=uncommon
|type=rare
|type=very rare
|type=epic
|type=legendary

|attunement= is optional.

If the item requires attunement you must put 1 as value. If the item requires a spellcaster to attune, put caster as value.