Classic Battlefield Modding Wikia

Creating Landing Zones By HDN

AILandingZone . createLandingZone name x1/z1 x2/z2 direction

  • Landing Zones are created much like Strategic Areas with a bottom-left coordinate and a top-right coordinate.
  • Unlike Strategic Areas, Landing Zones use real map coordinates for x2/z2 (in other words, you do not have to use xx2 = (x2 - x1) / 2 + x1 )
  • Statement appears after all Strategic Area definitions (AIStrategicArea.Create)


Landing Zones require a direction from which the bots will attempt to land. These directions are hard coded as LZZMax, LZXMax, LZZMin, LZXMin. They are defined as follows:

  • LZZMax - Towards Z Max - North
  • LZXMax - Towards X Max - East
  • LZZMin - Towards Z Zero - South
  • LZXMin - Towards X Zero - West

The direction specifies on which edge of the Landing Zone box the bots will travel towards and attempt to land on(when they reach the end of the LandingCraft3 pathmap).

The Landing Zone direction can be seen in game with bot stats on as a dark green line beneath the lighter green edge of the Landing Zone box.

An Example:

  • AILandingZone . createLandingZone WestLanding 816/816 898/946 LZZMin

Creates a Landing Zone called WestLanding with a box at the specified coordinates with a direction towards Z zero (west).

Attaching Landing Zones to Strategic Areas

AIStrategicArea.attachLandingZone name

  • Attach a landing zone to a Strategic Area. Called when creating a Strategic Area.
  • Typically placed after AIStrategicArea.AddAllowedVehicleGroup and before AIStrategicArea.AddNeighbour statements.
  • Strategic Areas can have more than one Landing Zone

AIStrategicArea.addLandingZoneUnit unitName

  • Allow unit to use Landing Zone (?) Must be added to a Strategic Area that has a Landing Zone attached.
  • Can appear before or after AIStrategicArea.attachLandingZone statement, but only once per Strategic Area.
  • unitName is LandingCraft in most (all?) of the original maps, possible to change to nother types of vehicles?

Once a Landing Zone has been attached to a Strategic Area, it appears linked in game with a green line going from the center of the Landing Zone box to the center of the Strategic Area box (assuming you have bot stats on).

An Example:

  • AIStrategicArea.attachLandingZone WestLanding
  • AIStrategicArea.attachLandingZone CenterLanding
  • AIStrategicArea.addLandingZoneUnit LandingCraft

Notes on using Landing Craft and Landing Zones

The following files must have a specific code block encapsulating all statements:

  • AIpathfinding.con
  • AI/conditions.con
  • AI/prerequsites.con
  • AI/StrategicAreas.con
  • AI/Strategies.con

The code is as follows:

 if v_arg1 == host
 ... file contents ...

additionally AI.con must have the following blocks:

 if v_arg1 == host
 ... every statement from aiSettings.setWorldMapSize to        ai.botStatisticUpdateSpeed ...
 run AIPathFinding.con v_arg1
 run ai/StrategicAreas.con v_arg1
 run ai/conditions.con v_arg1
 run ai/prerequisites.con v_arg1
 run ai/Strategies.con v_arg1
 if v_arg1 == host
 ... list of strategies ...

Without the v_arg1 blocks thebots will not use landing craft. The will get in landing craft, but they will not move.

Maps without landing crafts or boats can safely have these code blocks as well (all Secret Weapons maps do).

It appears this v_arg1 code block was added sometime around Secret Weapons because none of the original or Road To Rome maps have the code in their base rfa's. The code appears in later rfa revisions for the affected water based maps.

Please note that even if a map does include the above code, it will not necessarily work with landing craft until appropriate strategies are implemented for landing craft.