Resource icon

More Lenses - Now compatible with Gathering Storm 5.0

I've just encountered the vanishing lens bug. Had this in my previous game too, but didn't notice when exactly it happened. Now I have the exact turn. I was able to pin this down to when the Mont St. Michel wonder is placed on a tile, which requires to be built upon a march. Maybe this somehow screws with the logic when to display the lens.
It only happens the turn after you have placed the wonder though. I can't remember if I've built the wonder in the last game it happened, too, or if some AI did it.

// Edit
Error message in the LUA.log file
Code:
MinimapPanel: Checking wonder 60 if ancient or classical
Runtime Error: bad argument #1 to 'lMakeHash' (string expected, got nil)
stack traceback:
   [C]: in function 'lMakeHash'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:814: in function 'isAncientClassicalWonder'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:592: in function 'SetBuilderLensHexes'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:923: in function 'OnUnitSelectionChanged'
   [C]: in function 'func'
   [C]: in function '(anonymous)'
ModalLensPanel: currentModdedLensOn = 0


// Edit 2
Fixed it by editing line 814 in MinimapPanel.lua accordingly:
Code:
           -- Make hash, and get era
           if row.PrereqTech ~= nil then
               prereqTechHash = DB.MakeHash(row.PrereqTech);
               eraType = GameInfo.Technologies[prereqTechHash].EraType;
           elseif row.PrereqCivic ~= nil then
               prereqCivicHash = DB.MakeHash(row.PrereqCivic);
               eraType = GameInfo.Civics[prereqCivicHash].EraType;
           end

I actually have no idea why you're checking for era of a wonder, but if this wonder has no PrereqTech, as Mont St. Michel does, and instead only a PrereqCivic, the function bugs out. This fixes it, and the builder lens is working fine again.
 
Last edited:
I've just encountered the vanishing lens bug. Had this in my previous game too, but didn't notice when exactly it happened. Now I have the exact turn. I was able to pin this down to when the Mont St. Michel wonder is placed on a tile, which requires to be built upon a march. Maybe this somehow screws with the logic when to display the lens.
It only happens the turn after you have placed the wonder though. I can't remember if I've built the wonder in the last game it happened, too, or if some AI did it.

// Edit
Error message in the LUA.log file
Code:
MinimapPanel: Checking wonder 60 if ancient or classical
Runtime Error: bad argument #1 to 'lMakeHash' (string expected, got nil)
stack traceback:
   [C]: in function 'lMakeHash'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:814: in function 'isAncientClassicalWonder'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:592: in function 'SetBuilderLensHexes'
   C:\Users\xxx\Documents\My Games\Sid Meier's Civilization VI\Mods\More Lenses\UI\MinimapPanel.lua:923: in function 'OnUnitSelectionChanged'
   [C]: in function 'func'
   [C]: in function '(anonymous)'
ModalLensPanel: currentModdedLensOn = 0


// Edit 2
Fixed it by editing line 814 in MinimapPanel.lua accordingly:
Code:
           -- Make hash, and get era
           if row.PrereqTech ~= nil then
               prereqTechHash = DB.MakeHash(row.PrereqTech);
               eraType = GameInfo.Technologies[prereqTechHash].EraType;
           elseif row.PrereqCivic ~= nil then
               prereqCivicHash = DB.MakeHash(row.PrereqCivic);
               eraType = GameInfo.Civics[prereqCivicHash].EraType;
           end

I actually have no idea why you're checking for era of a wonder, but if this wonder has no PrereqTech, as Mont St. Michel does, and instead only a PrereqCivic, the function bugs out. This fixes it, and the builder lens is working fine again.

Wow, thanks for figuring that one out. The reason for checking for era was the Chinese UA only applies to the Ancient and Classical era wonders, but I did not handle when the wonder had a prereq civic not a tech, which you found.
 
Builder lense shows rivers in the FOW, which allows a lot of information in an MP game. If you could kindly look into it, that'd be much appreciated.

Can you upload a screenshot of what that looks like? I don't play multiplayer but I would like to fix that issue.
 
Can you upload a screenshot of what that looks like? I don't play multiplayer but I would like to fix that issue.

It isn't specific to multiplayer, the builder lense is allowing you to see rivers within the fog of war. So places you haven't scouted yet, you can see rivers.

Can't get a screen shot tonight, but if you need it can do it in the morning.
 
Builder lense shows rivers in the FOW, which allows a lot of information in an MP game. If you could kindly look into it, that'd be much appreciated.
Ah, realized why that was happening. It is related to applying the red color on a undiscovered territory. The upcoming update will have fixed this. Thanks for finding the bug for me
 
I've noticed that the builder lense stays on when you delete a builder unit.
Also, a lense for archeologists to only show artifacts would be helpful as well.

And while not exactly a lense, but a way to only show luxury or strategic resources would also be very helpful.
I also still need to look for a mod that shows in the tooltip for a resource how many of that type I already have (or not). Not sure if something like this already exists, but I think this is out of the scope for this addon anyway.
 
I've noticed that the builder lense stays on when you delete a builder unit.

Missed that. Thanks for letting me know. Should be fixed in the next update.
 
Awesome idea, I'm looking forward to you expanding on more new lenses in the future. Thanks.
I have a suggestion for one: a lens that shows current adjacency bonuses. It would be nice to see where your bonuses are coming from so you can relish in your pristine city planning skills.
 
Hello all, here is a teaser for the update I am currently working on. Keen observers can see the lenses I have added, but I am still working on others.
Spoiler Teaser :
 
Looks really awesome. Any timeframe? Especially for some of the bugfixes? I know the NQ guys want to include your mod.
 
Looks really awesome. Any timeframe? Especially for some of the bugfixes? I know the NQ guys want to include your mod.

Will be ready around this weekend. It took time because I had to change how the lenses were being activated to make it less buggy.

Need any help with the archaeologist lens? I have it working on my local copy.

The archaeologist lens is ready for the update

can you make a lens for hills when builders are active?

By this do you mean highlighting hills in a different color in the builder lens?
 
Last edited:
Awesome idea, I'm looking forward to you expanding on more new lenses in the future. Thanks.
I have a suggestion for one: a lens that shows current adjacency bonuses. It would be nice to see where your bonuses are coming from so you can relish in your pristine city planning skills.
Excellent suggestion. Will try to build that for the upcoming update.
 
i loaded a save file now the builder lens isn't working in that save?
 
i loaded a save file now the builder lens isn't working in that save?
The issue might be the one with wonders. Which Civ were you playing as?
 
Hello all, here is a teaser for the update I am currently working on. Keen observers can see the lenses I have added, but I am still working on others.
Spoiler Teaser :

Looks gorgeous Astog! You're killing it out here!
 
Top Bottom