Resource icon

Enable Yield Icons by Default 1.2

koreyama

Chieftain
Joined
Feb 9, 2025
Messages
6
Description
Auto Yield Icons is a simple yet effective mod that ensures yield icons are always enabled by default in Civilization VII. With this mod, you no longer need to manually toggle the yield icons every time you start a new game.

I wasn’t sure how to add a new file instead of replacing an existing one, but I managed to get it working for now. However, I’m not sure if this is the correct approach.

Also, I’d like to localize the mod, but I’m not quite sure how to do it. If there are any good examples, I’d appreciate any guidance!

 
Interesting idea! I was manually changing this in default-lens.js for myself locally:
JavaScript:
class DefaultLens {
    constructor() {
        this.activeLayers = new Set([
            'fxs-hexgrid-layer',
            'fxs-resource-layer',
            'fxs-culture-borders-layer',
            'fxs-yields-layer'
        ]);
        this.allowedLayers = new Set([
            'fxs-appeal-layer'
        ]);
    }
}

Moving 'fxs-yields-layer' from allowed to active. But this requires overriding a file. Good to know we can hook up to events and toggle the lens layers.
 
I initially tried that method as well, but in my environment, it didn’t work properly when the tutorial was enabled.
However, thanks to that, I was able to discover the current approach, so it was a silver lining!
 
This is actually Japanese. I understand that forum posts must be in English, but do the comment lines within the mod also need to be in English? Would it be acceptable if I include English alongside the original text?
 
This doesn't seem to work anymore with the latest patch, anyone else seeing that? I don't see a version in the Steam workshop.
 
It seems to be working now but with the latest release the icons are so huge I have to turn them off just to see what else is underneath them. Maybe a mod for NORMAL icons?
 
It seems to be working now but with the latest release the icons are so huge I have to turn them off just to see what else is underneath them. Maybe a mod for NORMAL icons?
that's a bug with high-res UI scaling in the new update. i've included a fix in my new mod, Trixie’s Fixes.
 
THANKS! I was just poking around here to see if this was officially recognized by Firaxis and saw your message, works great.
 
This mod isn't working for me any more, but I have managed to update my java file, which looks to have changed from the post above
yields are not even mentioned, so I have added it into active layers and will test if that works.

No, that didn't work for me, this is what the file looks like now:

import { L as LensManager } from '../../../../core/ui/lenses/lens-manager.chunk.js';

class DefaultLens {
activeLayers = /* @__PURE__ */ new Set(["fxs-culture-borders-layer", "fxs-operation-target-layer"]);
allowedLayers = /* @__PURE__ */ new Set(["fxs-hexgrid-layer", "fxs-resource-layer"]);
/**
* Do not blend on transition.
* Users are able to manage which layers to use in the default lens, so stick with those.
*/
blendEnabledLayersOnTransition = false;
}
LensManager.registerLens("fxs-default-lens", new DefaultLens());
//# sourceMappingURL=default-lens.js.map

It is really annoying as Yields turn off randomly throughout the game.
 
Last edited:
you don’t need a mod anymore to enable yields by default. if you click on Hex Grid or Yields and save your game, the game will remember that when you reload. (you need to click on the Lenses panel for this, the hotkey won’t work)

the settings do reset if you exit & restart the game, but they’ll be restored as soon as you load a game with saved lenses. at most you’ll need to set it up once per game
 
Back
Top Bottom