Module:Availability/Data/doc
This is the documentation page for Module:Availability/Data
Module documentation (view)
Usage
This is the subpage for Module:Availability, and stores the data needed for the module to function and outputs the availability of each source.
Inserting a new source/availability
["name_of_source"] = { "source_image", "source_image_size", "link_to_source", "name_of_source", "special_text_for_source" }
When adding a new source or availability to be used on pages, the following syntax must be inserted into the main data
table on Module:Availability/Data. Note that this should not be done to villagers; they are separately called in the template via its own section in the Lua module.
name_of_source
describes the name of the source that the editor will write in the Availability template. There is also a second instance ofname_of_source
, which can also feature a different text to its first instance. To use thespecial_text_for_source
parameter for certain instances (e.g. Paradise Planning office and Snake's Ninja Cookie), leave the second instance blank.source_image
requires an image (preferably an icon) to be added. It must include the filename extension.source_image_size
describes the default size thatsource_image
will be presented in.link_to_source
describes the link that the player will click on (provided that the link is present). To use thespecial_text_for_source
parameter for certain instances (e.g. Paradise Planning office and Snake's Ninja Cookie), leave this blank.special_text_for_source
is optional, and is used to display specialized wikitext.
Each source must then be added under their appropriate section.
Example
["Isabelle"] = { "Isabelle NH Character Icon.png", "22px", "Isabelle", "Isabelle", "[[Isabelle]]" }
"Isabelle" is the name_of_source
in both instances that it appears. "Isabelle" is also the link_to_source
and has a special wikitext presented in special_text_for_source
, although it will be unused in this instance. Its source_image
is "Isabelle NH Character Icon.png", and the source_image_size
is set to "22px".
The output is: Isabelle
["Punchy's Crunch Cookie"] = { "Punchy's Crunch Cookie PC Icon.png", "20px", "", "", "Punchy's Crunch Cookie" }
"Punchy's Crunch Cookie" is the name_of_source
, but it is blank in its second instance, along with its link_to_source
. Its source_image
is "Punchy's Crunch Cookie PC Icon.png", and the source_image_size
is set to "20px". Its special_text_for_source
is simply "Punchy's Crunch Cookie", and will provide no links at all.
The output is: Punchy's Crunch Cookie