Template:Creature Navbox: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
imported>Lemonlich
(included mechas)
mNo edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="qud-box-wrapper"><div class="qud-box"><span class="qud-box-header"><b>Creatures</b></span><div class="qud-box-content" style="font-weight:bold; line-height:1.5em; padding:0em;">
<includeonly>{{Navbox
{| class="mw-collapsible mw-collapsed" style="border: 1px ; width: 100%;"
| name      = Creature Navbox
|-
| title      = Creatures in the {{#cargo_query:|tables=Factions|fields=CONCAT('[[',PlainName,'{{!}}',PlainName,']]')|where=PlainName='{{#replace:{{{1|}}}|'|\'}}'|limit=1|more results text=}} Faction
|style="padding:.5em 1em;" colspan="3"|This navbox lists all the [[:Category:Creatures|Creatures]] in Caves of Qud. 
| listclass  = hlist
|-
| state      = {{{state|collapsed}}}
! rowspan="1" width="16%"| [[Antelopes]]
| titlestyle = background:rgba(8,51,50,0.8); font-family:Source Code Pro;
! width="10%" style="background: #F0E68C; color: black;"| Common
| groupstyle = background:rgba(8,51,50,0.8); font-family:Source Code Pro;
| {{Creature navbox query|Antelopes}}
| liststyle = padding:0.6em;
|-
| innerstyle = font-family:Source Code Pro;
! rowspan="1" width="15%"| [[Apes]]
 
! width="10%" style="background: #F0E68C; color: black;"| Common
| group1 = {{#if: {{{splitbycategory|}}} | {{{categorytitle|{{{splitbycategory}}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| Unique }} }}
| {{Creature navbox query|Apes}}
| list1  = {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|category={{{splitbycategory}}}}} | {{Creature navbox query|{{{1|}}}|{{#ifeq:{{{2|}}}|uniquecommon|unique}}}} }}
|-
 
! rowspan="1" width="15%"| [[Arachnids]]
| group2 = {{#if: {{{splitbycategory|}}} | {{{noncategorytitle|General}}} | {{#ifeq:{{{2|}}}|uniquecommon| Common}} }}
! width="10%" style="background: #F0E68C; color: black;"| Common
| list2style = background:rgba(0,0,0,0.2);
| {{Creature navbox query|Arachnids}}
| list2= {{#if: {{{splitbycategory|}}} | {{Creature navbox query|{{{1|}}}|notcategory={{{splitbycategory}}}}} | {{#ifeq:{{{2|}}}|uniquecommon| {{Creature navbox query|{{{1|}}}|common}} }} }}
|-
}}</includeonly><noinclude>
! rowspan="1" width="15%"| [[Baboons]]
[[Category:Creature Navigation]]
! width="10%" style="background: #F0E68C; color: black;"| Common
Template that makes a navigation box for the specified faction. The first argument should be the Faction name.
| {{Creature navbox query|Baboons}}
 
|-
Optionally:
! rowspan="1" width="15%"| [[Baetyls]]
* A second argument of <code>uniquecommon</code> can be specified to separate the navbox into two rows; one for unique characters, one for non-unique characters.
! width="10%" style="background: #F0E68C; color: black;"| Common
* The following parameters can be specified to divide the navbox into two category-based rows:
| {{Creature navbox query|Baetyls}}
** <code>splitbycategory</code>: The category by which to split the navbox
|-
** <code>categorytitle</code>: Creatures that have the specified category as their primary (cargo-stored) category will be put in the first row of the navbox, and that row will have the title specified in this parameter
! rowspan="2" width="15%"| [[Barathrumites]]
** <code>noncategorytitle</code>: All other creatures (not in the specified category) will go into the second navbox row, and that navbox row will have the title specified here.
! width="10%" style="background: #F08080; color: white;" | Unique
=== Simple Case ===
| {{#cargo_query:table=CreatureFactions,GeneralData,_pageData|join on=CreatureFactions._pageName=GeneralData._pageName,_pageData._pageName=CreatureFactions._pageName|fields=CONCAT('[[File:',GeneralData.Image,'|16px]] [[',CreatureFactions._pageName,']]')|format=list|delimiter=<nowiki> - </nowiki>|where=Faction="Barathrumites" AND CreatureFactions._pageNamespace ='0' AND _categories HOLDS 'Unique_Characters'|order by=CreatureFactions._pageName|group by=CreatureFactions._pageName}}
<pre>{{Creature Navbox|Barathrumites}}</pre>
|-
{{Creature Navbox|Barathrumites}}
! width="10%" style="background: #F0E68C; color: black;"| Common
=== Unique / Common Case ===
|
<pre>{{Creature Navbox|Barathrumites|uniquecommon}}</pre>
|-
{{Creature Navbox|Barathrumites|uniquecommon}}
! rowspan="1" width="15%"| [[Bears]]
=== Category-Divided Case ===
! width="10%" style="background: #F0E68C; color: black;"| Common
<pre>{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}</pre>
| {{Creature navbox query|Bears}}
{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}
|-
</noinclude>
! rowspan="1" width="15%"| [[Beasts]]
! width="10%" style="background: #F08080; color: white;" | Unique
| {{Creature navbox query|Beasts}}
|-
! rowspan="1" width="15%"| [[Birds]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Birds}}
|-
! rowspan="1" width="15%"| [[Cannibals]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Cannibals}}
|-
! rowspan="1" width="15%"| [[Cats]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Cats}}
|-
! rowspan="1" width="15%"| [[Children of Mamon]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Children of Mamon}}
|-
! rowspan="1" width="15%"| [[Consortium of Phyta]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Consortium of Phyta}}
|-
! rowspan="1" width="15%"| [[Crabs]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Crabs}}
|-
! rowspan="1" width="15%"| [[Cragmensch]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Cragmensch}}
|-
! rowspan="1" width="15%"| [[Dogs]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Dogs}}
|-
! rowspan="1" width="15%"| [[Dromad merchants]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Dromad merchants}}
|-
! rowspan="1" width="15%"| [[Equines]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Equines}}
|-
! rowspan="1" width="15%"| [[Farmers' Guild]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Farmers' Guild}}
|-
! rowspan="1" width="15%"| [[Fellowship of Wardens]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Fellowship of Wardens}}
|-
! rowspan="1" width="15%"| [[Fish]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Fish}}
|-
! rowspan="1" width="15%"| [[Flowers]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Flowers}}
|-
! rowspan="1" width="15%"| [[Frogs]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Frogs}}
|-
! rowspan="1" width="15%"| [[Fungi]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Fungi}}
|-
! rowspan="1" width="15%"| [[Girsh]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Girsh}}
|-
! rowspan="1" width="15%"| [[Glow-Wights]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Glow-Wights}}
|-
! rowspan="1" width="15%"| [[Goatfolk]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Goatfolk}}
|-
! rowspan="1" width="15%"| [[Grazing hedonists]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Grazing hedonists}}
|-
! rowspan="1" width="15%"| [[Hermits]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Hermits}}
|-
! rowspan="1" width="15%"| [[Highly entropic beings]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Highly entropic beings}}
|-
! rowspan="1" width="15%"| [[Hindren of Bey Lah]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Hindren of Bey Lah}}
|-
! rowspan="1" width="15%"| [[Insects]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Insects}}
|-
! rowspan="1" width="15%"| [[Issachari tribe]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Issachari tribe}}
|-
! rowspan="2" width="15%"| [[Mechanimists]]
! width="10%" style="background: #F08080; color: white;" | Unique
|  {{#cargo_query:table=CreatureFactions,GeneralData,_pageData|join on=CreatureFactions._pageName=GeneralData._pageName,_pageData._pageName=CreatureFactions._pageName|fields=CONCAT('[[File:',GeneralData.Image,'|16px]] [[',CreatureFactions._pageName,']]')|format=list|delimiter=<nowiki> - </nowiki>|where=Faction="Mechanimists" AND CreatureFactions._pageNamespace ='0' AND _categories HOLDS 'Unique_Characters'|order by=CreatureFactions._pageName|group by=CreatureFactions._pageName}}
|-
! width="10%" style="background: #F0E68C; color: black;"| Common
|
|-
! rowspan="1" width="15%"| [[Merchants' Guild]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Merchants' Guild}}
|-
! rowspan="1" width="15%"| [[Mollusks]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Mollusks}}
|-
! rowspan="1" width="15%"| [[Mysterious strangers]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Mysterious strangers}}
|-
! rowspan="1" width="15%"| [[Naphtaali tribe]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Naphtaali tribe}}
|-
! rowspan="1" width="15%"| [[Oozes]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Oozes}}
|-
! rowspan="1" width="15%"| [[Pariahs]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Pariahs}}
|-
! rowspan="1" width="15%"| [[Putus Templar]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Putus Templar}}
|-
! rowspan="1" width="15%"| [[Robots]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Robots}}
|-
! rowspan="1" width="15%"| [[Roots]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Roots}}
|-
! rowspan="1" width="15%"| [[Seekers of the Sightless Way]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Seekers of the Sightless Way}}
|-
! rowspan="1" width="15%"| [[Snapjaws]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Snapjaws}}
|-
! rowspan="1" width="15%"| [[Succulents]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Succulents}}
|-
! rowspan="1" width="15%"| [[Swine]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Swine}}
|-
! rowspan="1" width="15%"| [[Tortoises]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Tortoises}}
|-
! rowspan="1" width="15%"| [[Trees]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Trees}}
|-
! rowspan="1" width="15%"| [[Trolls]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Trolls}}
|-
! rowspan="1" width="15%"| [[Unshelled reptiles]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Unshelled reptiles}}
|-
! rowspan="1" width="15%"| [[Urchins]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Urchins}}
|-
! rowspan="1" width="15%"| [[Villagers of Joppa]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|villagers of Joppa}}
|-
! rowspan="1" width="15%"| [[Villagers of Kyakukya]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Villagers of Kyakukya}}
|-
! rowspan="1" width="15%"| [[Vines]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|Vines}}
|-
! rowspan="1" width="15%"| [[Water barons]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|water barons}}
|-
! rowspan="1" width="15%"| [[Winged mammals]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|winged mammals}}
|-
! rowspan="1" width="15%"| [[Worms]]
! width="10%" style="background: #F0E68C; color: black;"| Common
| {{Creature navbox query|worms}}
|-
|}
<span class="qud-box-footer-left"></span></div></div>
[[Category:Creatures]]<noinclude>[[Category:Navigation]]</noinclude>

Latest revision as of 17:06, 21 February 2022

Template that makes a navigation box for the specified faction. The first argument should be the Faction name.

Optionally:

  • A second argument of uniquecommon can be specified to separate the navbox into two rows; one for unique characters, one for non-unique characters.
  • The following parameters can be specified to divide the navbox into two category-based rows:
    • splitbycategory: The category by which to split the navbox
    • categorytitle: Creatures that have the specified category as their primary (cargo-stored) category will be put in the first row of the navbox, and that row will have the title specified in this parameter
    • noncategorytitle: All other creatures (not in the specified category) will go into the second navbox row, and that navbox row will have the title specified here.

Simple Case

{{Creature Navbox|Barathrumites}}

Unique / Common Case

{{Creature Navbox|Barathrumites|uniquecommon}}

Category-Divided Case

{{Creature Navbox|Robots|splitbycategory=Turrets|categorytitle=Turrets|noncategorytitle=General}}