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

Missions.get_mission_name

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

String The localization key for the mission name, or the text itself

Description

Event handler that returns the localization key used to display the mission name in the mission info window and mission result window. 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_name term or its _rawMissionName field. When the handler is missing, or returns an empty string, the mission id is shown.

from Blindflug.FlightMission import MissionEvent
# Set the localized term for the name
localization.SetTerm("en", "my_mod/patrol/mission_name", "Coastal patrol")
@event_handler(MissionEvent.GET_MISSION_NAME)
def get_mission_name(mission_entity_id):
# Return the key for the localized mission name
return "my_mod/patrol/mission_name"
Definition FlightMissionEcsInstaller.cs:7

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