Page 1 of 1

learn modding

Posted: Sat Dec 05, 2020 6:22 pm
by Ygreqk
Hello, can anyone advise me on how to start modding because I do not know where to start?

Re: learn modding

Posted: Sat Dec 05, 2020 6:37 pm
by robot256
Best place to start is the first tutorial on the Wiki: https://wiki.factorio.com/Tutorial:Modd ... al/Gangsir

Re: learn modding

Posted: Sat Dec 05, 2020 7:34 pm
by Ygreqk
Thank you :D .

Re: learn modding

Posted: Sun Dec 06, 2020 6:42 am
by Pi-C
I guess you'll want to start with creating or changing prototypes (recipes, items, entities etc.). So you should definitely consult the prototype definitions. Once your mod is loaded without errors, be sure to use the in-game prototype browser (hover the cursor over something and press CTRL+SHIFT+F) to inspect the final prototypes. That's really helpful because the game will everything you didn't define with default values, so your final prototype may be different from what you thought.

In addition to the tutorial robot256 linked to, here are more Modding tutorials that will become relevant to you at some point. However, there's a source beyond tutorials that you definitely should tap into: other mods!

Look at their code to see how other modders get things working! If you don't know where to start (mods may contain many files and folders) "reading a mod", I'd recommend progressing in the order in which things are loaded (see data lifecycle). So start with the settings, and continue with data.lua, data-updates.lua, and data-final-fixes.lua, following the trail if they contain something like "require(path_to_file)".

Eventually, you may want to let your mod do stuff not only when loading the game, but also when it's running (during the control stage). At that point, you should probably bookmark the Lua API description. :-)

Re: learn modding

Posted: Sun Dec 06, 2020 9:08 am
by Ygreqk
Thanks for advice. :D