Actions

Template

Difference between revisions of "Item"

From P6 Spheres

 
 
(55 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
This is the "Item" template.
 
This is the "Item" template.
It should be called in the following format:
+
 
<pre>
 
{{Item
 
|Name=
 
|SortName=
 
|Category=
 
|Subcategory=
 
|TreasureUse=
 
|Tags=
 
|Price=
 
|Weight=
 
|Short=
 
|Fluff=
 
|Description=
 
|Source=
 
|Campaigns=
 
}}
 
</pre>
 
 
Edit the page to see the template text.
 
Edit the page to see the template text.
{{#cargo_declare:_table=Base_Items|Name=Text|SortName=Text|Category=List (,) of String|Subcategory=List (,) of String|TreasureUse=String (allowed values=Weapon,Protection,Magical,Consumable,Gear)|Tags=List (,) of String|Price=Float|Weight=Float|Short=Wikitext|Fluff=Wikitext|Description=Wikitext|Source=List (,) of String|Campaigns=List (,) of String}}
+
{{#cargo_declare:_table=Base_Items|Name=String|SortName=String|UrlName=String|ItemType=List (,) of String|ItemSubType=List (,) of String|TreasureUse=String (allowed values=Weapon,Protection,Magical,Consumable,Gear,None)|Tags=List (,) of String|Price=Float|PrettyPrice=Text|Weight=Float|PrettyWeight=Text|Short=Wikitext|Fluff=Wikitext|Description=Wikitext|Benefit=Wikitext|Note=Wikitext|CraftRequirements=Wikitext|CraftDC=Integer|CraftSkill=String|CraftCost=Float|Source=List (,) of String|Campaigns=List (,) of String}}
</noinclude><includeonly>{{#cargo_store:_table=Base_Items|Name={{{Name|}}}|SortName={{{SortName|}}}|Category={{{Category|}}}|Subcategory={{{Subcategory|}}}|TreasureUse={{{TreasureUse|}}}|Tags={{{Tags|}}}|Price={{{Price|}}}|Weight={{{Weight|}}}|Short={{{Short|}}}|Fluff={{{Fluff|}}}|Description={{{Description|}}}|Source={{{Source|}}}|Campaigns={{{Campaigns|}}} }}{| class="wikitable"
+
</noinclude><includeonly><!--
! Name
+
 
| {{{Name|}}}
+
-->{{#vardefine:CraftCost|<!--
 +
  -->{{#if:{{{CraftCost|}}}<!--
 +
    -->|{{{CraftCost}}}<!--
 +
    -->|{{#ifeq:{{{IsCraftMagic|}}}|Yes<!--
 +
      -->|{{MapCraftPriceMagic|{{{Price|0.0}}}}}<!--
 +
      -->|{{MapCraftPriceCommon|{{{Price|0.0}}}}}<!--
 +
    -->}}<!--
 +
  -->}}<!--
 +
-->}}<!--
 +
 
 +
-->{{#cargo_store:_table=Base_Items|Name={{{Name}}}|SortName={{{SortName|{{{Name}}}}}}|UrlName={{InterCargoEncode|{{{Name}}}}}|ItemType={{#replace:{{{ItemType|}}}||_}}|ItemSubType={{{ItemSubType|}}}|TreasureUse={{{TreasureUse|}}}|Tags={{{Tags|}}}|Price={{{Price|-}}}|PrettyPrice={{MapPrice|{{{Price|0.0}}}}}|Weight={{{Weight|-}}}|PrettyWeight={{MapWeight|{{{Weight|0.0}}}}}|Short={{{Short|}}}|Fluff={{{Fluff|}}}|Description={{{Description|}}}|Benefit={{{Benefit|}}}|Note={{{Note|}}}|CraftRequirements={{{CraftRequirements|}}}|CraftDC={{{CraftDC|}}}|CraftSkill={{{CraftSkill|}}}|CraftCost={{#var:CraftCost}}|Source={{{Source|}}}|Campaigns={{{Campaigns|}}} }}<!--
 +
 
 +
-->{{#vardefine:CategoryTag|{{#replace:{{{ItemType}}}||_}}}}{{#vardefine:SubCategoryTag|{{#replace:{{{ItemSubType}}}||%20}}}}<!--
 +
 
 +
-->{{DISPLAYTITLE:{{{Name|}}}}}<!--
 +
-->{{BreadCrumbs|[[Equipment]] > [{{fullurl:Equipment/List|Category={{#var:CategoryTag}}}} {{{ItemType}}}] > [{{fullurl:Equipment/List#{{#var:SubCategoryTag}}|Category={{#var:CategoryTag}}}} {{{ItemSubType}}}]|{{{Name}}}|auto=no}}<!--
 +
 
 +
-->{{#decryptplt:<!--
 +
 
 +
-->{{#if: {{{Fluff|}}}|<wbr>
 +
 
 +
''{{{Fluff}}}''}}
 +
 
 +
{{#!:{| class="wikitable"
 
|-
 
|-
! SortName
+
! Cost !! Weight
| {{{SortName|}}}
 
 
|-
 
|-
! Category
+
| {{MapPrice|{{{Price|0.0}}}}} || {{MapWeight|{{{Weight|0.0}}}}}
| {{#arraymap:{{{Category|}}}|,|x|[[x]]}}
+
|}}}<!--
 +
 
 +
-->{{#if: {{{Description|}}}|{{{Description}}}
 +
 
 +
<wbr>|}}<!--
 +
 
 +
-->{{#if: {{{Benefit|}}}|'''Benefit:''' {{{Benefit}}}
 +
 
 +
<wbr>|}}<!--
  
|-
+
-->{{#if: {{{Note|}}}|'''Note:''' {{{Note}}}
! Subcategory
+
 
| {{#arraymap:{{{Subcategory|}}}|,|x|[[x]]}}
+
<wbr>|}}<!--
  
|-
+
-->{{#if: {{{CraftDC|}}}|'''Craft({{{CraftSkill|}}})''' DC {{{CraftDC}}}; '''Material Cost:''' {{MapPrice|{{#var:CraftCost}}}}}}{{#if: {{{CraftRequirements|}}}|<br>'''Requirements:''' {{{CraftRequirements}}}|}}{{#if: {{{CraftDC|}}}|
! TreasureUse
 
| {{{TreasureUse|}}}
 
|-
 
! Tags
 
| {{#arraymap:{{{Tags|}}}|,|x|[[x]]}}
 
  
|-
+
<wbr>|}}<!--
! Price
 
| {{{Price|}}}
 
|-
 
! Weight
 
| {{{Weight|}}}
 
|-
 
! Short
 
| {{{Short|}}}
 
|-
 
! Fluff
 
| {{{Fluff|}}}
 
|-
 
! Description
 
| {{{Description|}}}
 
|-
 
! Source
 
| {{#arraymap:{{{Source|}}}|,|x|[[x]]}}
 
  
|-
+
-->{{#spoiler:show=Data|hide=Hide Data|
! Campaigns
+
''Sort Name:'' {{{SortName|{{{Name}}}}}}<br><!--
| {{#arraymap:{{{Campaigns|}}}|,|x|[[x]]}}
+
-->''Treasure Type:'' {{{TreasureUse}}}<br><!--
 +
-->''Tags:'' {{{Tags|None}}}<br><!--
 +
-->''Campaigns:'' {{{Campaigns|}}}<br><!--
 +
-->''Short Description:'' {{{Short|None}}}}}
  
|}
+
}}{{OGL|{{{Source}}}}}[[Category:Items]]
 
</includeonly>
 
</includeonly>

Latest revision as of 19:51, 24 March 2020

This is the "Item" template.

Edit the page to see the template text. This template defines the table "Base_Items". View table.