Spawns. Unravelling their making and use.

I have been playing around with landing spawns both in my ETO and BoB installs. Here I only attach BoB ones since I am assuming more people may have that install. I can provide both. Also the ETO install needs gsl alterations for the Hawkinge airbase that I am using.

First I did a mission to get the coordinates I wanted for the landing spawn, as in the earlier remarks as below

"I have found a work around for the landing spawns or a trick. I used a two waypoint spawn. The first waypoint uses absolute coordinates and is at a location in direct line with the airport a few clicks out. The ai is at 500ft and normal airspeed. The 2nd absolute waypoint is the landing waypoint with the airfield coordinates from the global layer.

I then place the mission target file about 14 NM miles out from the airfield. The mission target file then triggers the spawn when you are still 14 miles out from the airfield so that the ai can do their thing and circle and get set up for a in line landing. This way you can intercept the ai as they begin their approach to the airfield."

Having done that I made the landing spawn by substituting in the new data from the 'Blenheim_landing_Waddington" xml and adding a new spawn file. All in the attachment. I made 'enemy' and friendly versions. Now the enemy one works fine but I don't seem to get the spawn to operate as a friendly version so suggestions there are welcome!
All the files and missions for both are incude. One can change the aircraft in the files if you want to, but to operate in ETO one will need the BoB Hawkinge entry which I can provide.

View attachment BoB landing spawns files.rar
 
Has anyone tried these landing spawns? I still have an issue with the friendly version, Also with ghost objects!:banghead:

attachment.php
 

Attachments

  • ghost revertments.jpg
    ghost revertments.jpg
    36.7 KB · Views: 92
I have been checking out the above solution to landing spawns in a 'friendly" situation - player is a friend, using Loic's method. I actually wanted to see them land as no particular airbase is mentioned. The result was intersteing as I think they landed in a field! maybe I should try putting the spawn at an actual airfield?

http://www.mediafire.com/view/gcv4674m7wbgu80/Hurris landing 1.png#

http://www.mediafire.com/view/2hhftouri09y1it/Hurris landing 2.png#

http://www.mediafire.com/view/ux75xnlxe73ly16/Hurris%20landing%203.png#
 
I think I have worked out how to make spawns by myself to get absolute coordinates just using the spawn stuff in the mission builder and setting absolute coordinates in there using pre determined ones. This spawn is for 6 Hurris landing at Hawkinge. I think I have to let at least one or two land before I do and then watch the others come in. No crashes this time!

PS In the spawn xml change the formation type to 'trail' i/o 'box'.

https://www.mediafire.com/file/7iu2rf21epg742u/Hurri_landing_test_Friendly_4.rar/file

http://www.mediafire.com/view/o3pz5d3bd175rc6/Landing Spawn 4 Test.png#

http://www.mediafire.com/file/nvg2p9ezlmsp78l/Landing_Spawn_4_Test.mp4/file
 
Last edited:
On request, I'm sticking this thread with the polite request that no-one spills coffee or leaves food around on it. It's been a long time since this subject was discussed in such detail and I only wish Owen was able to contribute too. Carry on!
 
Copy of posts info from thread http://www.sim-outhouse.com/sohforu...-meaning-of-quot-quot-in-a-facility-Unit-Type

Mongoose
The meaning of "#" in a facility Unit Type?

Such as the following
"#armor_aa_mobile"
"#armor_aa_static"
"#support_gas"
"#support_emergency_fire"
"#tracked"

and so on.

I have no idea what these are or how they work or are made

Mixxer

