Documentation
Русский
  • Gem RTS v1 Documentation
  • Foundational Knowledge
    • Game local files and Player Profile locations
    • Game resource architecture
      • Packages
      • Package file structure
    • Basic knowledge about configuration files
      • Include instruction
      • Define instruction
      • Mod instruction
  • Mod Development
    • Creating mod
    • Advanced package configuration
    • Creating Settings templates
  • Editor
    • Camera control in the Editor
    • Useful Editor shortcuts and Console commands
    • Map Editor
      • Creating a new map
      • Scene Editor
      • Entity Editor
      • Landscape Editor
        • Heights Editor
        • Polygons Editor
        • Terrains Editor
        • Color Editor
        • Flags Editor
        • Material Editor
        • Grass Editor
        • Foliage Editor
      • Water Editor
      • Specifics of Map Editing
        • Creating destroyed vehicle entities for map entourage
        • Creating terrain folds
          • Creating Ground Surface relief
          • Rock and cliff entities
        • Stone entities
        • Entity for water sound effects
        • Building entities
      • Creating a minimap
    • Mission Editor
      • Mission Properties Editor
    • FX Editor
    • Environment Editor
      • Basic knowledge about HDR
      • Creating environment preset
      • Setting Environment preset parameters
    • Debug Tools
      • Console
      • Debug Processes Window
      • Render Layer List Window
    • Simulation Mode
  • Textures and Materials
    • Physically Based Rendering
      • Texture compression formats in GEM RTS
      • PBR parameters
      • Texture Conversion in Gem RTS
      • Texture conversion to PBR materials using Nvidia Texture Exporter
  • Modeling
    • 3ds Max Plugin
    • Vehicle Model Setup Pipeline
      • Bone hierarchy in vehicle models
        • Body
        • Turret
        • Engine
        • Gun
        • Secondary bones
        • Transmission
          • Сhassis mechanisms
  • Localization
    • Variable strings in localization
    • Adding a new localization language
  • Game settings
    • Movement on slopes
    • Configuration of movement types for human units
    • Configuring entity interaction with wind
    • Sensor
    • User control sound
Powered by GitBook
On this page
  • Sensor modifiers and debugging tools
  • AI search debugging tools
  • Sensor configuration in mission
  1. Game settings

Sensor

Sensor Block Parameters

The Sensor block controls the radius of the approximate location of an object known to the AI. This radius changes based on various factors, such as initial detection, receipt of new signals, object movement, and detection of activity nearby. Below are the parameters that define these changes, along with their default values and corresponding formulas.

Parameter
Default Value
Description

radiusInitial

0.5

A coefficient that determines the initial radius of the approximate location of an object known to the AI. Calculated using the formula: r = radiusInitial * distance to the object

radiusChangeOnSignal

0.7

A coefficient that determines how the radius changes when a repeated signal is received. Calculated using the formula: r = r * radiusChangeOnSignal

radiusChangeOnShift

0.5

A coefficient that determines how the radius changes when the object has moved from its position. Calculated using the formula: r = Max(radiusChangeOnShift * shift distance, r)

radiusOnMove

0.3

A coefficient that determines how the radius changes if movement of an object is detected nearby. Calculated using the formula: r = Min(radiusOnMove * distance to the object, r)

All parameters are constrained within the range [0..1].

Example of Sensor Block Configuration
{sensor
    {radiusInitial 1.0}
    {radiusChangeOnSignal 0.1}
    {radiusChangeOnShift 0.1}
    {radiusOnMove 1.0}
}

Sensor modifiers and debugging tools

By default, visibility operates under the observed principle, meaning an object is considered visible if it enters the visor range of at least one allied unit.

To debug unit sensors and visibility mechanics, the following console commands are available:

  • v_visor 1 – displays unit visors.

  • v_visorInfo 1 – shows additional information about visors.

Additionally, the inform_range modifier is used to configure data transmission between allied soldiers. This command passes a multiplier to the engine, influencing how information is shared. In single-player mode, a value of 150 meters is considered excessively large.

AI search debugging tools

For an AI-controlled soldier to actively search for an enemy, all of the following conditions must be met simultaneously:

  • move_mode is set to free;

  • control = AI;

  • the unit is not currently moving due to a move task or waypoints;

  • the unit is allowed to advance based on advance/retreat settings.

Console Commands for Debugging

  • v_aiSearchPoints – spawns spherewater_small at all points of interest, allowing visualization of key areas the AI considers during searches.

  • v_sensorBasic – enables symbolic and color-coded marking of detected targets:

    • red – enemy;

    • green – ally;

    • yellow – neutral;

    • white – external target;

    • cyan – unidentified target;

    • darker colors – target is not currently visible;

    • circle (○) – approximate location of the target;

    • asterisk (*) – primary enemy;

    • question mark (?) – object is not studied; the unit should approach and investigate

Sensor configuration in mission

Sensor configuration settings for missions are written in the <name>.info file within the game settings block or in a global configuration file for all missions of a specific game type.

Parameter
Description

fogOfWar

Defines the fog of war mode.

Possible values:

  • fog_off – Fog of war is disabled.

  • fog_simple – works like in Men of War 2, only visibility radius and distances are considered, ignoring terrain, bushes, and other obstacles.

  • fog_realistic – functions like in Men of War original, but is currently disabled and needs restoration.

fogOfWarModeForAI

Defines how AI processes visibility.

fog_per_entity

Useful for single-player missions to prevent AI units from rushing toward the player. Each unit sees independently, with information shared only within its communication radius. Applies only to units with control = AI.

fog_per_player

Used in PVP Frontline Mode. Visibility is shared across all of a player's units—if one unit sees an enemy, all units see it. Enabled by default.

Example of sensor configuration in a mission
{settings
    {options gameDuration}
    {optionsAdvanced floraRespawn friendlyFire fogOfWar}
    {fogOfWar fog_simple}
    {fogOfWarForAI fog_per_entity}
    {difficulty normal}
    ...
}
  • fogOfWar fog_simple - the fog of war mode is set to simple, working like in Men of War 2: visibility is determined only by range, ignoring terrain and obstacles.

  • fogOfWarForAI fog_per_entity – AI units will perceive visibility individually, meaning they won’t collectively react to an enemy unless within their information-sharing radius.

Last updated 2 months ago