Re: [MOD 0.16] Miniloader
Posted: Sat Mar 16, 2019 12:28 pm
Like Therax said Miniloader use very fast inserters. That means they have to chase items on belts and can't take items from belts as fast as they can put them on.
Looks like this feature sometimes doesn't work in my example (even with belt-chest-belt).Miniloaders at "Ultra fast" and faster speeds use vanilla loader entities in addition to inserters, giving a max throughput of ~180 items/second when interacting with chests and other containers
Still sounds like a problem with your mining tool mod. Miniloaders should take as long as 2 belts if it were scaling everything together. Mind dropping a link so I can test?Optera wrote: ↑Sat Mar 16, 2019 9:39 amDon't nail me down on the 5s. I got rid of a mod adding a super mining tool. Being used to mine everything almost instantly, my perception is a bit skewed.
However it doesn't change that miniloaders take 10 times longer to pick up than belts. 1s vs 0.1s.
For comparison refineries mine in 0.2 and nuclear reactors in 0.5. There's no reason for a loader taking twice as long as a reactor to pick up.
Just to clarify, it’s not so much the chasing. It’s that every inserter picking up from a belt segment selects an item to chase and pick up at the start of each tick. So adding more inserters and increasing inserter speed still hits this fundamental limit of 1 item targeted per tick.
I thought the mod uses 2 inserters (1 per belt lane) therefore the total throughput should be 60x2=120 items/sTherax wrote: ↑Sat Mar 16, 2019 7:47 pmJust to clarify, it’s not so much the chasing. It’s that every inserter picking up from a belt segment selects an item to chase and pick up at the start of each tick. So adding more inserters and increasing inserter speed still hits this fundamental limit of 1 item targeted per tick.
I was under the same impression...wvlad wrote: ↑Sat Mar 16, 2019 7:52 pmI thought the mod uses 2 inserters (1 per belt lane) therefore the total throughput should be 60x2=120 items/sTherax wrote: ↑Sat Mar 16, 2019 7:47 pmJust to clarify, it’s not so much the chasing. It’s that every inserter picking up from a belt segment selects an item to chase and pick up at the start of each tick. So adding more inserters and increasing inserter speed still hits this fundamental limit of 1 item targeted per tick.
The key phrase is “every inserter.” It doesn’t matter if you have 100 inserters, they all select the same item at the start of a tick, and only one of them can succeed in picking it up. The next tick the other 99 repeat the process.Guilty wrote: ↑Sat Mar 16, 2019 11:33 pmI was under the same impression...wvlad wrote: ↑Sat Mar 16, 2019 7:52 pmTherax wrote: ↑Sat Mar 16, 2019 7:47 pmJust to clarify, it’s not so much the chasing. It’s that every inserter picking up from a belt segment selects an item to chase and pick up at the start of each tick. So adding more inserters and increasing inserter speed still hits this fundamental limit of 1 item targeted per tick.
I thought the mod uses 2 inserters (1 per belt lane) therefore the total throughput should be 60x2=120 items/s
Therax wrote: ↑Sun Mar 17, 2019 1:36 amThe key phrase is “every inserter.” It doesn’t matter if you have 100 inserters, they all select the same item at the start of a tick, and only one of them can succeed in picking it up. The next tick the other 99 repeat the process.Guilty wrote: ↑Sat Mar 16, 2019 11:33 pmI was under the same impression...wvlad wrote: ↑Sat Mar 16, 2019 7:52 pmTherax wrote: ↑Sat Mar 16, 2019 7:47 pmJust to clarify, it’s not so much the chasing. It’s that every inserter picking up from a belt segment selects an item to chase and pick up at the start of each tick. So adding more inserters and increasing inserter speed still hits this fundamental limit of 1 item targeted per tick.
I thought the mod uses 2 inserters (1 per belt lane) therefore the total throughput should be 60x2=120 items/s
Here’s the bug I posted.
You can control items on belts through lua. And performance of this was more then 10 times worse then inserters AFAIK. There is simply no way you can match inserter performance. Even actual loaders are less performant.Cadde wrote: ↑Tue Mar 26, 2019 9:49 amHe could make a "long" miniloader for ultimate belts that would work on two belt pieces at the same time. Then the limit would be 120 items/s.
But i would rather they added more belt specific LUA stuff so one could control items on belts directly through LUA without the need of inserters.
Well OK then, what i meant to say was "Do it efficiently".
Code: Select all
local function replace_entities(old_name, new_name)
local s = game.players[1].surface -- only for myself in single player
for chunk in s.get_chunks() do
local entities = s.find_entities_filtered{name=old_name, area={{chunk.x*32, chunk.y*32}, {(chunk.x+1)*32, (chunk.y+1)*32}}}
for _, entity in pairs(entities) do
local position = entity.position
entity.destroy()
local new_entity = s.create_entity{name=new_name, position=position, force=game.players[1].force}
end
end
end
You probably don't need to walk over the surface chunk by chunk. A single call should suffice:
Code: Select all
local entities = game.surfaces.nauvis.find_entities_filtered{name=old_name}
Code: Select all
local function replace_entities(old_name, new_name)
local surf = game.surfaces.nauvis
local entities = surf.find_entities_filtered{ name = old_name }
for _, entity in pairs(entities) do
local position = entity.position
local direction = entity.direction
entity.destroy()
local new_entity = surf.create_entity{name = new_name, position = position, direction = direction, force = game.players[1].force}
script.raise_event(defines.events.on_built_entity, {created_entity = new_entity, player_index = 1, stack = nil})
end
end
Code: Select all
replace_entities("transport-belt-loader", "miniloader-inserter")