From memory it was how you could spawn any model in with that picktype (or category in the case of the #tracked) parameter in the xdp file rather than a specific model,

If you put another hash tag at the end followed by a number you can get a group of different models to spawn.

For example
<Unit Type="#fighter_bomber#1" Position="-274.52 247.55" Angle="25.00"/>
<Unit Type="#fighter_bomber#1" Position="-253.80 428.65" Angle="-170.00"/>
<Unit Type="#fighter_bomber#1" Position="-163.90 195.96" Angle="25.00"/>
<Unit Type="#fighter_bomber#1" Position="-66.39 150.50" Angle="25.00"/>
will give you 3 spawns of the same fighter_bomber

If you also have on the same facility
<Unit Type="#fighter_bomber#2" Position="-79.81 397.97" Angle="-170.00"/>
<Unit Type="#fighter_bomber#2" Position="-335.97 484.66" Angle="-130.00"/>
<Unit Type="#fighter_bomber#2" Position="-163.91 412.80" Angle="-170.00"/>
You will get 3 spawns of a different fighter_bomber

In the case above if the facility unit type didnt have the hash tag and number at the end of the parameter you end up with all spawns being the same fighter_bomber

This can be used for all picktype and category parameters
 
Last edited:
Mission and Facility Editor

All this information about the randomiser for units and much, much more is available in the down loads section here at SOH. It is the documentation which accompanies Richard Eikland's Mission and Facility Editor, which HH (Owen) uploaded some time ago at my suggestion.

There is lots of good stuff about facilities, including the inclusion of a spawns flag in facility files.

www.sim-outhouse.com/sohforums/local_links.php?action=jump&catid=159&id=15412
 
So extract out the facility spawn related section.

"FACILITIES
Facility is the term used for the grouping of objects into a single unit placed in the game. Facilities are .xml files that define what objects are called and where they’re placed. Though the .xmls can be created by hand, the easiest method is to create the scene in Gmax and export the .xml.
When exported, the top two levels of node names and positions will be exported to the .xml. There will be a root node for the facility, then a node for each object to be part of that facility. The name for each object must exactly match one of the objects in the game folders or else it will not match up.
The easiest method of creation is to import each object into Gmax if possible, so that proper spacing can be quickly achieved. It is not necessary though, as it only looks at the names of the nodes, boxes or dummy objects will work fine, boxes of size equal to the object would work best. Unfortunately, if using the stock CFS3 objects, there’s no good way to retrieve the size of the objects so close placement of objects will require some trial and error.

In addition to explicitly calling vehicles or plane, you can you a ‘pick type’ node. The following is a list of the different ‘pick types’ that can be used. When a node with one of these names is placed, a object will be chosen randomly and placed there. The list of objects to choose from is determined based on the nationality of the owner of the facility and the current date in the game. A object of corresponding nationality that was in service during the current date which matches the category (all of which are defined in the .xdp), will then be placed in the position of the ‘pick type’ node.
This allows for ever changing background aircraft and vehicles around the facility to help it feel more alive, instead of always seeing the same thing over and over.

#level_bomber CATEGORY_AIRCRAFT_LEVELBOMBER
#tactical_bomber CATEGORY_AIRCRAFT_TACTBOMBER
#fighter_bomber CATEGORY_AIRCRAFT_FIGHTERBOMBER

// ships
#carrier CATEGORY_SHIP_CARRIER
#cruiser CATEGORY_SHIP_CRUISER
#destroyer CATEGORY_SHIP_DESTROYER
#submarine CATEGORY_SHIP_SUMBARINE
#battle CATEGORY_SHIP_BATTLE
#patrol CATEGORY_SHIP_PATROL
#auxiliary CATEGORY_SHIP_AUX

// vehicles
#tracked CATEGORY_VEHICLE_TRACKED
#wheeled CATEGORY_VEHICLE_WHEELED
#rail CATEGORY_VEHICLE_RAIL
#amphibious CATEGORY_VEHICLE_AMPHIBIOUS
#bailout CATEGORY_VEHICLE_BAILOUT
#balloon CATEGORY_VEHICLE_BALLOON

// anything else...
#artillery CATEGORY_STATIC_ARTILLERY
#equipment CATEGORY_STATIC_MECHEQUIP
#structure CATEGORY_STATIC_STRUCT
#factory CATEGORY_STATIC_FACTORY
#noncombatant CATEGORY_STATIC_NONCOMBATANT
#runway CATEGORY_STATIC_RUNWAY
#airbase CATEGORY_STATIC_AIRBASE
#weapon CATEGORY_WEAPON
#formation CATEGORY_FORMATION
#facility CATEGORY_FACILITY

// groups...
#bombers CATEGORY_AIRCRAFT_ALLBOMBERS & ~CATEGORY_AIRCRAFT_FIGHTERBOMBER }
#fighters CATEGORY_AIRCRAFT_ALLFIGHTERS
#aircraft CATEGORY_AIRCRAFT
#vehicles CATEGORY_VEHICLE
#ships CATEGORY_SHIP


// pick-types - categories plus a finer grained categorization - used for spawning
#armor_aa_static CATEGORY_VEHICLE
#armor_aa_mobile CATEGORY_VEHICLE
#armor_artillery_static CATEGORY_STATIC_ARTILLERY
#armor_artillery_mobile CATEGORY_VEHICLE
#armor_artillery_harbor_small CATEGORY_STATIC_ARTILLERY
#armor_artillery_harbor_large CATEGORY_STATIC_ARTILLERY
#armor_tank_light CATEGORY_VEHICLE_TRACKED
#armor_tank_medium CATEGORY_VEHICLE_TRACKED
#armor_tank_heavy CATEGORY_VEHICLE_TRACKED
#armor_tank_destroyer CATEGORY_VEHICLE_TRACKED
#support_emergency_ambulance CATEGORY_VEHICLE_WHEELED
#support_emergency_fire CATEGORY_VEHICLE_WHEELED
#support_gas CATEGORY_VEHICLE_WHEELED
#support_truck CATEGORY_VEHICLE_WHEELED
#personnel_car CATEGORY_VEHICLE_WHEELED
#personnel_staff CATEGORY_VEHICLE_WHEELED
#military_defensive_balloon CATEGORY_VEHICLE_BALLOON
#rail_loco_large CATEGORY_VEHICLE_RAIL
#rail_loco_medium CATEGORY_VEHICLE_RAIL
#rail_loco_small CATEGORY_VEHICLE_RAIL
#rail_freight_box CATEGORY_VEHICLE_RAIL
#rail_freight_flat CATEGORY_VEHICLE_RAIL
#rail_freight_tank CATEGORY_VEHICLE_RAIL
#rail_armor_flak CATEGORY_VEHICLE_RAIL
#rail_armor_gun CATEGORY_VEHICLE_RAIL
#flag CATEGORY_STATIC_NONCOMBATANT



#harborguns CATEGORY_STATIC_ARTILLERY
armor_artillery_harbor_small
#harborgun CATEGORY_STATIC_ARTILLERY
armor_artillery_harbor_large
#flaktower CATEGORY_STATIC_ARTILLERY

To create a group of the same randomly picked object (so it appears a squadron is parked at the airbase, or a factory is making all the same vehicle) add #(#) after the name.
#fighters#1
#fighters#1
#fighters#1
#fighters#1
#fighters#2
#fighters#2
#fighters#2
#fighters#2
In this example there will be two groups of fighters, the #1 would all be the same kind and the #2 would all be the same. Groups 1 and 2 may or may not be the same as each other.

In the File Properties, custom tab, the following information must be placed.

Name= type
Type=text
Value=Airbase, Ammo Depot, Artillery, Bunker, Dug-in tanks, flaktower, Factory, Refinery, Invasion Fleet, Invasion Defense, Radar, V1 Site, V2 Site, Shipyard, Sub Base, Rail Yard, etc…

The Value=X defines the display name for the facility in the game. It can be anything you wish, these are some of the names used in the stock facilities.

Name=flags
Type=text
Value=isAirbase, isFactory, isMilitary, isPort, isRailyard,spawnsRailTraffic

The ‘flags=isX’ is used by the dynamic mission generator. When a railyard is needed, the game will place one of the facilities with the flags=isRailyard line in the .xml. ‘spawnsRailTraffic’ is an additional flag for railyards telling it to generate trains.

Upon export, this information should be in the top line of the .xml. It can always be added by hand, but will have to be readded after every export from Gmax.
SPECIAL OBJECTS IN FACILITIES
minor_road A linear spline with this name will act as a path for vehicles to travel upon. Any vehicle placed on top of one of the vertices of the spline will be thought to be on the path and will travel around path in a continuous loop. You can have multiple vehicles on a path, but each will go at their own speed and will occasionally pass through each other.
The properties for a minor_road object should have a entry that says:
Type=Road

Airbase# These define the runways. The runways are not actual objects that get placed in the game, but are drawn on the facility ground plane. The airbase# nodes define the length of the runway and surface type. There are several different length runways currently used, additional runways can be created if a separate .xdp is also created and placed into the buildings directory.
Airbase#_notakeoff is for airbases with multiple runways. Runways marked with the ‘_notakeoff’ tag will not be used by the AI aircraft. These runways still have the surface properties of regular runways and can be used by the player as normal.

Runway_path is a two point spline that runs near the length of the runway. This defines the takeoff and landing points for AI aircraft. No type needs to be defined in the properties of this object.

taxi_path short two-point line that determines the position of the player’s plane in the UI animations. The properties for a taxi_path should have a entry that says:
type=hangar

railroad This is a two point spline that will draw and act like a railroad. It should stretch the entire width of the facility. This will also cause the Railyard to be placed along an exsisting railroad in the area. The properties for railroad should have a entry that says:
type=snap

shoreline This is a two point spline that stretches across the entire width of the facility and will automatically line the facility up with a shoreline or river bank. Each point will meet with the shoreline of the surrounding terrain, the line running across the facility will be the divider between land and water. The shoreline object can also be outside of the groundplane for the facility. This is helpful for invasion defenses and the like, so their orientation and position relative to the shoreline can be easily defined within the scene. The properties for shoreline should have a entry that says:
type=snap

groundplane This is a plane that generally encompasses all the buildings in the facility. This object does not show up in the game, but it does flatten the terrain so that all the buildings appear on a level surface. To texture the ground plane will require the terrain SDK. "

++++++++

I have been using the CFs3 Editor recently to re arrange a facility and it isn't as easy as it looks. While if gave me a general idea of object position, it was not pictorially precise enough for me to re arrange stuff. I found it easier going into CFS3 on a mission and then using the screenshots from that together with a mental x and y orientation. In theory one could make a grid facility to place on top in the correct orientation to help with that.
 
All this information about the randomiser for units and much, much more is available in the down loads section here at SOH. It is the documentation which accompanies Richard Eikland's Mission and Facility Editor, which HH (Owen) uploaded some time ago at my suggestion.

There is lots of good stuff about facilities, including the inclusion of a spawns flag in facility files.

www.sim-outhouse.com/sohforums/local_links.php?action=jump&catid=159&id=15412

Thanks Daiwilletti, this makes it easier than trying to remember it all
 
I have been using the CFs3 Editor recently to re arrange a facility and it isn't as easy as it looks. While if gave me a general idea of object position, it was not pictorially precise enough for me to re arrange stuff. I found it easier going into CFS3 on a mission and then using the screenshots from that together with a mental x and y orientation. In theory one could make a grid facility to place on top in the correct orientation to help with that.

Hi James, how much do you zoom in on the facility? Zooming right in seems to help me eliminate the guesswork. You do need some sort of a mental picture to get the heading right. Another problem with my version (not sure if I'm missing a .dll or something) is that when I save an edited facility file, all the # parameters loose the "#", and I have to replace all the hash entries. The easiest way is to have kept a backup and copy the entries back over into the new xml file.

Having a large widescreen monitor has, I must admit, helped me enormously with getting sufficient zoom to be able to locate things easily on the facility.
 
I have a 46" monitor or rather TV screen on my desk, or rather just off it! I zoomed in a lot but I also had a oriented screenshot of the facility, The CFS3 Editor did not in fact bear the same resemblance spatially as the screenshot did, (although I'm sure all were in the correct position) however it did allow me to sort out approximately where various parts where. after knowing roughly what items had what x - y corordinates it was easier for me to visualize them on screenshots. You will see the results when I upload some new gsl coordinates for ETO and BoB in London.
 
Coming back to take off spawns as this is a tricky topic, here is how I'm doing:

1) preparation of the spawn file and associated xml script. I always use the same waypoints format, especially the first one dedicated to the take off itself.

<Route>
<Waypoint PositionType="ground" Position="ground,ahead,airbase,airbase" Type="takeoff"/>
<Waypoint PositionType="facility-die-roll" Distance="3890.2" Die="1D12" Speed="107.52" Type="intercept" Alt="304.80"/>
<Waypoint PositionType="facility-die-roll" Distance="2037.72" Die="1D12" Speed="102.38" Type="landanywhere"/>
</Route>

2) placing the spawn file with mission builder.

