[1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Bugs that are actually features.
Post Reply
SeruleBlue
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 13, 2020 11:37 pm
Contact:

[1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by SeruleBlue »

There are certain places directly adjacent to spaceship wrecks that, if you place an item in with an inserter, the item will go into the wreck. However, these places appear to be empty and not a part of the wreck; in fact, objects can be built on these places.

I initially encountered this apparent bug when trying to directly insert some items into a spot adjacent to a spaceship wreck. To my surprise, the item went into the wreck, rather than beside it.
Image

I used ALT mode and placed inserters around various wrecks to see where all of the valid locations to insert an item into the wreck were.
For non-long-handed inserters, the only valid places should be directly adjacent to the wreck.
But some (not all!) spaces 1 tile further away will also allow direct insertion into the wreck.

Here are some screenshots illustrating this. An inserter that is in range of the wreck has the white box (see the control inserters in the corners, clearly out of range, without a white box).

Big Wrecks:
Image
There are extra valid spots all around the wreck.

Image
Extra valid spots are at the right, diagonal top-right, and diagonal bottom-right.

Medium Wrecks:
Image
Extra valid spots at the left, diagonal top-left, and diagonal bottom-left.

Image
Extra valid spots at the top and diagonal top-right.

And here is a more-clear example of the inserters I think should not be in range of the wreck, but they in fact are in range:
Image
Attachments
factorio-current.log
(7.41 KiB) Downloaded 61 times

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

Re: [1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by Rseding91 »

Thanks for the (quite detailed) report however this is all working correctly. Inserters have a relative position they pick up and drop off with. They then scan in a 1 tile box around that position for anything to interact with and if the things collision box overlaps with that area then they will interact with it.

In this case the wrecks have collision boxes that overlap with the areas you're seeing. You can press F4 and enable the "show collision boxes" debug option to see them fully.
If you want to get ahold of me I'm almost always on Discord.

SeruleBlue
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 13, 2020 11:37 pm
Contact:

Re: [1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by SeruleBlue »

Heyo, thanks for the reply :D
I'm still not sure if this is intentional behavior; allow me to explain further.

Regarding the collision box, I tried turning them on and having another look. But the collision box does not appear to be overlapping with the problematic inserters.
Image
See how the inserter 2 tiles away from the large wreck still counts as in range, despite its drop-off point not appearing to collide with the wreck?
It does not appear that the wreck's collision box covers that tile; in fact, one can build items in those spots, making me believe (as a player) there is nothing colliding there.

I mentioned I originally found this strange behavior when I was trying to insert into a storage box located on these special spots.
I've just discovered the behavior of inserters trying to insert into the special spots actually changes depending on the order in which you build the box and inserter.

Consider an inserter that is attempting to place items in a place that is visually adjacent to the wreck.
If you place the inserter first, and then a box where it looks like it's inserting into, any items the inserter moves will go into the wreck. The box is ignored:
Image

But if you place the box first, and then the inserter, the inserter instead prefers the box:
Image

Since I was curious, I tried a few more experiments.
If you placed the box first and then the inserter, and the box fills up, the inserter stops (despite the wreck being in range):
Image

If you then delete the box, the inserter will start placing items into the wreck:
Image

Placing the box back will not make the inserter place into the box; it will continue to fill the wreck:
Image

---------------------

One more thing; in the debug settings, there is a typo. "preformance" should be spelled "performance". :mrgreen:
Image
Thanks for your time!

SeruleBlue
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 13, 2020 11:37 pm
Contact:

Re: [1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by SeruleBlue »

Okay, having re-read everything one more time, I think I can see why the inserter is inserting into the wreck.
Like you said, the inserter uses that 1-tile range to determine where to insert into, if anything. I've just noticed these 'problematic' wrecks have hitboxes that are not a whole tile; they're slightly larger. Therefore, that <1 tile of extra wreck is what the inserters are seeing. I understand why the behavior is what it is now, at least, on the programmatic/logical point of view.

As a player, though, I'm not sure if it's the best behavior. The 'order determines which thing the inserter inserts into when there are >1 possible targets' behavior seems kind of strange and not immediately intuitive. I'd almost want to say it shouldn't be possible to be able to place things 'in the same tile' so that there isn't a case where an inserter's target is seemingly arbitrary.
But it's probably better this way to have mods/trains/some edge case to work, so I think it's fine. :D

I see the typo is already covered in another post; my mistake for not searching. (viewtopic.php?f=30&t=88050)
Thanks again! Belated congrats on 1.0 by the way!

Candù
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Feb 25, 2016 1:48 am
Contact:

Re: [1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by Candù »

Image

would this be the same issue?

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [1.0.0] Spaceship Wrecks have inconsistent inserter "hitboxes"

Post by Jap2.0 »

Candù wrote:
Wed Dec 02, 2020 6:29 pm
would this be the same issue?
Different issue, same root cause. Not sure if Rseding/others are still set on not changing the collision boxes here.
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Not a bug”