Sid Meier's Civilization VI

Sid Meier's Civilization VI

Map Search Extension
90 Comments
倾心 28 Aug, 2024 @ 3:42am 
使用搜索区域选择和快速搜索术语选择面板扩展内置地图搜索面板。
现在你不需要使用键盘来搜索和组合最常用的搜索词。
H.Humpel 29 Oct, 2023 @ 5:15am 
Hi Zur13,
your mod has been translated by ASM590319 into German and the translation is now part of the German translations for Civilization VI mods mod pack.
We would be more than happy if you could refer to the language translation in your mod description.
Nandybear 15 Sep, 2023 @ 3:27am 
Can it be used to search for multiple things ? Like different districts
Mocofan neprihanit 15 Oct, 2022 @ 8:27am 
Doesn't seem to work on linux :(
Zegangani 10 Dec, 2021 @ 11:33am 
Great Mod! tho I think it doesn't work on maps larger than the game's map sizes. I don't think it's an issue of this mod, bc it's also the same thing in the game witout this mod on, but it would be nice if there is a fix to it, ideally one included in this mod, bc it's so much better than the Game's Map search (like most UI things). Thanks!

BTW, thanks for making it compatible with ARS' Improved Movement v2.1 mod! didn't know that untill I read the comments just yet.
Curt 19 Nov, 2021 @ 3:21pm 
@Blakmoon, yes, showing tiles that need repairing (yes pillaged, but also do to natural disasters) would be great.
Blakmoon 19 Nov, 2021 @ 7:01am 
Really great mod, I use it a lot, unmatching improvement is very good help. I suggest some features to add: search list for city buildings ; tiles that was pillaging (I'm french, not sure of right english term for the french"pillage")
Curt 15 Nov, 2021 @ 8:40pm 
Great mod. Any chance we could get a button for districts?
sustainableciv 26 Aug, 2021 @ 10:19am 
can this do an OR search ... i.e. camps OR plantation OR pasture (for when you are looking for the best place to put a wonder etc.)
pauloel7 8 May, 2021 @ 7:42am 
ok. TYVM
Zur13  [author] 7 May, 2021 @ 11:22pm 
@pauloel7 It does not affect anything you can just ignore it.
pauloel7 7 May, 2021 @ 2:51pm 
[1221200.408] Loading Mod - /Users/PauloEduardoLeme/Library/Application Support/Steam/steamapps/workshop/content/289070/1709115371/MapSearchExtension.modinfo
[1221200.408] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - MapSearchExtension.lua
Zur13  [author] 7 May, 2021 @ 4:08am 
New version uploaded.
Added compatibility with ARS - Improved Movement v2.1 by Arstahd
Adriaman 6 May, 2021 @ 11:45am 
@Zur13 Do note that you can conditionally load files in the modinfo, you would typically have one condition per mod.
Zur13  [author] 6 May, 2021 @ 7:01am 
@Arstahd I really appreciate your help but the problem is not just to add the new formations from your mod the problem is to keep my mod compatible with all similar mods. If there is another mod which adds another formations the fix you suggest will work incorrectly in case of another mod enabled with my mod because indexes will differ and so on. I don't know why devs choose to design their code in this way there are better design solutions exist for similar problems in other parts of game code but it is what it is. It is fine fix if you do it in your own mod just for base game files but it will introduce possible incompatibilities in my mod.

Long story short the most universal fix is to add a nil checks in several functions in the code where the devs missed it. With such fix the search will not be able to detect/find the new formations but at least it will not break. I will add this when I'll have some free time.
Arstahd 5 May, 2021 @ 10:19pm 
I'm the author of Improved Movement and was able to fix the broken search functionality by adding references to my added formation classes to MapSearchPanel.lua. I was able to add the same references to MapSearchPanelExtended.lua to make this mod compatible with mine.

To do so, add the following to the FormationClassNameMap table (after line 77)

["FORMATION_CLASS_LAND_RANGED"] = "LOC_FORMATION_CLASS_LAND_COMBAT_NAME", -- Arstahd added
["FORMATION_CLASS_LAND_CAVALRY"]= "LOC_FORMATION_CLASS_LAND_COMBAT_NAME", -- Arstahd added
["FORMATION_CLASS_NAVAL_RANGED"]= "LOC_FORMATION_CLASS_NAVAL_NAME", -- Arstahd added
Zur13  [author] 2 May, 2021 @ 2:26pm 
@Junky I've just listed all possible options that could lead to the error you have shown. I've checked the ARS movement mod and it really adds new formations. The code in the base game files related to search has no such formations and therefore it breaks the same issue happens with this mod because it reuses most of the base game code.
Junky 2 May, 2021 @ 2:09pm 
In my game some formation changes are made with "ARS - Improved Movement v2.0" mod.
You think changes in formations are a problem to the search tool? Didn't know that.

But there is no modification adding new units (like steel and thunder).
Zur13  [author] 2 May, 2021 @ 1:17pm 
@Junky I don't see how this could happen. That part of code where you have the error is from the base game without my modifications and should not give errors.

Could you check if you have the same error when this mod is disabled?
Do you have other mods which add new units or do something with unit formations or combat or any other unit related stuff?
Junky 2 May, 2021 @ 9:43am 
mod doesn't work for me. I noticed the following failure in Lua.log. I followed instructions here in the fix discussion, but doesn't work for me.

MapSearchPanel: MSE GetPlotSearchTerms(), found tile where IMPROVEMENT_DOES_NOT_MATCH_RESOURCE
Runtime Error: F:\~\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:536: table index is nil
stack traceback:
F:\~\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:536: in function 'GetPlotSearchTerms'
F:\~\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:1328: in function 'GetPlotSearchTerms'
F:\~\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:1481: in function 'GetPlotSearchTerms'
F:\~\steamapps\workshop\content\289070\1709115371\MseQuickImprov.lua:37: in function 'GetPlotSearchTerms' (tail call): ?
F:\~\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:714: in function 'IncrementalSearch'
Zur13  [author] 1 May, 2021 @ 1:45pm 
New version uploaded.
Fixed error that may cause search to malfuction in some specific cases.
Fixed some errors related to heroes and legends mode.
Fixed error that prevented the Ley Line search in secret society mode.
Specific Barbarian Clans Mode search terms should work correctly now.
Adriaman 22 Apr, 2021 @ 12:40pm 
Hi, the following files have been updated, you might want to take a look:
..\Base\Assets\UI\Popups\MapSearchPanel.lua
..\DLC\Expansion2\UI\Replacements\MapSearchPanel_Expansion2.lua
..\DLC\BarbarianClansMode\UI\Replacements\MapSearchPanel_BarbarianClansMode.lua
CoffeeMakesMe 24 Mar, 2021 @ 11:58am 
can you add second growth woods to the search?
Junky 27 Jan, 2021 @ 10:51am 
Same for me: Wanted to search many terms at one time. For example Stone + Hill + Strategic Resource to get the best tiles for the Oppidum district.
Would be extremly great if that could be made.
IodizedSalt 9 Jan, 2021 @ 9:39am 
Would it be possible to append multiple search elements in the box? Really sucks to have to search for Charming and Breathaking tiles seperately. Also, searching for Uranium currently doesnt work. Dunno if that's an issue with the mod or something else.
zzz9826 7 Nov, 2020 @ 7:34am 
Hope can search for specific districts
Zur13  [author] 27 Oct, 2020 @ 1:52am 
@leszek.j966 This mod does not change the core logic of the game search engine so if you disable the mod and try the same search you will get the same result. Of course it is possible to change that logic but I have no a free week to spend on a found wonders counter.
leszek.j966 26 Oct, 2020 @ 11:34pm 
@Zur13 As for mathematics and counting the fields occupied by natural wonders, I agree. On the other hand, as far as ideas are, in my private opinion, the correct answer should be 3. Besides, just as there is a list of built wonders of the world, there could also be a list of discovered natural wonders. Unless there are any technical reasons/problems to implement such a list.
Zur13  [author] 26 Oct, 2020 @ 12:32pm 
@leszek.j966 I don't think it's a mod fault but you can check if the result differs when the mod turned off. I assume that the map search calculates map tiles found so if you have 3 NW x2 tiles each you'll have 6 result tiles.
leszek.j966 26 Oct, 2020 @ 11:20am 
@Zur13 , This mod incorrectly reports the results. For example, when searching for a natural wonder, on a map with 3 wonders, the mod's result is:6
Mt.Hawk 18 Oct, 2020 @ 9:58am 
It's a Perfect!! Thank you for your work:steamhappy: I'll give you a award.
Zur13  [author] 26 Sep, 2020 @ 12:08pm 
@sustainableciv This mod does not change default search logic, so you can put both the unit type name and the civ name or the civ leader name into the first box and as result, you will have:
* all units of that type belonging to that civ
* all units of the same type belonging to other civ but standing on tiles belonging to the searched civ

Also you can fine-tuning this search by entering the other civ name into the second box to filter out units that belong to not-needed civ but stand on tiles owned by searched civ but this also filters out units that belong to correct civ but stands on tiles owned by filtered civ.

That's the all options I could see but it is not related to this mod it's how the game search logic works.
sustainableciv 26 Sep, 2020 @ 10:54am 
is there a way to search for a type of unit filtered by civ or city state?
Jake_ 31 Aug, 2020 @ 12:53pm 
Is a way to search for more than one term on multiple tiles? i.e. All wonders and camps for example.
ChrisMartin 28 Jul, 2020 @ 8:13am 
We go for "purpose" until proven otherwise :p
Adriaman 28 Jul, 2020 @ 8:12am 
Nice job! It's working now.
Zur13  [author] 28 Jul, 2020 @ 8:10am 
@ChrisMartin Yes it might be some old file name and that file was renamed during development. But this mod has some complex logic to replace game files to be compatible with both vanilla and DLC game files so I don't want to remove anything without tests.
Zur13  [author] 28 Jul, 2020 @ 8:07am 
@pauloel7 It should not be critical I don't know why it is marked as an error and not warning. I don't remember why is that reference there so until I have some free time to test it in deep I don't want to remove it. You can just ignore it, it is the way the game says that mod description contains file name but there is no file with that name in the mod folder.
ChrisMartin 28 Jul, 2020 @ 8:06am 
Strange. I checked with my Workshop backups from 2019, and MapSearchExtension.modinfo has always had MapSearchExtension.lua under InGameAction, and not under Files. And never had the actual file MapSearchExtension.lua in the mod folder itself.
Is it a oversight, or does it have a purpose?
pauloel7 28 Jul, 2020 @ 6:17am 
Nonetheless, Modding.log reads:
[2508442.184] Discovering new mods...
[2508443.184] File timestamps do not match. Will reload the mod.
[2508443.184] Loading Mod - /Users/PauloEduardoLeme/Library/Application Support/Steam/steamapps/workshop/content/289070/1709115371/MapSearchExtension.modinfo
[2508443.184] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - MapSearchExtension.lua
[2508443.184] Checking for additional mod fragments...
[2508443.184] Finished Discovery.
pauloel7 28 Jul, 2020 @ 6:09am 
OMG, it's alive!!! Turn 22, "Ceteris Paribus", engine is back to work, and much faster than ever before! Dear Zur13, I don't know what you gave him, but I want some of that =)
Zur13  [author] 28 Jul, 2020 @ 5:07am 
@pauloel7 @Adriaman Check the new version I'm not sure but it might fix the error you have.
Adriaman 28 Jul, 2020 @ 2:49am 
I have the same (?) issue. When I try to use MSE late-game I repeatedly get this error:

