GithubHelp home page GithubHelp logo

morelenses's People

Contributors

astog avatar azurency avatar chaorace avatar d0sadata avatar deluxghost avatar infixo avatar krzyk avatar rzucareli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

morelenses's Issues

Unimproved resources in Natural Parks marked purple in Builder Lens

I hesitate to call this a bug since the hex IS a resource, but for Luxury or Strategic Resources in a Natural park there isn't anything you can do about it. I think Natural Park tiles should all have their own marking since apart from building woods in them there isn't really anything else you can do. (Maybe you can harvest bonus resources?) Per my other CR, my own preference would be that National Park tiles just not be tinted at all since they're basically completed work.

Worker Lense Improvements

  1. Do not highlight tiles which are not in any city working range (3 tiles) except those containing luxury or strategic resources.
  2. Highlight tiles with wrong improvements for strategic resources. Happens when tile was improved before the strategic resource was visible.

Archer Lens

From @mp0011, here

It's hard to tell if hex is plain or hill. Also, forests and rainforests are sometimes hard to spot (eg. with plantation or other improvement). So...

Archer lenses:
GREEN: empty plains/oceans/lakes etc,
ORANGE: plains with forrest / hill
RED: Hills with forrest (and also mountains)

This lens will also have the AUTO APPLY setting like some of the other lenses.

Builder Lens does not correctly apply the Nothing to do hex.

Currently, builder lens does not track technologies so the Nothing to do hex is not applied on tiles like plain desert / snow / tundra. This will also require to track unique improvements from the civilization and player, but also unique improvements gained from city states.

Lens Manager

Now that in summer patch, include function finally works correctly for new .lua files added. The main idea is I want to move all lens code outside of MinimapPanel.lua.

Lens Manager

This basically controls all lenses in game (including vanilla lenses).

Why do this?

To prevent various issues of having one lens apply over the other. Add modded lens very easily, and without editing the MinimapPanel.lua file.

Features

  1. Controls every lens in game, including modded lenses. When applying a lens, it makes sure no other lens is applied,
  2. Controls the ModalScreen, and other interface modes in a way that prevents future bugs.
  3. Can apply any lens (including modded lens) using LuaEvents to allow lenses to be tied to other UI elements (like pins).
  4. All lens have its own file that get imported at game setup. This will make it really easy for future modders to add lenses very easily, and without breaking other lenses.

This will require major code changes especially in MinimapPanel.lua, that is why this will be worked in a different branch.

Runtime Error

Seeing the below on the newest release version (v2). Not sure if i'm the only one. I'm on 1.0.0.129 (260180)

Runtime Error: D:\Steam\Sid Meiers Civilization VI\DLC\MoreLenses\UI\MinimapPanel.lua:3360: function expected instead of nil
stack traceback:
D:\Steam\Sid Meiers Civilization VI\DLC\MoreLenses\UI\MinimapPanel.lua:3360: in function 'Initialize'
D:\Steam\Sid Meiers Civilization VI\DLC\MoreLenses\UI\MinimapPanel.lua:3464: in function '(main chunk)'
[C]: in function '(anonymous)'
Lua callstack:
Runtime Error: Error loading D:\Steam\Sid Meiers Civilization VI\DLC\MoreLenses\UI\MinimapPanel.lua.
stack traceback:
[C]: in function '(anonymous)'

Builder Lens is broken

I'm playing on the Linux port of the game, version 1.03.31. I am using the latest version of MoreLenses with changes from PR #39 applied to fix Linux compatibility.

Attempting to activate the Builder Lens shows no overlay, just the legend panel. It also produces a stack trace in Lua.log (see below). All other lenses are verified to be working.

Please also see the attached save file if you are having difficulties reproducing the issue.

Runtime Error: C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\BuilderLens_Config_Default.lua:40: operator < is not supported for nil < number
stack traceback:
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\BuilderLens_Config_Default.lua:40: in function 'GetAppointedGovernor'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\BuilderLens_Support.lua:273: in function 'plotCanHaveImprovement'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\BuilderLens_Support.lua:300: in function 'plotCanHaveSomeImprovement'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\BuilderLens_Config_Default.lua:323: in function 'rule'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\Builder\ModLens_Builder.lua:110: in function 'OnGetColorPlotTable'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Base\Assets\UI\minimappanel.lua:975: in function 'SetModLens'
	C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Base\Assets\UI\minimappanel.lua:527: in function 'OnLensLayerOn'
	C:\Emu\AppAssets\DLC\expansion2\UI\Replacements\MinimapPanel_Expansion1.lua:180: in function 'OnLensLayerOn'
	[C]: in function 'func'
	[C]: in function '(anonymous)'
MinimapPanel: Adding ModLens: ML_RESOURCE

[Feature Request] LAMP (Lens Augmented Map Pins)

