# The problem:
Overlapping entities are hard to select if you want to get a specific one
We've all been there, chopping a forest by hand. Not the fastest, but it's always an option.
Problem is, sometimes you want to specifically chop one tree, but not another. This is the case when clearing out a small area just so you can build while having the benefit of reduced pollution. I sometimes find myself wanting to chop a nice line from the top and it's annoying.
# The solution:
Select an entity to hover over from a list of entities that you're hovering and then sorting by which one is closest. In most cases, this gives a very good, natural selection as the divider between two overlapping entities is the middle, like a voronoi texture.
Also here's a cool showcase of the same solution, but in 3D:
https://www.youtube.com/watch?v=0kNF4-nYd1o&t=362s
Better entity selection with overlapping boxes
Moderator: ickputzdirwech
-
- Burner Inserter
- Posts: 13
- Joined: Wed Sep 06, 2023 6:26 am
- Contact:
Re: Better entity selection with overlapping boxes
I only ever chop trees in the beginning of the game, as I usually rush for conbots, and with them, I don't "chop trees" anymore, I just build ghosts, and let my bots chop the trees that prevent those ghosts to be built.
Koub - Please consider English is not my native language.
-
- Burner Inserter
- Posts: 13
- Joined: Wed Sep 06, 2023 6:26 am
- Contact:
Re: Better entity selection with overlapping boxes
Point is, in vanilla this only shows up for trees, but with mods it really starts showing up. Especially buggy mods that have generous selection boxes. I remember playing a big lab mod and i tried to replicate the issue before posting here, but i couldn't replicate nor remember the save file.
Basically the big lab had a weirdly scaled hitbox so i couldn't select entities in its proximity easily.
Given that this does appear in vanilla with overlapping trees and sometimes even cliffs believe it or not (it doesn't matter too much since you either destroy it or not, you don't need precision, even though i have had moments when i "needed" precision), it's probably worth fixing.
Plus we have mods like Warptorio that allow things to spawn off the harvester platform so when you summon two harvester platforms next to each other, chances are they are going to have clipping entities because you always maximize the amount of entities you place on them.
Also Rampant spawns nests that create nests and it gets so packed that sometimes it's very weird to hover over them on the map.
It's just weird and i feel like the "acceptable weirdness level" is very non-weird considering some of the changes. I don't expect this to come to 2.0, but it's a good feature that will come eventually. It's guaranteed to never be worse than how entity selection is done currently. Except for when you have way too many clipping entities in one spot, but at this point it's on you and that mod you made.
Also with this we can just change the selection boxes to be more forgiving like how combat works. This forgiveness won't mess up anything except hovering over in empty space or in the middle of a circle.
In fact, it's definitely easier to add this feature by looking at enemy shooting target selection code than to do it from scratch because that code does exactly what i'm suggesting - selects the closest out of several enemies.
I have never played with mods that add tiny things, but there's a significant amount of them and this change will benefit those a LOT. I'm talking: https://mods.factorio.com/mod/tinyminingdrill, especially this since it adds tiny entity between other entities https://mods.factorio.com/mod/arrow-inserter , https://mods.factorio.com/mod/mini
One problem could be that when you start mining it's easier to un-hover the entity, but that's simple - while mining, just keep the entity selected until you exit it's actual bounding box.
Basically the big lab had a weirdly scaled hitbox so i couldn't select entities in its proximity easily.
Given that this does appear in vanilla with overlapping trees and sometimes even cliffs believe it or not (it doesn't matter too much since you either destroy it or not, you don't need precision, even though i have had moments when i "needed" precision), it's probably worth fixing.
Plus we have mods like Warptorio that allow things to spawn off the harvester platform so when you summon two harvester platforms next to each other, chances are they are going to have clipping entities because you always maximize the amount of entities you place on them.
Also Rampant spawns nests that create nests and it gets so packed that sometimes it's very weird to hover over them on the map.
It's just weird and i feel like the "acceptable weirdness level" is very non-weird considering some of the changes. I don't expect this to come to 2.0, but it's a good feature that will come eventually. It's guaranteed to never be worse than how entity selection is done currently. Except for when you have way too many clipping entities in one spot, but at this point it's on you and that mod you made.
Also with this we can just change the selection boxes to be more forgiving like how combat works. This forgiveness won't mess up anything except hovering over in empty space or in the middle of a circle.
In fact, it's definitely easier to add this feature by looking at enemy shooting target selection code than to do it from scratch because that code does exactly what i'm suggesting - selects the closest out of several enemies.
I have never played with mods that add tiny things, but there's a significant amount of them and this change will benefit those a LOT. I'm talking: https://mods.factorio.com/mod/tinyminingdrill, especially this since it adds tiny entity between other entities https://mods.factorio.com/mod/arrow-inserter , https://mods.factorio.com/mod/mini
One problem could be that when you start mining it's easier to un-hover the entity, but that's simple - while mining, just keep the entity selected until you exit it's actual bounding box.
- Attachments
-
- Screenshot 2024-08-07 181710.png (1.54 MiB) Viewed 293 times