Page 1 of 1

[1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 1:28 pm
by steinio
Hej,

i have a modded rail which consists of vanilla rails attached with placeable_by.

Blueprints and copy shortcut selects the correct modded rail.
Pipetting it selects the vanilla rail whch is then placed instead.

I expect that the pipette has the same behaviour like the blueprint tools.

Cu, steinio.

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 4:01 pm
by Jaren Taq
Can you post, which mod or the prototype definition?

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 6:21 pm
by steinio
Jaren Taq wrote: Sat Nov 28, 2020 4:01 pm Can you post, which mod or the prototype definition?
Well if you're actually interested:
https://mods.factorio.com/mod/naked-rails_se

Place vanilla rails, convert them with the shortcut tool to naked rails for example and pipette it.

Cu, steinio.

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 6:40 pm
by Rseding91
I don't know if this has a solution. When using an item directly to build a fresh entity it will always use the place_result on the item. An item can only have 1 place result.

Entities can be built by multiple items (multiple items can place the same entity). In the case of a ghost the first item-to-place-this-entity is used to revive the ghost. So it "works" with placeable_-by. Same thing for blueprints; they're just ghosts in the blueprint.

But direct building has no entity reference so it defaults to the place_result of the item - in this case the vanilla rail.

So with all that said; your use-case is unsupported and I don't think it will ever be supported fully. Sorry.

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 6:56 pm
by eradicator
Rseding91 wrote: Sat Nov 28, 2020 6:40 pm In the case of a ghost the first item-to-place-this-entity is used to revive the ghost.
If only the first item is ever used, why is it possible to specify more than one placeable_by item? I always assumed bots use the first compatible item they can find in the logistic network (i.e. if there's three possible items but the player only produces one of them).

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 8:28 pm
by Rseding91
eradicator wrote: Sat Nov 28, 2020 6:56 pm
Rseding91 wrote: Sat Nov 28, 2020 6:40 pm In the case of a ghost the first item-to-place-this-entity is used to revive the ghost.
If only the first item is ever used, why is it possible to specify more than one placeable_by item? I always assumed bots use the first compatible item they can find in the logistic network (i.e. if there's three possible items but the player only produces one of them).
I could remove that. But it's only going to break more stuff than it fixes.

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sat Nov 28, 2020 8:51 pm
by eradicator
Rseding91 wrote: Sat Nov 28, 2020 8:28 pm
eradicator wrote: Sat Nov 28, 2020 6:56 pm
Rseding91 wrote: Sat Nov 28, 2020 6:40 pm In the case of a ghost the first item-to-place-this-entity is used to revive the ghost.
If only the first item is ever used, why is it possible to specify more than one placeable_by item? I always assumed bots use the first compatible item they can find in the logistic network (i.e. if there's three possible items but the player only produces one of them).
I could remove that. But it's only going to break more stuff than it fixes.
I was kinda hoping for an "you misunderstood, they're actually used in edge case xyz" answer D:.
If they're actually never ever used i'd prefer if at least the wiki description mentioned that. But i am unsure how the "first" item is even determined. I.e. if there is an item that can place an entity, but the entity prototype itself specifies another 2 placeable_by items (for a total of 3 differnt items) then what... the item is used? or the first entry in the placeable_by array? or some sort of (alphabetic-)order? Without that knowledge i couldn't even fix the wiki page.

Re: [1.1.2] Modded rail pipettes wrong entity if placeable_by is used

Posted: Sun Nov 29, 2020 12:49 am
by steinio
eradicator wrote: Sat Nov 28, 2020 8:51 pm
Rseding91 wrote: Sat Nov 28, 2020 8:28 pm
eradicator wrote: Sat Nov 28, 2020 6:56 pm
Rseding91 wrote: Sat Nov 28, 2020 6:40 pm In the case of a ghost the first item-to-place-this-entity is used to revive the ghost.
If only the first item is ever used, why is it possible to specify more than one placeable_by item? I always assumed bots use the first compatible item they can find in the logistic network (i.e. if there's three possible items but the player only produces one of them).
I could remove that. But it's only going to break more stuff than it fixes.
I was kinda hoping for an "you misunderstood, they're actually used in edge case xyz" answer D:.
If they're actually never ever used i'd prefer if at least the wiki description mentioned that. But i am unsure how the "first" item is even determined. I.e. if there is an item that can place an entity, but the entity prototype itself specifies another 2 placeable_by items (for a total of 3 differnt items) then what... the item is used? or the first entry in the placeable_by array? or some sort of (alphabetic-)order? Without that knowledge i couldn't even fix the wiki page.
placeable_by != place_result