Actions

Template

Difference between revisions of "Item"

From P6 Spheres

 
(31 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
This is the "Item" template.
 
This is the "Item" template.
  
'''Name'''=Real name of item<br>
+
Edit the page to see the template text.
'''SortName'''=Name for use when sorting; "Climbing Kit, Basic" and "Climbing Kit, Deluxe"<br>
+
{{#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}}
'''ItemType'''=The major category of item: Weapons, Dungeoneering, Alchemy, etc<br>
+
</noinclude><includeonly><!--
'''ItemSubType'''=The subcategory of item: Alchemical Weapons, Alchemical Boosters, Alchemical Tools<br>
 
'''TreasureUse'''=Weapon, Protection, Magical, Consumable, Gear<br>
 
'''Tags'''=Any further tags used for filtering<br>
 
'''Price'''=Buying price in gp (Float)<br>
 
'''Weight'''=Weight of the item in lbs. (Float)<br>
 
'''Short'''=Short summary of benefits/use for tables<br>
 
'''Fluff'''=Fluff description<br>
 
'''Description'''=Full description<br>
 
'''Benefit'''=Specific rule benefits<br>
 
'''Note'''=Note<br>
 
'''CraftRequirements'''=Workshop, feats, materials, talents<br>
 
'''CraftDC'''=The Craft DC for the item (Integer)<br>
 
'''CraftSkill'''=The Craft skill used for the item or Spellcraft<br>
 
'''CraftCost'''=Cost in sp/gp (Float)<br>
 
'''Source'''=OGL Codes<br>
 
'''Campaigns'''=Filtering. "All" by default
 
  
It should be called in the following format:
+
-->{{#vardefine:CraftCost|<!--
<pre>
+
  -->{{#if:{{{CraftCost|}}}<!--
{{Item
+
    -->|{{{CraftCost}}}<!--
|Name=
+
    -->|{{#ifeq:{{{IsCraftMagic|}}}|Yes<!--
|SortName=
+
      -->|{{MapCraftPriceMagic|{{{Price|0.0}}}}}<!--
|ItemType=
+
      -->|{{MapCraftPriceCommon|{{{Price|0.0}}}}}<!--
|ItemSubType=
+
    -->}}<!--
|TreasureUse=
+
  -->}}<!--
|Tags=
+
-->}}<!--
|Price=
+
 
|Weight=
+
-->{{#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|}}} }}<!--
|Short=
+
 
|Fluff=
+
-->{{#vardefine:CategoryTag|{{#replace:{{{ItemType}}}||_}}}}{{#vardefine:SubCategoryTag|{{#replace:{{{ItemSubType}}}||%20}}}}<!--
|Description=
 
|Benefit=
 
|Note=
 
|CraftRequirements=
 
|CraftDC=
 
|CraftSkill=
 
|CraftCost=
 
|Source=
 
|Campaigns=
 
}}
 
</pre>
 
Edit the page to see the template text.
 
{{#cargo_declare:_table=Base_Items|Name=Text|SortName=Text|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|Name}}}|ItemType={{#replace:{{{ItemType|}}}||_}}|ItemSubType={{{ItemSubType|}}}|TreasureUse={{{TreasureUse|}}}|Tags={{{Tags|}}}|Price={{{Price|}}}|PrettyPrice={{MapPrice|{{{Price|}}}}}|Weight={{{Weight|}}}|PrettyWeight={{MapWeight|{{{Weight|}}}}}|Short={{{Short|}}}|Fluff={{{Fluff|}}}|Description={{{Description|}}}|Benefit={{{Benefit|}}}|Note={{{Note|}}}|CraftRequirements={{{CraftRequirements|}}}|CraftDC={{{CraftDC|}}}|CraftSkill={{{CraftSkill|}}}|CraftCost={{{CraftCost|}}}|Source={{{Source|}}}|Campaigns={{{Campaigns|}}} }}<!--
 
  
 
-->{{DISPLAYTITLE:{{{Name|}}}}}<!--
 
-->{{DISPLAYTITLE:{{{Name|}}}}}<!--
-->{{BreadCrumbs|[[Equipment]] > [[Equipment/{{{ItemType}}}|{{{ItemType}}}]]|{{{Name}}}|auto=no}}<!--
+
-->{{BreadCrumbs|[[Equipment]] > [{{fullurl:Equipment/List|Category={{#var:CategoryTag}}}} {{{ItemType}}}] > [{{fullurl:Equipment/List#{{#var:SubCategoryTag}}|Category={{#var:CategoryTag}}}} {{{ItemSubType}}}]|{{{Name}}}|auto=no}}<!--
-->''Category:'' {{{ItemType}}}{{#if: {{{ItemSubType|}}}|({{{ItemSubType}}})}}<!--
+
 
 +
-->{{#decryptplt:<!--
  
 
-->{{#if: {{{Fluff|}}}|<wbr>
 
-->{{#if: {{{Fluff|}}}|<wbr>
Line 60: Line 31:
 
{{#!:{| class="wikitable"
 
{{#!:{| class="wikitable"
 
|-
 
|-
! Cost !! Weight {{#if:{{{CraftDC|}}}|!! Craft DC|}}
+
! Cost !! Weight
 
|-
 
|-
| {{{Price|—}}} gp || {{{Weight|}}} {{#if:{{{CraftDC|}}}|{{!}}{{!}} {{{CraftDC}}}|}}
+
| {{MapPrice|{{{Price|0.0}}}}} || {{MapWeight|{{{Weight|0.0}}}}}
 
|}}}<!--
 
|}}}<!--
  
Line 77: Line 48:
 
<wbr>|}}<!--
 
<wbr>|}}<!--
  
-->{{#if: {{{CraftDC|}}}|'''Craft''' ({{{CraftType|}}}): {{{CraftDC}}}<br>'''Cost:''' {{{CraftCost|Undefined}}}}}{{#if: {{{CraftRequirements|}}}|<br>'''Requirements:''' {{{CraftRequirements}}}|}}{{#if: {{{CraftDC|}}}|
+
-->{{#if: {{{CraftDC|}}}|'''Craft({{{CraftSkill|}}})''' DC {{{CraftDC}}}; '''Material Cost:''' {{MapPrice|{{#var:CraftCost}}}}}}{{#if: {{{CraftRequirements|}}}|<br>'''Requirements:''' {{{CraftRequirements}}}|}}{{#if: {{{CraftDC|}}}|
  
 
<wbr>|}}<!--
 
<wbr>|}}<!--
Line 86: Line 57:
 
-->''Tags:'' {{{Tags|None}}}<br><!--
 
-->''Tags:'' {{{Tags|None}}}<br><!--
 
-->''Campaigns:'' {{{Campaigns|}}}<br><!--
 
-->''Campaigns:'' {{{Campaigns|}}}<br><!--
-->''Short Description:'' {{{Short|None}}}<br><!--
+
-->''Short Description:'' {{{Short|None}}}}}
-->''OGL Sources:'' {{{Source|}}}}}
 
  
[[Category:Items]]
+
}}{{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.