max_payload_size limited to stack size?

Place to get help with not working mods / modding interface.
Post Reply
can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

max_payload_size limited to stack size?

Post by can00336 »

Setting the max_payload_size for a logistic-robot seems to be limited to the size of a single stack of whatever item it is gathering.
Is there a way to increase this limit to allow bots to hold item amounts similar to cargo-wagons?

Thanks.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: max_payload_size limited to stack size?

Post by impetus maximus »

where/how are you setting max_payload_size?

can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

Re: max_payload_size limited to stack size?

Post by can00336 »

impetus maximus wrote:where/how are you setting max_payload_size?
entities.lua has max_payload_size for entities that can carry payloads.

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: max_payload_size limited to stack size?

Post by Arch666Angel »

Robots are limited to carrying one individual item type, the amount of the item type is limited by the robot cargo capacity defined in their entity plus extras from technology modifiers, the maximum of this value is the stack size of the individual item. So if an item has stack size 200, the robot will only get 200 each time, even if it is able to carry 1k.

can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

Re: max_payload_size limited to stack size?

Post by can00336 »

I feel like logistic robots should have an inventory_size definition in their entity like cargo wagons. I don't see why mods shouldn't be able to enable more stack carry capacity for logistic bots.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: max_payload_size limited to stack size?

Post by Rseding91 »

can00336 wrote:I feel like logistic robots should have an inventory_size definition in their entity like cargo wagons. I don't see why mods shouldn't be able to enable more stack carry capacity for logistic bots.
Because that would massively complicate and slow all robot related logic if they had to check multiple stacks every time they did anything.

As it is now them being fixed at 1 slot and always 1 slot means they never have to:
  • Check if the slot count is < 1 or > 1
  • Check if anything other than slot 0 contains a given item
  • Iterate "all slots"
  • Deal with finding places to put multiple item types
If you want to get ahold of me I'm almost always on Discord.

can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

Re: max_payload_size limited to stack size?

Post by can00336 »

I figured that computational cost would be the reason.

Thank you for confirming it.

Post Reply

Return to “Modding help”