Lethal Company Wiki:WikiAutomated

Introduction edit

Manually filling Template:Infobox scraps or creating a loot table can be cumbersome. When it comes to internationaliztion, game version update, or some of the data needs to be updated, it can be more annoying to editors, translation admins, and translators.

Thus, we've made several pieces of script that aim to automate this process. We pull the core data out of the pages, and let those powerful scripts to automatically fill information for us. The benefits are:

  • Consistent data between pages

For example, both scrap's spawn chances table and moon's loot table should give the same result. If an editor only updated the loot table but forgot to update the spawn chances table, it might confuse readers, as they don't know which value is actually right. With the scripts, we only need to update the "root" of the data, and they will properly handle the rest of things.

  • Less pain for translators

Because of how mw:Extension:Translate works, it might take days or weeks to apply changes to translated pages, depending on when translation admins and translators are active. By using scripts to exclude these timeliness texts out of translation units, real-time data is guaranteed for both original and translated pages.

  • Automated updates

Once the scripts are included in the pages, no further manual actions are required. It will automatically render the newest data whenever the code updates.

Scripts edit

The scripts are divided into four parts: Module:Scraps, Module:Moons, Module:Rarities, and Module:Entities.

All the game data are stored under the /Data/v{GAME_VERSION} subpages, e.g. Module:Scraps/Data/v49.

The actual functions are maintained in different submodules, as those above only responsible for data API. All submodules are listed below:

Templates edit

  • Template:WikiAutomated/??Entities (indoor/nighttime/daytime): Wrappers of the Moons/AutoTables:entitiesSpawnChances

Internationalization edit

The i18n support is provided by Module:I18n. Check the module's documentation for details.