Background

Random spawning seems to have always presented challenges in CFS3 which has led to various work arounds since the game's release. This document will help explain some of the challenges the Desert Rats have faced as well as how we've tackled the issue for the Mediterranean Air War as of the 1.20 version.

As it turns out there is really two types of random spawning that come into play in CFS3. Further, the solution for one does not work for the other.

The first type of random spawning is the one that most people think of and are referring to in the various threads seen in the forums about the issues surrounding spawning. That is the "air" spawns ~ the randomly generated "friendly" and "enemy" flights of aircraft you see as you try to complete your mission. In fact this type of spawning really extends to other types of randomly generated "formations" ~ that is units that move on the ground or at sea as well as the units that move through the air. In this discussion the machines  (i.e. aircraft, vehicles & ships) that get spawned this way will be referred to as "formation" spawns . Thanks to Charlie Simpson's discovery a few years ago, an important rule to remember when discussing CFS3's stock formation spawning routines is they will only generate spawns for one Allied nationality and one Axis nationality regardless of how many nationalities are defined. By default, these are the USA and Germany respectively in CFS3. Where as, MAW has been setup so these are Britain and Germany when the stock spawning routines are used: i.e. Legacy Mode.

The second type of random spawning is not immediately obvious. These will be referred to as "facility" spawns . Facility spawns are the ones most people think of as giving life to the theater by populating the various facilities throughout the map. For example, at an airbase, facility spawns are responsible for generating all the parked aircraft, the A/A guns, the cars and trucks that move around the service roads and so on.

There's are a couple of important rules to keep in mind about facilities which affect their spawns. The primary rule is facilities are assigned a random nationality from the appropriate Alliance based on the player's flight, the flight's Alliance and the position of the front line. Any facility on the same side of the front line as the player's flight is considered "friendly" and the facilities on the other side of the line are considered "enemy". If the player's flight is from one of the Axis nationalities then the Allied nationalities will be the "enemy" and vice versa.

The facility spawning secondary rule is based on the configuration of the global layer (the files that define where the facilities are placed in the map). A default nationality can be assigned to a facility in the global layer. If the player's flight is from the same alliance as the defined default nationality and the facility is on the same side of the line as the flight's originating point then the default nationality will override the game's behavior of randomly assigning a nationality to the facility. However, if the facility is on the other side of the line, or the player's flight is from the other alliance, then the primary rule is used: i.e. it is assigned a random nationlity despite the definition in the global layer.

Finally, another random spawning behavior is when the player is in close proximity to certain types of facilities. However, spawning generated this way actually uses the formation spawns. The difference is a facility is the trigger rather then an event in a mission or a campaign.

Challenges for MAW

The MAW map was built as large as it could be for the CFS3 game engine to encompass as much of the Mediterranean Theatre of Operations (MTO) as possible. Indeed, if CFS3 supported a larger map the MAW would have been built with it! The area covered by the map is diverse and allows for an incredible array of flying terrain and historical exploration. The fluid state of the various campaigns conducted throughout the MTO and the extreme differences in topography throughout the MTO have made it very challenging for the Desert Rats to strike a balance that allows for historically accurate spawning under all the possible scenarios while at the same time keeping the MAW game as easy to use as possible.

The goal is to generate the correct type of machines for a particular point in time as well as for the topography during both missions and campaigns. The CFS3 game engine recognizes "entered service" and "left service" dates which works reasonably well in a map that focuses on a geographic area where the terrain is similar throughout the map. However, there isn't a built in control that will limit a machine's  area of spawning. And that's the problem: the annoying issue of having desert paint schemes spawning over areas such as northern Italy and Yugoslavia, and vice versa, even if the machines were serving at that particular point in time (just not at that particular place).

If we just used the Legacy Mode to control spawns, most people would feel it's insufficient to only be able to generate formation spawns for either Britain and Germany given the large number of combatant nationalities represented in MAW. Similarly, people would be unhappy about having tropical paint schemes appearing in continental regions and vice versa ~ unless this was historically the case where a unit was rushed to the front "as is".

Another challenge is the method used to generate machines during both types of spawning: formation and facility. CFS3 uses generic "pickers" to select the machines: #friendly, #enemy, #fighter, #bomber, #support_truck, etc. In part, this is designed to produce variety within missions and campaigns. In the case of facilities, this is a necessary arrangement since it's not practicle to create a unique facility for each and every one that appears throughout the map. Consider the number of airbases alone. The generic pickers allow the facilities to be used over and over again. Further, it's also not possible in a fluid environment such as the MTO to permanently assign a nationality (ownership) to the facilities which also necessitates the use of generic pickers.

Solutions

There have been two fairly traditional solutions to the formation spawning problems. The first is a utility that switched Britain and USA around so one or the other (but not both) will spawn Allied formations. Germany always spawns the Axis formations using this method. The second has been to disable the air.spawns file which is responsible for a large number of the air formation spawns then leave it to the mission builder to include the desired spawns. This method is a good approach but doesn't address the campaigns or the other types of formation spawns. MAW 1.10 used the second method to disable the stock air.spawns but, as noted, isn't a complete solution.

