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
Affects templates such as ep, ep ref, ep time, and Infobox Episode.

New episode announced
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  field.

Episode VOD released on Twitch
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
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
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.

New arc
Arc information is not yet added to Module:Ep/Decoder, but there are plans to do so. This info needs to be added to Appearance logic, which uses arcs to determine which works a character has appeared in.

New campaign or series
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
Affects templates such as comic and {tl|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".

Expanding the kinds of information stored in arrays
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.