Module:DinoIcon/doc

From ARK Wiki
Jump to navigation Jump to search

This is the documentation page for Module:DinoIcon

Template-info.png Documentation

This module handles recognition of creatures in {{ItemLink}}s and similar templates, and allows for dynamic, browser-side colorization of creature icons.

Configuration (and explanations of its fields) are found under Module:DinoIcon/config.

Requirements

The Entities Cargo table is leveraged. Additionally, creature infobox invokes this module to determine dynamic icon parameters, with the result stored in the Cargo table as an optimization.

Translators: your table definition and creature infobox must be updated to contain changes up to October 15th, 2023 for this module to fully work. After the templates are updated, recreate the Cargo table (the process may take up to an hour based on server load). Additionally, ItemLink and possibly other templates may need to be updated to leverage dynamic icons.

Matchers

The module performs three attempts at assigning a category to a creature:

  • "Rigged" matcher checks if the configuration provides a hard-wired result for the creature's article name.
  • Afterwards, creature's article name is compared against name patterns, which follow Lua's pattern format. The checking order is not guaranteed.
  • If the above two methods do not yield any results, finally, the creature's taxonomic groups are checked. The checking order is guaranteed to match the order in configuration.

File choice

In the rigged matcher, configured icon file is used. In other matchers, the icon file used will always be either the parent creature's name (if checked creature is a variant) or the checked creature's article name.