[0.18.18] placeable_by allows robots to ignore max_payload

This subforum contains all the issues which we already resolved.
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

[0.18.18] placeable_by allows robots to ignore max_payload

Post by moon69 »

I've got a Prototype/SimpleEntityWithForce that requires 20 of the item to build...

Code: Select all

placeable_by = { item = "placeable-test-item", count = 20 },
(see Prototype/Entity.placeable_by)

Problem 1:
If I create a ghost for a "placeable-test-entity", the single construction bot will happily take 20 x placeable-test-item from my inventory in one go and build it in one trip - even though the bots maximum capacity is 5 (1 + 4 bonus)...

Code: Select all

newEnt = player.surface.create_entity
{
	name = "entity-ghost",
	inner_name = "placeable-test-entity",
	position = pos,
	force = "player"
}
Problem 2:
If the placeable_by.count is greater than the stack_size of "placeable-test-item", then the construction bot will take a whole stack and buzz around my (character's) head until I cancel the ghost.

Desired behaviour:
At a minimum in the above circumstances I think the bot should stay put in my inventory until it has enough carrying capacity - similar behaviour as when there are not enough items. This would also require a new alert to inform the player.

Ideally though, multiple bots would carry the required items and/or the single bot would make multiple trips until the required resources are assembled. I appreciate though this is new and possibly computationally intensive functionality. Could be cool though having bots build things on-site rather than just plonk them down?

I've attached a small test mod that exhibits the above behaviour... just start a new game with it and use the standard deconstruction planner to select any area (just using the deconstruct area event to trigger the ghost).
Attachments
PlaceableTest_0.18.0.zip
(1.86 KiB) Downloaded 118 times

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

Re: [0.18.18] placeable_by allows robots to ignore max_payload

Post by Rseding91 »

Thanks for the report. Construction robots being able to carry more than the inventory limit when building is (as far as I can tell) intended. If they didn't ignore the limit they wouldn't be able to build things like curved rails until you had researched some capacity increase.

Multiple robots going to build a single entity isn't going to happen. I've added a check for the next release to prevent any mod from defining a placeable-by with a count > stack size since that is literally impossible to build outside of the map editor or create-entity console commands.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”