Recipe Change

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2126
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Recipe Change

Post by Ranakastrasz »

I am attempting to modify recipies, mainly for my own use. However, i ran into a few issues

Resolved: The game doesn't accept lubricant as an item. I am certain I copied the original recipie exactly originally, and only changed the number.
Resolved: or the duration (assuming that is what energy is)

The game won't accept my attempt to change the result count

Can anyone point me to a location where all of this stuff is explained more clearly? I used an existing mod (Nova's Powered armor recipie changer) as a base, and while that works fine, as does anything closely related, the other, new stuff doesn't work as my expectations dictate.

Code: Select all

-- Armor
data.raw["recipe"]["basic-modular-armor"].ingredients =
	{
		{ "advanced-circuit", 40},
		{"heavy-armor", 1}
	}

data.raw["recipe"]["power-armor"].ingredients =
	{
		{"basic-modular-armor", 2},
		{"processing-unit", 100},
		{"electric-engine-unit", 30},
		{"alien-artifact", 10}
	}

data.raw["recipe"]["power-armor-mk2"].ingredients =
	{
		{"power-armor", 1}, {"effectivity-module-3", 5},
		{"speed-module-3", 5}, {"processing-unit", 100},
		{"alien-artifact", 40}
	}

-- Belts

data.raw["recipe"]["fast-transport-belt-to-ground"].ingredients = 
	{
	  {"fast-transport-belt", 4},
	  {"basic-transport-belt-to-ground", 2}
	}
--[[data.raw["recipe"]["express-transport-belt-to-ground"].ingredients = 
	{
	  {"express-transport-belt", 4},
	  {"fast-transport-belt-to-ground", 2},
      {"iron-gear-wheel", 2},
      {type="fluid", name="lubricant", amount=4}
	}
data.raw["recipe"]["fast-splitter"].ingredients = 
    {
      {"basic-splitter", 1},
	  {"express-transport-belt", 2},
      {"iron-gear-wheel", 4},
      {"advanced-circuit", 10}
    }
data.raw["recipe"]["express-splitter"].ingredients = 
    {
      {"fast-splitter", 1},
	  {"fast-transport-belt", 2},
      {"iron-gear-wheel", 2},
      {"electronic-circuit", 10},
      {type="fluid", name="lubricant", amount=8}
    }]]--
	
data.raw["recipe"]["iron-chest"].ingredients = 
    {
      {"wooden-chest", 1},
	  {"iron-plate", 6}
    }
data.raw["recipe"]["steel-chest"].ingredients = 
    {
      {"iron-chest", 1},
	  {"steel-plate", 6}
    }

	-- Circuits
--[[data.raw["recipe"]["advanced-circuit"].ingredients = 
    {
      {"electronic-circuit", 3},
      {"plastic-bar", 3},
      {"copper-cable", 6}
    },]]--
--data.raw["recipe"]["advanced-circuit"].result_count = 2
--data.raw["recipe"]["advanced-circuit"].energy_required = 15

--[[data.raw["recipe"]["processing-unit"].ingredients = 
    {
      {"electronic-circuit", 20},
      {"advanced-circuit", 4},
      {type="fluid", name = "sulfuric-acid", amount = 2}
    },]]--
--data.raw["recipe"]["processing-unit"].result_count = 4
--data.raw["recipe"]["processing-unit"].energy_required = 120
	
	-- Furnaces
--[[data.raw["recipe"]["steel-furnace"].ingredients = 
	{
		{"stone-furnace",1},
		{"steel-plate", 8},
		{"stone-brick", 8}
	},
    
data.raw["recipe"]["electric-furnace"].ingredients = 
	{
		{"steel-furnace",1},
		{"steel-plate", 8},
		{"electronic-circuit", 2},
		{"advanced-circuit", 2}
	},]]--
    
-- Chests

--[[
Previous recipes:

  {
    type = "recipe",
    name = "heavy-armor",
    enabled = "false",
    energy_required = 8,
    ingredients = {{ "copper-plate", 100}, {"steel-plate", 50}},
    result = "heavy-armor"
  },
  {
    type = "recipe",
    name = "basic-modular-armor",
    enabled = "false",
    energy_required = 15,
    ingredients = {{ "advanced-circuit", 30}, {"processing-unit", 5}, {"steel-plate", 50}},
    result = "basic-modular-armor"
  },
  {
    type = "recipe",
    name = "power-armor",
    enabled = "false",
    energy_required = 20,
    ingredients = {{ "processing-unit", 100}, {"electric-engine-unit", 30}, {"steel-plate", 100}, {"alien-artifact", 10}},
    result = "power-armor"
  },
  {
    type = "recipe",
    name = "power-armor-mk2",
    enabled = "false",
    energy_required = 25,
    ingredients = {{ "effectivity-module-3", 5}, {"speed-module-3", 5}, {"processing-unit", 200}, {"steel-plate", 50}, {"alien-artifact", 50}},
    result = "power-armor-mk2"
  },
  ]]--
  --[[
  {
    type = "recipe",
    name = "fast-transport-belt",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 5},
      {"basic-transport-belt", 1}
    },
    result = "fast-transport-belt"
  },
  {
    type = "recipe",
    name = "express-transport-belt",
    category = "crafting-with-fluid",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 5},
      {"fast-transport-belt", 1},
      {type="fluid", name="lubricant", amount=2},
    },
    result = "express-transport-belt"
  },
  ]]--
  --[[
  {
    type = "recipe",
    name = "iron-chest",
    enabled = "true",
    ingredients = {{"iron-plate", 8}},
    result = "iron-chest"
  },
  {
    type = "recipe",
    name = "steel-chest",
    enabled = "false",
    ingredients = {{"steel-plate", 8}},
    result = "steel-chest"
  },
  
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "fast-transport-belt-to-ground",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 20},
      {"basic-transport-belt-to-ground", 2}
    },
    result_count = 2,
    result = "fast-transport-belt-to-ground"
  },
  {
    type = "recipe",
    name = "express-transport-belt-to-ground",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 40},
      {"fast-transport-belt-to-ground", 2}
    },
    result_count = 2,
    result = "express-transport-belt-to-ground"
  },
  
  
  {
    type = "recipe",
    name = "fast-splitter",
    enabled = "false",
    energy_required = 2,
    ingredients =
    {
      {"basic-splitter", 1},
      {"iron-gear-wheel", 10},
      {"electronic-circuit", 10}
    },
    result = "fast-splitter"
  },
  {
    type = "recipe",
    name = "express-splitter",
    category = "crafting-with-fluid",
    enabled = "false",
    energy_required = 2,
    ingredients =
    {
      {"fast-splitter", 1},
      {"iron-gear-wheel", 10},
      {"advanced-circuit", 10},
      {type="fluid", name="lubricant", amount=8}
    },
    result = "express-splitter"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "advanced-circuit",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"electronic-circuit", 2},
      {"plastic-bar", 2},
      {"copper-cable", 4}
    },
    result = "advanced-circuit"
  },
  {
    type = "recipe",
    name = "processing-unit",
    category = "crafting-with-fluid",
    enabled = "false",
    energy_required = 15,
    ingredients =
    {
      {"electronic-circuit", 20},
      {"advanced-circuit", 2},
      {type="fluid", name = "sulfuric-acid", amount = 0.5}
    },
    result = "processing-unit"
  },
  
  ]]--
  --[[
  
  {
    type = "recipe",
    name = "steel-furnace",
    ingredients = {{"steel-plate", 8}, {"stone-brick", 10}},
    result = "steel-furnace",
    energy_required = 3,
    enabled = "false"
  },
  {
    type = "recipe",
    name = "electric-furnace",
    ingredients = {{"steel-plate", 15}, {"advanced-circuit", 5}, {"stone-brick", 10}},
    result = "electric-furnace",
    energy_required = 5,
    enabled = "false"
  },
  
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "iron-gear-wheel",
    ingredients = {{"iron-plate", 2}},
    result = "iron-gear-wheel"
  },
  
  ]]--
  --[[
  
  {
    type = "recipe",
    name = "basic-bullet-magazine",
    energy_required = 2,
    ingredients = {{"iron-plate", 2}},
    result = "basic-bullet-magazine",
    result_count = 1
  },
  {
    type = "recipe",
    name = "piercing-bullet-magazine",
    enabled = "false",
    energy_required = 3,
    ingredients =
    {
      {"copper-plate", 5},
      {"steel-plate", 1}
    },
    result = "piercing-bullet-magazine"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "rocket",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"electronic-circuit", 1},
      {"explosives", 2},
      {"iron-plate", 2}
    },
    result = "rocket"
  },
  {
    type = "recipe",
    name = "explosive-rocket",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"rocket", 1},
      {"explosives", 5}
    },
    result = "explosive-rocket"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "shotgun-shell",
    enabled = "false",
    energy_required = 3,
    ingredients =
    {
      {"copper-plate", 2},
      {"iron-plate", 2}
    },
    result = "shotgun-shell"
  },
  {
    type = "recipe",
    name = "piercing-shotgun-shell",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"copper-plate", 2},
      {"steel-plate", 2}
    },
    result = "piercing-shotgun-shell"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "cannon-shell",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"steel-plate", 4},
      {"plastic-bar", 2},
      {"explosives", 1},
    },
    result = "cannon-shell"
  }

--]]
Last edited by Ranakastrasz on Sat Jan 03, 2015 9:42 pm, edited 2 times in total.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
AlyxDeLunar
Fast Inserter
Fast Inserter
Posts: 105
Joined: Mon Dec 22, 2014 7:32 pm
Contact:

Re: Recipie Change

Post by AlyxDeLunar »

So, the fix is simple! Hooray!!!

For every item recipe, there is a recipe category it can be under. For most items, like the transport belts,they are just under a category that allows you to craft by hand, by machine, whatever. However, you can't use fluid recipes in this category, because it's not like the player can hold any fluid.
For recipes that use fluids, there is a separate category, "crafting-with-fluid" that they need to be set as, this allows you to use the fluid type entities with them. (Or "chemistry" if you want them to be created in a chemical plant)

Just add the following line to your recipes changes that need to work with fluid:
data.raw["recipe"]["express-transport-belt-to-ground"].category = "crafting-with-fluid"

So, as a test, I uncommented the first express belt there, and edited it as so:

Code: Select all

data.raw["recipe"]["express-transport-belt-to-ground"].category = "crafting-with-fluid"
data.raw["recipe"]["express-transport-belt-to-ground"].ingredients = 
   {
	
     {"express-transport-belt", 4},
     {"fast-transport-belt-to-ground", 2},
      {"iron-gear-wheel", 2},
      {type="fluid", name="lubricant", amount=4}
   }
