It would be fantastic if Factorio provided a command-line option which did the following:
- Start the application in headless mode.
- Run the normal game startup process, loading mods and running through the stages described in the docs, except sprites aren't loaded.
- After all the game data is loaded, dump data.raw to stdout in some recognizable format (JSON ideally, or just what serpent does would probably be fine).
Personally I would find this incredibly useful as I have been trying to develop a desktop application (completely separate from the game, so not a mod) that provides various tools for calculating recipe ratios and planning factories outside of the game. In order to do this, I need the game data from data.raw for the base game as well as any mods you might have installed. What I have right now is some code which actually emulates the entire startup process of the game (thanks to the fantastic documentation) using a Lua engine and the real game files, and it actually works pretty well. However I've started running into problems because I realized the Lua interpreter I'm using runs Lua 5.3, but Factorio uses Lua 5.2 and there are some subtle differences which cause issues. I could modify the library I'm working with to support Lua 5.2, but it would be so much easier if I didn't have to try to emulate the game startup process at all, and could just use the actual Factorio binary to do it. There may be a hacky way to do this currently by temporarily installing a mod that dumps data.raw to the Factorio logs using serpent, then killing the game process once it detects the presence of the data dump. But it would be much easier if there was a built-in option for this.
I think in general having an easy way to export the game data would be super useful to lots of people who make external Factorio tools. I definitely consider Factorio a very data-driven game, especially with the way mods can add and modify content, and having a way to automatically process that data is the highest level of Factorio game-play. In an abstract sense, the application I'm developing is meant to automate the playing of the game itself!
Happy to answer questions about use-cases for this, and thanks for making a fantastically fun and well-documented game!