Spawns. Unravelling their making and use.

Still it would be interest if you reminded me of your taxiing aircraft experiment and also what bit of this thread the specific airbase facility file is referring to. Actually the fliegerhorsten tried not to have their lights on or allow landings or take offs if an intruder was suspected near by. Thats why I am still going to try a spawn although your points noted and I think I have observed similar issues.
 
So re post #32 and related re picktypes. I note some facility files have #armor_aa_static but is this in fact a guarantee that the AA will show up or is it only on a probability basis? Is it also the case that, as the same facility; in this case an industrial factory; is used both for the Allies and the Axis, the picktype is used on the basis that the appropriate AA will show up?

In this respect I note WOTR has separated factories into Allied and Axis with their own content. Maybe this would be a better idea?
 
Nationality is Assigned Randomly for Ground Spawns

So re post #32 and related re picktypes. I note some facility files have #armor_aa_static but is this in fact a guarantee that the AA will show up or is it only on a probability basis? Is it also the case that, as the same facility; in this case an industrial factory; is used both for the Allies and the Axis, the picktype is used on the basis that the appropriate AA will show up?

In this respect I note WOTR has separated factories into Allied and Axis with their own content. Maybe this would be a better idea?

Hi James, for stock CFS3, the picktype #armor_aa_static is a guarantee, as you put it. However for other installs with multiple nationalities, you may get some blanks in some places. The reason is, that for the friendly and enemy ground spawns, facilities are randomly assigned nationalities. So in ETO, you might get Spanish republican facilities next to Vichy_France facility next to an OAN (other Axis Nations) facility.

Now go the the vehicles. Each of the many Axis nations may not have a vehicle with picktype #armor_aa_static. Or alternatively, the vehicle may only be operative over a few of ETO's five eras. The trouble is, although Spain_Republic is nominally an Era 1 nation, the ground.spawns facilities assign nations from the NEK country xml, irrespective of era. It is one of the tricky little "bugs" with ETO. To spot this type of issue, I have added flags to those facilities which lack them, and it shows pretty starkly the nature of the problem.

In my version of ETO, I've gone through and made sure that for each nation, there are vehicles for all the major picktypes called in the ground.spawns file. Otherwise you get things like invasion defenses that lack guns or vehicles or AA, because they are assigned a nation that does not have these types of vehicles present for that Era.
 
Thanks mate. I'll have a look re nationalities and also what type of guns will be used. I am assuming though that if a gun refers to 'Allies' it will only be used by them and 'Axis' only by them?
 
Thanks mate. I'll have a look re nationalities and also what type of guns will be used. I am assuming though that if a gun refers to 'Allies' it will only be used by them and 'Axis' only by them?

The nationality of the vehicles affects the spawning of vehicles in facilities. Guns are just called in gunstations of aircraft, ships, vehicles. So I guess they show up regardless of the nationality defined in the vehicle.xdp.
 
So I have been fooling around with existing spawns fro use in other missions, I was needing RAF ones to attack Bf110 'jabos'. As far as I could tell the only intercept 'Type' seems to be Type="intercept_bomber"

Now I noted the Bf110 xdp showed Category="fighter_bomber" , so I changed the spawn xml(s) to Type="intercept_fighter_bomber" which the mb app said wasn't a recognised type; neither was
Type="intercept_fighter" for that matter.

I will try just Type="intercept" to see if that works!

And I must change the Directive="bomber_intercept"> I suppose!
 
Last edited:
Hi James, your two choices are intercept and intercept_bomber. But all of this stuff is in the Mission Scripting SDK: your go-to for writing missions?
 
Copied from http://www.sim-outhouse.com/sohforums/showthread.php/124752-Spawns-Question in order to have this in the sticky


Can anybody explain to me with regard to missions and the spawn probability dice roll, what is the difference between 1D12 or 2D6 for when you have 12 spawns to choose from?

I understand 1d12 mean 1X12 sided dice as it were, it rolls and you get what ever spawn from the rolled position that's in the table, but how does that translate to a 2d6 dice and how does it affect the spawn table?

Why not have 4d3, what would that do to the spawn table?

So many questions I know, hoping somebody could explain it in layman's terms for me as I cant find any discussion that explains it on the forum