Lua callstack:
Runtime Error: bad argument #1 to 'lLookup' (string expected, got nil)
stack traceback:
[C]: in function 'lLookup'
C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:253: in function 'AddLocalizedSearchTerm'
C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:321: in function 'GetPlotSearchTerms'
C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:1305: in function 'GetPlotSearchTerms'
C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1709115371\MseQuickImprov.lua:37: in function 'GetPlotSearchTerms'
(tail call): ?
C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1709115371\MapSearchPanelExtended.lua:697: in function 'IncrementalSearch'
pauloel7 27 Jul, 2020 @ 10:18pm 
The engine breaks exactly at turn 21 start. That's true for all my last several playthroughs, regardless of config, mods or anything else, as far I as know. It feels this has to be some kind of clue to pin down this ghost issue. Zur13 or anyone else, any idea solving this?
pauloel7 6 Jun, 2020 @ 5:26am 
Well, apart from the vanilla short lived search engine or some unknown mod interaction bug, I've now stumbled into an issue I am the culprit of. Because I changed terrain, feature, and resource requirements for some buildings and improvements I now got this lua message "MapSearchPanel: MSE GetPlotSearchTerms(), found tile where IMPROVEMENT_DOES_NOT_MATCH_RESOURCE
Runtime Error: bad argument #1 to 'lLookup' (string expected, got nil)". Is there a way to adjust the function AddLocalizedSearchTerm so it would not crash in those cases or perhaps another solution? It'd be nice to see the engine still run with non-vanilla setups. Logs: https://www.dropbox.com/sh/h3tpljlxqcl7ddb/AAB6So_mR3VtYBi-rqk9UH5ua?dl=0
pauloel7 27 May, 2020 @ 7:28pm 
Yeah, sorry to hear that Mr. Zur13. These errors only appear after some 20 turns and I'm pretty sure they are due to some weird modding interaction, because I cannot remember them early on when I first start using MSE. I do not know how to proceed. Thank you anyways.
Zur13  [author] 27 May, 2020 @ 6:51am 
@pauloel7 I don't have such error on my side. I don't have much time for modding these days and I can't go deep investigating problems try to check if this error appears in log without MSE mod. because this part of code where the error appeared on your side was copied from original game files.
pauloel7 27 May, 2020 @ 5:19am 
Ok, now it's down for sure. Something about nil values. Please help? Logs: https://www.dropbox.com/sh/h3tpljlxqcl7ddb/AAB6So_mR3VtYBi-rqk9UH5ua?dl=0
pauloel7 22 May, 2020 @ 4:00pm 
OMG it worked. Thank you very much Laurana. Kind of you for sharing!
Laurana Kanan 22 May, 2020 @ 3:39pm 
@pauloel7 - Find that file/line in your Civ 6 installation and change Row to Replace and those errors will stop.