Template:Gallery List/v2/Documentation

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search
This article is a work in progress.
This pagesection is a work in progress.
The editors are working to update all pertinent information as soon as possible.
Zelda Wiki apologizes for any incomplete or missing information.

Purpose

A new version of Template:Gallery List with proposed improvements to syntax and functionality.

Changes
ChangeRationaleExamples

Added support for unnamed entities

It should be possible to list unnamed characters, enemies, etc. alongside named ones.

Added support for pipe links and word-ending links

The previous version of this template did not support custom link text, which could be limiting in certain cases.

By design, all list entries in v2 must be internal links, with the exception of unnamed entities. Though slightly more verbose, this simplifies both the usage and code implementation of the template. It removes the dependency on Module:Term Lite. It also enables editors to use the existing autocompletion tools available for internal links.

Removed support for multiple games

The vast majority of template uses are for a single game. When game tabs are needed, this template can be composed with Template:Game Tabs.

Not Applicable

Removed support for custom file names with [File:]

Based on a cursory survey of articles using this functionality, most if not all would be better served by:

  • using a file modifier
  • renaming the file to match the standard format
  • using ordinary <gallery> tags
Not Applicable

Removed [Qty:] tag

We already have {{Qty}} for this purpose.

Not Applicable

Created {{Has}} to replace {{Equipment}}

The new template addresses the issues raised at Template talk:Equipment.

Replaced [Sublocation:] tag with derived parameter and Template:Derived From

The syntax in v1 is awkward and more verbose than it needs to be. In terms of stored data, it is not necessary for entries to be associated to their specific sublocations. Having a separate section for derived entries is sufficient for solving the problem at hand, i.e. ensuring only the sublocation appears in Template:Spawn Locations. (The sublocations can still be identified using source comments, as shown in the examples.)

Template:Derived From replaces the automatic hatnote listing sublocations. It can be used alongside Template:Treasure Chests and any other templates where the concept of derivation may apply.