I tested it by loading the game with the changes, and it worked like a charm :D
Sometimes humorous, usually congenial. Always Alyx.

My Stuff:
Lunar's Factorio Mod Manager

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2126
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Recipie Change

Post by Ranakastrasz »

That fixes the first issue. Awsome. Thanks :D
However, I still can't seem to change the "energy Cost" meaning Processing duration. I want Processing units to take a full 2 minutes (less with speed) to make.
AND I can't get them to produce two or four per recipie. I copied the data from Copper Circuit.
I imagine the problem is that those data points don't exist to start with, so can't be changed, but I have no idea of the syntax for creating said entries.

Edit: The energy cost on it's own works fine. I still cant figure out how to change the output multiplier. Presumably this is because said entry doesn't exist to start with.

Edit2: huh. Now it works fine. Guess it was breaking from the earlier fluid-processing issue. All problems appear resolved.
New Code here.

Code: Select all

-- Armor


data.raw["recipe"]["iron-gear-wheel"].ingredients = 
	{
		{"iron-plate",1}
	}
    
data.raw["recipe"]["heavy-armor"].ingredients =
	{
		{"basic-armor",1},
		{ "copper-plate", 100},
		{"steel-plate", 40}
	}

data.raw["recipe"]["basic-modular-armor"].ingredients =
	{
		{ "heavy-armor", 1},
		{ "advanced-circuit", 40}
	}

data.raw["recipe"]["power-armor"].ingredients =
	{
		{"basic-modular-armor", 2},
		{"processing-unit", 100},
		{"electric-engine-unit", 30},
		{"alien-artifact", 10}
	}

data.raw["recipe"]["power-armor-mk2"].ingredients =
	{
		{"power-armor", 1}, {"effectivity-module-3", 5},
		{"speed-module-3", 5}, {"processing-unit", 100},
		{"alien-artifact", 40}
	}

-- Belts

data.raw["recipe"]["fast-transport-belt-to-ground"].ingredients = 
	{
		{"fast-transport-belt", 4},
		{"iron-gear-wheel", 2},
		{"basic-transport-belt-to-ground", 2}
	}
	
