Better Fog of War
Better Fog of War replaces the flat black "unexplored" area of a scene with a blurred, desaturated, darkened, optionally tinted copy of that scene's own background. Players still can't read the map through the fog, but the unexplored region now looks like misterious unknown terrain instead of a black void.
The effect is baked once to a WebP file and wired into Foundry's per-Level Fog of War → Unexplored Image slot. There is no per-frame shader cost at the table — once the overlay is generated it is just a static texture.
Features
- Background-aware fog — unexplored area is a processed version of the actual scene art, not solid black.
- Three tunable parameters, each with a live zoom/pan preview in the Scene Configuration dialog:
- Blur — how strongly the art is smeared (resolution-independent).
- Saturation —
0= greyscale,1= full colour. - Darkness — contrast-preserving curve;
1= black.
- Tint — reuses the scene's own Unexplored Color field as a multiply tint. Leave it blank for none.
- Per-Level — every level of the scene that has a background image gets its own baked overlay.
- Automatic upkeep — while enabled, the overlay re-bakes on its own when the background, a parameter, the tint, the scene dimensions or the WebP quality setting changes.
- Files land next to your art — each overlay is written into the same folder as that level's background image, named
bfw-fog_<sceneId>_<levelId>.webp. The prefix makes them obvious in your file browser and tells you which ones are safe to delete. - Non-destructive — if you had a custom Unexplored Image, it is remembered and restored when you disable the module. Generated files are never auto-deleted (Foundry has no delete API); a purge tool in the module settings zeroes out stale overlays so they stop taking up space.
- Import-safe — stale better-fogwar data on scenes imported from compendiums or other worlds is scrubbed on import.
- GM-only, single-writer — only the acting GM client bakes and uploads; players just receive the finished texture.
- Tiny macro API for scripting (see below).
Installation
In Foundry: Add-on Modules → Install Module, then paste this manifest URL:
https://github.com/mordachai/better-fogwar/releases/latest/download/module.json
Enable Better Fog of War in Manage Modules for your world.
How to Use
Edit the scene, turn the Better Fog of War check box in the Visibility tab, Config the sliders and colors as you prefer. Use Apply to see the update in realtime while you edit. It will also work with Levels, if you generate the Levels after just click Regenerate.
Settings
Game Settings → Configure Settings → Better Fog of War:
- Baked overlay WebP quality (
0.3–1.0, default0.85) — blurred images compress very well, so the default is usually plenty. - Enable on new scenes — auto-enable the module on newly created scenes that have a background image.
- Purge unused overlays — opens a tool that scans every folder overlays live in, lists the
bfw-fog_*files no longer tied to a live scene/level (scene deleted, level deleted, module disabled), and purges them. Foundry has no file-delete API, so each is overwritten in place with a ~50-byte transparent stub: the prefixed name stays so you can spot and delete the husks from disk whenever you want. Normal use never needs this — re-bakes overwrite one file per level, in place.
License
MIT © Mordachai