Code Monkey home page Code Monkey logo

factorio-scanner's Introduction

Factorio-Scanner

Collection of crates that help with deserializing and serializing Factorio blueprint strings, prototype and locale dumps and mod settings.

End goal is to build a blueprint renderer that properly supports blueprints with modded entities by first loading a prototype dump and then rendering the blueprint.

Building additional tools might also happen along the way (cli tool to edit mod-settings.dat files for example).

Crates

  • blueprint: blueprint string (de)serializing
  • factorio_api: internal factorio mod portal api
  • locale: locale dump (de)serializing
  • mod_util: mod settings (de)serializing (.json and .dat files), mod list (de)serializing, property tree (de)serializing (binary format only)
  • pretty_logging: modified version of pretty_env_logger. Unreleated to factorio but used in other crates.
  • prototypes: prototype (de)serializing & rendering (supports entities, items, fluids and recipes)
  • types: generic type (de)serializing, sprite loading, layering, merging, ...
  • serde_helper: util functions for deserialized defaults & serialization skip conditions
  • scanner: the actual render tool that connects everything

Versions

AT THIS POINT THERE IS NO GUARANTEE ABOUT BREAKING CHANGES.
CONSIDER ALL OF THIS TO BE UNSTABLE!

The prerelease part of the version number for the types and prototypes crates matches their corresponding factorio version.

Since the other crates are either only documented on the wiki (for example blueprint string format and mod settings file format) or not explicitly documented at all there is no factorio engine version to use for these crates.

Scanner

See scanner's readme for more information.

factorio-scanner's People

Contributors

danielniccoli avatar fgardt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

danielniccoli

factorio-scanner's Issues

Command line COMMAND does not recognize a blueprint string as a valid COMMAND

I'm trying to render a blueprint. The help lists the following three COMMAND arguments: string, file, help. When providing a blueprint, it exits with: error: unrecognized subcommand

PS C:\Games\Factorio (Scanner)> .\scanner.exe --factorio .\Factorio_1.1.104\ render
Render a blueprint string                                                                                                                                                                                                                                                                                                       Usage: scanner.exe --factorio <FACTORIO> render [OPTIONS] --out <OUT> <COMMAND>                                                                                 
Commands:
  string
  file
  help    Print this message or the help of the given subcommand(s)

Options:
      --prototype-dump <PROTOTYPE_DUMP>
          Path to the data dump json file. If not set, the data will be dumped automatically
      --preset <PRESET>
          Preset to use [possible values: K2, SE, K2SE, IR3, PyAE, FF, FFK2, Nullius, SeaBlock, EI, Ultracube]
      --mods <MODS>
          List of additional mods to use
  -o, --out <OUT>
          Path to the output file
      --res <TARGET_RES>
          Target resolution (1 side of a square) in pixels [default: 2048]
      --min-scale <MIN_SCALE>
          Minimum scale to use (below 0.5 makes not much sense, vanilla HR mode is 0.5) [default: 0.5]
  -h, --help
          Print help
PS C:\Games\Factorio (Scanner)> .\scanner.exe --factorio .\Factorio_1.1.104 render --out bp.png "0eNq9llGOmzAQhu9iqU+F1YZAsuEqVYUMTJKRwEa2SYtWHKC36Nl6ks5AkiUJ2YWs2pdIDp7P4/+fGXgVaVFDZVA5Eb8Kq2TlO+3vDOa8/initScaEUetJ2RqdVE78HlXhWonYmdq8ARmWlkRf6N43ClZcKRrKhCxQAel8ISSJa+kQbcvwWHmZ7pMUUmnjSA0qhzorEXrfcjIIcMczDggaL97ApRDh9Bn1C2aRNVlCoZOOHM4ZyeVG4I8UWlLsVodLx88Rd31n59YgBwNZP3TwGOAM7pIUtjLA1I0hWyxcGDuaHFA42r655xCv4PEhobvkOmaXVgM5KDboE34wK0sLHSblOqTsIxe8A8BQA1vy+YtaS+arEbXLYnVtizvlSDBPEGej4IE14KEDwhyaSwUxDJacXH0iQ9ECWbViMwPUmWQvwsKJoCQ8vF3II3/Yw9QjHKWUzjKgiEh/EoaZweY8IwJJ2C20jr/xBotmWgCJdNVxQ0k0wIGkNUZsqJaGa80A/mDdbb8YAjcVNpyvM7uNN4bNKHHOZ7T3qKxLpndixYYMz0OZLbnOE3Kyj5T8YV26dpVtZvLaafLHwy05nV0aUc3EEfnw6IzObiDDae5Gr43lm8sXc2y9Ej8nJ9SNW7Pr6pe0W7A0RTjRUm92OUZiz+/fj/g1dvcrpqka6Jka3SZoCLMaWI/3EjBu/5E0/yJ5nZdb1F4bdHq33bdqXuOXXdh1LCjvv6PjgqndlA0x7DbMTmN2jvL3wE8w+PB55onDvRm7TvoZRGuN8H6JdwsV5tV2/4FfVVczg=="
error: unrecognized subcommand '0eNq9llGOmzAQhu9iqU+F1YZAsuEqVYUMTJKRwEa2SYtWHKC36Nl6ks5AkiUJ2YWs2pdIDp7P4/+fGXgVaVFDZVA5Eb8Kq2TlO+3vDOa8/initScaEUetJ2RqdVE78HlXhWonYmdq8ARmWlkRf6N43ClZcKRrKhCxQAel8ISSJa+kQbcvwWHmZ7pMUUmnjSA0qhzorEXrfcjIIcMczDggaL97ApRDh9Bn1C2aRNVlCoZOOHM4ZyeVG4I8UWlLsVodLx88Rd31n59YgBwNZP3TwGOAM7pIUtjLA1I0hWyxcGDuaHFA42r655xCv4PEhobvkOmaXVgM5KDboE34wK0sLHSblOqTsIxe8A8BQA1vy+YtaS+arEbXLYnVtizvlSDBPEGej4IE14KEDwhyaSwUxDJacXH0iQ9ECWbViMwPUmWQvwsKJoCQ8vF3II3/Yw9QjHKWUzjKgiEh/EoaZweY8IwJJ2C20jr/xBotmWgCJdNVxQ0k0wIGkNUZsqJaGa80A/mDdbb8YAjcVNpyvM7uNN4bNKHHOZ7T3qKxLpndixYYMz0OZLbnOE3Kyj5T8YV26dpVtZvLaafLHwy05nV0aUc3EEfnw6IzObiDDae5Gr43lm8sXc2y9Ej8nJ9SNW7Pr6pe0W7A0RTjRUm92OUZiz+/fj/g1dvcrpqka6Jka3SZoCLMaWI/3EjBu/5E0/yJ5nZdb1F4bdHq33bdqXuOXXdh1LCjvv6PjgqndlA0x7DbMTmN2jvL3wE8w+PB55onDvRm7TvoZRGuN8H6JdwsV5tV2/4FfVVczg=='

Usage: scanner.exe --factorio <FACTORIO> render [OPTIONS] --out <OUT> <COMMAND>

For more information, try '--help'.

thread 'main' has overflowed its stack

PS> .\target\debug\scanner.exe --dump "C:\Users\Daniel\AppData\Roaming\Factorio\script-output\data-raw-dump.json" --out c:\temp\out.png --factorio "C:\Program Files (x86)\Steam\steamapps\common\Factorio" --blueprint "C:\Users\Daniel\AppData\Roaming\Factorio\script-output\blueprint.txt"
loaded BP

thread 'main' has overflowed its stack

input.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.