Skip to content

factoriolab/factorio-lab-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FactorioLab Tools

This repository contains a tool used for generating JSON data and icons for the FactorioLab calculator. It is forked from this repository by Dmitry Zaitsev (@hhrhhr).

Prepare

  1. Download and unpack tcc-0.9.27-win64-bin.zip and winapi-full-for-0.9.27.zip from http://download.savannah.gnu.org/releases/tinycc
  2. Update TCC's .def-files:
cd /d %TCC_DIR%\lib
..\tcc.exe -impdef kernel32.dll
..\tcc.exe -impdef user32.dll
..\tcc.exe -impdef msvcrt.dll
..\tcc.exe -impdef ws2_32.dll

Build on Windows

Edit mass_make.cmd and set:

  • CC - path to TCC x64 compiler
  • V=1 - show full command output
  • DIST - install path
  • LUAVER - Lua version (53 or 52f)

Note: Lua 52f is forked from https://github.com/Rseding91/Factorio-Lua

Usage

Build (or download ready package from Downloads )

Usage: [lua-lab/]factorio_data_dump.lua [-h] [-g <gamedir>] [-m <moddir>]
                              [-s <iconsize>] [-f <suffix>] [-n] [-i]
                              [-l <language>] [-c]
                              [--factorio_lab_hacks] [-b] [-v] [-d]
                              <command> ...

Data exporter for Factorio.

Options:
   -h, --help                show this help message and exit
   -v, --verbose             more verbose (try -vvv)
   -g, --gamedir <gamedir>   game location (default: .)
   -m, --moddir <moddir>     override mods location
   -s, --iconsize <iconsize> icon size (default: 32)
   -f, --suffix <suffix>     a string that is added to the file name (default: "")
   -n, --nomods              disable mods
   -i, --noimage             disable image generation
   -l, --language <language> select localization (default: en)
   -c, --clear               clear unneded fields in data.raw
   -b, --browse              * open browser (only with 'calc' command)
   -d, --debug               * start mobdebug

Commands:
   dump                  export data.raw from game and save it
   export                export data.raw for Factorio Lab
   demo                  export data.raw for demo page generation (with demo.lua)
   web                   * just start web server

* - not implemented

Issues

  • Only unpacked modifications are supported.
  • The selection of the used modifications is exported from the game, as well as their settings (so first start the game, select the mods, configure them as you wish and exit the game).
  • Some recipes show unsupported machines (e.g. "uranium ore" should not be mined with a "burner mining drill")

About

Lua parser to build data and icons for FactorioLab base recipe sets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages