Difference between revisions of "Template:5e Magic Item"

From Dungeons and Dragons Wiki
Jump to: navigation, search
m (category)
m
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{| class="dragon monstats" cellspacing="0" cellpadding="0"
+
<span style="font-size: 1.35em; font-weight:bold;>{{{name}}}</span>&nbsp;{{#if: {{{refs|}}}|{{{refs}}}&nbsp;|}}{{#if: {{{pointer|}}}|([[pointer]])&nbsp;|}}<br />{{#if:{{{sorttext|}}}|{{DEFAULTSORTKEY:{{{sorttext}}} 5e}}|{{DEFAULTSORTKEY:{{PAGENAME}} 5e}} }}[[Category:5e Magic Items]]
|+ style="font-size: larger; white-space: nowrap;" | {{{name}}}
+
''Magic {{#switch: {{{type}}}
|-
+
   |Armor
| colspan="2" | ''{{#switch: {{{type}}}
+
  |armor = [[Item Type::Armor]][[Category:5e Magic Armor]]
   |Armor = [[Item Type::Armor]]
+
   |Weapon
  |armor = [[Item Type::Armor]]
+
  |weapon = [[Item Type::Weapon]][[Category:5e Magic Weapons]]{{#if: {{{typenote|}}}|{{#set: Weapon Kind={{{typenote}}}}}|}}
   |Weapon = [[Item Type::Weapon]]
+
   |Wondrous Item   
  |weapon = [[Item Type::Weapon]]
+
  |wondrous item
   |Wondrous Item = [[Item Type::Wondrous item]]
+
   |Wondrous item = [[Item Type::Wondrous Item]][[Category:5e Wondrous Items]]
   |wondrous item = [[Item Type::Wondrous item]]
+
   |Potion
  |Wondrous item = [[Item Type::Wondrous item]]
+
  |potion = [[Item Type::Potion]][[Category:5e Magic Potions]]
   |Potion = [[Item Type::Potion]]
+
   |Scroll
  |potion = [[Item Type::Potion]]
+
  |scroll = [[Item Type::Scroll]][[Category:5e Magic Scrolls]]
   |Scroll = [[Item Type::Scroll]]
+
   |Staff
  |scroll = [[Item Type::Scroll]]
+
  |staff = [[Item Type::Staff]][[Category:5e Magic Staves]]
   |Staff = [[Item Type::Staff]]
+
   |Rod
  |staff = [[Item Type::Staff]]
+
  |rod = [[Item Type::Rod]][[Category:5e Magic Rods]]
   |Rod = [[Item Type::Rod]]
+
   |Wand  
  |rod = [[Item Type::Rod]]
+
  |wand = [[Item Type::Wand]][[Category:5e Magic Wands]]
   |Wand = [[Item Type::Wand]]
+
   |Ring
  |wand = [[Item Type::Wand]]
+
  |ring = [[Item Type::Ring]][[Category:5e Magic Rings]]
   |Ring = [[Item Type::Ring]]
 
  |ring = [[Item Type::Ring]]
 
 
   |#default = [[Item Type::{{ucfirst:{{{type}}}}}]]
 
   |#default = [[Item Type::{{ucfirst:{{{type}}}}}]]
   }}''{{#if: {{{typenote|}}}|,&nbsp;({{{typenote}}})| }},&nbsp;<!-- avoid cr
+
   }}{{#if: {{{typenote|}}}|,&nbsp;({{{typenote}}}){{#set: Type Note={{{typenote}}}}}| }},&nbsp;<!-- avoid cr
 
-->{{#switch: {{{rarity}}}
 
-->{{#switch: {{{rarity}}}
   |Common = {{lc:[[Rarity::Common]]}}
+
   |Common = common {{#set: Rarity=Common}}[[Category:5e Common Magic Items]]
   |Uncommon = {{lc:[[Rarity::Uncommon]]}}
+
   |Uncommon = uncommon{{#set: Rarity=Uncommon}}[[Category:5e Uncommon Magic Items]]
   |Rare = {{lc:[[Rarity::Rare]]}}
+
   |Rare = rare{{#set: Rarity=Rare}}[[Category:5e Rare Magic Items]]
   |Very Rare = {{lc:[[Rarity::Very Rare]]}}
+
   |Very Rare = very rare{{#set: Rarity=Very Rare}}[[Category:5e Very Rare Magic Items]]
   |Legendary = {{lc:[[Rarity::Legendary]]}}
+
   |Legendary = legendary{{#set:Rarity=Legendary}}[[Category:5e Legendary Magic Items]]
 +
  |Artifact = artifact{{#set: Rarity=Artifact}}[[Category:5e Artifacts]]
 
   |#default = {{lc:[[Rarity::{{{rarity}}}]]}}
 
   |#default = {{lc:[[Rarity::{{{rarity}}}]]}}
   }}{{#if: {{{raritynote|}}}|&nbsp;({{{raritynote}}})| }}{{#ifeq: {{{attunement|}}}|requires attunement|[[Attunement::True|:True]]| }}  
+
   }}{{#if: {{{attunement|}}}|{{#if: {{{raritynote|}}}|&nbsp;({{{raritynote}}}, requires {{{srd5lc|Attunement}}}{{#if: {{{attunementnote|}}}|&nbsp;{{{attunementnote}}}|}}{{#set: attunement=true}})|&nbsp;(requires {{srd5lc|Attunement}}{{#if: {{{attunementnote|}}}|&nbsp;{{{attunementnote}}}|}}{{#set: attunement=true}})| }}|{{#if: {{{raritynote|}}}|&nbsp;({{{raritynote}}})| }}}}''
|-
+
 
|{{{desc}}}
+
{{#if: {{{hoarditem|}}}|''Hoard Item''[[Category:5e Hoard Magic Items]]<br /><br />|}}{{#if: {{{pointer|}}}|'''Unofficial Description:'''&nbsp;{{{desc}}}|{{{desc}}}|}}{{#if: {{{charges|}}}|{{#set: Charges={{{charges|}}}}}| }}{{#if: {{{magicbonus|}}}|{{#set: Magic Bonus=&nbsp;{{{magicbonus|}}}}}|}}{{#if: {{{canon|}}}|{{#set: Canon=true}}[[Category:5e Canon Magic Items]]|}}
|} [[Category:5e Magic Weapon|{{Title Only|{{BASEPAGENAME}}}}]]
 
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
<!-- Tech note:
 
<!-- Tech note:

Latest revision as of 17:21, 31 March 2022

Template documentation (for the above template, sometimes hidden or invisible)

Use[edit]

Use in articles that describe a magic item in 5th edition.

Note!!! If you want to make a magic armor or weapon, you should use a different template:

Syntax[edit]

{{5e Magic Item
|name= <!-- name of magic item -->
|sorttext= <!--blank, or category sort-->
|refs= <!--references-->
|type= <!-- Weapon, Armor, Wondrous Item, Staff, Wand -->
|typenote= <!-- Note following type. ex. ammunition -->
|rarity= <!-- Common, Uncommon, Rare, Very Rare, Legendary -->
|raritynote= <!-- Note following rarity, other than requires attunement. -->
|attunement=  <!-- Yes if requires attunement, otherwise blank -->
|attunementnote= <!-- blank unless attunement note -->
|charges= <!-- # of charges or uses, otherwise blank -->
|magicbonus= <!-- blank; or +1, +2, +3 -->
|hoarditem= <!-- blank, Yes if hoard item -->
|desc= <!--Description of the magic item, rules, and abilities -->
}}

<--Description and rules for the magic item-->

Example[edit]

{{5e Magic Item
|name= Foo<!-- name of magic item -->
|sorttext= <!--blank, or category sort-->
|type= Wondrous Item<!-- Weapon, Armor, Wondrous Item, Staff, Wand -->
|typenote= not so wondrous<!-- Note following type. ex. ammunition -->
|rarity= Common<!-- Common, Uncommon, Rare, Very Rare, Legendary -->
|raritynote= <!-- Note following rarity, other than requires attunement. -->
|attunement=Yes <!-- Yes if requires attunement, otherwise blank -->
|attunementnote= <!-- blank unless attunement note -->
|charges= <!-- # of charges or uses, otherwise blank -->
|magicbonus= <!-- blank; or +1, +2, +3 -->
|hoarditem=
|desc= blah, blah, blah<!--Description of the magic item, rules, and abilities -->
}}

produces...


Foo 
Magic Wondrous Item, (not so wondrous), common (requires attunement)

blah, blah, blah