Is there an easy way to get all the initial resources that are required for crafting? Not "iron plate" or "battery", and how much iron, oil, etc needed for crafting? Or can I only find them after 1000 "for"? I only need to get the original resources, which are written, as an example, in creative mode, instead of ingredients.
And I need to get it in data.lua, not in scripts
Getting the resources required for carft
Re: Getting the resources required for carft
Recursive script like:
1. All raw resources
2. All items, that use 1. resources
3. All items, that use items from 2.
Etc.
By every iteration write previous resource items and amounts of them.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Getting the resources required for carft
Some of the big modpacks are very likely to have infinite loops to convert between (waste) products and production chains. A simple example: (H2O) -> (H + 2O) -> (H2O). And no, there is no easy way. You should tell what problem you're actually trying to solve. If you just want to assign a "score" to each item look at the team production scenario.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.