Input slots on electric furnaces

Place to get help with not working mods / modding interface.
Rufflemao
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jul 31, 2016 7:47 am
Contact:

Input slots on electric furnaces

Post by Rufflemao »

hey guys.

i'm working on a mod that adds an electric furnaces with additionnal input slots for use in smart furnace setups

benefits are that steel and stone doesn't get stuck in the input slot and prevent the furnace from switching production. however 0.13.12 prevents the entity from having more than one input slot and gives that message on startup :

imgur.com/a/DBdrV (mod name a placeholder)

could this be changed back?

thanks!!
ShinyAfro
Inserter
Inserter
Posts: 27
Joined: Mon Jan 04, 2016 1:27 pm
Contact:

Re: Input slots on electric furnaces

Post by ShinyAfro »

Not sure what you mean about smart furnaces, and why you would have stone and steel running in the same line, however, if you want a furnace to craft items with more then one ingredient, it is impossible. Its hard coded to not allow this, if you have 2 input slots and a recipe that requires 2 inputs, it just won't accept the items. This is a safeguard from what i understand, say if you wanted a tad more realistic steel that required coal and iron ore, the furnace would make iron if the coal ran out.

Furnaces work exactly the same as assembly machines, so all you need to do make a assembly machine look and behave like a furnace.

Code: Select all

ShinyAEF1 = util.table.deepcopy(data.raw["assembling-machine"]["assembling-machine-3"])
ShinyAEF1.name = "advanced-electric-furnace-1Shiny"
ShinyAEF1.icon = "__base__/graphics/icons/electric-furnace.png"
ShinyAEF1.minable = {mining_time = 1, result = "advanced-electric-furnace-1Shiny"}
ShinyAEF1.max_health = 150
ShinyAEF1.crafting_categories = {"smelting", "Electric-Smelting", "Advanced-Smelting"}
ShinyAEF1.module_specification.module_slots = 2
ShinyAEF1.energy_usage = "200kW"
ShinyAEF1.crafting_speed = 2
ShinyAEF1.energy_source.emissions = 0.05
ShinyAEF1.animation = animationShiny(Input)
ShinyAEF1.working_visualisations = working_visualisationsShiny(inputs)
ShinyAEF1.fast_replaceable_group = "furnace"
data:extend({ShinyAEF1})
working_visualisationsShiny(inputs) and animationShiny(Input) are just variables i have somewhere else to hide a wall of text somewhere else, they look like this

Code: Select all

function working_visualisationsShiny(inputs)
return 
{
    {
        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}
        }
    }
}
end

function animationShiny(Input)
return
    {
      filename = "__base__/graphics/entity/electric-furnace/electric-furnace-base.png",
      priority = "high",
      width = 129,
      height = 100,
      frame_count = 1,
      shift = {0.421875, 0}
    }
end
Not sure why you cannot have more then one input slot, worked for me when i wrote that. Besides the point, even if you had two input-slots and stone got in, it would still make stone bricks.
The only way to make a steel furnace not take anything other then iron plates is have the furnace secretly be an assembly machine. As i said before, the only difference is ones automatic.

Its advisable you add a new recipe category if you plan on making multi-ingredient recipes for such a furnace, like so:

Code: Select all

data:extend({
  {
    type = "recipe-category",
    name = "Advanced-Smelting"
  }}
)
Rufflemao
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Jul 31, 2016 7:47 am
Contact:

Re: Input slots on electric furnaces

Post by Rufflemao »

thanks for that, i will look into it.

what i meant by smart furnaces is furnaces that switch production according to circuit condition - they can smelt anything - and if a furnace has multiple inputs, they can still smelt iron if they have 2 leftover iron plates into one of their inputs.

would your solution not disallow this, as it would force the player to manually select the receipe?

i spoke to Rsending on the factorio chatroom several hours ago. he's the one who hardcoded the limit - for performance reasons. and it doesnt look like it'll get changed back.
ShinyAfro
Inserter
Inserter
Posts: 27
Joined: Mon Jan 04, 2016 1:27 pm
Contact:

Re: Input slots on electric furnaces

Post by ShinyAfro »

Hrm, could that still not be done with regular furnaces? Say you had a belt, with a splitter one with iron ore the other with stone, set a circuit condition on the belts then swap inputs? alternatively, two filtered inserters for a per-furnace setup where you switch inserters. With steel it will be a little tricky, for sure though. Perhaps if there were a way to have the logistics system set a recipe for the assembly machine? Or exact input of materials, into a furnace.
Post Reply

Return to “Modding help”