3) the spawn has to be placed at the exact same coordinbates location as the airfield so the mission xml file has to be modified manually using the the good old copy-paste function. If the airfield is a facility that has been placed in the mission then, it's easy to find. If not then, the airfield coordinates have to be found in the global_layer.csv.
 
I am interested to know if anyone has ideas on the following. I want to make the approach and runway lights only on when and friendly aircraft is taking off (so on the runway already) and approaching to land. I want to strip all approach lights and taxiway/runway lights from the airbase facility and have them as a separate spawn file related facility which works obviously at 0 to 5000 ft altitude and from o to about 5-10 miles out.
 
I am interested to know if anyone has ideas on the following. I want to make the approach and runway lights only on when and friendly aircraft is taking off (so on the runway already) and approaching to land. I want to strip all approach lights and taxiway/runway lights from the airbase facility and have them as a separate spawn file related facility which works obviously at 0 to 5000 ft altitude and from o to about 5-10 miles out.

hi James, I am only on my first coffee of the morning so the following is off the top of my head. It is possible to add a specific spawn key to a specific airbase facility file (per the information above in this thread). Therefore it is possible to write a spawn file to place vehicles in a specific formation (eg. as I did for my taxiing aircraft experiment). If you make the lights vehicles, and perhaps also provide a route to help key the vehicles into specific positions, then make the vehicle speed 0 or very low, they should spawn reasonably reliably. You can use the low agl and hi agl parameters to link the spawning event from 0m agl to 1500m agl.

