Help:Data Overview
| Cargo and Structured Data | |
|---|---|
| Documentation | Data Overview • Introduction to Cargo • Game Files • Obelisk Bot
Building Cargo Templates • Building Rich Tables • Debugging Cargo • Searching Cargo Tables • Using Translations |
| Architecture Reference | Data Architecture • Data:Coverage • Cargo Definition Pages • Game Data Pages
All Cargo Tables • Artifacts • Buildings • Heroes • Factions • Laws • MapObjects • Skills • Spells • Translations • Units |
| External Links | Official Cargo Extension Documentation • SQL References |
Heroes of Might and Magic is a complex game series, and Olden Era is no different in this regard. Spells, Skills, Artifacts, Heroes, Laws, Creatures, Buildings, Map Objects, it's hundreds if not thousands of individual pieces to track and verify. And to make things even more complicated, translations into 16 languages means that tens of thousands of individual translations exist--more than 75,000 at least.
Properly documenting all of this information is the duty of a wiki. But there are smart ways and stupid ways to make this happen.
On many wikis, the naive approach is to simply rely on the legions of fans to meticulously and manually enter all of the data on the individual pages. This however has many issues--it is error prone, and results in lots of disparate pages where page X says a value is 7 and page Y says it's 8. And every time a game patch drops, it throws everything into chaos. Not to mention that there are multiple sub-wikis in different languages on this wiki, where language barriers can make coordinating the fixing of such issues a hassle--and multiply the possible places where values can diverge.
The solution to this is to use centralized structured data. This solves several problems:
- Since every page is referring to the same shared source of truth, divergence is eliminated.
- When the game updates, a single place can be updated to automatically propagate the change across the entire wiki.
- Hard-working and motivated wiki editors can turn their attention to more high-level articles instead of wasting time on number-fiddling and typo-hunting.
- Alternate-language wikis do not have to repeat the busy work of managing data and can also dedicate their limited resources to articles that matter.
Cargo
On the Olden Era wiki, we use Cargo to store and structure our data by the use of Obelisk Bot. Obelisk is a tool which reads the game files of HOMM:OE and extracts/transforms the data into a form ready for the wiki to use, and which can then automatically upload it to the wiki.
Cargo is the plugin used to hold that extracted data. It is built on SQL and stores the information in many database tables, all structured to permit fast and reliable querying of the game data stored within. One of the major tables is Translations, which contains names, descriptions, and terms translated into all the officially-supported languages, ready to be pulled out and used in queries.
Cargo is best used in two places: infoboxes, and table content. Whenever you are building an infobox for any particular sort of widget (Hero, Creature, Spell, etc), the data that goes into that infobox should refer to Cargo for its information. Likewise, whenever you find yourself making something like "a table of all units in the game", that should also be querying Cargo for that information, so that when the game updates and new units are added (or old units are reworked or deleted), the information can automatically draw from the new changes for you. Humans should spend their time excitedly writing about the new changes, not drudging their way through a stack of pages to update the same number fourteen times.
See Help:Cargo and other articles at the top of this page for more information.
Architecture
HOMM:OE stores a conveniently-accessible zip file called Core.zip which contains hundreds of Json files storing all sorts of data pertaining to the game. In general, the data in Cargo tables is arranged to mimic the data as stored in those game files. There are several key reasons why the wiki structure diverges from the same structure of the Json, however, including:
- Ignoring data so large it is difficult to condense (AI parameters, map template parameters, campaign dialogue)
- Ignoring data which only exists as an implementation detail and is completely transparent to the player (UI layouts, "glue" data)
- Ignoring data which is too complex to parse into an easily-queried form (specifics of individual abilities)
- Deriving concepts which exist as design concepts but which do not have first-class treatment in the game files (Hero Classes)
However these are for the most part edge cases, and about three-quarters of the game file structure is reflected in the Cargo tables.
Translation
Most user-facing game concepts have a name and description which is used somewhere in the UI. In the game files, these are referred to by unique "SIDs" (possibly meaning String IDentifier). The logical game data refers exclusively to SIDs, and once the concept bubbles up to the player's level, those SIDs are looked up in giant dictionaries where they are translated into each of the 16 languages supported by the game. We have duplicated this corpus (for SIDs relating to game concepts referenced here on the wiki) so that each individual language wiki can share the work without needing to re-do all the effort of the English wiki.
To ensure parity in templates, even English terms are stored within the Translations table. This forces us to develop templates from a language-aware standpoint so that they do not stay English-only.
However there are still times where templates may need to split their functionality along language lines, in which case the template will have subpages for each individual language; see for instance Template:HeroStinger/en which is one of several language variants of the same concept.
Any time that a language is referred to in tables or in wiki directory structure, it will use lowercase codes as follows:
| English | en |
|---|---|
| Brazilian Portuguese | pt_br |
| Czech | cs |
| French | fr |
| German | de |
| Hungarian | hu |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Polish | pl |
| Russian | ru |
| Spanish | es |
| Turkish | tr |
| Ukranian | uk |
| Chinese - Simplified | zh_cn |
| Chinese - Traditional | zh_tw |


