civfanatics / CQUI_Community-Edition

Civilization 6 mod - UI enhancements, reduce clicks and manage your empire faster!
MIT License
149 stars 28 forks source link

Hide uninteresting yields : hide yields that are only explained from base terrain and base feature modifiers. #326

Open Gnightz opened 2 years ago

Gnightz commented 2 years ago

Problem Showing yields from every tiles adds a lot of noise to the map, especially when the player knows well all base yields ( the combination of base terrain and base feature yields)

Solution An option to hide yields on plots that are not interesting, i.e from plots that have nothing special, i.e. just a base terrain and a base feature (or no feature). Pseudo code (no problem with possible negative modifier cause it's using absolute value):

interesting_yields = 0
for yield_type in all_yield_type: 
    interesting_yield = plot_yields.yield_type  - plot_base_terrain_yield.yield_type  - plot_base_feature_yield.yield_type 
    interesting_yields = interesting_yields + abs(interesting_yield)
display_plot_yields = (interesting_yields  != 0)

Alternative solution An alternative is showing only the yields resulting from the true yields minus the base yield (base terrain and base feature), but the result is a bit confusing as the yields that are shown on the map will not be the true ones. Pseudo code (could bug and drop under 0 if there is negative modifier):

displayed_yields = plot_yields
for yield_type in all_yield_type: 
    interesting_yield = plot_yields.yield_type  - plot_base_terrain_yield.yield_type  - plot_base_feature_yield.yield_type 
    displayed_yields[yield_type] =  interesting_yield 

Additional context