Help:Maintaining data modules
Maintaining the ecosystem of modules about episodes and published works allows critical templates to function correctly by utilizing Lua data arrays. The following sections describe how to keep this array information up-to-date in common scenarios where new Critical Role content becomes available.
Episodic content[edit source]
Affects templates such as {{ep}}, {{ep ref}}, {{ep time}}, and {{Infobox Episode}}.
New episode announced[edit source]
Add a new top-level entry for the episode to Module:Ep/Array directly after the previous one in the series. If it's a campaign episode, you can add 10-20 episodes to the array in advance, using placeholder titles like "Campaign 3 Episode 70". Then create a new article named after the episode title using {{New episode}} to pre-format it and be sure to include the new episode code in the epCode
field.
Episode VOD released on Twitch[edit source]
Add the link to the Twitch VOD to Module:Ep/Twitchoffset, as well as the duration in minutes and seconds from the beginning of the video to the fade-in after the pre-show countdown, where the YouTube VOD will start. This allows editors to use Twitch times in {{ep ref}} in addition to YouTube.
Episode VOD released on YouTube[edit source]
Run the Pywikibot VOD script. This allows you to extract the thumbnail and transcript from the video based on its YouTube ID, as well as automatically populating the relevant data modules such as Module:Ep/YTURLSwitcher/URLs and Module:AirdateOrder/Array. See the script's help page for the full list of tasks it can perform.
New season[edit source]
When a new season of an existing show like The Legend of Vox Machina is announced, add it to the relevant 'seasons' section in Module:Ep/Decoder. If there won't be a page for the season, leave that part blank. This is necessary to ensure the {{Infobox Episode}} display is correct, as well as its automatic category assignments.
Sometimes the show already has released episodes and season dividers are subsequently introduced, as happened with Candela Obscura. In this case,
- Update the epCode format (e.g.,
COx01
toCO1x01
) in:- Module:Ep/Array
- Existing episodes' individual pages infoboxes
epCode
field - any linked data modules, like for youtube urls
- Add a
seasons
section to the array for that episode prefix in Module:Ep/Decoder. Add custom fields for each season as needed if they don't follow the "Season 1" naming format, or have special linked season pages.
New arc[edit source]
Arc information for each campaign is in an arcs
array in Module:Ep/Decoder. Each arc has a number, name, and specifies its range of episode numbers. A new arc array can be added following the format of the other arcs. This info still needs to be added to {{Appearance}} logic, which uses arcs to determine which appearance categories to place a character in.
New campaign or series[edit source]
Figure out a short format for the show's episode codes based on its title, such "CO" for "Candela Obscura" or "3" for "Campaign 3". Add a new top-level entry to Module:Ep/Decoder using that shortcode as the array key. While not required, consider ensuring that this data functions as expected in commonly-used templates by adding new testcases for Ep, Ep ref, Ep time, and Infobox Episode.
New printed works[edit source]
Affects templates such as {{comic}} and {{print ref}}. New works should be added to Module:Print ref/Array under the previous work of the same type: gn
(graphic novel), gn series
(graphic novel series), book
(including novels and CR sourcebooks), comic
, or dnd
(Dungeons & Dragons sourcebooks not produced by or affiliated with Critical Role). Most works should receive a new top-level entry. New numbered issues of an existing comic should be added to the appropriate work under "issues". If a new book is the latest out, it should receive the altTitle book latest
. If a graphic novel or comic issue is the latest comic released, it should receive the altTitle comic latest
.
Expanding the kinds of information stored in arrays[edit source]
Module:Ep/Decoder, Module:Ep/Array, and Module:Print ref/Array can be expanded to include new fields of information that other modules and templates can use. The base-level modules that interpret these data modules are Module:Ep/Matcher and Module:Ep/Info for episodes, and Module:Print ref/Matcher and Module:Print ref/Info for printed works. Any new fields in the data arrays will likely need to be added to one of those modules to ensure the data can be read.
As an example, when the codeFormat field was introduced to Ep/Decoder, an accompanying function "epCodeFormatted" was created in Ep/Info to interpret that field.