AAR Tanker Setup - Fullerpj/United-States-Air-Force-Mod GitHub Wiki
Table of Contents
This article explains setting up your tanker aircraft to use the USAF Air-to-Air refueling functions. If you are instead authoring a non-tanker aircraft to receive fuel from USAF tankers, you want to read AAR: Receiver Aircraft Setup.
First you'll setup your model, and then add two entries to your tankers config class which tell the functions how to manipulate it. This article shows the USAF KC-135 model as an example. The memory point and animation names are completely up to you - what's important is that the config entries match your model data.
1. Animations
USAF_KC-135 model.cfg
class Animations {
class boom {
source = "user";
initPhase = 0;
animPeriod = 8;
};
class refuel_drogue_2 {
type="hide";
source="hoseL";
selection="refuel_drogue_2";
minValue=0;
maxValue=1;
};
class refuel_drogue_3: refuel_drogue_2 {
source="hoseR";
selection="refuel_drogue_3";
};
};
USAF_KC-135 Config.cpp
class boom {
source = "user";
initPhase = 1;
animPeriod = 8;
};
class refuel_drogue_2 {
source = "user";
animPeriod = 10;
initPhase = 1;
};
class refuel_drogue_3: refuel_drogue_2 {};
2. Memory Points
Create memory points at the position(s) where the receiver aircraft will connect to the boom/drogue.
3. USAF_Tanker class
Add the following class to the root of your tanker's class. Then change the values to match your model's animation and memory point design. The USAF KC-135 is the MPRS variant with both a boom and baskets. Remove the respective values if your tanker only has one or the other.
- Hose... = Basket
- Probe... = Boom
The arrays are in parallel, meaning index 0 of each array pertains to the first boom/basket, index 1 pertains to the next, etc.
class USAF_Tanker
{
HoseAnims[] = {"HoseL", "HoseR"}; //default empty
HosePos[] = {"refuel_drogue_2_pos", "refuel_drogue_3_pos"}; //can be memory or position
HoseAnimsFree[] = {1, 1}; //when the anim is in it's free state (retracted)
HoseAnimsUsed[] = {0, 0}; //when the anim is in it's used state (extended)
HoseAnimsSource[] = {1, 1}; //to use anim source set to 1 or else set to 0, default 1 if not present
ProbeAnims[] = {"Boom"};
ProbePos[] = {"refuel_drogue_1_pos"};
ProbeAnimsSource[] = {1};
ProbeAnimsFree[] = {0};
ProbeAnimsUsed[] = {1};
};
4. UserActions Entry
Add the following entry to your tanker's UserActions class, then change the displayName text to match your aircraft. No other values need to be changed.
class UserActions
{
class USAF_refuelaction
{
displayName = "Request refuel from KC-135";
position = "pos driver";
priority = 100;
onlyForPlayer = 0;
showWindow = 0;
hideOnUse = 1;
radius = 1000;
condition = "!((vehicle player) in [this,player])";
statement = "[this, vehicle player] spawn USAF_REFUEL_fnc_MidairRefuel";
};
};
PDL Control
Finally, PDL control is not yet documented since only one aircraft uses it, but if you happen to be making a KC-10 with working PDL, please contact a developer for the info.