Fast Furnace Recipes


Make Furnace Recipes FAST with FAST Furnace Recipes. Multiply Furnace Recipe Speeds by up to 256 for all Furnace Recipes.

Content
8 months ago
1.1 - 2.0
1.09K
Manufacturing Cheats

b [Fixed] Crafting speed bug

8 months ago
(updated 8 months ago)

Hi, thanks for making this mod! I was looking for something simple to compact my smelting lines and this mod is just what I needed. There's a problem on this line though:

[code]FastFurnaceEntity.crafting_speed = Furnace.max_health * SpeedMultiplier[/code]

It should be crafting_speed on the right-hand side. An electric furnace with a crafting speed of 1400 is pretty wild though!

I also took the liberty of scaling up the energy usage as well. This is my first time using LUA or modding Factorio, so maybe there's a better way, but feel free to use it if you like.

[code]
diff --git a/FastFurnaceRecipes/data.lua b/FastFurnaceRecipes/data.lua
index d0dbb1e..8d274d6 100644
--- a/FastFurnaceRecipes/data.lua
+++ b/FastFurnaceRecipes/data.lua
@@ -32,7 +32,12 @@ for ,Furnace in pairs(data.raw["furnace"]) do
FastFurnaceEntity.match_animation_speed_to_activity = false
FastFurnaceEntity.MachineItem = FastFurnaceItem.name
FastFurnaceEntity.max_health = Furnace.max_health * SpeedMultiplier
- FastFurnaceEntity.crafting_speed = Furnace.max_health * SpeedMultiplier
+ FastFurnaceEntity.crafting_speed = Furnace.crafting_speed * SpeedMultiplier
+ if Furnace.energy_usage ~= nil then
+ local _, _, amt, unit = string.find(Furnace.energy_usage, "(%d+)%s(%a)")
+ local scaled_usage = "" .. (amt * SpeedMultiplier) .. unit
+ FastFurnaceEntity.energy_usage = scaled_usage
+ end
FastFurnaceEntity.localised_name = {"furnace.name", "ENTITY" .. Furnace.name .. "__"}
FastFurnaceEntity.localised_description = {"furnace.description", "ENTITY" .. Furnace.name .. "__"}
local FastFurnaceRecipe = {}
@@ -67,4 +72,4 @@ for
,Furnace in pairs(data.raw["furnace"]) do
data.raw["furnace"][Furnace.name] = FurnaceCraftingSpeed * SpeedMultiplier
end
end
-end
\ No newline at end of file
+end
[/code]

8 months ago
(updated 8 months ago)

Hi, thanks for making this mod! I was looking for something simple to compact my smelting lines and this mod is just what I needed. There's a problem on this line though:

FastFurnaceEntity.crafting_speed = Furnace.max_health * SpeedMultiplier

It should be crafting_speed on the right-hand side. An electric furnace with a crafting speed of 1400 is pretty wild though!

I also took the liberty of scaling up the energy usage as well. This is my first time using LUA or modding Factorio, so maybe there's a better way, but feel free to use it if you like.

```
diff --git a/FastFurnaceRecipes/data.lua b/FastFurnaceRecipes/data.lua

index d0dbb1e..8d274d6 100644

--- a/FastFurnaceRecipes/data.lua

+++ b/FastFurnaceRecipes/data.lua

@@ -32,7 +32,12 @@ for _,Furnace in pairs(data.raw["furnace"]) do

             FastFurnaceEntity.match_animation_speed_to_activity = false

             FastFurnaceEntity.MachineItem = FastFurnaceItem.name

             FastFurnaceEntity.max_health = Furnace.max_health * SpeedMultiplier
  • FastFurnaceEntity.crafting_speed = Furnace.max_health * SpeedMultiplier

  • FastFurnaceEntity.crafting_speed = Furnace.crafting_speed * SpeedMultiplier

  • if Furnace.energy_usage ~= nil then

  • local _, _, amt, unit = string.find(Furnace.energy_usage, "(%d+)%s(%a)")

  • local scaled_usage = "" .. (amt * SpeedMultiplier) .. unit

  • FastFurnaceEntity.energy_usage = scaled_usage

  • end

             FastFurnaceEntity.localised_name = {"furnace.name", "__ENTITY__" .. Furnace.name .. "__"}
    
             FastFurnaceEntity.localised_description = {"furnace.description", "__ENTITY__" .. Furnace.name .. "__"}
    
             local FastFurnaceRecipe = {}
    

@@ -67,4 +72,4 @@ for _,Furnace in pairs(data.raw["furnace"]) do

         data.raw["furnace"][Furnace.name] = FurnaceCraftingSpeed * SpeedMultiplier

     end

 end

-end

\ No newline at end of file

+end

```

Hi! I must have pasted the max health code over to the crafting speed code and forgot about changing the second max speed value.
Thank you for increasing energy usage and fixing the animations! I'll implement your fix when I have the time.
I'm also pretty sure that code will work.
I did try to clean up the code... But it didn't seem to work properly. Not sure why.

8 months ago
(updated 8 months ago)

Your code broke, but it was only the pattern which did so. I fixed this by using this as the pattern (second argument to string.find) instead: "(%d+)([kMGTPEZYRQ]%a)" which checks for as many digits as needed, then finds a size multiplier (the square brackets here) then an alphanumeric character. Not sure why you chose any whitespace character instead of a size multiplier, but that's for you to decide.

Also, your code was added:

local FastFurnaceEntity = table.deepcopy(data.raw["furnace"][Furnace.name])
FastFurnaceEntity.name = "ffr_fast-" .. Furnace.name
FastFurnaceEntity.minable.result = nil
if FastFurnaceEntity.minable.mining_time == nil then
    FastFurnaceEntity.minable.mining_time = 0.2
end
FastFurnaceEntity.minable.results = {{type = "item", name = FastFurnaceItem.name, amount = 1}}
FastFurnaceEntity.match_animation_speed_to_activity = false
FastFurnaceEntity.MachineItem = FastFurnaceItem.name
FastFurnaceEntity.max_health = Furnace.max_health * SpeedMultiplier
FastFurnaceEntity.crafting_speed = Furnace.crafting_speed * SpeedMultiplier
if Furnace.energy_usage ~= nil and EnergyMultiplierToggle then
    local _, _, amt, unit = string.find(Furnace.energy_usage, "(%d+)([kMGTPEZYRQ]%a)")
    if amt ~= nil and unit ~= nil then
         local scaled_usage = "" .. (amt * EnergyMultiplier) .. unit
         FastFurnaceEntity.energy_usage = scaled_usage
    else
         log("Something is wrong with this furnace! Full entity data: " .. serpent.block(Furnace))
    end
end
FastFurnaceEntity.localised_name = {"furnace.name", "__ENTITY__" .. Furnace.name .. "__"}
FastFurnaceEntity.localised_description = {"furnace.description", "__ENTITY__" .. Furnace.name .. "__"}

I think something was weird about how you pasted in the code (possibly due to the git messages "included" in the code)

This thread has been locked.