New map search function that can feasibly search the entire map #36789
Labels
Info / User Interface
Game - player communication, menus, etc.
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
<Suggestion / Discussion>
Talk it out before implementing
Is your feature request related to a problem? Please describe.
A few days ago, the option to set up on which radius the map function searches for stuff, implemented in #35709 was then later shortly removed. Thinking on the subject, I feel that there's something that can make it easier to search even the entirety of the map without creating too many problems even for someone with a weaker computer.
Describe the solution you'd like
A indexed search function that allows quick search in the whole map, at least for someone who actually knows how to code more than the very basics of JSON editing (that is, not me): Constructing an index of all non "basic" tiles (that is, not field, forest, swamp, road, river, and so forth. Maybe house too, as all cities have lots of them and until you actually explore them and see if there is anything special about them, they might as well be interchangeable), with the tile's names and locations, constructed as the player explore and reveal said tiles might allow for a very quick search, as they would not have to go through the absolute vast majority of "empty" tiles, just tiles with at least some meaning to them.
Main issue is that my coding skills are limited to very basic JSON editing, so I would have no idea even where to start with this.
Describe alternatives you've considered
An interesting thought, if even more complex, might also have an editable "don't keep track of these tiles" list, say, to allow someone playing in a mega-city map (max city size, 0 city distance) to include "forest" tiles in their search. Alternatively, any type of tile that occupies more than a set percentage of the map gets excluded from the indexing perhaps?
Another, just restoring the feature from #35709 . It would likely be the easiest solution, and it even if not an optimized search code, it's a functional one, and the radius setting would allow for both those with stronger and weaker computer to pick what value works best for them. Possibly making it a "hidden" option, that is, one that exist but would need the option files to be directly edited, might be a good idea if the issue is concern that basic users might get confused with excessive options and then get confused why their search function is freezing the game.
And yet another alternative might just be a relatively modest increase in the radius, so that even people with relatively weaker computers won't be excessively affected.
As a sidenote on the last alternative, keeping the current search code in the game (possibly accessed through a code in the search box?) even after an algorithm better for most cases is implemented, might also be a good idea, to allow players to search for tiles that might be locally scarce but generally very common (say, like a forest tile inside a huge city in a map that have enough city spacing that the normal forested areas still spawn like normal)
The text was updated successfully, but these errors were encountered: