An alternative method of making aircraft spawns. Part II
In Part I, I was ending with the fact that, if using real waypoints in my spawn.xml file, I was having issues getting it working, due to where to put the spawn relative to the player, and what range to set in the mission_target_facility file.
I then thought to examine how sdsbolt set up his way of doing it,using a '
patrol box' facility and a related spawn file. His original was,
facility = Blitz_Patrol_Box.xml
<Facility Type="" Flags="isFactory" OuterDistance="20000">
</Facility>
with a
spawn file called Blitz_patrolbox.spawns
<?xml version="1.0" encoding="UTF-8"?>
<SpawnControl Priority="1000" Stop="y" HighAgl="9999.8779296875">
<Spawns Roll="1D1">
<Spawn ID="1" FormationType="Blitz_Portsmouth"/>
</Spawns>
</SpawnControl>
using the
spawn xml file Blitz_Portsmouth.xml
<?xml version="1.0" encoding="UTF-8"?>
<AirFormation Country="#enemy" Points="1" DamagePercent="40" GoalID="Blitz_patrolbox" FormType="trail" OffsetScaleFactor="45" Directive="strike">
<Unit Type="sj_do17z1_3z-gs" Repeat="3" Payload="3"/>
<Route>
<Waypoint PositionType="player-die-roll" Distance="9262.36" Die="1D6" Speed="65.34" Type="turn" Alt="3047.99"/>
<Waypoint PositionType="player-die-roll" Distance="3704.94" Die="1D6" Speed="65.84" Type="turn" Alt="3047.99"/>
<Waypoint PositionType="player-die-roll" Distance="14819.8" Die="1D6" Speed="65.84" Type="turn" Alt="499.87"/>
</Route>
</AirFormation>
So after trial and error working out what sdsbolt had done, I realized the following
1.
The facility file can have any name but one should follow the basic layout as the Blitz_Patrol_Box.xml facility file. This is instead of using a mission_target_facility file, and does not require an additio0nal range calculation, as I assume that is baked in the "OuterDistance="xxxxx">" value.
So I have so far made facilities called
BC_Patrol_Box.xml and
NJ_Patrol_Box.xml. I have not changed the OuterDistance="20000">, as so far that works for my purposes.
The spawn xxxx.spawns file also can be named otherwise, such as BC_patrolboxX.spawns where X= a number or whatever, depending on what spawn xml file one wants; for instance
BC_patrolbox5.spawns has
BC Stirling Lubeck2.xml associated with it
<?xml version="1.0" encoding="UTF-8"?>
<SpawnControl Priority="1000" Stop="y" HighAgl="9999.8779296875">
<Spawns Roll="1D1">
<Spawn ID="1" FormationType="BC Stirling Lubeck2"/>
</Spawns>
</SpawnControl>
BC Stirling Lubeck2.xml =
<?xml version="1.0" encoding="UTF-8"?>
<AirFormation Country="#enemy" Points="1" DamagePercent="60" GoalID="BC_patrolbox" FormType="trail" OffsetScaleFactor="45" Directive="strike">
<Unit Type="sc_TOW_Stirling_mki" Skill="2" Payload="5"/>
<Route>
<Waypoint PositionType="latlon" Lat="N54*14'11.4931"" Lon="E8*38'46.4933"" Speed="95.18" Type="turn" Alt="4114.49"/>
<Waypoint PositionType="latlon" Lat="N54*12'5.1193"" Lon="E9*5'24.6566"" Speed="95.18" Type="turn" Alt="4114.49"/>
<Waypoint PositionType="latlon" Lat="N54*8'7.6818"" Lon="E10*2'0.2890"" Speed="95.18" Type="turn" Alt="4114.49"/>
</Route>
</AirFormation>
Once again, I use real waypoints as I want the aircraft to follow a specific track relative to the player.
Another example is
NJ_Patrol_Box.xml facility
NJ_patrolbox.spawns
with
Intruder_Venlo.xml
as seen here below
I am sure this can be refined somewhat, but I did a mission "31Jul-1 Aug 1942 Schnaufer vs BC various.xml" which used 3 patrol boxes to cover the 3 Abscussen Schnaufer had that night . Testing was positive for all 3 facilities.
<Facilities>
<Facility ID="9507" Type="NJ_Patrol_Box" Lat="N50*29'47.4019"" Lon="E4*27'42.1510"" heading="0" Country="Britain" Spawns="Schnaufer_patrolbox_Whitley.spawns" IsOneShot="y"/>
<Facility ID="9506" Type="NJ_Patrol_Box" Lat="N52*23'23.3777"" Lon="E6*18'57.2645"" heading="0" Country="Britain" Spawns="Schnaufer_patrolbox_WellA.spawns" IsOneShot="y"/>
<Facility ID="9505" Type="NJ_Patrol_Box" Lat="N51*53'23.5049"" Lon="E5*16'36.6885"" heading="0" Country="Britain" Spawns="Schnaufer_patrolbox_Wellb.spawns" IsOneShot="y"/>
<Facility ID="9504" Type="ILS_approach" Lat="N50*47'25.2912"" Lon="E5*12'23.3570"" heading="243" Country="Germany"/>
</Facilities>