With version 1.20 the Desert Rats have developed a method that completely addresses the formation spawning issues in both mission and campaign modes of play. The 1.20 Update includes a new spawning configuration utility which disables all of the stock spawning control files ~ not just the air.spawns file. This gives the mission builder full control over air, land and sea formations to build very historically accurate missions leaving nothing to random chance. In addition, the 1.20 update includes several dozen new spawn control files which are tailored to specific types of aircraft, periods in time and geographic regions of the MAW map. These are named in a friendly manner that will make it fairly easy to determine what they do just from their file name. Although the 1.20 release only includes new aircraft related spawns, as this new concept matures, we plan to include tailored land and sea spawn control files for mission builders too. A question mission builders might ask is "What happens if you haven't included the type of air spawn I need or I really need a land/sea spawn?". The great thing about the mission builder is you can build exactly the type of spawn control files you need. Just use the ones we've included in MAW as examples or post a question in the MAW Discussion forum.

As also mentioned, the traditional solutions don't address the needs of the campaign player. So, the new spawning configuration utility now includes custom spawn control files which are tailored for specific alliances, years and campaigns to meet this need. An appropriate set of control files are swapped for the stock files after a player has made the desired selections. The 1.20 set addresses the various types of air spawns in campaign (air, cap, sweep, etc) as well as the frontline spawns. The utility is already configured to swap the land and sea spawn controls as well. The land and sea spawn control files will be updated with tailored files in future releases. Similarly, the utility has been built to support the campaign scenarios of the new chapters as the project moves forward.

When the Nationality Expansion Kit (NEK) was first released for the stock CFS3 game, the solution to the random assignment of nationalites to facilities was addressed by cloning the stock vehicles for all the new nationalities. In the ETO this worked very well since all of the terrain is "continental". MAW has a custom version of the NEK built in. As noted, the facility spawns do not use control files like the formation spawns and rely heavily on the generic pickers. This means the facility spawns can't be tailored the same way as the formation spawns can be. Therefore, it is still necessary to clone the American, British, German and Italian vehicles to ensure all of the facilities will have activity.

To get around the issue of tropical vs continental terrain, MAW also includes several vehicles with tropical paint schemes cloned as required for all the nationalities. The service dates for the vehicles have been tailored so when tropical versions of vehicles exist, they will spawn prior to 10/31/1943 and the continental ones from 11/1/1943 onward in most cases. Other fine tuning has been done to ensure German and USA type vehicles don't appear too early in the MTO. This will help to ensure facilities in most mission and campaign scenarios will spawn with correctly textured vehicle types but will not completely prevent some situations where the wrong type appears. The solution is not ideal but is much preferred to having just tropical or just continental machines spawning or to disabling the facility spawns to avoid the problem. We feel in most cases the current solution will not detract from the overall immersion quality of the missions and campaigns yet at the same time keep MAW easy to use and maintain.

For Mission Builders

The new spawning configuration utility supports three modes: Legacy, Mission and Campaign. When you build missions for MAW, you'll want to advise the player of which mode they should use. There is no "right" method. Rather, you must choose the method that works best for you and supports the style of mission you're trying to build.

When using Legacy Mode , stock CFS3 spawn control files will be used. The limitation is only British and German formations will spawn and they may spawn with inappropriate paint schemes. The advantage is it greatly simplifies the mission building process since the random behavior will add variety to your mission without the need to code each and every part.

When using Mission Mode , all formation spawning is disabled. This gives you complete control over how the mission will unfold and allows you to create a highly accurate historical mission. You will need to place spawning facilities throughout the mission where ever you want a formation to spawn: be it land, sea or air. You'll notice we've provided a fair number of tailored air formation spawns already which are named in a way that makes them easy to use. For example, you can probably guess the "blenhm_recon_desert_40.spawns" control file will spawn Blenheim aircraft suitable for a reconnaisance mission in desert areas during 1940.

In Campaign Mode , the spawning control files are active like in the Legacy Mode but they've been tailored to use machines which are suitable for the player's role, the geographic area (campaign) and the time in history. This mode is required to properly support the variety of campaigns possible in MAW but it could also be used by mission builders. By using a Campaign Mode configuration that suited your mission, it would remove the need to code every aspect of the mission (like Legacy Mode) but you would be assured of having historically accurate random spawns rather then just something chosen from what ever matches the service dates.

We understand the changes in 1.20 may mean some existing work, and some work in progress, will need to be redone and we apologize in advance for the inconvenience this will cause. Please understand this was not a direction or a decision that was taken lightly by the Desert Rats. When discussing the pros and cons of this decision within our private forum, we came to two conclusions: taking total control of spawning is the right direction to head in for the future and doing it now (i.e. with the 1.20 update) was the right time to minimize the disruption caused within the mission building community.