Mick

+++
Daiwilletti
I find it helps to picture a real dice when working it out. If you have 2 6 sided die, you cannot throw a 1, the lowest you can get is 2 (1+1). If you roll 3 die, the lowest number you can get is 3 (1+1+1).

If you have 1D12=6, you have only one out of twelve chance of the event happening (throwing a 6). If you have 2D6=6, you have more chance of the spawning event occurring, (1+5, 2+4, 3+3, 4+2, 5+1).

Also the context of the die roll is relevant. When it is in a positional context, like a facility-die-roll, sometimes you don't want the spawn to appear in sector one (there are twelve positional sectors like hours on a clock). Then you can use 2D6 instead of 1D12, and you can ensure that sector one is never engaged.

I haven't been trained in or studied syntax, all I've done is look at the way it is used in the campaign file and spawn files. Someone who has studied this stuff can give you a more academically precise explanation no doubt.

There are a few errors in the stock campaign, right at the end of the campaign.xml file. There are a number of events defined by the roll of die. The section is very useful as you can work out syntax like gt is grand total, and == is "exactly equal to". In the stock xml, there is a little inconsistency in the use of the syntax and that can be tidied up.


Oh, and if you have 12 spawns in the .spawns file, and you are using 2D6, obviously spawning event 1 will never happen. In that case, I just bung in any old thing at position 1, as it will never be used.
===
Thanks for taking the time to explain this Daiwilleti I can grasp the 1d 2d 3d 4d etc part now.

If I understand you right and forgetting about the probability %, the low and high level altitude overriding conditions and the modifiers, If I have 12 spawns in the spawn table and having the die set to 1d12, each time it rolls I should have 1 of the 12 things in the table happen ie at every roll something from the table should happen? Is that correct?

Mick

+++
Daiwilletti
yes, that is correct. And I deliberately didn't start to talk about modifiers, lowagl, etc .

That assumes all is well with the spawning objects concerned. Take ships, for example. If your ship spawn set includes a random entry #patrol, and the country set to spawn does not have a patrol boat, this can mean that the spawning event fails to occur. However quite recently for the first time, I saw a partial formation where only some of the ships spawned. That is pretty unusual though.

