Raw Calculator deprecated

by RedRafe

Computes total amount of raw resources needed to craft any item. Raw Calculator will find the shortest path (lowest cost) to craft any item. Intended use for mod developers, does not affect the game.

Internal
3 years ago
1.1
321
Manufacturing
Owner:
RedRafe
Source:
https://github.com/RedRafe/raw-calculator
Homepage:
N/A
License:
MIT
Created:
3 years ago
Latest Version:
0.1.0 (3 years ago)
Factorio version:
1.1
Downloaded by:
321 users

Raw Calculator

A Factorio mod that computes the total raw cost for items' recipes. Raw Calculator will find the shortest path (lowest cost) to craft any item. Intended use for mod developers, does not affect the game.

Features

  • A RecipeBook object is created pushing all the parsed recipes from data.raw.recipe
  • Raw Calculator then computes all the recipes raw cost, computing is performed across the recipe tree, bottom-up, time is ~ O(n)
  • Raw Calculator already computes the minimum cost possible for recipes
  • Value is expressed on total raw resources (e.g.: iron-ore=1, copper-ore=2, automation-science-pack=3)
  • Results are logged in the log file

Future developments

  • Add in-game GUI to show exact total raw resources
  • Improve compatibility with mods (some recipes might need to be inputted manually maybe)
  • Express the raw total for each of the raw resources (e.g.: automation-science-pack = 2 iron-ore, 1 copper-ore)