Delete zones tool is a bit broken

Started by RommePawn, October 29, 2016, 12:14:12 PM

Previous topic - Next topic

RommePawn

[edit]
I didn't explain the problem very well, so here is my attempt at a simple explanation:

Delete zones tool randomly deletes entire zones when only part is selected.

Quote from: RommePawn on October 29, 2016, 06:26:34 PMThe point is that it should never delete the entire zone, regardless.

[original post]

Delete zones tool is suppose to let you reshape your zones but for some reason it randomly deletes the zone you are trying to reshape. This can be problematic because you can carefully detail what you need in the stockpile and sometimes you don't have every single item the stockpile needs memorized. Obviously you can always just copy the stockpile settings beforehand, every time you touch any stockpile ever. But I feel you shouldn't have to. Another issue can come from mods relying on the continued existence of a stockpile.

I went to remove 12 cells of a highly detailed stockpile that had maybe 200 cells and it deleted the whole thing. It also broke some modded relays but this topic isn't about mods. This forced me to reload, losing progress. This has happened enough times that I almost always copy settings. I tried finding anything on this problem with google but only got wiki pages and random posts about infestation and people asking how to destroy items. Since I couldn't find anything and I have seen many youtubers accidentally delete stockpiles I thought I would make post about it.

I don't think the delete zones tool should do anything but reshape zones. I tried to repeat the above accident and it didn't delete the whole zone. The delete zones tool shouldn't remove entire zones with inconsistent and non obvious criteria. Its just a bad design. If we want to delete an entire zone we can just click the zone and press y.

The tool shouldn't do two entirely different functions(on of which is redundant). This would be like if you went to deconstruct a few walls and it marked the entire building for deconstruction and didn't let you cancel. Forcing the destruction of an entire stockpile because you wanted to reduce its size a few cells is just dumb.

nccvoyager

Some parts of zones may be deleted if the delete tool will "split" the zone in two.

Zone:
SXXXXXX
XXXXXXX
AAAXAAA
XXXXXXX
XXXXXXX

Using the delete tool on the part of the zone in the center (the X) will delete half of the zone, not split it into two zones.

The half of the zone that will remain (from what I have observed) is the half that was closest to where the zone was originally placed.
(If that spot was the "S" in the top-left, the top half would be the part to remain.)

RommePawn

#2
Quote from: nccvoyager on October 29, 2016, 04:33:24 PM
Some parts of zones may be deleted if the delete tool will "split" the zone in two.

The problem is the game deleting the whole zone when part of it is selected. An unpredictable, unwanted and unnecessary function.

The tool should never destroy zones unless they are entirely selected.

While I appreciate you replying, your post has nothing to do with my post.

See the screenshot below. Using the delete zones tool it deleted the entire stockpile. After attempting to reproduce the result it didn't. I believe I did everything the same.



[attachment deleted by admin due to age]

RommePawn

#3
The screenshot below reliably deletes the entire zone. The yellow border is the region border. Regions don't seem to have any effect. It seems to delete the zone regardless of direction or how much you over select. I have had the game delete a stockpile with much less then half selected. The point is that it should never delete the entire zone, regardless.

[edit] Actually it seems as though its not reliable. Try it a few times. It seems to be random.



[attachment deleted by admin due to age]

arl85

I can confirm it happened to me several times, but I was never able to understand how to reproduce the behavior.

nccvoyager

It was a little difficult to understand your initial post.
(Specifically for me. Should not be providing assistance at 2AM while sitting outside a closed coffee shop.)

Okay, so, if I understand correctly...

-Create stockpile.
-Delete section of stockpile.
-Entire stockpile may (often) be deleted regardless of where stockpile creation started.

Am I getting this right?

Calahan

#6
I've experienced the frustration of this issue myself many times (and for as long as I can remember re:alpha versions). Not sure if it's WAD or not, but the speed with which the sections/tiles of the stockpile/grow zone are deleted seems to be a factor as well. In that when I'm deleting parts of a stockpile/grow zone I usually do it one tile at a time, and with a deliberate pause between clicks, as anything else risks the entire thing being deleted.

