Creating Custom Missions
YSFlight contains a mission definition that makes it possible to create a mission where an F-16 is on the runway and is being approached by a Mig-29 at 20 miles distance.
The definition file contains the following (without the comments). This file is inside the /ysflight/mission folder and is named f16vsmig29.yfs. The aircraft inside the file can be edited, saved as another file and it will appear in the menu.
The position of the attacking aircraft at present cannot be set.
YFSVERSI 20141101 #Version
SIMTITLE "Air Combat II: F-16 Fighting Falcon vs. Mig-29" #Title used in menu
FIELDNAM NEWTA_AIRBASE 0 0 0 0 0 0 FALSE # fieldname : map name
ALLOWAAM FALSE #Y or no Air-Air missiles
AIRPLANE F-16C_FIGHTINGFALCON TRUE #Player Airplane (TRUE)
STARTPOS STARTPOS 0 SOUTH10000_02 #Starting position player
IDENTIFY 0 #Starting position player
AIRPLANE MIG-29_FULCRUM FALSE #Opposing airplane (FALSE)
STARTPOS 0 SOUTH10000_01 #Unknown
IDENTIFY 1v #Unknown
INTENTIO #Unknown
MINIALTI 1000 #Unknown Min/ alt opponent
DOGFIGHT G5.00 B20.00 #Unknown
ENDINTEN #Unknown Ending
The following modification moves the attacker more out to sea. The position CLOSEBY_GROUNDTARGET was added by inspecting the menu for create new flight. The underscore item has to be added, as it is not obvious.
YFSVERSI 20141101
SIMTITLE "Falcon vs. Mig-29 CLOSEBY_GROUNDTARGET"
FIELDNAM NEWTA_AIRBASE 0 0 0 0 0 0 FALSE
ALLOWAAM FALSE
AIRPLANE F-16C_FIGHTINGFALCON TRUE
STARTPOS STARTPOS 0 SOUTH10000_02
IDENTIFY 0
AIRPLANE MIG-29_FULCRUM FALSE
STARTPOS 0 CLOSEBY_GROUNDTARGET
Positions for starting the mission can be found by starting a flight and selecting the start positions, a cross highlights that location on the map. Locations can be chosen within that map or 'field' as it is called in YSFlight.