Bigger Stack Sizes x10


Makes item stack sizes bigger. based on mod Bigger Stack Sizes by Suprnova74.

2 years ago
1.1
3.01K

g 2.0 Update?

2 months ago

Any updates for SpaceAge? Big fan of this mod and consider Factorio unplayable without it.

2 months ago

I was able to update your mod. Fixed the "Defult" typo in both lua files as well.

Here's the updated data-final-fixes.lua for Capsules to identify any remotes (since they can't be stacked
require( "config" )

function modified_size( oldvalue, multiplier )
if oldvalue == nil then oldvalue = 1 end
local v = oldvalue * multiplier
if v > oldvalue then
return( v )
else
return oldvalue
end
end

-- Normal Item Stacks
for ,dat in pairs(data.raw) do
for
,item in pairs(dat) do
if item.stack_size and type(item.stack_size) == "number" and item.stack_size > 1 then
item.stack_size = modified_size( item.stack_size, stack_multiplier )
if Default_logistics_request_multiplier ~= nil then
item.default_request_amount = Default_logistics_request_multiplier
end
end
end
end

-- Ammo Stacks
for _, ammo in pairs(data.raw.ammo) do
ammo.magazine_size = modified_size( ammo.magazine_size, ammo_multiplier )
if Default_logistics_request_multiplier then ammo.default_request_amount = Default_logistics_request_multiplier end
end

-- Module Stacks
for _, modu in pairs(data.raw["module"]) do
modu.stack_size = modified_size( modu.stack_size, stack_multiplier )
end

-- Capsule Stacks
for _, caps in pairs(data.raw["capsule"]) do
-- Check if the capsule is a remote by looking for "remote" in its name
if not string.find(caps.name, "remote") then
caps.stack_size = modified_size(caps.stack_size, stack_multiplier)
else
caps.stack_size = 1 -- Ensure all remotes remain non-stackable
end
end

And then here's the contents of the config.lua

stack_multiplier = 10

ammo_multiplier = 10

default_logistics_request_multiplier = 10


And here's the info.json
{
"name": "BiggerStackSizesx10",
"version": "1.0.0",
"title": "Bigger Stack Sizes x10",
"author": "Patrick",
"description": "Makes item stack sizes bigger. based on mod Bigger Stack Sizes by Suprnova74.",
"factorio_version":"2.0",
"dependencies": ["base"]
}

New response