AAR Receiver Setup - Fullerpj/United-States-Air-Force-Mod GitHub Wiki

Table of contents


Introduction

This script uses the 2 most commonly known in-air refueling methods. An excerpt from wikipedia: https://en.wikipedia.org/wiki/Aerial_refueling

Flying Boom

The flying boom is a rigid, telescoping tube with movable flight control surfaces that a boom operator on the tanker aircraft extends and inserts into a receptacle on the receiving aircraft. All boom-equipped tankers (e.g. KC-135 Stratotanker, KC-10 Extender) have a single boom, and can refuel one aircraft at a time with this mechanism.

Probe-and-drogue

The probe-and-drogue refueling method employs a flexible hose that trails from the tanker aircraft. The drogue (or para-drogue), sometimes called a basket, is a fitting resembling a shuttlecock, attached at its narrow end (like the "cork" nose of a shuttlecock) with a valve to a flexible hose. The drogue stabilizes the hose in flight and provides a funnel to aid insertion of the receiver aircraft probe into the hose. The hose connects to a Hose Drum Unit (HDU). When not in use, the hose/drogue is reeled completely into the HDU. The receiver has a probe, which is a rigid, protruding or pivoted retractable arm placed on the aircraft's nose or fuselage to make the connection. Most modern versions of the probe are usually designed to be retractable, and are retracted when not in use, particularly on high speed aircraft

In the USAF refueling functions, the variable USAF_RefuelType is used to set which mode probe refers to the Flying boom and hose refers to probe-and-drogue.


Requirements for receiving fuel

The bare minimum for your aircraft to be accepted by the tanker script is the config values USAF_RefuelType and USAF_RefuelPoint being set inside your aircraft's CfgVehicles class. The other config values are not required but enable additional functionality.

USAF_RefuelType - STRING (Required)

Sets which refueling system the aircraft can accept: "hose" (Probe and Drogue) or "probe" (Flying Boom)

USAF_RefuelPoint - STRING or ARRAY (Required)
String: reference to memory point Array: an array of type PositionRelative representing the position in your aircraft's modelspace of the connection point with the tanker's drogue or boom.

USAF_RefuelAnimation - STRING (Optional)
The name of an animation that must equal to 1 in order to connect. This enables the requirement of having a refuel door open or probe out (optional! but is nice to have otherwise it will look weird with no probe out/door opened). If the door/probe is not in this state, the tanker will refuse the connection.

External tank code

the following is for allowing the tanker to refuel external tanks

USAF_RefuelExtTank - STRING or ARRAY (Optional)
Array: a list of custom magazines that should be considered fuel tanks
String: reference to an animation which equals 1 when a fuel tank is equipped (e.g. Firewill F-14 has animation for external tanks)

USAF_RefuelExtTankVar - STRING (Optional)
Either a reference to animation or getVariable, or for Firewill's case can be "vanilla" which indicates that the max fuel is done via vanilla route

USAF_RefuelExtCount - SCALAR or FLOAT (Optional)
Float or array of floats (from 0-1) that reference what each magazine referenced in USAF_RefuelExtTank gives the plane x amount of fuel extra on board. Please ensure that if you do decide to use an array, that the array is the same size as USAF_RefuelExtTank.

USAF_RefuelMaxNormal is for when "vanilla" setting is being used in USAF_RefuelExtTankVar to let the refuel script understand that if no external tanks are present that this is the max amount of fuel to be inputted.

USAF_RefuelExtTankAnimation - BOOLEAN (0 or 1) (Optional)
Set this to 1 if USAF_RefuelExtTank is an animation.

USAF_RefuelExtTankAnimationUnHideValue - SCALAR (Optional)
The amount required for external tanks to no longer be present, this needs to be exact! Default: 0

To emphasize, if you use USAF_RefuelExtTankVar = "vanilla" you must include USAF_RefuelMaxNormal and if your USAF_RefuelExtTank is an animation please set USAF_RefuelExtTankAnimation to 1. If your plane has no external tanks but has an animation for refuel door then you only need to use USAF_RefuelType, USAF_RefuelPoint, and USAF_RefuelAnimation.

Deprecated method for backwards compatibility (please don't use)

This is a very specific case for backwards compatibility (no config references in this method). None of the external tank code works with this method.

The plane will have a memory point of either refuel_probe or refuel_hose and then either an animation of fuel_probe or fuel_hose.

So if you are using the boom, the aircraft will have a memory point refuel_probe and then have an animation called fuel_probe.

Or if you are using the hose the aircraft will have a memory point called refuel_hose and an animation called fuel_hose.

Again, no new aircraft should use this method going forward.


Config Examples


Aircraft without animation (vanilla A-164 in this case)

Bare minimum for air refuel to work and also demonstrates USAF_RefuelPoint as array.
The player would simply scroll wheel on the tanker and request refuel without needing to deploy a probe/door.

class cfgVehicles
{
    class Plane_Base_F;
    class Plane_CAS_01_base_F : Plane_Base_F
    {
        USAF_RefuelType = "probe";
        USAF_RefuelPoint[] = {0, 8.75, 1.05};
    };
};

Firewill F-14 (external tanks as animation)

This tells the script that if the external tank animation fueltank_hide is equal to 1 then you can allow the plane to refuel to 1. (USAF_RefuelMaxNormal + USAF_RefuelMaxNormal)
otherwise it will refuel the plane to 0.5.
Remember that since this plane uses animations for itโ€™s external tanks we need to set USAF_RefuelExtTankAnimation to 1.

class cfgVehicles
{
    class Plane_Fighter_03_base_F;
    class FIR_F14D_Base : Plane_Fighter_03_base_F
    {
        USAF_RefuelType = "hose";
        USAF_RefuelPoint = "refuel_probe";
        USAF_RefuelAnimation = "fuel_probe";
        USAF_RefuelMaxNormal = 0.5;
        USAF_RefuelExtTank[] = {"fueltank_hide"};
        USAF_RefuelMaxNormal = "vanilla";
        USAF_RefuelExtCount = 0.5;
        USAF_RefuelExtTankAnimation = 1;
    };
};

Firewill F-16 (2 Separate fuel tanks with different fuel amounts)

What this tells the script is that for each FIR_F16C_Fueltank_1rnd_M present, add fuel an extra 0.2 fuel and for each FIR_F16C_center_Fueltank_1rnd_M present add an extra 0.1.
So if a player were to only have 1 centre line tank, extra fuel added would be 0.1, bringing the total to 0.6
or
if a player were to only have 1 wing tank, extra fuel added would be 0.2 bringing the total to 0.7
or
if a player were to only have 2 wing tanks, extra fuel added would be 0.4 bringing the total to 0.9
or finally
if they had 3 tanks (2 wing and 1 centre line) it would bring to a total of 1

class cfgVehicles
{
    class Plane_Fighter_03_base_F;
    class FIR_F16_Base : Plane_Fighter_03_base_F
    {
        USAF_RefuelType = "probe";
        USAF_RefuelPoint = "refuel_probe";
        USAF_RefuelAnimation = "refuel_hatch";
        USAF_RefuelMaxNormal = 0.5;
        USAF_RefuelExtTank[] = {"FIR_F16C_Fueltank_1rnd_M", "FIR_F16C_center_Fueltank_1rnd_M"};
        USAF_RefuelExtTankVar = "vanilla";
        USAF_RefuelExtCount[] = {0.2, 0.1};
    };
};

John Spartan and Saul's old F/A-18 Mod

In this mod there is the use of an animation which stores how much external fuel is present, this is called auxtank_switch.
Also for each external tank 0.2 is added to this external fuel reference.
You can see with the F/A-18F the buddy pod also adds extra fuel of 0.2 without the need to make USAF_RefuelExtCount an array

class cfgVehicles
{
    class Plane;
    class JS_JC_FA18E : Plane
    {
        USAF_RefuelType = "hose";
        USAF_RefuelPoint = "refuel_probe";
        USAF_RefuelAnimation = "fuel_probe";
        USAF_RefuelExtTank[] = {"js_m_fa18_wing_tank_x1"};
        USAF_RefuelExtTankVar = "auxtank_switch";
        USAF_RefuelExtCount = 0.2;
    };
    class JS_JC_FA18F : Plane
    {
        USAF_RefuelType = "hose";
        USAF_RefuelPoint = "refuel_probe";
        USAF_RefuelAnimation = "fuel_probe";
        USAF_RefuelExtTank[] = {"js_m_fa18_wing_tank_x1", "js_m_fa18_buddypod_x1"};
        USAF_RefuelExtTankVar = "auxtank_switch";
        USAF_RefuelExtCount = 0.2;
    };
};

USAF F-35A (3 Separate fuel tanks with same amount)

Just another example demonstrating how when using external tanks, there is no need to have USAF_RefuelExtCount be an array of different sizes if each fuel tank contributes the same amount.

class cfgVehicles
{
    class Plane_Base_F;
    class USAF_F35A : Plane_Base_F
    {
        USAF_RefuelType = "probe";
        USAF_RefuelPoint = "refuel_probe";
        USAF_RefuelAnimation = "fuel_probe";
        USAF_RefuelExtTank[] = {"USAF_1Rnd_F16_FUEL","USAF_1Rnd_F35_TANK","USAF_1Rnd_F16_DROPTANK"};
        USAF_RefuelExtTankVar = "USAF_EXT_FUEL";
        USAF_RefuelExtCount = 0.2;
    };
};