Example of a well structured Factorio mod?

Place to post guides, observations, things related to modding that are not mods themselves.
ChineseFountain
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Aug 18, 2016 6:34 pm
Contact:

Example of a well structured Factorio mod?

Post by ChineseFountain »

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
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Example of a well structured Factorio mod?

Post by aubergine18 »

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.
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.
Post Reply

Return to “Modding discussion”