Having the random modifier (#) used in a spawn xml file is great for variety and immersion, but it does mean that all the possible set of vehicles or ships must be working well, otherwise there can be times when the formation fails to spawn. Sometimes I use the entry #ships, but you can get some funny vessels spawning, and all the available ships need to be ship-shape. I put the modifier #vehicles into some groundspawns, and ended up with some wacky results. All rail bogeys are vehicles, and once I got a big 800mm Dora gun trundling down the road!! (courtesy of Airfighter55). So I curb my excesses and call for #tracked or #wheeled if I want a bit of variety in ground formations.
 
Just for clarification, the above mainly concerns random spawning in a mission or campaign. This would be different if one is using a spawn that must appear in a mission, which is normally the case when I am making a spawn.

For instance, in the case below in the 14th_March_1941_Do17Z_spawn.spawns file 1D1 is used

<?xml version="1.0" encoding="UTF-8"?>
<SpawnControl Stop="n" HighAgl="9999.8779296875">
<Spawns Roll="1D1">
<Spawn ID="1" FormationType="14th_March_1941_Do17Z_spawn"/>
</Spawns>
</SpawnControl>

relating to the xml file 14th_March_1941_Do17Z_spawn.xml

<?xml version="1.0" encoding="UTF-8"?>
<AirFormation Country="Germany" FormType="trail" OffsetScaleFactor="20" Directive="nothing">
<Unit Type="ai_blitz_do17z2_5k+ba" Repeat="1"/>
<Route>
<Waypoint PositionType="latlon" Lat="N53*10'51.4005"" Lon="E0*23'17.8953"" Speed="92.5" Type="turn" Alt="3657.59"/>
<Waypoint PositionType="latlon" Lat="N53*14'46.7210"" Lon="E0*20'49.2769"" Speed="92.5" Type="turn" Alt="3657.59"/>
<Waypoint PositionType="latlon" Lat="N53*3'0.7956"" Lon="E0*35'3.8236"" Speed="92.5" Type="turn" Alt="3500.00"/>
</Route>
</AirFormation>
 
An alternative method of making aircraft spawns. Part I

An alternative method of making aircraft spawns. Part I

AFAIK, most aircraft spawns, in this case spawns of enemy aircraft for friendly interception, or visa versa, involve the use of mission_target_facility_Xk.xml. where X= some OuterDistance="xxxxx", such as OuterDistance="5000"

I have made ranges from 1K to 20K, and AFAIK one can make any reasonable range, although I have yet to try more than 20K.
So this mission_target_facility_Xk is put in in the missions builder tab "type", and then the relevant spawn in the tab 'Spawn table", as below.

spawn2.png


Now the spawn in spawn table is traditionally something like this

NJG2_Ju88.spawns

<?xml version="1.0" encoding="UTF-8"?>
<SpawnControl Priority="1000" Stop="n" LowAgl="4571.99951171875" HighAgl="7619.99951171875" OutOfRangeProbability="100">
<Spawns Roll="1D1">
<Spawn ID="1" FormationType="NJG2_Ju88"/>
</Spawns>
</SpawnControl>

with NJG2_Ju88.xml

?xml version="1.0" encoding="UTF-8"?>
<AirFormation Country="Germany" FormType="box" Directive="bomber_intercept">
<Unit Type="ai_TOW_JU88C-4_R4CH" Payload="0"/>
<Route>
<Waypoint PositionType="facility-die-roll" Distance="3000" Die="1D3+8" Speed="113.18" Type="turn" Alt="7000.03"/>
<Waypoint PositionType="facility-die-roll" Distance="2000" Die="2D3+2" Speed="113.18" Type="intercept_bomber" Alt="7000.03"/>
<Waypoint PositionType="facility-die-roll" Distance="10000" Die="2D3+2" Speed="116.26" Type="turn" Alt="7000.03"/>
</Route>
</AirFormation>


Now I have not always liked this set up for 'enemy' bombers for player interception, in that the spawn always turns WRT the player, rather than moving on a straight line as it would if not a spawn but a flight with waypoints of Lat Lon values. As a result I have been making flights with 2-3 wp's and relevant Lat Lon values, then copying those into a spawn.xml as in this 2 waypoint Wellington_spawn_Inbound_Cologne_30_31 May 1942.xml

<?xml version="1.0" encoding="UTF-8"?>
<AirFormation Country="#enemy" FormType="trail" OffsetScaleFactor="40 " Directive="nothing">
<Unit Type="ai_Well_U-KX" Skill="3" Payload="7"/>
<Route>
<Waypoint Type="turn" Speed="102.888888888889" IsWarpable="n" Lat="N52*13'36.0543"" Lon="E4*8'10.3288"" Alt="3367.19"/>
<Waypoint Type="turn" Speed="102.888888888889" IsWarpable="n" Lat="N51*9'11.8052"" Lon="E6*45'53.6570"" Alt="3367.19"/>
</Route>
</AirFormation>

This issue here is
-what mission target facility distance value one should use
-where to actually place the spawn relative to the player aircraft's intended interception waypoint.

Sometimes it does the job, but on other occasions, I have found this very difficult to work out. This made me think of what I first saw in a test mission from sdsbolt WRT his A.I.Radar app.

This is his use of 'parol box' facilities and associated spawns. See Part II
 
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>


blitz-patrol-box-2.png


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

patrol-box-spawn.png



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>
 
Last edited:
I have yet to check if the GoalID="BC_patrolbox" is really necessary, as that makes it somewhat easier to orientate towards the enemy, when the idea is to use the A>I> Radar app's GCI function to direct the player towards the target. I shall have to test without it!
 
When working with routes in a spawn file, are the route statements friendly territory and enemy territory in relation to the players aircraft or to the spawned aircraft, IE if I'm flying an axis aircraft in axis friendly skies (as determined by the mission front-line) but trying to spawn allied aircraft that I want to fly towards allied territory, are the spawned aircraft flying to friendly territory or enemy territory.

Answering my own question here:

After doing some testing I can confirm those statements are in relation to the players aircraft and not the spawning aircraft, so if you want a enemy aircraft to fly to a base and land in its own territory you would select enemy territory
 
Back
Top