Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:BBDW Character Table: Difference between revisions

Template page
(moved template for formatting a table row into subpage, and moved wikitext for determining the table and cargo query itself here)
m (added "limited" field to query)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
-->{{#vardefine:RARITY|IF(baserarity='SS',4,IF(baserarity='S',3,IF(baserarity='AI',2,IF(baserarity='AII',1,0)))) }}<!--
-->{{#vardefine:RARITY|IF(baserarity='SS',4,IF(baserarity='S',3,IF(baserarity='AI',2,IF(baserarity='AII',1,0)))) }}<!--
-->{{#vardefine:ORDER_BY|{{#replace:{{{order by|}}}|RARITY|{{#var:RARITY}}}}}}<!--
-->{{#vardefine:ORDER_BY|{{#replace:{{{order by|}}}|RARITY|{{#var:RARITY}}}}}}<!--
--><table class="sortable wikitable" style="text-align:center;">
--><table class="sortable wikitable" style="text-align:center; width: 100%;">
<tr>
<tr>
<th>Icon</th>
<th>Icon</th>
Line 15: Line 15:
{{#cargo_query:
{{#cargo_query:
|tables=BBDW_Characters
|tables=BBDW_Characters
|fields=icon,pgname,nameen,namejp,element,baserarity,position,role,fxnameen1,fxdesc1,fxnameen2,fxdesc2,fxnameen3,fxdesc3,skillnameen1,skillicon1,skilldesc1,skillbasecd1,skillnameen2,skillicon2,skilldesc2,skillbasecd2,influences,releasejp
|fields=icon,pgname,nameen,namejp,element,baserarity,position,role,fxnameen1,fxdesc1,fxnameen2,fxdesc2,fxnameen3,fxdesc3,skillnameen1,skillicon1,skilldesc1,skillbasecd1,skillnameen2,skillicon2,skilldesc2,skillbasecd2,influences,releasejp,limited
|where={{{where|}}}
|where={{{where|}}}
|order by={{#var:ORDER_BY}}
|order by={{#var:ORDER_BY}}
Line 33: Line 33:
}}
}}
</nowiki></pre>
</nowiki></pre>
This template defines a custom column, <code>RARITY</code>, for ordering characters by their rarity the way the game orders it, instead of alphabetically. <code>RARITY</code> translates the in-game alphabetic base rarities into their numbers: AII to 1, AI to 2, S to 3, SS to 4, and none to 0.


==See Also==
==See Also==

Latest revision as of 19:22, 28 September 2021

Queries the Cargo table BBDW_Characters to create a table of characters.

Usage

{{BBDW Character Table
|where=RARITY='SS' and element='fire' and position='Front' and role='Attacker'
|order by=RARITY desc, nameen
}}

This template defines a custom column, RARITY, for ordering characters by their rarity the way the game orders it, instead of alphabetically. RARITY translates the in-game alphabetic base rarities into their numbers: AII to 1, AI to 2, S to 3, SS to 4, and none to 0.

See Also