> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dietrich-development.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Persistent fog of war for RedM: the map starts blank and uncovers as players explore, stored per character

The map starts blank. It uncovers as players ride, and what each character has seen is stored in the database and restored on every login, restart and reconnect.

<Info>
  The fog itself is the game engine's own, on both the minimap and the pause menu map. The resource records where players have been and replays it on login, so live exploration costs the script nothing while the server is running.
</Info>

## Features

<Columns cols={2}>
  <Card title="Persistent exploration" icon="floppy-disk">
    Progress is stored per character, or shared across all characters of an account.
  </Card>

  <Card title="Native engine fog" icon="map">
    The real fog of war on the minimap and the pause menu map, not an overlay drawn on top.
  </Card>

  <Card title="No per-frame cost" icon="gauge-simple-high">
    The engine handles the live reveal. The script only samples positions and flushes deltas.
  </Card>

  <Card title="Zone discoveries" icon="location-dot">
    First entry into one of the game's own districts or towns fires a discovery, notifies, pays an optional reward and reveals that zone's shape. No coordinates to configure.
  </Card>

  <Card title="Custom regions" icon="circle-dot">
    Define your own circle regions with first-visit rewards, on their own or alongside the game zones.
  </Card>

  <Card title="Pre-revealed zones" icon="eye">
    Towns, spawn points or a starting area that are always visible and never persisted.
  </Card>

  <Card title="Blips follow the fog" icon="location-pin">
    Blips in undiscovered areas are hidden and appear as players explore, like singleplayer points of interest. One config switch, using the free companion resource DD Blip Manager.
  </Card>

  <Card title="Admin tools" icon="user-shield">
    Reveal, session-only peek, reset and stats per player, behind an ace permission.
  </Card>

  <Card title="Server API" icon="code">
    Exports for treasure maps, quests and region unlocks, plus a discovery event to hook into.
  </Card>

  <Card title="Framework support" icon="gears">
    Runs on VORP and RSG through a built-in bridge with automatic detection.
  </Card>
</Columns>

## How it works

<Steps>
  <Step title="The engine reveals">
    While a player rides, the game's own fog of war uncovers the map around them, exactly as it does in singleplayer.
  </Step>

  <Step title="The script records">
    Positions are sampled on an interval and marked as explored cells in a compact bitfield. Deltas are flushed to the database in batches.
  </Step>

  <Step title="The script replays">
    On the next login, stored exploration is restored through a handful of native reveal volumes, with an instant fast path for a fully revealed map.
  </Step>
</Steps>

## Companion resource

Nothing in the game hides script blips inside undiscovered fog, so a shop, stable or sheriff blip stays visible in an area a player has never seen. DD Blip Manager is a free companion resource that discovers every blip on the client and hides the ones that sit in fog, without any change to the resources that create them. Install it and set `Config.HideBlipsInFog = true`.

## Next steps

<Columns cols={2}>
  <Card title="Setup" icon="screwdriver-wrench" href="/scripts/fog-of-war/setup">
    Installation, configuration, admin commands and troubleshooting.
  </Card>

  <Card title="Developers" icon="code" href="/scripts/fog-of-war/developers">
    Server exports, client exports and the discovery event.
  </Card>
</Columns>
