Anyone have a mod source that they believe is a good example of the best practices to use when developing factorio mods? I'm going to start working on my first mod soon, and I want it to be clean and easily understandable, so I'm looking for an example.
Thanks
Example of a well structured Factorio mod?
-
- Manual Inserter
- Posts: 1
- Joined: Thu Aug 18, 2016 6:34 pm
- Contact:
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Example of a well structured Factorio mod?
It depends on what you plan to do as to how your mod will be structured. I'd advise looking at existing mods in the mod portal (download some, they are just zip files so you can easily open them to see what's inside).
Generally speaking, it's wise to have just a few files in the main folder (the info.json, data.lua, control.lua, etc) and then put other scripts in to subfolders (prototypes, sprites, etc) to keep things organised. You'll see most mods already follow those patterns.
Generally speaking, it's wise to have just a few files in the main folder (the info.json, data.lua, control.lua, etc) and then put other scripts in to subfolders (prototypes, sprites, etc) to keep things organised. You'll see most mods already follow those patterns.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.