Any chance of combining the functionality of Map Pins & Lenses?

Example 1: New City Pin & Settler Lens
Selecting the City Pin, before deciding where to place it, could bring up the Settler Lens and show a 3 tile radius around the Map Pin as we move it around, helping us decide where to place it. Once placed, City Pins could interact with the Settler Lens still, making it easier to decide where to place our 2nd or 3rd new City.

Example 2: Water Park Pin & Amenities Lens
Selecting a Water Park Pin, before deciding where to place it, could bring up an Amenities Lens that highlights Entertainment Complex, Water Park, and Colosseum tiles (as they, or buildings within them can emit an Amenity AOE - Area of Effect). This Lens could highlight their AOE coverage, along with the strength of the AOE effect(s). This Lens could also follow the Water Park Pin as we move it around, showing it's potential AOE coverage, helping us decide where to place it. And once placed, Entertainment Complex, Water Park, and Colosseum pins could interact with the Amenities Lens still, making it easier to decide where to place other such districts.

While in 'Map Tacking' mode, lenses could reflect maximum potential AOE, ignoring what buildings have been completed within districts, or whether the district has even been built (say it's under construction, or nothing more then a map pin).

Having the option through the Lenses Menu to show current/actual AOE (instead of potential) would still be useful for identifying districts that would benefit from building upgrades. Alternatively, we could simply use potential AOE, and highlight districts/pins that don't meet that potential.

Other Uses:
Of course, the usefulness of this wouldn't be limited to Water Parks and Amenity Lenses. It would be useful for Industrial Zones (Factories, Coal/Oil/Nuclear Power Plants) along with their Production and Electricity AOEs (Gathering Storm changes some of this). I could even see this being useful for Aerodromes, highlighting the area our air units could cover.

Back to the Settler Lens: Adding to Example 1
It would also be useful if, while the Settler Lens were active, pressing a hot key would change the functionality of the scroll wheel, allowing us to quickly switch through these AOE Lenses, making it easier to find the perfect new city location. Pressing the hot key again, or exiting the lens view, could revert the scroll wheel to it's default functionality.

Taken a step further, LAMP (Lens Augmented Map Pins) could show adjacency bonuses.

I posted a variation of this in this mod's Steam comment section. Figured GitHub to be the more appropriate place to post it.

Did I get carried away again?

June '19 Update breaks minimap and lens button

Sdgabai on steam has a good traceback

I tested out renaming LateInitialize and the map showed up just fine, but it seems there are still issues with the lens button:

 Runtime Error: C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion2\UI\Replacements\MinimapPanel_Expansion2.lua:23: attempt to index a nil value
stack traceback:
	C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion2\UI\Replacements\MinimapPanel_Expansion2.lua:23: in function 'OnToggleLensList'
Lua callstack:

Builder Lens enhancements

I've currently got a ridiculous game going for the Trans-Siberian Achievement and it's giving me a lot of interaction with the builder lens, because I seem to be fundamentally incapable of not developing my lands while waiting for trade routes to run. Here are some observations.

"Generic Tile" gets applied to all of flat plains, flat snow, and flat desert. When deciding whether to move a builder to a tile, it is hard to distinguish the first case, which can get a farm or forest, from the latter two, which can't have anything done to them. The same is sort of true of water with no resources, but at least you can readily tell that's what the hex is. I think my personal preference would be in all of those cases to just have no lens tint applied to the hex at all, like it is for all of the tiles outside my territory that I can't do anything with.

Similarly, it doesn't seem helpful to tint mountains since it's not just that there's "Nothing to do" there's nothing that can be done -- unless maybe they could be part of a National Park but even then "Nothing to do" is not accurate and it'd be more helpful to see the potential National Park. Right now it's just a sea of red, blending with tiles that can't be part of a National Park, possibly ever (because, for example, it's a district or city).

Along those lines, I'd find it really helpful if tiles outside of any city's working radius were indicated as such. For me, that means if it's a bonus resource I want to harvest it or if it's a plain tile then I'm really only thinking of it in terms of an adjacency bonus (farm or forest, or maybe clearing the rainforest) not whether to improve it sooner for a worker.

It'd also be nice to highlight breathtaking coastal hexes.

Finally, it'd be nice to also have an option to turn off highlighting for all the rest of "Nothing to do". While it is true that many of those tiles could be modified still (say, removing an improvement), it'd better focus attention on tiles that can have work done.

Naturalist Lens

From @vttale, here

There really should be a way to tell whether you can build a National Park without blowing a ton of faith on a Naturalist just to find out whether you can.

