Fog of War API
advanced scriptingWorld Map Strategy Kit · Scripting Support (C#)
WMSK (namespace WorldMapStrategyKit)
Fog of War API
Methods for controlling the fog of war overlay.
Properties
bool fogOfWarLayer { get; set; }Enable or disable the fog of war layer.
Color fogOfWarColor { get; set; }Color of the fog overlay (typically black or dark gray).
float fogOfWarLayerElevationElevation of fog of war layer when viewport is used.
Texture2D fogOfWarTextureGets or sets the fog of war texture.
Global Fog Control
void FogOfWarClear(bool visible)Resets the entire fog of war layer. If visible is true, all areas are revealed; if false, all areas are fogged.
Position-Based Fog Control
float FogOfWarGet(float x, float y)Returns the fog alpha at a given map position (0 = fully visible, 1 = fully fogged).
void FogOfWarSet(float x, float y, float alpha)Sets the fog alpha at a position (0 = visible, 1 = fogged).
void FogOfWarIncrement(float x, float y, float alphaIncrement, float radius)Changes fog alpha in a circular area around a point. Positive increment reveals, negative increment fogs.
Entity-Based Fog Control
void FogOfWarSetCountry(int countryIndex, float alpha)Sets fog alpha for an entire country (0 = visible, 1 = fogged).
void FogOfWarSetProvince(int provinceIndex, float alpha)Sets fog alpha for an entire province.
void FogOfWarSetCell(Cell cell, float alpha)Sets fog alpha for a specific grid cell.
Advanced
Additional Methods
void FogOfWarSetCountryRegion(int countryIndex, int regionIndex, float alpha)Sets alpha of fog over a specific country region.
void FogOfWarSetProvinceRegion(int provinceIndex, int regionIndex, float alpha)Sets alpha of fog over a specific province region.
void FogOfWarSetCells(List cells, float alpha)Sets alpha of fog for a list of cells
Suggest an improvement
Help us improve this documentation page.