Register

GG Fog Scout

An Add-on Module for Foundry Virtual Tabletop

Author: Ggs Project: Source Foundry Versions 12+ (Verified 14) Last Updated 1 day, 21 hours ago

GG Fog Scout

Selective fog of war exploration for Foundry VTT. Decide, user by user, who keeps the memory of the map they explored — and share the scout's discovered map with the rest of the party in one click.

Part of the Crónicas Bárdicas line by GegesVTT. Works standalone; no other module required.


Why

Foundry already stores fog exploration per user — every user has their own FogExploration document for every scene. What is global is the scene's on/off switch: either everybody remembers the map, or nobody does.

GG Fog Scout makes that switch per user. The ranger who scouted ahead keeps the map in their head. Everyone else sees only what their tokens can see right now.

Features

Usage

Configure explorers — Module Settings → GG Fog Scout → Configure explorers, or the binoculars button on the Lighting scene controls (GM only).

Share a map — the map-pin button on the Lighting scene controls. Pick a source user, pick the recipients, confirm. This overwrites the recipients' exploration on the current scene and cannot be undone.

The scene itself must have Fog Exploration enabled (Scene Configuration → Lighting). If it is off there, nobody explores, regardless of this module.

API

const api = game.modules.get("gg-fog-scout").api;

api.isExplorer(user);                     // boolean
await api.setExplorer(userId, false);     // take exploration away
api.getExplorerMap();                     // { userId: boolean }
await api.shareExploration(fromId, [toIds]);
api.openExplorers();                      // config window
api.openShare();                          // share dialog
 

Handy macro — give exploration to exactly one player:

const api = game.modules.get("gg-fog-scout").api;
const scout = game.users.getName("Fruti");
for (const u of game.users) if (!u.isGM) await api.setExplorer(u.id, u.id === scout.id);
 

Compatibility

Foundry VTT v13+, system agnostic.

Map sharing uses canvas.fog.sync, which Foundry documents as experimental and may remove without a deprecation warning. It is isolated in a single guarded function: if it disappears, sharing reports itself unavailable and the rest of the module keeps working.

Development

node tests/smoke.mjs
 

Simulates FogManager and asserts the patch contract without needing an open world.

License

MIT © Geges

Supported Game Systems

  1. Dungeons & Dragons Fifth Edition

    Latest Version: Version 5.3.3 Last Updated 3 months ago

Categories

Available Versions

  1. Version v1.0.0

    1 day, 21 hours ago
    Foundry Version 12+ (Verified 14) Manifest URL Read Notes