Help:Searching Cargo Tables

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 03:25, 20 May 2026 by Ketura (talk | contribs) (Created page with "{{DataNavBox}} Sometimes it can be difficult to trace where exactly a game concept has ended up in a Cargo table. You might know what it's called in the game, but how do you get from there to a table row? Cargo comes preloaded with two different tools for inspecting data; this page will explain how to use both. == Special:Drilldown == You can either navigate directly to Special:Drilldown or begin on the Special:CargoTables view. * If starting on Special:D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Useful Recipes • Useful Templates

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



Sometimes it can be difficult to trace where exactly a game concept has ended up in a Cargo table. You might know what it's called in the game, but how do you get from there to a table row?

Cargo comes preloaded with two different tools for inspecting data; this page will explain how to use both.

Special:Drilldown

You can either navigate directly to Special:Drilldown or begin on the Special:CargoTables view.

  • If starting on Special:Drilldown, select the table you wish to inspect from the list at the top.
  • If starting on Special:CargoTables, find the table you want to inspect (possibly Translation). Then click the filter icon button, which will lead to Special:Drilldown keyed to that particular table.

(You should first open the link under the Templates column, which will go to a breakdown of all the fields on the table with notes and documentation, which may help shed light on what you are looking for, especially if its buried in a splinter table and not a parent.)

Once in Special:Drilldown and keyed to a particular table, you can inspect the readouts next to each field, which will often give hints regarding the sort of content you can expect to find in a given field. For example, on the Artifact drilldown we can see how many of each item set are configured:

You can select multiple values to filter with an "OR".

Once you have selected your desired field filters, at the bottom you will find a list of links to the specific articles which defined the row for that widget. If you edit/view source on that article, you will be able to see further detail regarding what else was defined and entered by that particular widget.


Query Builder

Start at Special:CargoTables, and find the table you wish to inspect, then click its entry on the left under the Table column.

This will give you a list of rows inside that table, but we can do better. Scroll all the way down to the "More..." link at the bottom.

This second screen will look much like the first, but if you scroll again to the bottom you will find a new set of controls at the bottom of the page:

Click on Modify Query to expand the form. And then change Offset to 0 (we just moved to page 2, which means we are skipping the first 100 entries, and that will come back to bite us if we don't account for it.)

You can then use this UI to search for table entries that fulfill certain criteria. Using the SQL LIKE instruction, we can tell Cargo to produce all rows which have an ID containing the string "angel", like so:

id LIKE '%angel%'

That's a percentage sign around the word angel, and single quotes around the percentages.  % is a "wildcard" in SQL, meaning that '%angel%' translates to "anything followed by 'angel' followed by anything else".

Once you hit Submit, you'll find the Artifact table has been filtered down to just artifacts with "angel" somewhere in the internal id, which for the most part means artifacts of the "angelic alliance" item set.

If you expand the View Wikitext section, you'll also find a pleasant surprise:

That is a #cargo-query all ready to go with whatever parameters and filters you applied in this search.

(In general, while this UI can be helpful in some ways, it is unhelpful in others: in particular if you enter incorrect syntax, the error message you get is much more opaque and unhelpful than the one you would get in a normal article. But the buttons are neat.)