Sunday, October 15, 2017

Top Down Stealth Toolkit Basics: Global Alert Level System

The following information is based on the v2.1 edition of Top Down Stealth Toolkit & hence may not remain entirely relevant in later versions. For more information about the toolkit, check out the official support thread in the Unreal Engine forums:

The v2.1 update for Top Down Stealth Toolkit introduced a Global Alert Level Controller (GALC) tasked with controlling high-level AI responses to the player's actions. While all AI agents still retain their individual alert level systems, the GALC acts as an autonomous outside listener that keeps track of stimulus perception events, 
with minimal coupling to existing systems within the toolkit. With every new instance of a stimulus being perceived by an AI agent, the Global Alert Meter keeps rising based on the perceived threat rating of the stimulus. As the meter crosses certain threshold values, the Global Alert Level system kicks into action by activating the designated responses associated with the new state. These could include activation of automated security devices like lasers & turrets, as well as the deployment of reinforcement patrol guards to ramp up the difficulty of the mission over time.

The Global Alert Level Controller provides the following options to control the functioning of the new alert level system:

1. ThreatRatingModifier: Controls the rate at which Global Alert Meter goes up. While the perceived threat value of a stimulus is the major deciding factor when it comes to rising global alert levels, this modifier can help control the overall growth curve without having to tune the threat value of individual stimuli.

2. GlobalAlertLevelEscalationData: Determines how the game state changes in response to an increase in the Global Alert Level, based on the following parameters:

  • AlertLevel: The Global Alert Level associated with the state.
  • AlertMeterTarget: Minimum Global Alert Meter value required to reach the associated level.
  • AlertSystemResponse: Determines the actions taken by the AI in response to an increase in the Global Alert Level. Every time the Global Alert Level reaches a new state, the 'ResponseType' associated with the same gets relayed to the AI Surveillance Controller class which processes the request & performs the necessary actions. While the default setup offers up to three types of responses (Idle, ActivateIdleAgents, & Deploy Backup agents), more customized response types can be easily integrated into the system through this parameter.
  • AlertDisplayBackgroundColor: Determines the background color of the UI element that displays the Global Alert Level.