Template:BCS cosmetic item list by hero: Difference between revisions

From Blooncyclopedia, the independent Bloons knowledge base
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly><div class="center-col-2 center-col-4 responsive-block-col-1">{{#cargo_query:tables=bcs_cosmetic_items=items, bcs_rewards=rewards
<includeonly>{{generic cargo compact list
|fields=CONCAT("[[File:", items.image, "|30px|link=", items._pageName, "|Icon of ", items.name, "]] ", items.name) = Item,
|tables=bcs_cosmetic_items=items, bcs_rewards=rewards
CONCAT("[[", items._pageName, "|", items.category, "]]") = Category,
|image field=items.image|name field=items.name|pagename field=items._pageName
GROUP_CONCAT(rewards.name SEPARATOR ", ") = Unlock method(s),
CONCAT(CASE WHEN items.introduced IS NULL THEN "Launch" ELSE CONCAT("[[Bloons Card Storm v", items.introduced, "|Version ", items.introduced, "]]") END) = Introduced


|extra col 1=CONCAT("[[", items._pageName, "|", items.category, "]]") = Category
|extra col 2=GROUP_CONCAT(rewards.name SEPARATOR ", ") = Unlock method(s)
|col 1 name=Item
|introduced col game name=Bloons Card Storm
|no link=y
|where  =items.applies_to HOLDS "{{{1|}}}"
|where  =items.applies_to HOLDS "{{{1|}}}"
|join on =items.id = rewards.item
|join on =items.id = rewards.item
|group by=items._pageName, items.name, items.image, items.category, items.introduced, rewards.item
|group by=items._pageName, items.name, items.image, items.category, items.introduced, rewards.item
|order by=items.category
|order by=items.category
}}</div>{{#cargo_store:_table=bcs_rewards
|center extra cols=y
}}{{#ifeq:{{NAMESPACENUMBER}}|0|{{#cargo_store:_table=bcs_rewards
|item  ={{{level 10|}}}
|item  ={{{level 10|}}}
|name  =[[{{{1|}}} (BCS)|{{{1|}}}]] level 10
|name  =[[{{{1|}}} (BCS)|{{{1|}}}]] level 10
Line 17: Line 21:
|name  =[[{{{1|}}} (BCS)|{{{1|}}}]] level 15
|name  =[[{{{1|}}} (BCS)|{{{1|}}}]] level 15
|amount=1
|amount=1
}}</includeonly><noinclude>{{#cargo_attach:_table=bcs_rewards}}{{/doc}}</noinclude>
}}}}</includeonly><noinclude>{{#cargo_attach:_table=bcs_rewards}}{{/doc}}</noinclude>

Revision as of 11:36, 3 December 2025

This template adds rows to the table "bcs_rewards", which is declared by the template BCS rewards. View table.

Generates a table of cosmetic items in Bloons Card Storm that are equippable to a specific Hero using a Cargo query. This template also stores the IDs of the cosmetic items unlocked at levels 10 and 15 to "bcs_rewards".

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Hero1

no description

Stringrequired
Level 10 cosmetic item IDlevel 10

no description

Stringrequired
Level 15 cosmetic item IDlevel 15

no description

Stringrequired

Example usage

{{BCS cosmetic item list by hero|Quincy|level 10=CardBackQuincyMasterHero|level 15=AltQuincyHeroCard01}}
Error 1052: Column '_pageName' in field list is ambiguous

Function: CargoSQLQuery::run Query: SELECT CONCAT("<div class='gccl-flex'>Image of", `items`.`name`, "", "", `items`.`name`, "", "</div>") AS `Item`,CONCAT("", `items`.`category`, "") AS `Category`,GROUP_CONCAT(`rewards`.`name` SEPARATOR ", ") AS `Unlock method(s)`,COALESCE(IF(introduced = "Firstlook test" OR introduced = "Full Playable test", CONCAT("", introduced, ""), CONCAT("Version ", introduced, "")), "Launch") AS `Introduced` FROM `cargo__bcs_cosmetic_items` `items` LEFT OUTER JOIN `cargo__bcs_rewards` `rewards` ON ((`items`.`id`=`rewards`.`item`)) WHERE `items`.`_ID` IN (SELECT `_rowID` FROM `cargo__bcs_cosmetic_items__applies_to` WHERE `_value`= "Quincy") GROUP BY `items`.`_pageName`, `items`.`name`, `items`.`image`, `items`.`category`, `items`.`introduced`, `rewards`.`item` ORDER BY `items`.`category` LIMIT 100