Template:ArmorTable: Difference between revisions
imported>Aramachus m included horizon changes by section rather than template call to distinguish no changes from unknown |
imported>Aramachus m added tags like rare ex to the name column, if they are given in the item statistics template of the respective item |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 14: | Line 14: | ||
|title = {{{title5|}}} |
|title = {{{title5|}}} |
||
|title = {{{title6|}}} |
|title = {{{title6|}}} |
||
|title = {{{title7|}}} |
|||
|title = {{{title8|}}} |
|||
|title = {{{title9|}}} |
|||
|title = {{{title10|}}} |
|||
|count = {{{count|}}} |
|count = {{{count|}}} |
||
|include={{#if:{{{tooltip|}}}|{Item Statistics¦Item_Tooltip.dpl}|{Item Statistics} |
|include={{#if:{{{levelrange|}}}|{Item Statistics}.hidebylevel¦phantom_arg={{{levelrange}}},}}{{#if:{{{tooltip|}}}|{Item Statistics¦Item_Tooltip.dpl}|{Item Statistics¦NameWithTags.dpl}<!---->}},{Item Statistics¦ArmorTable.dpl},##Horizon Changes.* |
||
|includematch = {{#if:{{{job|}}}|/jobs\s*=.*\[\[{{{job}}}\]\].*¦jobs\s*=\s*All\sJobs\s*¦(?s)^((?!jobs).)*$/|/.*/}} |
|includematch = {{#if:{{{job|}}}|/jobs\s*=.*\[\[{{{job}}}\]\].*¦jobs\s*=\s*All\sJobs\s*¦(?s)^((?!jobs).)*$/|/.*/}} |
||
|table=class="horizon-table {{{cssclasses|}}} sortable",-,Name,Level,Slot,Jobs,Stats,Horizon Changes {{changes}} |
|table=class="horizon-table tight-list {{{cssclasses|gear-table}}} sortable",-,Name,Level,Slot,Jobs,Stats,Horizon Changes {{changes}} |
||
|tablesortcol=2 |
|tablesortcol={{#if:{{{levelrange|}}}|3|2}} |
||
}}{{#if:{{{collapse|}}}|</div><br>}}<!-- |
}}{{#if:{{{collapse|}}}|</div><br>}}<!-- |
||
--></onlyinclude></includeonly> |
--></onlyinclude></includeonly> |
||
| Line 25: | Line 29: | ||
Syntax: |
Syntax: |
||
<pre>{{ArmorTable|cat1|...|notcat1|...|title1|...|job|collapse|cssclasses|tooltip|count}}</pre> |
<pre>{{ArmorTable|cat1|...|notcat1|...|title1|...|job|levelrange|collapse|cssclasses|tooltip|count}}</pre> |
||
*Use cat1, cat2, cat3 to include required categories |
*Use cat1, cat2, cat3 to include required categories |
||
:(note: you can use <nowiki>{{!}}</nowiki> to use a logical OR in a category) |
:(note: you can use <nowiki>{{!}}</nowiki> to use a logical OR in a category) |
||
*Use notcat1, notcat2, notcat2 to exclude categories |
*Use notcat1, notcat2, notcat2 to exclude categories |
||
*Use title1, title2, ..., |
*Use title1, title2, ..., title10 to include specific pages |
||
*Use job to include only gear by job XXX |
*Use job to include only gear by job XXX |
||
*Use levelrange to include gear in a given level range. Use a minus to separate min and max level like: ''30-40'' |
|||
*Use collapse to make the table collapsible. collapse=collapsed makes it collapsed by default. collapse=expand to make it expanded by default. (collapsed is also the default when entering anything else for the collapse parameter). |
*Use collapse to make the table collapsible. collapse=collapsed makes it collapsed by default. collapse=expand to make it expanded by default. (collapsed is also the default when entering anything else for the collapse parameter). |
||
*cssclasses can be used to add additional classes to the table. The most common usage here is add a color class to the table. |
*cssclasses can be used to add additional classes to the table. The most common usage here is add a color class to the table. |
||
| Line 51: | Line 56: | ||
===Example 2=== |
===Example 2=== |
||
Syntax: |
Syntax: |
||
<pre>{{ArmorTable|cat1=Artifact Armor|job=WHM|tooltip=true}}</pre> |
<pre>{{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}}</pre> |
||
Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. Will also display the item image as tooltip when hovering over the name. |
Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. Will also display the item image as tooltip when hovering over the name. The css classes give the table the colors of the "gear-table" class as well as hide the fourth column (jobs), e.g. for display in a list about WHM gear where it isn't necessary to show the jobs of each piece. |
||
{{ArmorTable|cat1=Artifact Armor|job=WHM|tooltip=true}} |
{{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}} |
||
===Example 3=== |
===Example 3=== |
||
Syntax: |
Syntax: |
||
<pre>{{ArmorTable|cat1=Body|job=BLM|collapse=collapsed}}</pre> |
<pre>{{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapsed}}</pre> |
||
Will give out all body pieces equippable by BLM in a collapsible table that is collapsed by default. |
Will give out all body pieces equippable by BLM in the level range 70-75 in a collapsible table that is collapsed by default. |
||
{{ArmorTable|cat1=Body|job=BLM|collapse=collapse}} |
{{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapse}} |
||
===Example 4=== |
===Example 4=== |
||
Latest revision as of 00:24, 7 January 2026
Usage
Wrapper Template to generate lists of armor based on categories.
Syntax:
{{ArmorTable|cat1|...|notcat1|...|title1|...|job|levelrange|collapse|cssclasses|tooltip|count}}
- Use cat1, cat2, cat3 to include required categories
- (note: you can use {{!}} to use a logical OR in a category)
- Use notcat1, notcat2, notcat2 to exclude categories
- Use title1, title2, ..., title10 to include specific pages
- Use job to include only gear by job XXX
- Use levelrange to include gear in a given level range. Use a minus to separate min and max level like: 30-40
- Use collapse to make the table collapsible. collapse=collapsed makes it collapsed by default. collapse=expand to make it expanded by default. (collapsed is also the default when entering anything else for the collapse parameter).
- cssclasses can be used to add additional classes to the table. The most common usage here is add a color class to the table.
- use the tooltip parameter to display image tooltips when hovering over the item names. Set to anything to enable, e.g. tooltip=true.
- (The count parameter is mainly used for testing)
- Also: count does not work with job parameter since the job parameter seems to filter after generating the list and after the count parameter cropped the list.
Examples
Some Example tables have been limited to output only 5 items (through the optional parameter count=5) because they serve only as examples. The syntax shown in the examples would generate the full tables.
Example 1
Syntax:
{{ArmorTable|cat1=Artifact Armor|cat2=Feet|notcat1=White Mage}}
Will give out all pieces of armor which are categorized as "Artifact Armor" and "Feet" while excluding those, which are categorized as "White Mage". ("All AF Feet except WHM feet")
Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'ecl1.cl_to' in 'WHERE' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Artifact_Armor'))) JOIN `categorylinks` `cl2` ON (((p.page_id = cl2.cl_from) AND (cl2.cl_to = 'Feet'))) LEFT JOIN `categorylinks` `ecl1` ON (((p.page_id = ecl1.cl_from) AND (ecl1.cl_to = 'White_Mage'))) WHERE p.page_is_redirect = 0 AND ecl1.cl_to IS NULL LIMIT 5 </code>
Example 2
Syntax:
{{ArmorTable|cat1=Artifact Armor|job=WHM|cssclasses=gear-table hide-col-4|tooltip=true}}
Will give out all pieces of armor which are categorized as "Artifact Armor" and have "WHM" (or "all") in their job list. Will also display the item image as tooltip when hovering over the name. The css classes give the table the colors of the "gear-table" class as well as hide the fourth column (jobs), e.g. for display in a list about WHM gear where it isn't necessary to show the jobs of each piece.
Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'cl1.cl_to' in 'ON' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Artifact_Armor'))) WHERE p.page_is_redirect = 0 LIMIT 500 </code>
Example 3
Syntax:
{{ArmorTable|cat1=Body|job=BLM|levelrange=70-75|collapse=collapsed}}
Will give out all body pieces equippable by BLM in the level range 70-75 in a collapsible table that is collapsed by default.
Extension:DynamicPageList4 (DPL4), version 4.0.0: Error: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable: The DynamicPageList4 extension (version 4.0.0) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DynamicPageList4 or an error that you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy <code>*?</code> matching patterns are not supported.<br/>The error message was:<br/><code>Error 1054: Unknown column 'cl1.cl_to' in 'ON' Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Template:ArmorTable Query: SET STATEMENT max_statement_time=10 FOR SELECT DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title` FROM `page` `p` JOIN `categorylinks` `cl1` ON (((p.page_id = cl1.cl_from) AND (cl1.cl_to = 'Body'))) WHERE p.page_is_redirect = 0 LIMIT 500 </code>
Example 4
Syntax:
{{ArmorTable|title1=Evoker's Spats|title2=Evoker's Horn|cssclasses=jobs-table table-md}}
Will give out a list of those two specified items using the css styles of "jobs-table" (for color) and "table-md" (for size).
| Name | Level | Slot | Jobs | Stats | Horizon Changes
|
|---|---|---|---|---|---|
| Evoker's Spats |
52 | Legs | {{#replace:{{#replace:{{#replace:SMN| | }}| | }}|]]/|]]/ |
{{#replace:{{#replace:DEF: 25 MP +15 Evasion skill +10 Avatar: Enhances accuracy Enmity -2| | }}| | }} |
none
|
| Evoker's Horn |
60 | Head | {{#replace:{{#replace:{{#replace:SMN| | }}| | }}|]]/|]]/ |
{{#replace:{{#replace:DEF: 15 MP +20 INT +3 Summoning Magic Skill +5 Avatar: Enmity -3| | }}| | }} |
none
|
