Template:Tiered Body Part Equipment Navbox: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(tweak query to include black mote)
 
Line 14: Line 14:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=1 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=1 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 28: Line 28:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=2 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=2 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 42: Line 42:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=3 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=3 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 56: Line 56:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=4 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=4 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 70: Line 70:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=5 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=5 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 84: Line 84:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=6 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=6 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 98: Line 98:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)=7 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)=7 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName
Line 112: Line 112:
   | join on  = IT.ObjectID=GD.ObjectID  
   | join on  = IT.ObjectID=GD.ObjectID  
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | fields    = CONCAT('{{(}}favilink id{{!}}',GD.ObjectID,'{{)}}')=Page
   | where    = COALESCE(GD.Tier,1)>=8 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Weight <> '' AND Skill <> 'Shield'
   | where    = COALESCE(GD.Tier,1)>=8 AND WornOn='{{{bodypart|Body}}}' AND GD._pageNamespace='0' AND Skill <> 'Shield'
   | format    = list
   | format    = list
   | order by  = GD.PlainName
   | order by  = GD.PlainName

Latest revision as of 21:48, 22 December 2022

Generic template wrapper for a tiered body part equipment navbox for the specified body part. Excludes shields and bucklers from the navbox by default.

parameter description
navboxname Name of the navbox. Should match the navbox page name excluding the " Navbox" part at the end. For example, "Template:Body Armor Navbox" should have this set to "Body Armor".
navboxtitle Optional. User-friendly navbox title. Defaults to navboxname if not specified.
bodypart The body part that will be used for cargo queries, such as "Head" or "Body".
category The associated category to link to. For example, the Body Armor Navbox sets this to "Armor", which results in a link to Category:Armor.
seealso Optional. An additional link that should be pre-pended to the default list of "see also:" links. See Template:Floating Nearby Objects Navbox for an example of this in use.

Example:

{{Tiered Body Part Equipment Navbox|category=Head Equipment|bodypart=Head|navboxname=Head Equipment}}

Result: