Template:Equipment Weapon: Difference between revisions

Template page
(Created page with "<noinclude> {{#template_params:Category|SubCategory|Rarity|Level|Price_Gp|Price_Sp|Price_Cp|Bulk|Short|Description|Traits}} {{#cargo_declare:_table=Equipment|Name=String|Category=String|SubCategory=String|Rarity=String|Level=Integer|Price_Gp=Integer|Price_Sp=Integer|Price_Cp=Integer|Price=String|Bulk=String|Short=String|Description=WikiText|Traits=List (,) of String|Image=String}} </noinclude><includeonly>{{#cargo_store:_table=Equipment|Name={{SUBPAGENAME}}|Price={{#if:{...")
 
mNo edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
{{#template_params:Category|SubCategory|Rarity|Level|Price_Gp|Price_Sp|Price_Cp|Bulk|Short|Description|Traits}}
{{#template_params:Damage|Hands|Range|Reload|WeaponCategory|WeaponGroup|Ammunition}}
{{#cargo_declare:_table=Equipment|Name=String|Category=String|SubCategory=String|Rarity=String|Level=Integer|Price_Gp=Integer|Price_Sp=Integer|Price_Cp=Integer|Price=String|Bulk=String|Short=String|Description=WikiText|Traits=List (,) of String|Image=String}}
{{#cargo_declare:_table=Equipment_Weapon|Damage=WikiText|Hands=String|Range=String|Reload=String|WeaponCategory=String|WeaponGroup=String|Ammunition=String}}
</noinclude><includeonly>{{#cargo_store:_table=Equipment|Name={{SUBPAGENAME}}|Price={{#if:{{{Price_Gp|}}}|{{{Price_Gp}}} gp|{{#if:{{{Price_Sp|}}}|{{{Price_Sp}}} sp|{{#if:{{{Price_Cp|}}}|{{{Price_Cp}}} cp|{{{Cost|—}}}}}}}}}}}
{{#cargo_attach:_table=Equipment}}
<yambe:breadcrumb>Equipment</yambe:breadcrumb><!--
</noinclude><includeonly>{{#cargo_store:_table=Equipment}}
<yambe:breadcrumb>Weapons</yambe:breadcrumb><!--


-->{{#if:{{{Image|}}}|[[{{{Image}}}|200px|thumb|right]]}}<!--
-->{{#if:{{{Image|}}}|[[{{{Image}}}|200px|thumb|right]]}}<!--
Line 12: Line 13:
|-
|-
| {{#ifeq:{{{Rarity|}}}|Common||{{{Rarity}} {{#!:||}}}} {{#if:{{{Level|}}}|{{{Level}}} {{#!:||}}}} {{#if:{{{Price_Gp|}}}|{{{Price_Gp}}} gp|{{#if:{{{Price_Sp|}}}|{{{Price_Sp}}} sp|{{#if:{{{Price_Cp|}}}|{{{Price_Cp}}} cp|{{{Cost|—}}}}}}}}} || {{{Bulk|—}}}
| {{#ifeq:{{{Rarity|}}}|Common||{{{Rarity}} {{#!:||}}}} {{#if:{{{Level|}}}|{{{Level}}} {{#!:||}}}} {{#if:{{{Price_Gp|}}}|{{{Price_Gp}}} gp|{{#if:{{{Price_Sp|}}}|{{{Price_Sp}}} sp|{{#if:{{{Price_Cp|}}}|{{{Price_Cp}}} cp|{{{Cost|—}}}}}}}}} || {{{Bulk|—}}}
|-
! Damage!!  {{#if:{{{Range|}}}|Range!!}} {{#if:{{{Reload|}}}|Reload!!}} Hands
|-
| {{{Damage|—}}} || {{#if:{{{Range|}}}|{{{Range}}} {{#!:||}}}} {{#if:{{{Reload|}}}|{{{Reload}}} {{#!:||}}}} {{{Hands|—}}}
|}}}
|}}}
{{#if:{{{WeaponCategory|}}}{{{WeaponGroup|}}}|{{#!:{| class="wikitable"
|-
! {{#if:{{{WeaponCategory|}}}|Category!!}} {{#if:{{{WeaponGroup|}}}|Group!!}}
|-
| {{#if:{{{WeaponCategory|}}}|{{{WeaponCategory}}} {{#!:||}}}} {{#if:{{{WeaponGroup|}}}|{{{WeaponGroup}}} {{#!:||}}}}
|}}}}}


{{{Description|}}}
{{{Description|}}}


{{#if:{{{Traits|}}}|<h3>Traits</h3>
{{#if:{{{Traits|}}}|<h4>Traits</h4>


}}
{{#arraymap:{{{Traits}}}|,|x|{{#cargo_query:tables=Equipment_Traits|fields=Name,Description|where=Name="x"|format=template|template=Equipment_Traits|named args=yes}}|<br>}}}}


[[Category:Equipment]]
[[Category:Equipment]]
</includeonly>
</includeonly>

Revision as of 12:55, 16 June 2023

This is the "Equipment Weapon" template.

It should be called in the following format:

{{Equipment Weapon
|Damage=
|Hands=
|Range=
|Reload=
|WeaponCategory=
|WeaponGroup=
|Ammunition=
}}

Edit the page to see the template text.

Error: "Range" cannot be used as a Cargo field name, because it is an SQL keyword.

This template adds rows to the table "Equipment", which is declared by the template Equipment Item. View table.