gtnhvelo


Namegtnhvelo JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryFactory Optimization Flowcharts for Gregtech: New Horizons
upload_time2023-01-09 06:16:02
maintainer
docs_urlNone
authorvelolib
requires_python>=3.11,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1>gtnh-velo <img src="https://img.shields.io/github/license/velolib/gtnh-velo?style=flat-square"/> </h1>
<!-- TODO: Shorten the readme to move some of it into the wiki -->

## ❓ What is it?

This is a fork of OrderedSet86's [gtnh-flow](https://github.com/OrderedSet86/gtnh-flow). In addition to the functionalities of the original tool, this fork has:
1. Extended formatting of projects
2. Added stylization add formatting of graphs
3. Standards to increase readability
4. A custom CLI

## 📖 Samples
Samples of the graphs in the repository.
<details open>
    <summary><strong>Samples</strong></summary>
    <img src="samples/rutile-titanium.svg" alt="Rutile -> Titanium">
    <img src="samples/epoxid.svg" alt="Epoxid">
</details>

## ⏲️ Installation
### Install as Python package
This is the easiest installation method. In the terminal run:
```
pip install gtnhvelo -U
```


### Linux
1. Clone this repository `git clone https://github.com/velolib/gtnh-velo.git`
2. Download Python 3 and install from `https://www.python.org/downloads/`
3. Navigate to the cloned repository and install the required project dependencies `pip install -r requirements.txt`
4. Install Graphviz, on Debian-based Linux it's `sudo apt-get install graphviz`
    - If Graphviz is not added to the system path, you can add the path to the `/bin` folder in the configuration file.

### Windows
1. Clone this repository `git clone https://github.com/velolib/gtnh-velo.git`
2. Download Python 3 and install from `https://www.python.org/downloads/`
3. Navigate to the cloned repository and install the required project dependencies `pip install -r requirements.txt`
4. Install Graphviz, for Windows there is a guide [here](https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224). Graphviz must be added to the system PATH for all users or the current user which may or may not need a system restart.
    - If Graphviz is not added to the system path, you can add the path to the `/bin` folder in the configuration file.

>It's recommended to create a virtual environment before installing to isolate the development environment from the global scope.


## ⏲️ Usage
### CLI
1. Create a project under `projects/`. You can look at existing projects to see the structure.
2. The project name is a system file path relative to `projects/`, for example `plastics/epoxid`. You can run the graph creator in 2 ways:
    - `flow [project name]`
    - `flow` then inputting your project name in the dialog
3. The output graph will pop up and be available in `output/`

When running `flow` the directories `projects/` and `output/` will be created in the working directory if they do not exist already.
### In code
You can use gtnh-velo in Python code like this:
```python
from gtnhvelo import flow
flow('project_name', 'output_path', 'projects_path')
```
Using gtnh-velo in Python also automatically turns on quiet mode.

## ⁉ Answers
### How to configure
The configuration file `config_factory_graph.yaml` will be created on startup in the working directory if not created already.
You can configure a variety of layout and functional options using it. Make sure to not delete any keys.

### Automatic overclocking
All of the names in the following image are recognized and will be overclocked automatically to 1A of the tier you select. This includes the EBF, which will default to 1 hatch of the selected tier.
<details>
    <summary><strong>Recognized Overclocks</strong></summary>
    <img src="https://github.com/OrderedSet86/gtnh-flow/raw/master/samples/recognized_ocs.png" alt="Recognized overclocks">
</details>

### Dealing with multi-I/O
Sometimes the balancing algorithm will fail. You may need to manually make the adjustments by renaming the ingredients so that it will only be used for the recipes you want. An example: `chlorine 1`, `chlorine 2`
### Project Standards
This section will cover how to create a basic project.

#### Basic recipes
Here is how to write a recipe (note the indentation):
```yaml
- m: large chemical reactor
  tier: HV # The recipe tier, minimum LV
  I: # Inputs
    nonrecycle hydrochloric acid: 3000
    hydrochloric acid: 27000
    raw silicon dust: 10
  O: # Outputs
    trichlorosilane: 9000
    silicon tetrachloride: 300
    hexachlorodisilane: 200
    dichlorosilane: 300
    '[recycle] hydrogen': 20400 # Recycle this output
  eut: 480 # EU/t of recipe
  dur: 7.5 # Recipe duration in seconds
  group: silicon # Used to group recipes on the graph
```
In every project there needs to be 1 (and only 1) recipe that needs to be locked. This is the recipe that every other recipe will be balanced off of. Here are the fields you need to add:
```yaml
# These 2 fields (target and number) are mutually exclusive!
- m: example machine
  target: # lock it to the number of a specific ingredient output per second
    trichlorosilane: 4000
# -------------------------------------------------------------------
  number: 2 # lock the number of machines for this recipe
```
#### Advanced recipes
This section will cover the exceptions to the recipes.
Some fields you need to know about:
``` yaml
- m: example machine
  heat: 4001 # The required heat for a recipe
  coils: nichrome # The selected coils for a recipe
  saw_type: saw # The saw type for a Tree Growth Simulator
  material: shadow # Turbine material for turbines
  size: large # Turbine size for turbines
  pipe_casings: tungstensteel # Pipe casings for chemplants
```