I'm sure there is more to it but that's a start.
 
I'm already over caffeinated!:redfire: Lights are vehicles as per xml file below. you'll have to remind me of your taxiing aircraft experiment and also what biy of this threa the specific airbase facility file is referring to.


<?xml version="1.0"?>
<UnitData>
<General Hardness="2" LongName="" ShortName="" ModelName="runway_light_d.m3d" BlastDamageScale="1.0" ImpactDamageScale="1.0" FireDamageScale="1.0" Priority="4" Type="moving" EnteredService="01/01/1930" BlastDamageMod="1" ImpactDamageMod="1" FireDamageMod="1" Category="wheeled" PickType="support_truck" Country="neutral" AllowSpawn="n"/>
<Description String=""/>
<Moving MinSpeed="0" MaxSpeed="6" CruiseSpeed="4" GroupSize="0" Type="0"/>
<Loadouts/>
<GunStations>
<GunStation UpLimit="90" DownLimit="0" LeftLimit="180" RightLimit="180" RateLimit="45" SystemID="engine_one" Tracer="75" Trainable="1" Trigger="0" Type="20mm_gun" Name="20mm Flak" ConvergeDistance="0" Pitch="0" MaxAmmo="0"/>
</GunStations>
<DamageBoxes>
<Box ID="damagebox_nose" Parent="damagebox_nose">
<BoxMap SystemID="engine_one" Probability="100" Points="500"/>
</Box>
</DamageBoxes>
<Systems>
<System ID="engine_one" Name="">
</System>
</Systems>
<Effects>
<Effect Type="Track" EffectName="fx_tow_approach_light" PosX="0" PosZ="0" PosY="0.2" MinVel="-1" MaxVel="100" />
</Effects>
<Ground RoadMove="0" WaterMove="0" ForestMove="0" MtnMove="0" CrewSize="1"/>
</UnitData>
 
Thinking about it, there are disadvantages to making the landing lights vehicles which appear only as spawns. Tests with things spawning attached to a facility file are prone to problems and often seem to work intermittently. You might be better to sacrifice a little functionality and install the lights as vehicles in the facility.xml file rather than in the spawn.xml file.

One thing you could do is set up the effect line (in the effects.xml) for the landing lights so that the light is only seen from a short distance (say 2000m), and only stays on for a short period of time (say 10 minutes). Unfortunately this does not solve the friendly/enemy problem, mind you enemy aircraft were known to lurk around airbases waiting for friendly aircraft to start their landing approach, and presumably the landing lights would be switched on.
 
Back
Top