I'm not sure whether a mod can figure this out the same way that actually having a naturalist does it though. I've found some interesting bugs (in unmodded base game) where it won't actually let you build a national park in a particular location when a couple of legitimate sites would overlap (but none are built). As an example, say you have 7 breathtaking tiles 2-over-3-over-2. The Naturalist will only highlight -- and only build -- in one part of that. I'm not sure if it is deterministic, but to continue the example it'll only let you build the national park in the diamond on the right hand side. You can force it to build in the left instead by developing (is possible) the rightmost point of the 2-3-2. I don't know if a lens would be able to tell; maybe it should just show all valid tiles anyway and then the player can work around the bugs with actual placement.

(As a culture player I have a lot of issues with the current state of National Park implementation.)

Update for Winter 2016 patch

The recent patch fixes the toggle grid hotkey, but also introduces a bug, explained here.

The fixes from the recent patch needs to be ported over.

Spy Lens

Lens to show where each spy is deployed.

Builder Lens doesn't support Hotseat Multiplayer

How to test:
Start a hotseat multiplayer game, setting the first 3 players as human (first 2 humans in a team, 3rd one solo), and the last player(s) occupied by computer(s). A duel sized pangaea probably works best for this.

What happens:
The Builder Lens only works as expected for player 1. As for players 2 & 3, the Builder Lens darkens all their owned tiles. Interestingly, when player 2 uses the Builder lens, it highlights improvable tiles owned by player 1 (as they have shared visibility), but does not highlight it's own improvable tiles.

If you start a fresh game, it only works for player 1. But if you then save it when it's another players turn, and reload the game from that point, it will only work for that player going forward (and won't work for player 1).

  • OS: Windows 10
  • Version: 1.0.0.290
  • Expansions: All expansions and DLC, including Rise & Fall, and Gathering Storm
  • Other mods: None

I should also note that I played a number of hotseat multiplayer games with CQUI enabled prior to Gathering Storm, and this issue was not present until this recent update. Issue present in both the stand alone mod and in CQUI, since Gathering Storm update.

Feature Request: Pillage Lens

Hello,

It would be great to have a lens to know which hexes aren't fully pillaged and color them based on their yield types.
For example, pillaged improvements and fully pillaged districts wouldn't be highlighted, but a campus that isn't fully pillaged (belonging to an enemy) is colored blue. Same goes for an industrial zone. For a pillage-able theatre square and government plaza, purple can be used. etc.

It would be fantastic to auto activate this lens for certain units such as light/heavy cavalry, privateers and vampires.

Thank you

Lens effect only applying to bottom portion of map

Encountered a weird situation where the lens effects were not applying to all hexes in the normal view. The unapplied versus applied difference was a very clear horizontal split across the map. It didn't occur to me until now to check if it was a fully edge-to-edge line, however.

I had a ridiculous game going on a Huge Pangea map where things just got out of hand. (Background on that available on request, but I don't think it's really germane for the issue report.) What might be germane is that I eventually ended up with so many cities spammed that my civ, Russia, ran out of names in the Russian list and started naming new ones after American cities. I owned like 80% of the land on the map, and the majority of it was unimproved hexes.

I could probably get you a save game if it helps. I was playing with CQUI and all the current DLC enabled.

Game Crash

Runtime Error: C:\Steam ²\steamapps\workshop\content\289070\871712879\Lenses\Scout\ModLens_Scout.lua:68: attempt to index a nil value
stack traceback:
    C:\Steam ²\steamapps\workshop\content\289070\871712879\Lenses\Scout\ModLens_Scout.lua:68: in function 'OnUnitSelectionChanged'
    [C]: in function 'func'
    [C]: in function '(anonymous)'

Builder Lens

Please consider indicating which tiles are not workable when the builder lens is selected.

Workable Too Far Tiles

If a city grows much more rapidly than an adjacent one, it may take tile more than 3 hexes away from city center that are within the 3 hex radius of another city. This can happen when annexing enemy cities as well. Would be great to have a lens to mark such tiles. I.e. too far from current city center, but within workable radius of another city center.

Summer Patch Update

2107 Summer patch broke a lot of stuff regarding lenses. I am working on a fix, currently. If you want to report a specific issue, please comment below.

unclear docs?, potential bug?

When you say "Delete MinimapPanel.lua and MinimapPanel.xml from CQUI",
do you mean delete it from the original Chao QUI? It should have to be that one, since I'm guessing MoreLenses has its own settings in MinimapPanel.lua and MinimapPanel.xml

In Chao QUI, the file names are minimappanel.lua and minimappanel.xml, not capitalized.
I'm not sure if that matters or not.

Anyway, I deleted them from Chao QUI, and kept the ones from MoreLenses, but I am still getting bugs.
The Chao QUI options icon is there, but the menu doesn't show up.

Did I delete the wrong one? Am I supposed to delete the one from MoreLenses?
If so, then it would be good to make the documentation wording more clear to something like,

"Delete MinimapPanel.lua and MinimapPanel.xml from MoreLenses".

Thanks for all the work you put into this. This is one of my favorite mods.

