making a furnace accept coal + custom item

Place to get help with not working mods / modding interface.
Post Reply
Kriogenic
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Jun 02, 2016 4:56 pm
Contact:

making a furnace accept coal + custom item

Post by Kriogenic »

I am trying to make a furnace take two inputs which I would like to be coal and a custom item which name at the moment is new-fuel

I have written it so far like so

Code: Select all

 {
    type = "item",
    name = "new-fuel",
    icon = "__ModTest__/graphics/icons/new-fuel.png",
    flags = {"goes-to-main-inventory"},
   subgroup = "raw-material",
    order = "a[new-fuel]",
    stack_size = 200
  },
 {
    type = "recipe-category",
    name = "new-smelting"
  },
{
    type = "recipe",
    name = "new-dust",
    category = "new-smelting",
    energy_required = 3.5,
    ingredients = {{ "new-ore", 1}},
    result = "new-dust"
  },
{
    type = "recipe",
    name = "new-fuel",
    category = "new-smelting",
    energy_required = 5,
    ingredients = {
	  {type="item", name="new-dust", amount=2},
      {type="item", name="coal", amount=1}},
    result = "new-fuel"
  },
  {
    type = "furnace",
    name = "new-furnace",
    icon = "__base__/graphics/icons/electric-furnace.png",
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    minable = {mining_time = 1, result = "new-furnace"},
    max_health = 150,
    corpse = "big-remnants",
    dying_explosion = "medium-explosion",
    light = {intensity = 1, size = 10},
    resistances =
    {
      {
        type = "fire",
        percent = 80
      }
    },
    collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
    selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
    module_specification =
    {
      module_slots = 2,
      module_info_icon_shift = {0, 0.8}
    },
    allowed_effects = {"consumption", "speed", "productivity", "pollution"},
    crafting_categories = {"new-smelting"},
    result_inventory_size = 1,
    crafting_speed = 2,
    energy_usage = "180kW",
    source_inventory_size = 2,
    energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      emissions = 0.005
    },
    vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
    working_sound =
    {
      sound =
      {
        filename = "__base__/sound/electric-furnace.ogg",
        volume = 0.7
      },
      apparent_volume = 1.5
    },
    animation =
    {
      filename = "__base__/graphics/entity/electric-furnace/electric-furnace-base.png",
      priority = "high",
      width = 129,
      height = 100,
      frame_count = 1,
      shift = {0.421875, 0}
    },
    working_visualisations =
    {
      {
        animation =
        {
          filename = "__base__/graphics/entity/electric-furnace/electric-furnace-heater.png",
          priority = "high",
          width = 25,
          height = 15,
          frame_count = 12,
          animation_speed = 0.5,
          shift = {0.015625, 0.890625}
        },
        light = {intensity = 0.4, size = 6, shift = {0.0, 1.0}}
      },
      {
        animation =
        {
          filename = "__base__/graphics/entity/electric-furnace/electric-furnace-propeller-1.png",
          priority = "high",
          width = 19,
          height = 13,
          frame_count = 4,
          animation_speed = 0.5,
          shift = {-0.671875, -0.640625}
        }
      },
      {
        animation =
        {
          filename = "__base__/graphics/entity/electric-furnace/electric-furnace-propeller-2.png",
          priority = "high",
          width = 12,
          height = 9,
          frame_count = 4,
          animation_speed = 0.5,
          shift = {0.0625, -1.234375}
        }
      }
    },
    fast_replaceable_group = "furnace"
  },
so basically I have a new ore i have put on the map, this is named 'new-ore', I made a copy of the orignal electric furnace made its crafting_categories to new-smelting and made it take 2 inputs.

I also have two recipes for this furnace, one which turns new-ore into new-dust, this recipe works perfectly fine
the other recipe is meant to take 1 new-dust and 1 coal and turn it into new-fuel.

However when I try to put either coal or new-dust into the furnace it says neither of them can be smelted.
I have also tried making the furnaces crafting_categories = {"new-smelting", "smelting"} which had no effect.

Any help would be awesome thanks,
Kriogenic.

Swadius
Inserter
Inserter
Posts: 31
Joined: Sun Feb 23, 2014 10:54 am
Contact:

Re: making a furnace accept coal + custom item

Post by Swadius »

Try replacing the coal in the ingredients list with something else like iron. Test it to see if maybe it's just coal that isn't allowed due to how furnaces work with using coal as power.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: making a furnace accept coal + custom item

Post by Arch666Angel »

You need to make it an assembly machine type instead of a furnace type to take more than one input. Furnaces are hardcoded to just take 1 input, so they can set their recipes automatically

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: making a furnace accept coal + custom item

Post by bobingabout »

I suppose the round-about solution is to make a new furnace entity that is actually an assembling machine, so it can take more custom recipe inputs. The problem is like an assembling machine, you have to set it manually.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Kriogenic
Burner Inserter
Burner Inserter
Posts: 7
Joined: Thu Jun 02, 2016 4:56 pm
Contact:

Re: making a furnace accept coal + custom item

Post by Kriogenic »

Ahhh no worries, thanks for the help. I have made it an assembly machine and all is well

Post Reply

Return to “Modding help”