Page 1 of 1

I want make addon

Posted: Thu Aug 20, 2020 10:52 am
by CruWiT
I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?

Re: I want make addon

Posted: Thu Aug 20, 2020 10:58 am
by darkfrei
CruWiT wrote: Thu Aug 20, 2020 10:52 am I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?
Write here ingredients, amounts and result for example.

See also https://wiki.factorio.com/Tutorial:Modding_tutorial

Re: I want make addon

Posted: Thu Aug 20, 2020 12:56 pm
by CruWiT
darkfrei wrote: Thu Aug 20, 2020 10:58 am
CruWiT wrote: Thu Aug 20, 2020 10:52 am I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?
Write here ingredients, amounts and result for example.

See also https://wiki.factorio.com/Tutorial:Modding_tutorial
For Example I want;
ingredients;
1x phenolic board
1x copper plate
1x tin plate
1x cobalt plate
5x ferric chloride solution
Result;
4x Basic Module Board

How can do this?

Re: I want make addon

Posted: Thu Aug 20, 2020 1:46 pm
by darkfrei
CruWiT wrote: Thu Aug 20, 2020 12:56 pm
darkfrei wrote: Thu Aug 20, 2020 10:58 am
CruWiT wrote: Thu Aug 20, 2020 10:52 am I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?
Write here ingredients, amounts and result for example.

See also https://wiki.factorio.com/Tutorial:Modding_tutorial
For Example I want;
ingredients;
1x phenolic board
1x copper plate
1x tin plate
1x cobalt plate
5x ferric chloride solution
Result;
4x Basic Module Board

How can do this?
I don't know the internal name, press the F5 in the game to get the item's internal name.
there is internal name
The recipe must be as:

Code: Select all

data:extend({
{
	name = "my-first-mod-basic-module-board", -- the name of the recipe must be unique
	type = "recipe",
	ingredients = 
	{
		{"phenolic-board", 1},
		{"copper-plate", 1},
		{"tin-plate", 1},
		{"cobalt-plate", 1},
		{"ferric-chloride-solution", 5} -- definition for item, not for fluid!
	},
	result = "basic-module-board",
	result_count = 4
}
})

1. Setup the info.json (copy from any mod, paste to your mod folder my-first-mod_0.0.1 and change it to the same as folder name).
2. Place above code to the data.lua in your mod folder.

Re: I want make addon

Posted: Thu Aug 20, 2020 3:54 pm
by CruWiT
Thanks but How can override this recipe to old orginal recipe?

Re: I want make addon

Posted: Fri Aug 21, 2020 8:54 am
by darkfrei
CruWiT wrote: Thu Aug 20, 2020 3:54 pm Thanks but How can override this recipe to old orginal recipe?
Use the same internal recipe name as it was before, not unique recipe name anymore; but instead of data.lua it must be in the file data-updates.lua or data-final-fixes.lua.

Re: I want make addon

Posted: Fri Aug 21, 2020 5:10 pm
by CruWiT
darkfrei wrote: Fri Aug 21, 2020 8:54 am
CruWiT wrote: Thu Aug 20, 2020 3:54 pm Thanks but How can override this recipe to old orginal recipe?
Use the same internal recipe name as it was before, not unique recipe name anymore; but instead of data.lua it must be in the file data-updates.lua or data-final-fixes.lua.
Ok. I will try thanks your helps.