Page 1 of 1

max_payload_size limited to stack size?

Posted: Wed Mar 15, 2017 11:16 pm
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.

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 1:44 am
by impetus maximus
where/how are you setting max_payload_size?

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 4:26 am
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.

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 7:05 am
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.

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 7:57 am
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.

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 10:29 am
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

Re: max_payload_size limited to stack size?

Posted: Thu Mar 16, 2017 1:10 pm
by can00336
I figured that computational cost would be the reason.

Thank you for confirming it.