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

Missions.get_mission_id

Parameters

mission_entity_id Entity ID of the mission currently accessing the mission script

Returns

String The identifier of the mission

Description

Event handler that returns the internal identifier of the mission. The game does not call it for its own use; it looks for a get_mission_id handler in a module named exactly like the mission to decide whether that mission has a script of its own, and the shared default_mission.py calls it to build the text keys.

  • A mission without a .json must define it, in a .py whose file name is the mission id - otherwise the mission does not exist as far as the game is concerned.
  • A mission with a .json does not need it: it is inherited from default_mission.py, which answers with missions_api.GetMissionId(mission_entity_id).
from Blindflug.FlightMission import MissionEvent
@event_handler(MissionEvent.GET_MISSION_ID)
def get_mission_id(mission_entity_id):
return "my_mod_patrol"
Definition FlightMissionEcsInstaller.cs:7

⚠️ The returned string, the .py file name and the .json file name (if any) must all be identical ⚠️