248k Redux Mod


Port of the 248k mod by PreLeyZero from 1.1 to Factorio 2.0. May have compatibility issues with other mods.

Overhaul
a month ago
2.0
8.61K
Transportation Logistic network Manufacturing Power

b K2SO compat recycling bug

a month ago

Found that most recipes changes in scripts/krastorio2/overhaul.lua
The recycling recipe is regenerated in data-final-fix in k2so which runs before the overhaul.lua updates them

fix I found was to add the following to the end of scripts/krastorio2/overhaul

if mods["quality"] then
local skip = {
["kr-advanced-loader"] = true,
["kr-imersium-plate"] = true,
["kr-lithium-sulfur-battery"] = true,
["chemical-science-pack"] = true,
["production-science-pack"] = true,
["utility-science-pack"] = true,
["kr-singularity-tech-card"] = true,
}

local recycling = require("__quality__.prototypes.recycling")

local to_regenerate = {}

for _, entry in ipairs(building_table) do
    local recipe_name = entry[1]
    if not skip[recipe_name] then
        table.insert(to_regenerate, recipe_name)
    end
end

for _, entry in ipairs(item_table) do
    local recipe_name = entry[1]
    if not skip[recipe_name] then
        table.insert(to_regenerate, recipe_name)
    end
end

for _, recipe_name in ipairs(to_regenerate) do
    if data.raw.recipe[recipe_name] then
        data.raw.recipe[recipe_name .. "-recycling"] = nil
        recycling.generate_recycling_recipe(data.raw.recipe[recipe_name])
    end
end

end

Checked this in my own world and it appears to be good now. There is probably an easier way to go about this but I am not very good at lua so even this took me a while.

I am skipping certain recipes as they only output themselves at a 25% chance from how k2so has them setup and those recipes would get removed if I didnt. I dont know for sure what is causing this but it appears to be something with how generate_recycling_recipe creates recipes.

a month ago
(updated a month ago)

Thanks, I’m going to use your fix because I don't think I can do it any better. Also, as Todd Howard said: 'It just works.'

a month ago

I'm going to test it to see if everything works as intended

a month ago

Sounds good, and sorry for the poorly worded bug report. The report and fix took me right up to when I had to leave and I didnt end up proofreading it.

It may be worth looking into k2so to see how they are handling the recipes that I am currently skipping but I havent had the time to look into that yet. Also, I noticed some recipes missing from localization but didnt have time to put those in this report. Will write up which ones they are when I have time to get back into the game.

New response