Skip to content

Latest commit

 

History

History
105 lines (88 loc) · 3.91 KB

README.md

File metadata and controls

105 lines (88 loc) · 3.91 KB

Satisfactory Docs Exporter - An alternative Docs.json implementation

Usage:

SatisfactoryDocsExporter is a console .NET applicaton. .NET Runtime 8.0 or later is required. Windows and Linux are both supported, macOS might work too.

Prebuilt binaries are available on Releases page.

Build-in help can be printed by running SatisfactoryDocsExporter.exe with --help option:

$ ./SatisfactoryDocsExporter --help
Description:
  Parser of Satisfactory game's data files to JSON database.

Usage:
  SatisfactoryDocsExporter [options]

Options:
  -d, --game-dir <game-dir>  Path to Satisfactory game directory where FactoryGame.exe is located [default: ..]
  -o, --output <output>      Path to output JSON file. [default: Docs.json]
  -?, -h, --help             Show help and usage information

To export Docs.json with default options:

  1. Place SatisfactoryDocsExporter directory inside Satisfactory's game directory (next to FactoryGame.exe file).
  2. Open Terminal app in SatisfactoryDocsExporter directory.
  3. Start SatisfactoryDocsExporter.exe.
  4. Wait for operation to complete. Progress is displayed in Terminal's output.
  5. SatisfactoryDocsExporter directory should contain Docs.json file with all exported data.

Ready-to-use Docs.json files

Docs.json files generated by SatisfactoryDocsExporter can by found in this repository.

Please note, that linked repository is updated manually and can lack Docs.json files for latest or experimental builds.

Motivation:

Satisfactory already provides Docs.json file with various info about recipes, buildables and other items. But those who try to parse such file might face following issues:

  • A lot of different native classes without exposed hierarchy. There are 30+ classes extending base FGItemDescriptor class. To find all item descriptors manual class mapping needed.
  • Some properties are missing, for example mBuildableClass in FGBuildDescriptor, which makes it impossible to link it to corresponding FGBuildable class without heuristics and manual mapping.
  • Map and Array properties are using custom encoding format, so additional lexer/parser needed on top of JSON decoder.
  • Other small inconveniences, such as inconsistent class name encoding, missing game version field, etc...

Docs.json generated by SatisfactoryDocsExporter has similar structure to the original one, but resolves these issues. Here's an example of exported class:

[
  {
    "NativeClass": "FGCustomizationRecipe",
    "NativeClassChain": [
      "FGCustomizationRecipe",
      "FGRecipe"
    ],
    "Class": "BlueprintGeneratedClass'FactoryGame/Content/FactoryGame/Buildable/-Shared/Customization/Patterns/Icons/Recipe_Pattern_Icon_Cart.Recipe_Pattern_Icon_Cart_C'",
    "Name": "Recipe_Pattern_Icon_Cart_C",
    "Type": "BlueprintGeneratedClass",
    "Properties": {
      "mCustomizationDesc": {
        "Class": "BlueprintGeneratedClass'FactoryGame/Content/FactoryGame/Buildable/-Shared/Customization/Patterns/Icons/PatternDesc_Icon_Cart.PatternDesc_Icon_Cart_C'",
        "Name": "PatternDesc_Icon_Cart_C",
        "Type": "BlueprintGeneratedClass"
      },
      "mDisplayName": "Test Pattern 6",
      "mIngredients": [
        {
          "ItemClass": {
            "Class": "BlueprintGeneratedClass'FactoryGame/Content/FactoryGame/Resource/Parts/ColorCartridge/Desc_ColorCartridge.Desc_ColorCartridge_C'",
            "Name": "Desc_ColorCartridge_C",
            "Type": "BlueprintGeneratedClass"
          },
          "Amount": 1
        }
      ],
      "mProducedIn": [
        {
          "Class": "BlueprintGeneratedClass'FactoryGame/Content/FactoryGame/Equipment/BuildGun/BP_BuildGun.BP_BuildGun_C'",
          "Name": "BP_BuildGun_C",
          "Type": "BlueprintGeneratedClass"
        }
      ]
    }
  }
]