YouMod Recipe - Tutorial and Example how to mod Recipes


Edit these recipe files with a software like Notepad++ and create your own mod with modified recipes. See Mod Portal - YouMod Recipe for tutorial.

5 years ago
0.16 - 0.17
227

g Dude, that is great

6 years ago

Nice work. IF possible would you add an example of how to change / hide recipes from other mods?

6 years ago

Just do
data.raw.recipe["recipename"] = nil
To remove a recipe
Or
data.raw.recipe["recipename"].ingredients =
{
{
["itemname", itemamount]
},
{
["itemname", itemamount]
}
(you can make this list as long as you want, just don't forget commas!)
}
To add something to a recipe

6 years ago

Perfect micromario... that's it. In data.lua you can do it easily and without conflict. Really is the way to do all kind of modifications

Some more examples:
data.raw["recipe"]["underground-belt"].hidden = true -- recipe underground belt disapear
data.raw["recipe"]["locomotive"].ingredients = {} -- locomotive free
data.raw["recipe"]["science-pack-2"].ingredients = {{"inserter", 1},{"burner-inserter", 1}} -- change the recipe of science pack 2

data.raw["mining-drill"]["electric-mining-drill"].mining_speed = 5
data.raw["assembling-machine"]["assembling-machine-1"].crafting_speed = 5
data.raw["assembling-machine"]["assembling-machine-2"].crafting_speed = 7.5
data.raw["assembling-machine"]["assembling-machine-3"].crafting_speed = 12.5

mining drill and assembling machines 10 times faster

data.raw["furnace"]["stone-furnace"].crafting_speed = 10
data.raw["furnace"]["steel-furnace"].crafting_speed = 20
data.raw["furnace"]["electric-furnace"].crafting_speed = 25

furnaces 10 times faster

data.raw["inserter"]["long-handed-inserter"].rotation_speed = 0.07
data.raw["inserter"]["long-handed-inserter"].extension_speed = 0.05
Long handed inserter be fast

data.raw["player"]["player"].collision_box = {{0,0}, {0,0}}
You not colide, you can walk anywhere...

The downloaded mods - you can extract all zip files into folders, and open all .lua files from them and edit each file. You can delete the zips and have just the folders with all files extracted. All mods will continue work and you can edit them individually.

Every thing you edit, it's good to start the game to see if there any error.

New response