Export Factoriopedia for LLM


Writes most of the info in the Factoriopedia to a text file for LLM ingestion.

Utilities
a month ago
2.0
13
Owner:
StephenB
Source:
https://github.com/StephenBarnes/Writ...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.0.0 (a month ago)
Factorio version:
2.0
Downloaded by:
13 users

To use:

  • Install the mod.
  • Start a new game. Just opening Factorio isn't enough, you have to actually start a game.
  • Find the folder script-output in the same place as your mods folder.
  • In that folder, you'll have a text-file called ExportFactoriopediaForLLM.txt.
  • Attach that text-file when talking to an LLM such as ChatGPT or Claude.

The text-file contains a list of all items, fluids, recipes, entities, and space locations/connections, organized by subgroup. Includes all descriptions and recipe ingredients and products (like 10 Uranium ore -> 0.7% 1 Uranium-235 + 99.3% 1 Uranium-238). There is also a list of all techs with their prereqs and unlocks.

The file fits easily in a modern LLM's context window. For base Factorio, the file is 2000 lines and 21k tokens. With Space Age it's 37k tokens. GPT-4o has a context window limit of 128k tokens.

The file uses localised names for everything, NOT ID's. This is good for designing or examining a modpack, but bad for coding. So if you want to use this with something like Cursor, you'll probably want to first edit the script to add an option to write all the IDs too. If you implement that, please send me a pull request.