AIRPORT SERVICES EXAMPLES
This page contains examples to help understand the Services.xml
file structure, a Service script file, or an IdleWorker script file. It also gives some details on how the Services and IdleWorkers are actually created or not, based on options and parameters.
Example Of The Services.xml
File
This example is a complete valid Services.xml
file, though with only one <ParkingSpace>
and fewer <Service />
and IdleWorker <Spot>
than usual:
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="ServiceFile" version="1,0">
<Service.ParkingSpaceServices>
<!-- You can choose a custom name for your parking space -->
<ParkingSpace name="RAMP MEDIUM" MinParkingSpaces="2">
<ParkingTypes>
<!-- This means that it will affect both RAMP_GA and RAMP_GA_MEDIUM Parking type -->
<ParkingEntry ParkingType="RAMP_GA_MEDIUM"/>
<ParkingEntry ParkingType="RAMP_GA"/>
</ParkingTypes>
<IdleWorkers>
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="2.0" SpawnAngleFromParking="-100" HeadingFromParkingHeading="90" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="12.0" SpawnAngleFromParking="110" HeadingFromParkingHeading="-80" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V2" EntryWeight="1"/>
</Spot>
</IdleWorkers>
<Services>
<!-- Delete or comment a <Service../> you do not want for a selected parking space -->
<Service name="GroundPowerUnit" Filename="Shared\Asobo_GroundPowerUnit\GroundPowerUnit" AIType="GROUNDPOWERUNIT" Frequency="0.25" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="4.0" SpawnAngleFromParking="20" HeadingFromParkingHeading="50"/>
<Service name="SmallPushBack" Filename="Shared\Asobo_PushBack\SmallPushBack" AIType="SmallPushback" Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="2.0" SpawnAngleFromParking="-10" HeadingFromParkingHeading="150"/>
</Services>
<SleepingActivities>
<SleepingAirlinerServices Probability="0.1" Timer="600"/>
<SleepingSmallPlaneRefueling Probability="0.1" Timer="600"/>
</SleepingActivities>
</ParkingSpace>
</Service.ParkingSpaceServices>
<Service.AirportServices>
<Services>
<Service name="Fuel" Filename="Shared\Asobo_Fuel\Fuel" ParkingType="VEHICLE" Frequency="1"/>
</Services>
</Service.AirportServices>
</SimBase.Document>
It is important to understand that Script files mentioned in Services.xml
can be part of other packages, including the default Microsoft Flight Simulator packages. Thus, here is a list of the scripts you can use, with their associated AIType
:
Category | Filename | AIType |
---|---|---|
Parking Service | Shared | BaggageLoader |
Parking Service | Shared | BoardingRamp |
Parking Service | Shared | CateringTruck |
Parking Service | Shared | GroundPowerUnit |
Parking Service | Shared | Marshaller |
Parking Service | Shared | PushBack |
Parking Service | Shared | SmallPushBack |
Airport Service | Shared | FuelTruck |
IdleWorker | Shared | IdleWorker |
IdleWorker | Shared | IdleWorker |
We recommend using a unique prefix to your script files, in order to avoid confusion with other packages from other companies.
Example Of The Spawning Parameters
The following example, with associated screenshot from Microsoft Flight Simulator, illustrates the meaning of the various spawning parameters. In the example they are used for IdleWorkers only, but the behavior is the same for Services.
<IdleWorkers>
<!-- 1 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="0.0" SpawnAngleFromParking="0" HeadingFromParkingHeading="0" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 2 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="0.0" SpawnAngleFromParking="180" HeadingFromParkingHeading="45" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 3 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="0.0" SpawnAngleFromParking="-90" HeadingFromParkingHeading="-135" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 4 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="5.0" SpawnAngleFromParking="90" HeadingFromParkingHeading="0" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 5 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.0" SpawnDistanceAdditionalOffset="-5.0" SpawnAngleFromParking="90" HeadingFromParkingHeading="0" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 6 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="0.5" SpawnDistanceAdditionalOffset="0.0" SpawnAngleFromParking="135" HeadingFromParkingHeading="0" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 7 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="1.5" SpawnDistanceAdditionalOffset="0.0" SpawnAngleFromParking="135" HeadingFromParkingHeading="0" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
<!-- 8 -->
<Spot Frequency="1" SpawnDistanceParkingRadiusFactor="0.91" SpawnDistanceAdditionalOffset="2.6" SpawnAngleFromParking="-117" HeadingFromParkingHeading="82" >
<IdleWorker Filename="Shared\Asobo_IdleWorkers\Large\V1" EntryWeight="1"/>
</Spot>
</IdleWorkers>
The numbers in the screenshot above correspond to the number in the *.xml
example. Moreover, both the numbers and the generated cones are placed in front of the IdleWorker, to help visualize their orientation. The blue circle represents the parking spot, with its heading aligned with the aircraft heading (as should be the case if the aircraft is properly parked). In this example, the radius of the parking is 10m. If the parking was larger, both examples 6 and 7 would be farther away from the circle line, while examples 4 and 5 would stay at exactly 5m from this circle line. Finally, note that in normal conditions, an aircraft whose wingspan is larger than the diameter of a parking should never park in said parking.
Example Of Services Script File
The following example is a simple script file for a GroundPowerUnit
service:
NOTE: The second <SimContain.Container>
, creating a pilot for a GroundPowerUnit
vehicle, is not necessary to make a minimal working example and is included to help illustrate the process.
<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="MissionFile" version="1,0" id="fuel">
<WorldBase.Flight>
<SimContain.Container InstanceId="{3FEDE4D4-899E-4E6D-9EE7-A6AE472D23A6}"> <!-- Can be any GUID -->
<Descr>GroundPowerUnit</Descr>
<UseRegionContainerType>True</UseRegionContainerType>
<IsOnGround>True</IsOnGround>
<AIType>GroundPowerUnit</AIType>
</SimContain.Container>
<SimContain.Container InstanceId="{177A3F45-396D-4FA8-BBB6-8E7BEBCFC28D}"> <!-- Can be any other GUID -->
<Descr>Pilot of GroundPowerUnit</Descr>
<UseRegionContainerType>True</UseRegionContainerType>
<AIType>GroundVehicle_Pilot</AIType>
<DontCreateSimSound>True</DontCreateSimSound>
<HumanPilotAI>
<HumanPilotType>Pilot</HumanPilotType>
</HumanPilotAI>
<AttachedWorldObject>
<ObjectReference id="GroundPowerUnit" InstanceId="{3FEDE4D4-899E-4E6D-9EE7-A6AE472D23A6}" /> <!-- Has to be the same GUID as first -->
</AttachedWorldObject>
</SimContain.Container>
</WorldBase.Flight>
</SimBase.Document>
Example Of IdleWorker Script File
The following example would be for an IdleWorker
rather than a service:
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="MissionFile" version="1,0" id="Worker">
<Title>FreeFlight</Title>
<Filename>Worker.xml</Filename>
<WorldBase.Flight>
<Service.GroundService>
<Name>IdleWorker</Name>
<States>
</States>
</Service.GroundService>
<SimMission.TimerTrigger InstanceId="{7B0E7908-BD60-447E-B68C-1AF0727F099C}">
<Descr>Start Idle worker</Descr>
<DefaultActivated>True</DefaultActivated>
<OnScreenTimer>True</OnScreenTimer>
<Actions>
<ObjectReference id="Random Action IdleWorker4" InstanceId="{DEDBAA0C-093E-46D3-987E-665A8DFAB712}"/>
</Actions>
</SimMission.TimerTrigger>
<SimContain.Container InstanceId="{857701B9-C9DA-45F9-82B5-BF62DB755A6A}">
<Descr>IdleWorker1</Descr>
<UseRegionContainerType>True</UseRegionContainerType>
<IsOnGround>True</IsOnGround>
<AIType>IdleWorker</AIType>
<IdleWorkerAI>
<WaypointList>
<ObjectReference id="IdleWorker1" InstanceId="{857701B9-C9DA-45F9-82B5-BF62DB755A6A}"/>
<YieldToUser>False</YieldToUser>
<WrapWaypoints>True</WrapWaypoints>
<CurrentWaypoint>0</CurrentWaypoint>
<BackupToFirst>False</BackupToFirst>
<Waypoint InstanceId="{7E4E6824-0D73-4ED5-A9E7-52EAF86D8B41}">
<InitRelativeToWorldObject>
<OffsetXYZ>10.000,0.000,0.000,0.000</OffsetXYZ>
<IsOnGround>True</IsOnGround>
</InitRelativeToWorldObject>
<Descr>Waypoint 1</Descr>
<SpeedKnots>1.000</SpeedKnots>
</Waypoint>
<Waypoint InstanceId="{BDD360C5-8CE2-4FFE-AA79-3A90D37F6730}">
<InitRelativeToWorldObject>
<OffsetXYZ>0.000,0.000,10.000,0.000</OffsetXYZ>
<IsOnGround>True</IsOnGround>
</InitRelativeToWorldObject>
<Descr>Waypoint 2</Descr>
<SpeedKnots>1.000</SpeedKnots>
</Waypoint>
<Waypoint InstanceId="{BE31DCA2-EC74-447F-9F7C-E3E1EFD5E990}">
<InitRelativeToWorldObject>
<IsOnGround>True</IsOnGround>
</InitRelativeToWorldObject>
<Descr>Waypoint 3</Descr>
<SpeedKnots>1.000</SpeedKnots>
</Waypoint>
</WaypointList>
</IdleWorkerAI>
</SimContain.Container>
<SceneryObjects.LibraryObject InstanceId="{AEE5D461-C311-48C5-9B36-5439FB553A75}">
<MDLGuid>{FC6152CE-F1CE-4651-9703-54DE41BE5354}</MDLGuid>
<InitRelativeToWorldObject>
<OffsetXYZ>0.000,0.000,2.000,0.000</OffsetXYZ>
<ObjectReference id="IdleWorker1" InstanceId="{857701B9-C9DA-45F9-82B5-BF62DB755A6A}"/>
</InitRelativeToWorldObject>
</SceneryObjects.LibraryObject>
</WorldBase.Flight>
</SimBase.Document>