Page 1 of 1

[posila] [1.1.25] Can't place a wall ghost near trees

Posted: Sun Feb 28, 2021 7:03 pm
by Genhis
Description:
In a WALL-TREE-WALL configuration, I can't place a wall ghost (with shift+click) on the tree tile.
The issue has been bugging me in a modded save, so I tried reproducing it in a fresh game without mods and I was able to successfully reproduce it.
Steps to reproduce:
  1. Note: This only happens with some trees (it may be related to their collision box.
  2. Place two walls next to a tree (one on the left side, another on the right side) leaving a 1-tile gap.
  3. Try placing a wall as a ghost in the gap.
  4. The placement is unsuccessful, the ghost is red and "Tree is in the way" message appears.
In the image below, the issue does not occur when I remove the left wall but can be reproduced without the right wall.
factorio.png
factorio.png (1.31 MiB) Viewed 4211 times

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Mon Mar 01, 2021 4:39 pm
by posila
This is working as intended, unfortunatelly.
The placed walls would connect to the wall ghost, expanding their bounding boxes and at least one of them would then collide with the tree, so it doesn't allow to build the ghost there.
That makes for some inconvenient/flawed behavior, though.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Mon Mar 01, 2021 5:48 pm
by Genhis
That is unfortunate. I build walls using personal bots with shift+click in areas with many trees because it's quicker and the leftover trees also serve as a second wall, but sometimes I miss a spot. Then I have to manually cut down the tree because the wall is not placeable. It happens to me around 20 times per day when I am expanding my territory and it's a bit annoying.

Thank you for your reply though, I understand it may not be easily fixable without breaking other things.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Mon Mar 01, 2021 9:50 pm
by jodokus31
Would it help, to place a wall blueprint, which cannot miss a spot?

Why is the bounding box of single wall smaller than a connected wall. Could it not be the same?

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 3:07 am
by NotRexButCaesar
jodokus31 wrote:
Mon Mar 01, 2021 9:50 pm
Why is the bounding box of single wall smaller than a connected wall. Could it not be the same?
To make graphical sense when walking.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 6:41 am
by Khagan
posila wrote:
Mon Mar 01, 2021 4:39 pm
This is working as intended, unfortunatelly.
I'm fairly sure it has only started happening very recently (perhaps even being new in 1.1.25); I noticed it for the first time a day or two ago. Have the intentions changed? (A similar problem with cliffs not being demolished when needed has been around a while though.)
jodokus31 wrote:
Mon Mar 01, 2021 9:50 pm
Would it help, to place a wall blueprint, which cannot miss a spot?
Yes, this is a rather clumsy workaround.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 9:11 am
by Genhis
posila wrote:
Mon Mar 01, 2021 4:39 pm
The placed walls would connect to the wall ghost, expanding their bounding boxes and at least one of them would then collide with the tree, so it doesn't allow to build the ghost there.
This has got me thinking, why does it matter that the wall would collide? The tree is marked for deconstruction anyway.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 9:27 am
by posila
Khagan wrote:
Tue Mar 02, 2021 6:41 am
I'm fairly sure it has only started happening very recently (perhaps even being new in 1.1.25); I noticed it for the first time a day or two ago. Have the intentions changed? (A similar problem with cliffs not being demolished when needed has been around a while though.)
The check that already existing walls won't collide after connecting to the new piece is new to 1.1, but there were some other bugs in it, so this specific case might have not worked correctly until a few patches ago.
Genhis wrote:
Tue Mar 02, 2021 9:11 am
This has got me thinking, why does it matter that the wall would collide? The tree is marked for deconstruction anyway.
Ghosts can collide with entities marked for deconstruction but real entities can't.

I am seriously considering to make the buildability check fail only if the colliding entity is a character or spidertron leg. Walls were extending bounding boxes to possibly colliding size for years and I don't recall it ever causing any issues besides someone walling-in themself occasionally, which I don't think is a game issue, to be honest. With spidertron being mobile construction unit, the problem of one of its legs being accidentally walled in by construction robots became a real issue.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 9:34 am
by jodokus31
Genhis wrote:
Tue Mar 02, 2021 9:11 am
posila wrote:
Mon Mar 01, 2021 4:39 pm
The placed walls would connect to the wall ghost, expanding their bounding boxes and at least one of them would then collide with the tree, so it doesn't allow to build the ghost there.
This has got me thinking, why does it matter that the wall would collide? The tree is marked for deconstruction anyway.
The problem is, that the bounding box of the real/existing wall gets bigger by placing a ghost next to it. A real entity cannot collide with a real tree, no matter if one of it is marked for deconstruct
AmericanPatriot wrote:
Tue Mar 02, 2021 3:07 am
jodokus31 wrote:
Mon Mar 01, 2021 9:50 pm
Why is the bounding box of single wall smaller than a connected wall. Could it not be the same?
To make graphical sense when walking.
Fair.
Maybe the single wall reserves enough space for the bigger variants, before placing? So the colliding tree would be deconstructed before placing.

Re: [1.1.25] Can't place a wall ghost near trees

Posted: Tue Mar 02, 2021 1:05 pm
by posila
Thanks for the report.
For 1.1.27 I decided to do what I said in the previous post and change the buildability check such that neighbouring walls must not become colliding with character or spidertron.