Squad Wiki Editorial/Cargo Maintenance
|Note: This page is used exclusively by the Squad Wiki Editorial for internal administration and maintence of Cargo - please do not edit.|
Introduction[edit | edit source]
Cargo tables are a very powerful tool for easier wiki maintenence. Cargo tables allow the automatic re-use of their data on many wiki pages. Therefore, we only have to update the Cargo data and all wiki pages are automatically updated with the latest data. Sweet!
There are two ways to get data into Cargo tables:
- If you include a infobox template with Cargo commands (example: Template:Map infobox), any wiki editor can enter the data into the infobox by editing that page. Upon saving the page edit, the data is automatically saved to the Cargo table.
- We have created the Squad Wiki Pipeline: Map Data (in short: Pipeline) to automatically export map related data from the Squad SDK and important it directly into Cargo tables.
Similarly, there are also two ways to use data from the Cargo tables on wiki pages:
- With the same infobox template that was used for entering data, it also automatically pulls the latest data from the Cargo table and shows it on wiki pages.
- The MediaWiki extension Scribunto allows powerful programming to manipulate and visualize the data from (even different) Cargo tables onto wiki pages - everything done automatically. Scribunto uses the programming language Lua.
Squad Wiki Pipeline: Map Data[edit | edit source]
Our initial motivation to create the Pipeline was the impossible task to keep the map pages up-to-date. Finding out manually which vehicles are available on which map layer was becoming increasingly impossible, with more and more maps being added with each new Squad release. As a result, most of the map pages were out-of-data or incorrect. We needed an automatic process to get to this data and get the data onto the wiki.
Figure: Squad Wiki Pipeline breakdown
The pipeline itself consists of 4 parts:
- Export the game data from the Squad SDK
- Convert this raw export into JSON format for easier processing
- Convert SDK labels into names used on the wiki
- Upload the data to Data pages on the wiki
With step 4, the data however cannot be directly imported into Cargo tables via the MediaWiki API - this command does not exist. Therefore we have to upload the data first into interim Data pages - from there, using Cargo commands, the data goes finally into the Cargo tables (to see the data on the Data pages, you have to "source edit" them).
Once the data is in the Cargo tables, we can do whatever and on as many wiki pages we want using calls to Lua modules.
The Pipeline was created and is operated by the Squad Wiki Editorial - if you have any questions or suggestions, please contact us.
The full documentation alongside with all source code and the latest interim data files can be found on GitHub.
Checklists and troubleshooting[edit | edit source]
- New versions of images are re-uploaded over existing media files - the new version is not showing up, the wiki page(s) still show the old version
- Click "More > Purge cache" on each of the wiki pages that are affected.
Quick reference[edit | edit source]
The following pages, modules and templates make direct use Cargo data (if you click "what links here" for each of them, you see which pages actually use them):
- Module:Cargo Map Page Generator (generates the map layer and map vehicle assets information for all map pages)
- Module:Cargo Display Functions (generates useful facts about vehicles and factions based on the map data we have in Cargo)
- Template:Faction infobox (field "Theaters" for display)
- Template:Vehicle infobox (field "Maps Available" for display)
- Template:Map infobox (all fields for data storage)
Our current Cargo tables:
- Special:CargoTables/maps Cargo table with all general info of all maps - updated via Template:Map infobox
- Special:CargoTables/map_layers Cargo table with all map layers - updated via the Pipeline
- Special:CargoTables/map_vehicle_assets Cargo table with all vehicle assets of all maps - updated via the Pipeline
- Special:CargoTables/divisions Cargo table with all divisions - updated via the Pipeline
- Special:CargoTables/division_vehicle_assets Cargo table with all vehicle assets of all divisions - updated via the Pipeline
Frequently used links
- Category:Maps all map wiki pages - all English wiki pages use Cargo
- Category:Cargo_Data all map data pages (edit the page in order to see the data)
- Special:all pages - all Lua modules
- Special:CargoTables - Lists all cargo tables