Capacity, when moving or stalled, of a transportline

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Capacity, when moving or stalled, of a transportline

Post by sparr »

Code: Select all

line_caps = {curve_right={5,2},curve_left={2,5},straight={4,4},underground={2,2,4,4},splitter={nil,nil,nil,nil,2,2,2,2}}
This is from one of my mods, determined by trial and error. For a belt that curves left, transportline #1 has a capacity of 2; if two or more items are present then the transportline is stalled (not moving forward).

I'd like to be able to get this info from the entities/prototypes instead of experimentally.

(also these numbers predate the recent changes to belt item density, so I probably need to calculate them again anyway)
Rseding91
Factorio Staff
Factorio Staff
Posts: 15026
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Capacity, when moving or stalled, of a transportline

Post by Rseding91 »

I'm not sure what you mean. Transport belt entities don't have any built in capacity logic: they simply have some "length" and items have a "size". Items get added until the logic says they can't fit anymore (would collide with other items) and then the belt is "full". What that number ends up being depends on many things - if side loading is happening - and so on. There's no function or set of functions to tell how many of an item can fit on any given belt.
If you want to get ahold of me I'm almost always on Discord.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Capacity, when moving or stalled, of a transportline

Post by sparr »

Then how about access to the length, and to the size of items?

Also, I seem to recall that the logic for putting things on belts puts items farther apart than they end up when the belt stalls. Maybe that changed, or I am misremembering? Either way, I'd love to have enough data to calculate my original request.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Capacity, when moving or stalled, of a transportline

Post by sparr »

Bumping this. Currently I have to do a bunch of logic to figure out if a belt is curved so that I can know how many items fit on each side of it. I'd really like to be able to just query how long the line is or how many items should fit on it when it's moving or stalled.
Post Reply

Return to “Modding interface requests”