Ground of Aces Modding
Loading...
Searching...
No Matches
Get Threat Level

Missions.get_threat_level

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

String The localization key for the mission threat level, or the text itself.

Description

Event handler that returns the localization key used to display the mission threat level in the mission info window. It is called once, while the mission is created, and only for a mission without a .json - a mission with JSON shows its missions/<id>/intel_threat_report term or its _rawIntelThreatReport field. When the handler is missing the game shows Low.

from Blindflug.FlightMission import MissionEvent
# Set the localized term for the threat level
localization.SetTerm("en", "my_mod/patrol/threat_level", "Difficult")
@event_handler(MissionEvent.GET_THREAT_LEVEL)
def get_threat_level(mission_entity_id):
# Return the key for the localized mission threat level
return "my_mod/patrol/threat_level"
Definition FlightMissionEcsInstaller.cs:7

⚠️ Localization key needs to be unique to avoid conflicts with other localization entries - prefix it with your mod's name ⚠️