I have dumped all recipes using a command I found here (it needs a bit of modification before it works)
I know that you can access all recipes at the game.player.force.recipes, but where can you find all machines? I tried finding it on the API but didn't really find anything other than the game.entity_prototypes, but you can't access the crafting speed and such from there.
Dump all machines using the "/c" command
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Dump all machines using the "/c" command
Eh?nalafxx wrote: Mon Oct 12, 2020 1:36 pm but you can't access the crafting speed and such from there.
https://lua-api.factorio.com/latest/Lua ... ting_speed
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.
Re: Dump all machines using the "/c" command
I guess you have to access the prototypes in the data stage?
https://lua-api.factorio.com/latest/Data-Lifecycle.html
Or is it possible via /c command? (Probably is, somehow)
https://lua-api.factorio.com/latest/Data-Lifecycle.html
Or is it possible via /c command? (Probably is, somehow)
Re: Dump all machines using the "/c" command
Code: Select all
/c for _, m in pairs(game.entity_prototypes) do if m.crafting_speed then game.print(m.crafting_speed .. " " .. m.name) end end