data.raw["recipe"]["express-transport-belt-to-ground"].category = "crafting-with-fluid"
data.raw["recipe"]["express-transport-belt-to-ground"].ingredients = 
   {
   
		{"express-transport-belt", 4},
		{"fast-transport-belt-to-ground", 2},
		{"iron-gear-wheel", 4},
		{type="fluid", name="lubricant", amount=4}
   }
   
data.raw["recipe"]["fast-splitter"].ingredients = 
    {
      {"basic-splitter", 1},
	  {"fast-transport-belt", 2},
      {"iron-gear-wheel", 2},
      {"advanced-circuit", 10}
    }
	
data.raw["recipe"]["express-splitter"].category = "crafting-with-fluid"
data.raw["recipe"]["express-splitter"].ingredients = 
    {
      {"fast-splitter", 1},
	  {"express-transport-belt", 2},
      {"iron-gear-wheel", 4},
      {"electronic-circuit", 10},
      {type="fluid", name="lubricant", amount=8}
    }
	
    
-- Chests

data.raw["recipe"]["iron-chest"].ingredients = 
    {
      {"wooden-chest", 1},
	  {"iron-plate", 6}
    }
data.raw["recipe"]["steel-chest"].ingredients = 
    {
      {"iron-chest", 1},
	  {"steel-plate", 6}
    }

	-- Circuits
data.raw["recipe"]["advanced-circuit"].ingredients = 
    {
      {"electronic-circuit", 3},
      {"plastic-bar", 3},
      {"copper-cable", 6}
    }
	--result_count = 2,
data.raw["recipe"]["advanced-circuit"].energy_required = 15


data.raw["recipe"]["processing-unit"].ingredients = 
    {
      {"electronic-circuit", 20},
      {"advanced-circuit", 4},
      {type="fluid", name = "sulfuric-acid", amount = 2}
    }
	
data.raw["recipe"]["processing-unit"].energy_required = 120
--data.raw["recipe"]["processing-unit"].result_count = 4
	
	-- Furnaces
data.raw["recipe"]["steel-furnace"].ingredients = 
	{
		{"stone-furnace",1},
		{"steel-plate", 8},
		{"stone-brick", 8}
	}
    
data.raw["recipe"]["electric-furnace"].ingredients = 
	{
		{"steel-furnace",1},
		{"steel-plate", 8},
		{"electronic-circuit", 2},
		{"advanced-circuit", 2}
	}
	
