Fog of War on Map - KageDesu/Alpha-ABS GitHub Wiki
⚠️ Available since Build 1110
⚠️ Available only in Alpha ABS PRO
1. Map setup
⚠️ Fog of War works only on ABS maps
Add AAFOG
to the map Note
2. Fog Of War setup
📁 Open file data\AABS\ FogSettings.json
Parameters:
fogOpenRadiusVarId
- Variable ID with value of player fog open radius
⚠️ If 0 - the player will not be able to open the fog around him
⚠️ If you change variable in game on map with fog of war, you can immediately refresh fog state around player, use: script call uAPI.refreshFog
for this
fogRegions
- array of regions for fog on map
fogIgnorePairs
- region A and array of regions B for ignore fog discover on regions B when player stay on region A. 😕
How it works, example:
- Without
fogIgnorePairs
- player can discover fog behind the wall
- Let's change this, using
fogIgnorePairs
parameter
3. Fog and Save Game
By default each map save own fog of war state. If player discover all the fog on map, the fog itself will not recreated again if you get back on this map. You can use uAPI script call to reset fog state on any map.
5. uAPI script calls
uAPI.refreshFog
- refresh fog state on map
uAPI.resetFogOnMap(MAP_ID);
- recreate fog on map with ID (MAP_ID)
File with default settings: FogSettings.json