Removed support for "quoted number" tag (see Quiver example in Template:Gallery List#Variants)

Not enough need to justify additional complexity. This functionality is only used on Items in Phantom Hourglass and Items in Spirit Tracks. The problem there could instead be solved by moving the files, to say, File:ST Quiver Icon 2.png (or creating a redirect) and using the usual number tag.

Not Applicable

Usage

Required ParametersAll Parameters
{{Gallery List/v2|||
 *
}}
{{Gallery List/v2|||
 *
|derived=
 *
}}
ParameterRequired?Description
1 (game)
RequiredA game code.
2 (category)
RequiredA content category name such as Characters, Enemies, Items, Objects, etc.
3 (list)
RequiredBullet list of links. Each link becomes an entry in the resulting gallery. The filename is automatically generated from the name of the linked page. The filename can be modified by appending a file modifier. Additional information such as auxiliary templates and list notes can also be appended, after any file modifiers.
derived
OptionalBullet list of links indicating which of the above entries are derived.

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
game1

A [[:Category:Game codes|game code]].

Contentoptional
category2

A [[:Category:Content by Type|content category name]] such as <code>Characters</code>, <code>Enemies</code>, <code>Items</code>, <code>Objects</code>, etc.

Contentoptional
list3

[[Guidelines:Templates#Lists|Bullet list]] of links. Each link becomes an entry in the resulting gallery. The filename is automatically generated from the name of the linked page. The filename can be modified by appending a [[#File modifiers|file modifier]]. Additional information such as [[#Auxiliary templates|auxiliary templates]] and [[Template:List Note|list notes]] can also be appended, after any file modifiers.

Contentoptional
derivedderived

[[Guidelines:Templates#Lists|Bullet list]] of links indicating which of the above <code>entries</code> are [[#Derived entries|derived]].

Contentoptional

File modifiers

For a given entry in a Gallery List, the automatically generated filename can be modified to display an unnamed variant, such as File:TLoZ Keese Sprite 2.png or File:TLoZ Keese Vire Sprite.png. To do so, place the variant name or number in single square brackets immediately after the subject. Leave a space between the subject and the modifier.

For entities which are only mentioned in text and have no image, place [No Image] after the subject to display File:No Image.png.

Input Generated Filename
Game Category Entry
TLoZ Enemies [[Keese]] [2] File:TLoZ Keese Sprite 2.png
TLoZ Enemies [[Keese]] [Vire] File:TLoZ Keese Vire Sprite.png
FSA Characters Unnamed [2] File:FSA Unnamed Character Sprite 2.png
TMC Objects [[Hyper Pico Bloom]] [No Image] File:No Image.png

Auxiliary templates

Main articles: Template:Has and Template:Qty

{{Has}} and {{Qty}} are auxiliary templates that can be used to add specific details to entries in a Gallery List. While any text or template can be appended to a list entry for additional details (list notes, namely), Gallery List is specifically aware of auxiliary templates and uses their output to perform additional computations.

Gallery List reads the output from Qty and stores that quantity amount in the LocationFeatures Cargo table. This is also done for Has. In addition, Gallery List transforms Has by taking its arguments, as well the value of its own game parameter, and passing that to Template:Type Icon. Has is merely a shorthand for Type Icon that works specifically within Gallery List. This is to save editors from having to repeat the same game argument to Type Icon, which is already provided to the surrounding Gallery List.

Derived entries

On some location pages, Gallery Lists contain entries that are actually located in named sub-areas of the given location. For example, Forest Temple#Ocarina of Time lists all enemies that appear in the dungeon, including those which appear specifically in the dungeon's East Courtyard, West Courtyard, and Stone Tower.

An entry may be fully derived or partially derived. An entry is fully derived if all of its Qty comes from sub-areas. The entry is partially derived if some but not all of its Qty comes from sub-areas, meaning that the remaining quantity is located in parts of the dungeon that are not specifically named. If an entry is fully derived, then the location page is not added as a spawn location for that item/enemy/object because the spawn list should already include all the specific sub-areas where that thing spawns. However, if the entry is partially derived, then the broader location is also stored as a spawn location because the thing is not exclusive to the sub-areas.

The derived parameter is used to determine which entries are partially or fully derived. Simply copy-paste the Gallery List entries from all the sub-area articles.[note 1] As shown in example 9, use source comments to let editors know which pages they were copied from. Add {{Derived}} on a separate line above the Gallery List to let readers know which locations are being derived from.

Note that if two of the same entry have different things, they are considered different entries for the calculation of partial or full derivation.

Examples

InputOutput
Anouki Village inhabitants – simple usage
{{Gallery List/v2|ST|Characters|
 * [[Bulu]]
 * [[Honcho]]
 * [[Kofu]]
 * [[Noko]]
 * [[Yefu]]
 * [[Yeko]]
}}
Pipe links and word-ending links are supported. The linked page name is used for the file name.
{{Gallery List/v2|TLoZ|Enemies|
 * [[Zora (Enemy)|Zora]]
}}
{{Gallery List/v2|FSA|Enemies|
 * [[Bomb]]s
}}
Enemies in The Legend of Zelda#Keese – File modifiers
{{Gallery List/v2|TLoZ|Enemies|
 * [[Keese]]
 * [[Keese]] [2]
 * [[Keese]] [3]
 * [[Keese]] [Vire]
}}
Objects in The Minish Cap#Pico Blooms[No Image] file modifier
{{Gallery List/v2|TMC|Objects|
 * [[Blue Pico Bloom]]
 * [[Cyber Pico Bloom]] [No Image]
 * [[Hyper Pico Bloom]] [No Image]
}}
Agaat Canyon Mine#Enemies - Auxiliary templates {{Has}} and {{Qty}} are placed after file modifiers.
{{Gallery List/v2|TotK|Enemies|
 * [[Blue Bokoblin]] [3] {{Qty|1}}{{Has|[[Spiked Boko Bow]], [[Horn]]}}
 * [[Ice Keese]] [2] {{Qty|2}}
 * [[Ice Like]] [2] {{Qty|2}}
 * [[Ice-Breath Lizalfos]] [2] {{Qty|1}}{{Has|[[Freezing Stick]]}}
 * [[Silver Bokoblin]] [3] {{Qty|1}}{{Has|[[Rock Hammer]], [[Rock Armor]]}}
 * [[Silver Bokoblin]] [4] {{Qty|2}}{{Has|[[Rock Hammer]], [[Rock Armor]], [[Zonaite]]}}
}}
Mountain Passage#Enemies – Additional information such as list notes can also be added.
{{Gallery List/v2|PH|Enemies|
 * [[Keese]] {{Qty|11}}
 * [[Red Chuchu]] {{Qty|10}}
 * [[Rat]] {{Qty|6}}
 * [[Rat]] {{Qty|1}}{{List Note|Does not [[Zelda Wiki:Glossary#Reappear|reappear]].}}{{Has|[[Small Key]]}}
 * [[Rope]] {{Qty|5}}{{List Note|Only [[Zelda Wiki:Glossary#Spawn|spawn]] if the {{Plural|PH|Lever Switch|link}} are pulled in the wrong order.}}
}}
{{List Notes}}
Characters in Echoes of Wisdom#Suthorn Village – Unnamed characters
{{Gallery List/v2|EoW|Characters|
 * [[Jacint]]
 * [[Oethera]]
 * [[Verley]]
 * Unnamed [7]
 * Unnamed [8]
 * Unnamed [80]
 * Unnamed [81]
 * Unnamed [88]
}}
Forest Temple#Enemies - derived parameter. Forest Temple is not stored as a spawn location for Big Deku Baba because its total quantity (3) equals the sum of its derived quantities (2 in West Courtyard + 1 in East Courtyard). All Deku Babas are in either the East Courtyard or the West Courtyard. Conversely, the page is stored as a spawn location for Blue Bubble because not all of them appear in specific named areas within the Forest Temple.
{{Derived From|[[East Courtyard]], [[Stone Tower]], [[West Courtyard]]}}
{{Gallery List/v2|OoT|Enemies|
 * Big Deku Baba {{Qty|3}}
 * Blue Bubble {{Qty|7}}
 * Deku Baba {{Qty|1}}
|derived= 
 <!-- East Courtyard -->
 * [[Big Deku Baba]] {{Qty|1}}
 * [[Deku Baba]] {{Qty|1}}
 
 <!-- Stone Tower -->
 * [[Blue Bubble]] {{Qty|3}}
 
 <!-- West Courtyard -->
 * [[Big Deku Baba]] {{Qty|2}} 
}}

Template:Derived From

Notes

  1. It would be nice if the template could simply calculate the derivations given the names of the sub-areas, pulling the information from these pages automatically instead of editors having to copy-paste content. However, this becomes difficult to implement when conditions are taken into account. The time cost may also be too great.
This is the documentation page, it should be transcluded into the main template page. See here for more information.