--[[
Previous recipes:

  {
    type = "recipe",
    name = "basic-armor",
    enabled = "false",
    energy_required = 3,
    ingredients = {{"iron-plate", 40}},
    result = "basic-armor"
  },
  {
    type = "recipe",
    name = "heavy-armor",
    enabled = "false",
    energy_required = 8,
    ingredients = {{ "copper-plate", 100}, {"steel-plate", 50}},
    result = "heavy-armor"
  },
  {
    type = "recipe",
    name = "basic-modular-armor",
    enabled = "false",
    energy_required = 15,
    ingredients = {{ "advanced-circuit", 30}, {"processing-unit", 5}, {"steel-plate", 50}},
    result = "basic-modular-armor"
  },
  {
    type = "recipe",
    name = "power-armor",
    enabled = "false",
    energy_required = 20,
    ingredients = {{ "processing-unit", 100}, {"electric-engine-unit", 30}, {"steel-plate", 100}, {"alien-artifact", 10}},
    result = "power-armor"
  },
  {
    type = "recipe",
    name = "power-armor-mk2",
    enabled = "false",
    energy_required = 25,
    ingredients = {{ "effectivity-module-3", 5}, {"speed-module-3", 5}, {"processing-unit", 200}, {"steel-plate", 50}, {"alien-artifact", 50}},
    result = "power-armor-mk2"
  },
  ]]--
  --[[
  {
    type = "recipe",
    name = "fast-transport-belt",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 5},
      {"basic-transport-belt", 1}
    },
    result = "fast-transport-belt"
  },
  {
    type = "recipe",
    name = "express-transport-belt",
    category = "crafting-with-fluid",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 5},
      {"fast-transport-belt", 1},
      {type="fluid", name="lubricant", amount=2},
    },
    result = "express-transport-belt"
  },
  ]]--
  --[[
  {
    type = "recipe",
    name = "iron-chest",
    enabled = "true",
    ingredients = {{"iron-plate", 8}},
    result = "iron-chest"
  },
  {
    type = "recipe",
    name = "steel-chest",
    enabled = "false",
    ingredients = {{"steel-plate", 8}},
    result = "steel-chest"
  },
  
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "fast-transport-belt-to-ground",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 20},
      {"basic-transport-belt-to-ground", 2}
    },
    result_count = 2,
    result = "fast-transport-belt-to-ground"
  },
  {
    type = "recipe",
    name = "express-transport-belt-to-ground",
    enabled = "false",
    ingredients =
    {
      {"iron-gear-wheel", 40},
      {"fast-transport-belt-to-ground", 2}
    },
    result_count = 2,
    result = "express-transport-belt-to-ground"
  },
  
  
  {
    type = "recipe",
    name = "fast-splitter",
    enabled = "false",
    energy_required = 2,
    ingredients =
    {
      {"basic-splitter", 1},
      {"iron-gear-wheel", 10},
      {"electronic-circuit", 10}
    },
    result = "fast-splitter"
  },
  {
    type = "recipe",
    name = "express-splitter",
    category = "crafting-with-fluid",
    enabled = "false",
    energy_required = 2,
    ingredients =
    {
      {"fast-splitter", 1},
      {"iron-gear-wheel", 10},
      {"advanced-circuit", 10},
      {type="fluid", name="lubricant", amount=8}
    },
    result = "express-splitter"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "advanced-circuit",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"electronic-circuit", 2},
      {"plastic-bar", 2},
      {"copper-cable", 4}
    },
    result = "advanced-circuit"
  },
  {
    type = "recipe",
    name = "processing-unit",
    category = "crafting-with-fluid",
    enabled = "false",
    energy_required = 15,
    ingredients =
    {
      {"electronic-circuit", 20},
      {"advanced-circuit", 2},
      {type="fluid", name = "sulfuric-acid", amount = 0.5}
    },
    result = "processing-unit"
  },
  
  ]]--
  --[[
  
  {
    type = "recipe",
    name = "steel-furnace",
    ingredients = {{"steel-plate", 8}, {"stone-brick", 10}},
    result = "steel-furnace",
    energy_required = 3,
    enabled = "false"
  },
  {
    type = "recipe",
    name = "electric-furnace",
    ingredients = {{"steel-plate", 15}, {"advanced-circuit", 5}, {"stone-brick", 10}},
    result = "electric-furnace",
    energy_required = 5,
    enabled = "false"
  },
  
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "iron-gear-wheel",
    ingredients = {{"iron-plate", 2}},
    result = "iron-gear-wheel"
  },
  
  ]]--
  --[[
  
  {
    type = "recipe",
    name = "basic-bullet-magazine",
    energy_required = 2,
    ingredients = {{"iron-plate", 2}},
    result = "basic-bullet-magazine",
    result_count = 1
  },
  {
    type = "recipe",
    name = "piercing-bullet-magazine",
    enabled = "false",
    energy_required = 3,
    ingredients =
    {
      {"copper-plate", 5},
      {"steel-plate", 1}
    },
    result = "piercing-bullet-magazine"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "rocket",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"electronic-circuit", 1},
      {"explosives", 2},
      {"iron-plate", 2}
    },
    result = "rocket"
  },
  {
    type = "recipe",
    name = "explosive-rocket",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"rocket", 1},
      {"explosives", 5}
    },
    result = "explosive-rocket"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "shotgun-shell",
    enabled = "false",
    energy_required = 3,
    ingredients =
    {
      {"copper-plate", 2},
      {"iron-plate", 2}
    },
    result = "shotgun-shell"
  },
  {
    type = "recipe",
    name = "piercing-shotgun-shell",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"copper-plate", 2},
      {"steel-plate", 2}
    },
    result = "piercing-shotgun-shell"
  },
  
  ]]--
  --[[
  {
    type = "recipe",
    name = "cannon-shell",
    enabled = "false",
    energy_required = 8,
    ingredients =
    {
      {"steel-plate", 4},
      {"plastic-bar", 2},
      {"explosives", 1},
    },
    result = "cannon-shell"
  }

--]]
Request Lock.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Post Reply

Return to “Modding help”