As I said I don't know if this is WAD or not, but I would certainly welcome a change if it is WAD, and I could certainly get behind this PoV.
Quote from: RommePawn on October 29, 2016, 06:26:34 PMThe point is that it should never delete the entire zone, regardless.

RommePawn

Quote from: Calahan on October 31, 2016, 05:21:08 AM
I've experienced the frustration of this issue myself many times (and for as long as I can remember re:alpha versions). Not sure if it's WAD or not, but the speed with which the sections/tiles of the stockpile/grow zone are deleted seems to be a factor as well. In that when I'm deleting parts of a stockpile/grow zone I usually do it one tile at a time, and with a deliberate pause between clicks, as anything else risks the entire thing being deleted.

As I said I don't know if this is WAD or not, but I would certainly welcome a change if it is WAD, and I could certainly get behind this PoV.
Quote from: RommePawn on October 29, 2016, 06:26:34 PMThe point is that it should never delete the entire zone, regardless.

Assuming WAD means working as designed, if it is by design then I question it, why would we use a selection tool to delete entire zones? Makes no sense really.

I have also taken the liberty of putting an edit in my original post. I really should rewrite any post I make over a single paragraph. I have a problem of over explaining things that can be summed up in a few lines.

arl85

It seems to happen if you move the delete tool beyond the limit of the zone you want to delete (have a look to attached gif)


[attachment deleted by admin due to age]

nccvoyager

#9
Strange.
I'm going to go try this later, see if I can reproduce it.
Can't remember ever having it happen.
But then again, I usually set up big square zones, and forget them, so, yeah.

(Oh, and I just wanted to apologize. Didn't mean to make it seem like your post was completely unclear; now that I have actually slept more than a couple hours, I can understand it fine.)

Zhentar

#10
Took a look at the code; it seems to happen at random because it literally does happen at random. What happens is that when you define a stockpile, the cells get shuffled into a random order (which is also why pawns fill stockpiles in random orders). The cell chosen for the very first slot in the list becomes a sort of "master" cell; if you bisect the stockpile with the delete zone designator, you should see that it always keeps the side of the stockpile with the first slot in it. And incidentally, that's exactly what happens here - the delete zone designator deletes one cell at a time, from bottom to top, left to to right, checking if the zone is still contiguous after every cell. So when you delete the full height of the zone, it gets bisected and the side that doesn't have the "master" cell gets deleted... and that side could well be the side you wanted to keep.

nccvoyager

Indeed Zhentar, that is what I tried to explain earlier.
Though, it apparently randomly deletes the entire stockpile zone, not just the "half" without the "master cell" in it.

Darth Fool

#12
Perhaps you are unknowingly deleting the master cell?  What happens then?  I could guess that a bug could cause this might delete the whole zone...

To test, you could make a 1x2 zone.  if this is the cause of the bug, deleting one cell should about half the time delete the whole zone...

Zhentar

Quote from: nccvoyager on November 03, 2016, 12:29:30 PM
Indeed Zhentar, that is what I tried to explain earlier.
Though, it apparently randomly deletes the entire stockpile zone, not just the "half" without the "master cell" in it.

What I'm saying is it deletes the side of the stockpile that doesn't have the "master cell", then it finishes deleting what you asked it to delete. If what you are deleting is the side that does have the "master cell", then it deletes all of the stock pile that you didn't have selected to delete.

To put it differently, if you take the action in arl85's gif, but instead of deleting all but one column of cells, you leave two columns of cells, one on either side. Six out of seven times, it's going to delete the column on the left, leaving the column on the right - and it's doing exactly the same thing when you *do* include the column on the right to be deleted.

schizmo

#14
I have also experienced this issue intermittently. In my experience it seemed to have something to do with whether or not a zone is "selected" when using the Delete Zone tool, but I have not been able to accurately recreate it in testing. It's quite frustrating.

Edit: I am specifically referring to Grow Zones, I have not had the issue as often with Stockpiles. Since Grow Zones are easier to fix, the bug has not affected me as severely so I haven't made a point to focus my attention on it