Terrible documentation
Posted: Sun Apr 02, 2017 12:22 am
1. lua-api.factorio.com is not searchable. I solved this by downloading the site (wget -m http://lua-api.factorio.com/latest/) and searching with grep. Not ideal as the lines are often huge and fill the whole terminal... but it works.
2. game.findentities() is used in the main modding tutorial on the wiki, but it is not even documented. On the wiki there are no hits (other than the tutorial) and in the Lua reference there are no hits at all.
3. Entities of type "tree" are not in the lua reference either. They appear to be non-blueprintable... but who can say?
4. That I can create an entity of type "tree" but not find it in the Lua reference, also means that there exists no list of possible types. We just have to infer this from what the base mod uses?
5. I cannot find assembling-machine info in the Lua reference. I'd like to know what fields and methods it has (defines.html tells me I must be able to access its inventory because defines.inventory.assembling_machine_input exists.... but how?) and whether it has any events (particularly: recipe changed, or finished crafting an item).
How do people even manage to make mods and write tutorials when functions are not written down anywhere, am I missing something?
2. game.findentities() is used in the main modding tutorial on the wiki, but it is not even documented. On the wiki there are no hits (other than the tutorial) and in the Lua reference there are no hits at all.
3. Entities of type "tree" are not in the lua reference either. They appear to be non-blueprintable... but who can say?
4. That I can create an entity of type "tree" but not find it in the Lua reference, also means that there exists no list of possible types. We just have to infer this from what the base mod uses?
5. I cannot find assembling-machine info in the Lua reference. I'd like to know what fields and methods it has (defines.html tells me I must be able to access its inventory because defines.inventory.assembling_machine_input exists.... but how?) and whether it has any events (particularly: recipe changed, or finished crafting an item).
How do people even manage to make mods and write tutorials when functions are not written down anywhere, am I missing something?