Factorio+

by fishbus

A mod that builds upon and tweaks the vanilla experience with a little bit of everything: crafting, furnaces, resources, turrets, vehicles, enemies and weapons. [Built for base 2.0 Factorio - Works with Space Age]

Overhaul
a day ago
0.18 - 2.0
28.0K
Transportation Logistics Trains Combat Armor Character Enemies Environment Mining Fluids Logistic network Manufacturing Power Storage

b [Fixed] check if nil before change it

20 days ago

模组加载失败:factorioplus/buildings-sa.lua:36: attempt to index field 'basic-loader' (a nil value)
stack traceback:
factorioplus/buildings-sa.lua:36: in main chunk
[C]: in function 'require'
factorioplus/data.lua:44: in main chunk

20 days ago

模组加载失败:factorioplus/buildings-sa.lua:36: attempt to index field 'basic-loader' (a nil value)
stack traceback:
factorioplus/buildings-sa.lua:36: in main chunk
[C]: in function 'require'
factorioplus/data.lua:44: in main chunk

Heya,

Just to check: You have the Loaders turned off?

I will make a quick fix sometime today/tomorrow.

20 days ago

Yes, I suggest you check for existence before making modifications

19 days ago

Heya,

Fixed included in 2.7.1 update.

Cheers

19 days ago

hey....
crashed again
in technology-sa.lua

i fixed it

require("stats")

if data.raw["technology"]["bioflux-processing"] and data.raw["technology"]["bioflux-processing"].effects then
table.insert(data.raw["technology"]["bioflux-processing"].effects,
{
type = "unlock-recipe",
recipe = "bioexplosives"
})
end

if data.raw["technology"]["captivity"] and data.raw["technology"]["captivity"].effects then
table.insert(data.raw["technology"]["captivity"].effects,
{
type = "unlock-recipe",
recipe = "process-biter-egg-to-chunks"
})
end

if data.raw["technology"]["turbo-transport-belt"] then
data.raw["technology"]["turbo-transport-belt"].hidden = true
data.raw["technology"]["turbo-transport-belt"].hidden_in_factoriopedia = true
end

if data.raw["technology"]["logistics-4"] and data.raw["technology"]["logistics-4"].unit then
data.raw["technology"]["logistics-4"].unit.ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"space-science-pack", 1},
{"metallurgic-science-pack", 1}
}
end

if data.raw["technology"]["loaders-4"] and data.raw["technology"]["loaders-4"].unit then
data.raw["technology"]["loaders-4"].unit.ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"space-science-pack", 1},
{"metallurgic-science-pack", 1}
}
end

if data.raw["technology"]["electric-energy-distribution-3"] then
data.raw["technology"]["electric-energy-distribution-3"].prerequisites =
{
"electric-energy-distribution-2",
"advanced-circuit",
"production-science-pack",
"electromagnetic-science-pack"
}
if data.raw["technology"]["electric-energy-distribution-3"].unit then
data.raw["technology"]["electric-energy-distribution-3"].unit.ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"space-science-pack", 1},
{"electromagnetic-science-pack", 1}
}
end
end

if data.raw["technology"]["electric-energy-accumulators-3"] then
data.raw["technology"]["electric-energy-accumulators-3"].prerequisites =
{
"electric-energy-accumulators-2",
"processing-unit",
"electromagnetic-science-pack"
}
if data.raw["technology"]["electric-energy-accumulators-3"].unit then
data.raw["technology"]["electric-energy-accumulators-3"].unit.ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"space-science-pack", 1},
{"electromagnetic-science-pack", 1}
}
end
end

if data.raw["technology"]["worker-robots-speed-7"] then
data.raw["technology"]["worker-robots-speed-7"].effects =
{
{
type = "worker-robot-speed",
modifier = robot_speed_per_tech_level
}
}
end

if data.raw["technology"]["foundry"] and data.raw["technology"]["foundry"].effects then
table.insert(data.raw["technology"]["foundry"].effects, { type = "unlock-recipe", recipe = "glass-from-lava" })
table.insert(data.raw["technology"]["foundry"].effects, { type = "unlock-recipe", recipe = "molten-aluminium-from-lava" })
table.insert(data.raw["technology"]["foundry"].effects, { type = "unlock-recipe", recipe = "casting-aluminium" })
end

data.extend({
{
type = "technology",
name = "aluminium-productivity",
icons = util.technology_icon_constant_recipe_productivity("factorioplus/graphics/technology/aluminium-productivity.png"),
icon_size = 256,
effects =
{
{
type = "change-recipe-productivity",
recipe = "aluminium-plate",
change = 0.1
},
},
prerequisites = {"production-science-pack", "metallurgic-science-pack"},
unit =
{
count_formula = "1.5^L*1000",
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"metallurgic-science-pack", 1},
},
time = 60
},
max_level = "infinite",
upgrade = true
},

{
    type = "technology",
    name = "rocket-battery",
    icon = "__space-age__/graphics/technology/rocket-turret.png",
    icon_size = 256,
    effects =
    {
      {
        type = "unlock-recipe",
        recipe = "rocket-battery"
      },
      {
        type = "unlock-recipe",
        recipe = "coal-synthesis"
      }
    },
    prerequisites = {"rocket-turret", "carbon-fiber", "stronger-explosives-2"},
    unit =
    {
      ingredients =
      {
        {"automation-science-pack", 1},
        {"logistic-science-pack", 1},
        {"military-science-pack", 1},
        {"chemical-science-pack", 1},
        {"space-science-pack", 1},
        {"agricultural-science-pack", 1}
      },
      time = 30,
      count = 1000
    }
}

})

19 days ago

and

I noticed that you wrote these lines of code in your mod:

data.raw["technology"]["explosive-rocketry"].enabled = false
data.raw["technology"]["explosive-rocketry"].hidden = true

But in my mod pack, this causes all the technologies that have this tech as a prerequisite to become permanently un-researchable. I can't figure out why you set it up this way.

19 days ago

also for me its till crashing
Failed to load mods: factorioplus/technology-sa.lua:36: attempt to index field 'loaders-4' (a nil value)
stack traceback:
factorioplus/technology-sa.lua:36: in main chunk
[C]: in function 'require'
factorioplus/data.lua:42: in main chunk

19 days ago

also for me its till crashing
Failed to load mods: factorioplus/technology-sa.lua:36: attempt to index field 'loaders-4' (a nil value)
stack traceback:
factorioplus/technology-sa.lua:36: in main chunk
[C]: in function 'require'
factorioplus/data.lua:42: in main chunk

same to me

New response