Trade Route Lens

Lens to show currently running trade routes.

If possible, also show all possible trade routes.

CQUI and Allowing Customized Colors

Hey @astog - I have been doing a good chunk of the work in the past year or so on CQUI (https://github.com/civfanatics/CQUI_Community-Edition) and I wanted to run a few things by you:

  1. I just wanted to re-confirm that it's OK that CQUI integrates the MoreLenses mod? Judging by the comment on your Steam Workshop page, I am assuming it's still OK, however as I have been the primary CQUI contributor for a while now and hadn't updated the ML code in any significant way... I wanted to verify. Also, I'll admit: I just posted a PR that included updating the CQUI integrated ML and thought to myself "I think it better if I verify. :)"

  2. One of the occasional requests on the workshop discussion has been to allow changing of lens colors, and is something that I've wanted to look into for a while, because it sounded like an interesting challenge and always wanted a "softer" pink for the resource highlights. I have been poking at this the last few nights and got to thinking once I saw you'd added a settings panel that if I manage to get something together, I'd like to share it for you to integrate into the MoreLenses mod if you were interested.

This is early prototype - at the moment most of my effort is tied to trying to work with these controls. There was some changes I made to the ModLens_Builder file to make this work, but not a significant overhaul.
img

[Feature request] Friend/foe "diplomatic status" lens

I'm not sure it would be doable, but a lens showing friend/foe territory would help a lot: when waging war, it's not easy for me to remember if that city-state is my friend or my enemy and right now I found no way to know.

A simple lens with my territory in green, my allies' one in cyan and my enemy's one in red (or something similar) would help a lot

Feature Request: RockBand's Best Shot

Would it be possible to have a lens that depending on the selected RockBand, it color codes available hexes based on its promotions or the percentage of likelihood of retiring after the performance (which is shown as a tooltip when you hover mouse over 'perform' once arrived at a possible hex) ?

All Lens View Break in Gathering Storm

This issue is expected, but with this mod enabled, all lens views stop working in Gathering Storm (press preview).

What kind of debug info can I provide you to get a jump on this for release?

District Lens

The idea of the city overlap lens is to show potentially how many cities a district/wonder (if placed) will reach. For example say you have 4 industrial district all with factories, and you just got Great Engineer that boosts production for one particular factory. This is when the City Overlap lens will help you because it shows the absolute number of cities and not the currently affecting amount.

But there is still a need to see the current value, namely, which cities are affected buy what districts. I guess the best solution might be to make a district lens, that shows this info, and combine it with the adjacency yield lens. I could have the AoE affect behind a keybind (maybe ALT) and then display the info when the mouse hovers above the relevant district. Ex If you hover above a industrial district it will show in red/green which cities it is affecting. If you hover the mouse above a city it shows which districts are affecting it, in red/green.

No longer works

The lenses no longer work for me since the august 2023 update.

Runtime errors on Linux

I tried using the mod on Linux and I get a bunch of erros in Lua.log:

InGame: Loading InGame UI - C:/Emu/AppDataParent/Sid Meier's Civilization VI/Mods/MoreLenses/Lenses/ModLens_CityOverlap
ModLens_CityOverlap: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ModLens_CityOverlap:           City Overlap Panel
ModLens_CityOverlap: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Runtime Error: C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_CityOverlap.lua:182: operator + is not supported for nil + number
stack traceback:
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_CityOverlap.lua:182: in function 'OnReoffsetPanel'
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_CityOverlap.lua:279: in function 'Initialize'
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_CityOverlap.lua:306: in function '(main chunk)'
    [C]: in function '(anonymous)'^M
Lua callstack:^M
Error loading file where=, file=C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_CityOverlap.lua
InGame: Loading InGame UI - C:/Emu/AppDataParent/Sid Meier's Civilization VI/Mods/MoreLenses/Lenses/ModLens_Resource
ModLens_Resource: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ModLens_Resource:            Resource Panel
ModLens_Resource: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Runtime Error: C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_Resource.lua:355: operator + is not supported for nil + number
stack traceback:
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_Resource.lua:355: in function 'OnReoffsetPanel'
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_Resource.lua:424: in function 'Initialize'
    C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_Resource.lua:448: in function '(main chunk)'
    [C]: in function '(anonymous)'^M
Lua callstack:^M
Error loading file where=, file=C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Lenses\ModLens_Resource.lua

This is the first time I look at the logs, maybe it is uppercase/lowercase related? None of the lens buttons works right now for me in the game.

EDIT:
And also:

Error opening/reading where=C:\Emu\AppAssets\DLC\expansion2\UI\Replacements\MinimapPanel_Expansion1.lua:6: , file=C:\Emu\AppDataParent\Sid Meier's Civilization VI\Mods\MoreLenses\Base\Assets\UI\minimappanel.lua

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.