<details>
    <summary><strong>Special Recipes</strong></summary>

```yaml
# Electric Blast Furnace example
- m: electric blast furance
tier: HV
I:
    tungstic acid: 7
O:
    tungsten trioxide: 4
eut: 480
dur: 10
heat: 1200
coils: nichrome
number: 1
```

```yaml
# Chemical Plant example
- m: chem plant
tier: LuV
I:
    pine wood: 0.1
O:
    crushed pine materials: 40
eut: 120
dur: 10
coils: tungstensteel
pipe_casings: tungstensteel

```

```yaml
# GT++ Machine example
- m: industrial sifter
tier: HV
I:
    platinum salt dust: 1
O:
    refined platinum salt dust: 0.95
eut: 30
dur: 30
group: pmp recycling

```

```yaml
# Multiblock turbine example
# in the finished graph it will calculate the actual numbers
- m: LGT
tier: EV
I:
    benzene: 1
O: {}
eut: 0
dur: 0
material: shadow
size: large
```

</details>



## 🙏 Thanks
Visit the original [gtnh-flow by OrderedSet](https://github.com/OrderedSet86/gtnh-flow). Without it this fork would not exist!


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gtnhvelo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "velolib",
    "author_email": "vlocitize@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f6/bb/7357296ea7e656c65692bc58dd2098ccd491cb53b7fc0a5fff0ef9dd0816/gtnhvelo-0.2.0.tar.gz",
    "platform": null,
    "description": "<h1>gtnh-velo <img src=\"https://img.shields.io/github/license/velolib/gtnh-velo?style=flat-square\"/> </h1>\n<!-- TODO: Shorten the readme to move some of it into the wiki -->\n\n## \u2753 What is it?\n\nThis is a fork of OrderedSet86's [gtnh-flow](https://github.com/OrderedSet86/gtnh-flow). In addition to the functionalities of the original tool, this fork has:\n1. Extended formatting of projects\n2. Added stylization add formatting of graphs\n3. Standards to increase readability\n4. A custom CLI\n\n## \ud83d\udcd6 Samples\nSamples of the graphs in the repository.\n<details open>\n    <summary><strong>Samples</strong></summary>\n    <img src=\"samples/rutile-titanium.svg\" alt=\"Rutile -> Titanium\">\n    <img src=\"samples/epoxid.svg\" alt=\"Epoxid\">\n</details>\n\n## \u23f2\ufe0f Installation\n### Install as Python package\nThis is the easiest installation method. In the terminal run:\n```\npip install gtnhvelo -U\n```\n\n\n### Linux\n1. Clone this repository `git clone https://github.com/velolib/gtnh-velo.git`\n2. Download Python 3 and install from `https://www.python.org/downloads/`\n3. Navigate to the cloned repository and install the required project dependencies `pip install -r requirements.txt`\n4. Install Graphviz, on Debian-based Linux it's `sudo apt-get install graphviz`\n    - If Graphviz is not added to the system path, you can add the path to the `/bin` folder in the configuration file.\n\n### Windows\n1. Clone this repository `git clone https://github.com/velolib/gtnh-velo.git`\n2. Download Python 3 and install from `https://www.python.org/downloads/`\n3. Navigate to the cloned repository and install the required project dependencies `pip install -r requirements.txt`\n4. Install Graphviz, for Windows there is a guide [here](https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224). Graphviz must be added to the system PATH for all users or the current user which may or may not need a system restart.\n    - If Graphviz is not added to the system path, you can add the path to the `/bin` folder in the configuration file.\n\n>It's recommended to create a virtual environment before installing to isolate the development environment from the global scope.\n\n\n## \u23f2\ufe0f Usage\n### CLI\n1. Create a project under `projects/`. You can look at existing projects to see the structure.\n2. The project name is a system file path relative to `projects/`, for example `plastics/epoxid`. You can run the graph creator in 2 ways:\n    - `flow [project name]`\n    - `flow` then inputting your project name in the dialog\n3. The output graph will pop up and be available in `output/`\n\nWhen running `flow` the directories `projects/` and `output/` will be created in the working directory if they do not exist already.\n### In code\nYou can use gtnh-velo in Python code like this:\n```python\nfrom gtnhvelo import flow\nflow('project_name', 'output_path', 'projects_path')\n```\nUsing gtnh-velo in Python also automatically turns on quiet mode.\n\n## \u2049 Answers\n### How to configure\nThe configuration file `config_factory_graph.yaml` will be created on startup in the working directory if not created already.\nYou can configure a variety of layout and functional options using it. Make sure to not delete any keys.\n\n### Automatic overclocking\nAll of the names in the following image are recognized and will be overclocked automatically to 1A of the tier you select. This includes the EBF, which will default to 1 hatch of the selected tier.\n<details>\n    <summary><strong>Recognized Overclocks</strong></summary>\n    <img src=\"https://github.com/OrderedSet86/gtnh-flow/raw/master/samples/recognized_ocs.png\" alt=\"Recognized overclocks\">\n</details>\n\n### Dealing with multi-I/O\nSometimes the balancing algorithm will fail. You may need to manually make the adjustments by renaming the ingredients so that it will only be used for the recipes you want. An example: `chlorine 1`, `chlorine 2`\n### Project Standards\nThis section will cover how to create a basic project.\n\n#### Basic recipes\nHere is how to write a recipe (note the indentation):\n```yaml\n- m: large chemical reactor\n  tier: HV # The recipe tier, minimum LV\n  I: # Inputs\n    nonrecycle hydrochloric acid: 3000\n    hydrochloric acid: 27000\n    raw silicon dust: 10\n  O: # Outputs\n    trichlorosilane: 9000\n    silicon tetrachloride: 300\n    hexachlorodisilane: 200\n    dichlorosilane: 300\n    '[recycle] hydrogen': 20400 # Recycle this output\n  eut: 480 # EU/t of recipe\n  dur: 7.5 # Recipe duration in seconds\n  group: silicon # Used to group recipes on the graph\n```\nIn every project there needs to be 1 (and only 1) recipe that needs to be locked. This is the recipe that every other recipe will be balanced off of. Here are the fields you need to add:\n```yaml\n# These 2 fields (target and number) are mutually exclusive!\n- m: example machine\n  target: # lock it to the number of a specific ingredient output per second\n    trichlorosilane: 4000\n# -------------------------------------------------------------------\n  number: 2 # lock the number of machines for this recipe\n```\n#### Advanced recipes\nThis section will cover the exceptions to the recipes.\nSome fields you need to know about:\n``` yaml\n- m: example machine\n  heat: 4001 # The required heat for a recipe\n  coils: nichrome # The selected coils for a recipe\n  saw_type: saw # The saw type for a Tree Growth Simulator\n  material: shadow # Turbine material for turbines\n  size: large # Turbine size for turbines\n  pipe_casings: tungstensteel # Pipe casings for chemplants\n```\n\n<details>\n    <summary><strong>Special Recipes</strong></summary>\n\n```yaml\n# Electric Blast Furnace example\n- m: electric blast furance\ntier: HV\nI:\n    tungstic acid: 7\nO:\n    tungsten trioxide: 4\neut: 480\ndur: 10\nheat: 1200\ncoils: nichrome\nnumber: 1\n```\n\n```yaml\n# Chemical Plant example\n- m: chem plant\ntier: LuV\nI:\n    pine wood: 0.1\nO:\n    crushed pine materials: 40\neut: 120\ndur: 10\ncoils: tungstensteel\npipe_casings: tungstensteel\n\n```\n\n```yaml\n# GT++ Machine example\n- m: industrial sifter\ntier: HV\nI:\n    platinum salt dust: 1\nO:\n    refined platinum salt dust: 0.95\neut: 30\ndur: 30\ngroup: pmp recycling\n\n```\n\n```yaml\n# Multiblock turbine example\n# in the finished graph it will calculate the actual numbers\n- m: LGT\ntier: EV\nI:\n    benzene: 1\nO: {}\neut: 0\ndur: 0\nmaterial: shadow\nsize: large\n```\n\n</details>\n\n\n\n## \ud83d\ude4f Thanks\nVisit the original [gtnh-flow by OrderedSet](https://github.com/OrderedSet86/gtnh-flow). Without it this fork would not exist!\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Factory Optimization Flowcharts for Gregtech: New Horizons",
    "version": "0.2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5bdb09ca3ed52f24bcf2821b65b12a42b3a5f8b39b5c375299c827425bb227e",
                "md5": "a3a83afec1fc205065bce7942503e476",
                "sha256": "5f475b89662b4d80076e4738270ad8913a2cafd400d23ada87a88c2606e96b32"
            },
            "downloads": -1,
            "filename": "gtnhvelo-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3a83afec1fc205065bce7942503e476",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 50036,
            "upload_time": "2023-01-09T06:15:59",
            "upload_time_iso_8601": "2023-01-09T06:15:59.235529Z",
            "url": "https://files.pythonhosted.org/packages/e5/bd/b09ca3ed52f24bcf2821b65b12a42b3a5f8b39b5c375299c827425bb227e/gtnhvelo-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6bb7357296ea7e656c65692bc58dd2098ccd491cb53b7fc0a5fff0ef9dd0816",
                "md5": "1577d1a44bcaf46dba66f0e8997b5075",
                "sha256": "91932cc427805d1ca286f048e65ebcaa6499ce86b14d6b739cd083d41bf723bf"
            },
            "downloads": -1,
            "filename": "gtnhvelo-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1577d1a44bcaf46dba66f0e8997b5075",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 45783,
            "upload_time": "2023-01-09T06:16:02",
            "upload_time_iso_8601": "2023-01-09T06:16:02.031526Z",
            "url": "https://files.pythonhosted.org/packages/f6/bb/7357296ea7e656c65692bc58dd2098ccd491cb53b7fc0a5fff0ef9dd0816/gtnhvelo-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-09 06:16:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "gtnhvelo"
}
        
Elapsed time: 0.30740s