Include active_mods in --dump-data

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
ilbJanissary
Inserter
Inserter
Posts: 33
Joined: Tue May 28, 2019 12:34 pm
Contact:

Include active_mods in --dump-data

Post by ilbJanissary »

TL;DR
Include the data from `game.active_mods` or the data stage `mods` table as part of the `--dump-data` flag JSON dump.

What ?
Add a new field to the JSON prototype data dump, or a new file if necessary, that contains the list of active mods when the data is dumped. This could just be a new JSON property "active_mods" or "mods" but if data-raw-dump.json is intended to be strictly prototype data, dumping to a separate mods file would be fine.

Why ?
Context is key! When I perform a data dump, I need to know what mods were loaded and what version of each mod. This way if I take multiple dumps at different points in time I can tell what mods were loaded and set expectations for what is in the file(s).
Specifically, the tool I am working to support, FactorioLab, includes the mods and versions that are included in each data set. In order to build a full working data set for FactorioLab, I need that information.
In theory, I could pull the information from the `info.json` files for `base` and look through `mod-list.json` to find the active mods. But even then, I would have to walk the list of mod zip files, find the appropriate zip file for the mod (a difficult task considering there may be multiple versions or an unzipped copy of the mod in the folder!) and parse the version out of the zip file name or unzip the file and open `info.json`.

Post Reply

Return to “Ideas and Suggestions”