Skip to content

michaeldoylecs/gtnh-toolkit

Repository files navigation

GTNH Toolkit

Warning

This project is very much a work-in-progress. The project does not currently handle machine power usage or overclocking. If you decide to use it, please report any bugs, issues, or awkwardness as a GitHub issue.

GTNH Toolkit is a tool for designing factories in the Minecraft modpack GregTech: New Horizons. It automatically balancing the inputs and outputs of a given set of recipes to achieve a desired output rate of a given item.

The design is heavily inspired by gtnh-flow.

Screenshot of an example output showing a diagram for creating Hydrogen Sulfide.

Usage

I use uv for managing dependencies and python environments, so instructions will use uv for commands. If you use something else, use the equivalent substitutions to install dependencies and run the program.

  1. Install the Cbc dependency listed in the dependency section of this file.

  2. Write a project file that specifies all recipes to be considered as well as your desired item output rate. Currently, JSON and YAML files are supported.

Example project file

recipes:
  - m: Electrolyzer
    inputs:
      water: 500      # per craft
    outputs:
      oxygen: 500     # per craft
      hydrogen: 1000  # per craft
    dur: 1000         # gameticks per craft
    eut: 100          # EU per gametick

  - m: Large Chemical Reactor
    inputs:
      sulfur: 1               # per craft
      hydrogen: 2000          # per craft
    outputs:
      hydrogen sulfide: 1000  # per craft
    dur: 60                   # gameticks per craft
    eut: 200                  # EU per gametick

targets:
  hydrogen sulfide: 250 # per second
  1. Change the file being loaded in main.py to reference your new project file:
factory_config = load_factory_config("./.input/hydrogen_sulfide.yaml")
  1. Run the program with uv run main.py to generate your output. It will be saved in the output folder.

Dependencies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages