Module AI_Cargo_APC

AI -- (R2.3) - Models the intelligent transportation of infantry and other cargo.


Author: FlightControl


Global(s)

AI_CARGO_APC

AI_CARGO_APC class, extends Core.Base#BASE


AI_CARGO\APC brings a dynamic cargo handling capability for AI groups.

Type AI_CARGO_APC

AI_CARGO_APC.APC_Cargo
AI_CARGO_APC.BoardingCount
AI_CARGO_APC.CargoCarrier
AI_CARGO_APC.CargoSet
AI_CARGO_APC.CarrierCoordinate
AI_CARGO_APC.CarrierStopped
AI_CARGO_APC.Coalition
AI_CARGO_APC.CombatRadius
AI_CARGO_APC:Deploy(Coordinate)

Deploy Trigger for AICARGOAPC

AI_CARGO_APC:FindCarrier(Coordinate, Radius)

Find a free Carrier within a range.

AI_CARGO_APC:FollowToCarrier(Me, APCUnit, Cargo, CargoGroup)

Follow Infantry to the Carrier.

AI_CARGO_APC:IsRelocating()
AI_CARGO_APC:IsTransporting()
AI_CARGO_APC:New(APC, CargoSet, CombatRadius)

Creates a new AICARGOAPC object.

AI_CARGO_APC:OnAfterDeploy(From, Event, To, Coordinate)

Deploy Handler OnAfter for AICARGOAPC

AI_CARGO_APC:OnAfterLoaded(APC, From, Event, To)

Loaded Handler OnAfter for AICARGOAPC

AI_CARGO_APC:OnAfterPickup(From, Event, To, Coordinate)

Pickup Handler OnAfter for AICARGOAPC

AI_CARGO_APC:OnAfterUnloaded(APC, From, Event, To)

Unloaded Handler OnAfter for AICARGOAPC

AI_CARGO_APC:OnBeforeDeploy(From, Event, To, Coordinate)

Deploy Handler OnBefore for AICARGOAPC

AI_CARGO_APC:OnBeforePickup(From, Event, To, Coordinate)

Pickup Handler OnBefore for AICARGOAPC

AI_CARGO_APC:Pickup(Coordinate)

Pickup Trigger for AICARGOAPC

AI_CARGO_APC.Relocating
AI_CARGO_APC.RouteDeploy
AI_CARGO_APC.RoutePickup
AI_CARGO_APC:SetCarrier(CargoCarrier)

Set the Carrier.

AI_CARGO_APC.Transporting
AI_CARGO_APC.Zone
AI_CARGO_APC._Deploy(APC, self)
AI_CARGO_APC._Pickup(APC, self)
AI_CARGO_APC:__Deploy(Coordinate, Delay)

Deploy Asynchronous Trigger for AICARGOAPC

AI_CARGO_APC:__Pickup(Delay, Coordinate)

Pickup Asynchronous Trigger for AICARGOAPC

AI_CARGO_APC:onafterBoard(APC, From, Event, To, Cargo)
AI_CARGO_APC:onafterDeploy(APC, From, Event, To, Coordinate, Speed, EndPointFormation)
AI_CARGO_APC:onafterFollow(APC, From, Event, To)
AI_CARGO_APC:onafterHome(APC, From, Event, To, Coordinate, Speed)
AI_CARGO_APC:onafterMonitor(APC, From, Event, To)
AI_CARGO_APC:onafterPickup(APC, From, Event, To, Coordinate, Speed, EndPointFormation)
AI_CARGO_APC:onafterUnboard(APC, From, Event, To, Cargo, Deployed)
AI_CARGO_APC:onafterUnload(APC, From, Event, To, Deployed)
AI_CARGO_APC:onbeforeLoad(APC, From, Event, To)
AI_CARGO_APC:onbeforeLoaded(APC, From, Event, To)
AI_CARGO_APC:onbeforeUnloaded(APC, From, Event, To, Cargo, Deployed)

Type AI_CARGO_HELICOPTER

AI_CARGO_HELICOPTER.RouteHome

Global(s)

#AI_CARGO_APC AI_CARGO_APC

AI_CARGO_APC class, extends Core.Base#BASE


AI_CARGO\APC brings a dynamic cargo handling capability for AI groups.

Armoured Personnel Carriers (APC), Trucks, Jeeps and other ground based carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation. The AI_CARGO\APC module uses the Cargo capabilities within the MOOSE framework. CARGO derived objects must be declared within the mission to make the AI_CARGO\APC object recognize the cargo. Please consult the Cargo module for more information.

Cargo loading.

The module will load automatically cargo when the APCs are within boarding or loading range. The boarding or loading range is specified when the cargo is created in the simulation, and therefore, this range depends on the type of cargo and the specified boarding range.

Enemies nearby.

When the APCs are approaching enemy units, something special is happening. The APCs will stop moving, and the loaded infantry will unboard and follow the APCs and will help to defend the group. The carrier will hold the route once the unboarded infantry is further than 50 meters from the APCs, to ensure that the APCs are not too far away from the following running infantry. Once all enemies are cleared, the infantry will board again automatically into the APCs. Once boarded, the APCs will follow its pre-defined route.

A combat range needs to be specified in meters at the AI_CARGO_APC.New() method. This combat range will trigger the unboarding of troops when enemies are within the combat range around the APCs. During my tests, I've noticed that there is a balance between ensuring that the infantry is within sufficient hit range (effectiveness) versus vulnerability of the infantry. It all depends on the kind of enemies that are expected to be encountered. A combat range of 350 meters to 500 meters has been proven to be the most effective and efficient.

Infantry health.

When infantry is unboarded from the APCs, the infantry is actually respawned into the battlefield. As a result, the unboarding infantry is very healthy every time it unboards. This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. However, infantry that was destroyed when unboarded and following the APCs, won't be respawned again. Destroyed is destroyed. As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every time is not so much of an issue ...

Control the APCs on the map.

It is possible also as a human ground commander to influence the path of the APCs, by pointing a new path using the DCS user interface on the map. In this case, the APCs will change the direction towards its new indicated route. However, there is a catch! Once the APCs are near the enemy, and infantry is unboarded, the APCs won't be able to hold the route until the infantry could catch up. The APCs will simply drive on and won't stop! This is a limitation in ED that prevents user actions being controlled by the scripting engine. No workaround is possible on this.

Cargo deployment.

Using the AI_CARGO_APC.Deploy() method, you are able to direct the APCs towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. The APCs will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment.

Cargo pickup.

Using the AI_CARGO_APC.Pickup() method, you are able to direct the APCs towards a point on the battlefield to board/load the cargo at the specific coordinate. The APCs will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment.

Type AI_Cargo_APC

Type AI_CARGO_APC

Extends Core.Fsm#FSM_CONTROLLABLE

Field(s)

#table AI_CARGO_APC.APC_Cargo
#number AI_CARGO_APC.BoardingCount
AI_CARGO_APC.CargoCarrier
Core.Set#SET_CARGO AI_CARGO_APC.CargoSet
AI_CARGO_APC.CarrierCoordinate
#boolean AI_CARGO_APC.CarrierStopped
AI_CARGO_APC.Coalition
AI_CARGO_APC.CombatRadius
AI_CARGO_APC:Deploy(Coordinate)

Deploy Trigger for AICARGOAPC

Parameter

AI_CARGO_APC:FindCarrier(Coordinate, Radius)

Find a free Carrier within a range.

Parameters

Return value

Wrapper.Group#GROUP: NewCarrier

AI_CARGO_APC:FollowToCarrier(Me, APCUnit, Cargo, CargoGroup)

Follow Infantry to the Carrier.

Parameters

Return value

#AI_CARGO_APC:

AI_CARGO_APC:IsRelocating()
AI_CARGO_APC:IsTransporting()
AI_CARGO_APC:New(APC, CargoSet, CombatRadius)

Creates a new AICARGOAPC object.

Parameters

Return value

#AI_CARGO_APC:

AI_CARGO_APC:OnAfterDeploy(From, Event, To, Coordinate)

Deploy Handler OnAfter for AICARGOAPC

Parameters

AI_CARGO_APC:OnAfterLoaded(APC, From, Event, To)

Loaded Handler OnAfter for AICARGOAPC

Parameters

AI_CARGO_APC:OnAfterPickup(From, Event, To, Coordinate)

Pickup Handler OnAfter for AICARGOAPC

Parameters

AI_CARGO_APC:OnAfterUnloaded(APC, From, Event, To)

Unloaded Handler OnAfter for AICARGOAPC

Parameters

AI_CARGO_APC:OnBeforeDeploy(From, Event, To, Coordinate)

Deploy Handler OnBefore for AICARGOAPC

Parameters

Return value

#boolean:

AI_CARGO_APC:OnBeforePickup(From, Event, To, Coordinate)

Pickup Handler OnBefore for AICARGOAPC

Parameters

Return value

#boolean:

AI_CARGO_APC:Pickup(Coordinate)

Pickup Trigger for AICARGOAPC

Parameter

#boolean AI_CARGO_APC.Relocating
#boolean AI_CARGO_APC.RouteDeploy
#boolean AI_CARGO_APC.RoutePickup
AI_CARGO_APC:SetCarrier(CargoCarrier)

Set the Carrier.

Parameter

Return value

#AI_CARGO_APC:

#boolean AI_CARGO_APC.Transporting
AI_CARGO_APC.Zone
AI_CARGO_APC._Deploy(APC, self)

Parameters

AI_CARGO_APC._Pickup(APC, self)

Parameters

AI_CARGO_APC:__Deploy(Coordinate, Delay)

Deploy Asynchronous Trigger for AICARGOAPC

Parameters

AI_CARGO_APC:__Pickup(Delay, Coordinate)

Pickup Asynchronous Trigger for AICARGOAPC

Parameters

AI_CARGO_APC:onafterBoard(APC, From, Event, To, Cargo)

Parameters

AI_CARGO_APC:onafterDeploy(APC, From, Event, To, Coordinate, Speed, EndPointFormation)

Parameters

AI_CARGO_APC:onafterFollow(APC, From, Event, To)

Parameters

AI_CARGO_APC:onafterHome(APC, From, Event, To, Coordinate, Speed)

Parameters

AI_CARGO_APC:onafterMonitor(APC, From, Event, To)

Parameters

AI_CARGO_APC:onafterPickup(APC, From, Event, To, Coordinate, Speed, EndPointFormation)

Parameters

AI_CARGO_APC:onafterUnboard(APC, From, Event, To, Cargo, Deployed)

Parameters

AI_CARGO_APC:onafterUnload(APC, From, Event, To, Deployed)

Parameters

AI_CARGO_APC:onbeforeLoad(APC, From, Event, To)

Parameters

AI_CARGO_APC:onbeforeLoaded(APC, From, Event, To)

Parameters

AI_CARGO_APC:onbeforeUnloaded(APC, From, Event, To, Cargo, Deployed)

Parameters

Type AI_CARGO_HELICOPTER

Field(s)

#boolean AI_CARGO_HELICOPTER.RouteHome