The new match system - A Developers Guide
Overview
[edit]This guide exists to give contributors a short and slightly simplified overview of the structure of the new match system.
For the sake of readability, this guide will ignore the following topics:
- Legacy-Wrappers (converting old match1 code into a readable format for the new Match-System) which exist on several wikis until all old inputs have been converted.
- Legacy storage (storing into the old deprecated match1 LPDB tables for sake of Backwards compatibility with old wiki specific modules and templates which use that data)
- Match Page support (Some wikis for who the shown MatchSummaries are not detailed enough the option for Match Pages was created. On those match pages additional data about the specific match is shown.)
- The usage of several additional Helper Modules and Libraries. (Honorable mentions: Module:Opponent, Module:OpponentDisplay, ...)
For more details on the used Modules you can check out our Lua-Modules git Repository
The input processing
[edit]MatchGroups (Brackets, Matchlists, SingleMatches, SingleGames) use Template:Match, which pipes the supplied arguments to Module:Match for an initial pre-processing.
Within the Match template several subtemplates (Map, LiteralOpponent, TeamOpponent, SoloOpponent, etc) are used. These subtemplates all json-ify the inputted args so they can be Json-parsed into a lua table in the input processing.
The input processing modules process the input. The input gets parsed, standardized, stored into LPDB and then passed to the display component modules. Template:Bracket, Template:Matchlist, Template:SingleMatch and Template:SingleGame invoke Module:MatchGroup.

The display components
[edit]The display component modules handle the display of the Brackets, Matchlists, SingleMatches and SingleGames. Entry points are either the passed data from the input processing (after the data was stored) or one of Template:ShowBracket, Template:ShowSingleMatch or Template:SingleGame which query the data from LPDB for a given id (plus matchId and gameId where applicable) via an invoke to MatchGroup.

Other Modules
[edit]In addition to the input (pre-) processing and display components modules several more modules are used.
Commons bracket pages
[edit]Commons bracket pages like e.g. Template:Bracket/8 use Template:BracketDocumentation and Template:TemplateMatch, which use Module:Bracket/Template to store the base LPDB data for the brackets and generate the Documentation for the bracket pages.
Copy-Paste Code Forms
[edit]Copy-Paste Forms are optional but highly recommended. They generate (as the name suggests) copy-paste code for bracket and matchlist usage.
The Forms can be used via the according Special:RunQuery pages.
- Form:BracketCopyPaste uses Template:GetBracketCopyPaste
- Form:MatchListCopyPaste uses Template:GetMatchListCopyPaste
- Form:SingleMatchCopyPaste uses Template:GetSingleMatchCopyPaste
- Form:MatchPageCopyPaste uses Template:GetMatchPageCopyPaste
Modules
[edit]The four above mentioned templates invoke Module:GetMatchGroupCopyPaste, which provides the base structure for the copy-paste generation.
GetMatchGroupCopyPaste uses the wiki based modules Module:BracketAlias and Module:GetMatchGroupCopyPaste/wiki. The later one defines the generation for maps, opponents and some other features. It uses the commons based Module:GetMatchGroupCopyPaste/wiki/Base as a basis and fallback for functions that do not get defined in the wiki specific module.
Templates
[edit]This section contains a list of templates and a short description for each.
| Template | Description |
|---|---|
| Match | Invokes Module:Match |
| Bracket | Invokes Module:MatchGroup as a bracket. |
| MatchList | Invokes Module:MatchGroup as a matchlist. |
| SingleMatch | Invokes Module:MatchGroup as a single match. |
| SingleGame | Invokes Module:MatchGroup as a single game. |
| Map | A map of a match. |
| TeamOpponent | A team opponent of a match. |
| SoloOpponent | A Solo opponent of a match. |
| BracketDocumentation | Creates documentation for a bracket template. |
| TemplateMatch | Stores a template match to the LPDB. |
| ShowBracket | Displays a given bracket. |
| ShowSingleMatch | Displays a given single match. |
| ShowSinglegame | Displays a given single game. |
Configuration
[edit]BracketConfig
[edit]Module:Info handles the default configuration of each bracket. Data that can be set:
| Key | Default | Description |
|---|---|---|
| headerHeight | 25 | Height of a header in px. |
| matchWidth | 120 | Width of a match in px. A bracket reset extends the match width by scoreWidth. |
| scoreWidth | 20 | Width of the score display. |
| matchWidthMobile | 60 | Width of the match if shown on mobile. |
| opponentHeight | 24 | Width of the score display. |