sp00n
Prince
- Joined
- Jan 4, 2007
- Messages
- 371
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
// Edit 2
Fixed it by editing line 814 in MinimapPanel.lua accordingly:
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.
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: