FGO reader JP server
Reading pageTemplate:Inum/Draft

Module:Servant Icon/doc

Cached copy of the original page · revision 1657505 · refresh

This is the documentation page for Servant Icon.
It contains usage information, categories, and other content not part of the original module page.
Emoji Guako Angry
This Lua module is used primarily on pages in the Main namespace. It can be found on 8,955 pages, or on about 67.31% of those pages.
Edits to this Lua module will be widely noticed. To avoid large-scale disruption and unnecessary server load, any changes to this Lua module should be tested in its sandbox or testcases subpages. The tested changes can then be added to this page in one single edit by an administrator or Content Moderator.
Please consider discussing any changes in the wiki's Discord.

Module for {{Servant Icon}}. Turns a Servant's article name into that Servant's icon.

The file name is built from the Servant's collection number and the requested Ascension stage, with the number padded to three digits: id 472 at stage 1 gives File:S472A1Icon.webp. stage=cos1 yields C1 in place of A1, rawimage=y appends Raw, and an entry carrying iconFile replaces the generated name outright.

Nothing here produces a red link on bad input. A stage the Servant does not have falls back to stage 1, and an article name missing from the data falls back to the Unknown Servant entry. That is what makes these suffixes safe to pass to any Servant:

Uses Module:Arguments, Module:Yesno.

To update:

Parameters are documented at Template:Servant Icon. In articles the module is normally reached through the per-Servant templates, e.g. {{Nero Claudius}}, which call the fromTemplate entry point. It takes the Servant from the template's own name and the size from its first argument, and passes every other argument on.