Ground of Aces Modding
Loading...
Searching...
No Matches
Get Mission Description

Missions.get_mission_description_text

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

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

Description

Event handler that returns the localization key used to display the mission description in the mission info window and mission result window. The event name is get_mission_description_text; the constant is MissionEvent.GET_MISSION_DESCRIPTION_TEXT. It is called once, while the mission is created, and only for a mission without a .json - a mission with JSON shows the text of its missions/<id>/mission_description term or its _rawMissionDescription field. When the handler is missing the description is empty.

from Blindflug.FlightMission import MissionEvent
# Set the localized term for the description
localization.SetTerm("en", "my_mod/patrol/mission_description", "Patrol the coast and report anything unusual.")
@event_handler(MissionEvent.GET_MISSION_DESCRIPTION_TEXT)
def get_mission_description_text(mission_entity_id):
# Return the key for the localized mission description
return "my_mod/patrol/mission_description"
Definition FlightMissionEcsInstaller.cs:7

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