Difference between revisions of "Template:WeaponsTable"

From Epic Paths
Jump to navigation Jump to search
Tag: Manual revert
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
All lower-case
Displays an equipment-table with weapon stats


* 1: simple / martial / exotic
One parameter: the where-value
* 2: light / one-handed / two-handed
* 3: melee / ranged
 
<hr>
 
'''Template:'''
 
* <nowiki>{{</nowiki>Equipment_Weapons|simple|light|melee<nowiki>}}</nowiki>
* <nowiki>{{</nowiki>Equipment_Weapons|simple|ranged<nowiki>}}</nowiki>
* <nowiki>{{</nowiki>Equipment_Weapons|ammunition<nowiki>}}</nowiki>
</noinclude><includeonly><!--
</noinclude><includeonly><!--


-->{{#if: {{{3|}}}|<!--
-->{{#cargo_query:tables=Equipment_Items=Items,Equipment_Weapons=Weapons
  -->=== {{ucfirst:{{{2}}}}} {{ucfirst:{{{3}}}}} ===
  {{#cargo_query:tables=Equipment_Items=Items,Equipment_Weapons=Weapons
   |join on=Items._pageName= Weapons._pageName
   |join on=Items._pageName= Weapons._pageName
   |where=Proficiency="{{{1}}}" AND Hands="{{{2}}}" AND ItemType="{{{3}}}"
   |where={{{1}}}
   |order by=Name
   |order by=Items.Name
   |fields=CONCAT( '[[', Weapons._pageName, '|', Name, ']]' ) = Name,Cost,Damage,Critical,RangeInc = Range,Weight,DamageType=Type,Special
   |fields=CONCAT( '[[', Weapons._pageName, '|', Name, ']]' ) = Name,Cost,Damage,Critical,RangeInc = Range,Weight,DamageType=Type,Special
   |format=table
   |format=table
   }}<!--
   }}<!--
-->|{{#if: {{{2|}}}|<!--
--></includeonly>
    -->=== {{ucfirst:{{{2}}}}} ===
    {{#cargo_query:tables=Equipment_Weapons
    |where=Proficiency="{{{1}}}" AND TableType="{{{2}}}"
    |order by=Name
    |fields=CONCAT( '[[', _pageName, '|', Name, ']]' ) = Name,Cost,Damage,Critical,RangeInc = Range,Weight,Type,Special
    |format=table
    }}<!--
  -->|<!--
    -->=== {{ucfirst:{{{1}}}}} ===
    {{#cargo_query:tables=Equipment_Weapons
    |where=TableType="{{{1}}}"
    |order by=Name
    |fields=CONCAT( '[[', _pageName, '|', Name, ']]' ) = Name,Cost,Damage,Critical,RangeInc = Range,Weight,Type,Special
    |format=table
    }}<!--
  -->}}<!--
-->}}</includeonly>

Latest revision as of 17:23, 14 August 2021

Displays an equipment-table with weapon stats

One parameter: the where-value