5.1. MAIN sectionΒΆ
Note
MainSectionParser is responsible
for parsing MAIN section. This section contains one key-value pair per each
line.
Section example:
[MAIN]
MAP Moscow/sload.ini
TIME 11.75
TIMECONSTANT 1
WEAPONSCONSTANT 1
CloudType 1
CloudHeight 1500.0
player fiLLv24fi00
army 1
playerNum 0
Output example:
{
'location_loader': 'Moscow/sload.ini',
'time': {
'value': datetime.time(11, 45),
'is_fixed': True,
},
'weather_conditions': Conditions.good,
'cloud_base': 1500,
'player': {
'belligerent': Belligerents.red,
'flight_id': "fiLLv24fi00",
'aircraft_index': 0,
'fixed_weapons': True,
},
}
As you can see, we have a dict as a result.
Description:
MAPName of location loader. Location loaders contain information about locations (textures, air pressure, air temperature, list of map labels, etc) and can be found inside
fb_maps*.SFSarchives.Output path: location_loaderOutput type: strOutput value: original string value TIMEInitial time in mission. Defined as a real number. Integer part defines hour. Fractional part defines minutes as a fraction of 60 minutes, so
0.75is60 * 0.75 = 45minutes indeed.Output path: time.valueOutput type: datetime.timeTIMECONSTANTWhether time specified by
TIMEmust be fixed during all mission long.Output path: time.is_fixedOutput type: boolOutput value: Trueif1,FalseotherwiseWEAPONSCONSTANTWhether player’s loadout is fixed (usually used in single player).
Output path: player.fixed_weaponsOutput type: boolOutput value: Trueif1,FalseotherwiseCloudTypeDescribes type of weather by code in range
[0-6].Output path: weather_conditionsOutput type: complex weather conditions constant CloudHeightA real number which defines cloud base.
Output path: cloud_baseOutput type: intOutput value: original value converted to integer number player[1]ID of AI flight which player will be the part of during single mission or campaign mission.
Output path: player.flight_idOutput type: strOutput value: original string value or Noneif not presentarmy[1]Code number of player’s belligerent. This value is primarily used to correctly define types of targets for a particular player.
For example, this value equals to
1and there are 2 targets defined for mission: 1) destroy an object; 2) protect objects in an area.In this case, Allies will see these targets on map without changes.
But for the Axis these targets will be displayed with the opposite meaning, i.e.: 1) protect an object; 2) destroy objects in an area.
This principle works only if there are only 2 belligerents in mission: red and blue.
Output path: player.belligerentOutput type: complex belligerents constant playerNum[1]Player’s position in flight defined by
player. It’s always equal to0ifplayeris not set.Output path: player.aircraft_indexOutput type: intOutput value: original value converted to integer number
Footnotes:
| [1] | For single player mode only. |