Get basic ingredients of items

Place to get help with not working mods / modding interface.
Post Reply
Camv
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Apr 18, 2016 9:33 pm
Contact:

Get basic ingredients of items

Post by Camv »

I'm currently developing a mod and would like to iterate through a list of items/equipments and break everything down to the base materials.

More specific, I would like to go through all inventory items and retrieve the total amount of base materials (iron ore, copper ore etc) to get what the items are really "worth".

Is there a way to find the base materials when having an item name? I know the recipe with the same name has ingredients, but do I then need to break these ingredients down further? I've noticed in-game that all items also list base resource cost. Is it a easy way to retrieve that?

Thank you

seronis
Fast Inserter
Fast Inserter
Posts: 225
Joined: Fri Mar 04, 2016 8:04 pm
Contact:

Re: Get basic ingredients of items

Post by seronis »

The Galactic Trade mod does exactly this. Download and check its code

Post Reply

Return to “Modding help”