Space Exploration Earlier logistics system

by nodinos

Removes the Utility science pack, rocket science pack, and space science pack requirements from Logistics research, allowing access to it earlier in the game. Adapted from Space Exploration Early logistics system HomicidalBarber

Tweaks
1 year, 1 month ago
1.1
1.74K
Logistic network

g SE + KR2, AAI edits

1 year, 6 months ago
(updated 1 year, 6 months ago)

I edited this for my (currently early ongoing) playthrough of SE + KR2. Thought I would share for people seeking a similar experience. I may refine and upload it as a mod later idk.

it does the same thing but adds back the logistic science pack and for some later technologies rocket science pack. it also makes technologies like kr-logistic-containers-2 attainable earlier as well.

local function removePacks(name, requireRocket)
local tech = data.raw.technology[name]
if not tech then
log(name .. ' does not exist')
return
end

for i = 3, 1, -1 do --why do we need to do this 3 times? idk but it works
    for i, item in pairs(tech.unit.ingredients) do
        log(item[1])
        if requireRocket then
            if item[1] ~= 'chemical-science-pack' and item[1] ~= "logistic-science-pack" and item[1] ~= "automation-science-pack" and item[1] ~= 'se-rocket-science-pack' then
                table.remove(tech.unit.ingredients, i)
            end
        else
            if item[1] ~= 'chemical-science-pack' and item[1] ~= "logistic-science-pack" and item[1] ~= "automation-science-pack" then
                table.remove(tech.unit.ingredients, i)
            end
        end
    end

    if tech.prerequisites then
        for i, prereq in pairs(tech.prerequisites) do
            log(prereq)
            if prereq == 'utility-science-pack' then
                tech.prerequisites[i] = 'chemical-science-pack'
            end
            if prereq == 'production-science-pack' then
                tech.prerequisites[i] = 'chemical-science-pack'
            end
        end
    end
end

end

removePacks('logistic-robotics', false)
removePacks('logistic-system', false)
removePacks('kr-logistic-containers-2', false)
removePacks('aai-strongbox-logistic', false)
removePacks('aai-storehouse-logistic', true)
removePacks('worker-robots-storage-2', true)
removePacks('worker-robots-storage-3', true)
removePacks('robot-attrition-explosion-safety', true)

New response