show spoiler
#define true 1
#define false 0
#define private 0
#define protected 1
#define public 2
#define TEast 1
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define VSoft 0
#define VArmor 1
#define VAir 2
#define ReadAndWrite 0
#define ReadAndCreate 1
#define ReadOnly 2
#define ReadOnlyVerified 3
class CfgPatches
{
class PRACS_MiG21
{
units[] = {PRACS_MiG21};
requiredVersion = 1.0;
};
};
#include <cfgmagazine.h>
#include <cfgWeapons.h>
#include <cfgAmmo.h>
class CfgRadio {
class PRACS_MiG21_miswarn {
sound[] = {"\PRACS_MiG21\sounds\REDmissilewarn.ogg", db30, 1};
name = "";
title = "";
};
};
class CfgSounds {
class PRACS_MiG21_flarelaunch {
sound[] = {"\PRACS_MiG21\sounds\flare_drop.wav", db10, 1};
name = "PRACS_MiG21_flarelaunch";
titles[] = {};
};
};
class CfgVehicles
{
class All {};
class AllVehicles : All {};
class Air : AllVehicles {};
class Plane : Air {};
class PRACS_MiG21 : Plane
{
memoryPointsGetInDriver = "pos driver";
memoryPointsGetInDriverDir = "pos driver dir";
memoryPointsGetInCargo = "pos driver";
memoryPointsGetInCargoDir = "pos driver dir";
scope = public;
model = "\PRACS_MiG21\PRACS_MiG21.p3d";
displayName = "MiG-21M Fishbed (CAP)";
side = "TEast";
vehcileClass = "Air";
transportSoldier = 0;
crew = "SoldierEPilot";
driverAction = "AV8B_Pilot";
cargoAction[] = {""};
Icon = "\PRACS_MiG21\tex\icon.paa";
picture = "\PRACS_MiG21\tex\picture.paa";
accuracy = .3; // accuracy needed to recognize type of this target
gearUpTime = 2;
gearDownTime = 2;
gearRetracting = true;
nameSound = "plane";
soundEngine[] = {"\PRACS_MiG21\Sounds\engine.ogg",1.2,.7};
soundServo[] = {"Vehicles\gun_elevate", db0, 0.4};
// maneuvrability = 90.0; ----------------Only used on weapons has no effect on aircraft
maxSpeed = 600; // max speed on level road, km/h
armor=50;
damageResistance = 0.01246;
ejectSpeed[] = {0, 0, 0};
cost = 20000;
type = "Air";
class EventHandlers {
init = "[(_this select 0)] exec ""\PRACS_MiG21\scripts\common_init.sqs""";
IncomingMissile = "if ((_this select 0)==(_this select 0)) then {[_this] exec ""\PRACS_MiG21\scripts\CMSe.sqs""}";
};
class AnimationSources
{ class ABSwitch // Should be the same as your selection name.
{ source = "user"; //The controller is defined as a user animation.
animPeriod = 1; //The animation period used for this controller.
initPhase=0; //Initial phase when object is created. 0 = CLOSED
};
};
class UserActions
{
class Afterburner
{
displayName ="Afterburner On";
position = "pilotcontrol";
radius =15;
condition = "speed this >10 and this animationPhase ""ABSwitch"" <= 0.1";
statement = "this execvm ""\PRACS_MiG21\scripts\afterburner.sqf""; ";
onlyforplayer = False;
};
class Afterburner_1
{
displayName ="Afterburner Off";
position = "pilotcontrol";
radius =15;
condition = "this animationPhase ""ABSwitch"" >= 0.9";
statement = "this animate [""ABSwitch"",0]";
onlyforplayer = False;
};
};
dammageHalf[]=
{
\Ca\air\data\ah1z_monitor_glass_ca.paa, \Ca\air\data\ah1z_monitor_glass_destr_co.paa
};
dammageFull[]=
{
\Ca\air\data\ah1z_monitor_glass_ca.paa, \Ca\air\data\ah1z_monitor_glass_destr_co.paa
};
class Damage
{
tex[]={};
mat[]={
"PRACS_Mig21\tex\hull_east.rvmat",
"PRACS_Mig21\tex\hull_east.rvmat",
"ca\tracked\data\walls_destruct.rvmat",
"PRACS_Mig21\tex\misc.rvmat",
"PRACS_Mig21\tex\misc.rvmat",
"ca\tracked\data\walls_destruct.rvmat",
"PRACS_Mig21\tex\mig_krd.rvmat",
"PRACS_Mig21\tex\mig_krd.rvmat",
"ca\tracked\data\walls_destruct.rvmat",
"PRACS_Mig21\tex\mig_trp_1.rvmat",
"PRACS_Mig21\tex\mig_trp_1.rvmat",
"ca\tracked\data\walls_destruct.rvmat",
"PRACS_Mig21\tex\mig_trp_2.rvmat",
"PRACS_Mig21\tex\mig_trp_2.rvmat",
"ca\tracked\data\walls_destruct.rvmat"
};
};
// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
threat[] = {0.1, 1, 0.7};
aileronSensitivity = .7; // relative aileron sensitivity
elevatorSensitivity = .8; // relative elevator sensitivity
flapsFrictionCoef = 0.1;
noseDownCoef = 0.9; // how much goes nose down during turns
landingAoa = "rad 10";
brakeDistance = 300; // vehicle movement precision
steerAheadSimul = 1.0;
steerAheadPlan = 2.0;
hiddenSelections[] = {"light", "daylight", "polyons", "vrtule blur", "vrtule"};
extCameraPosition[] = {0, 3, -20};
irTarget = true;
irScanRange = 6500;
irScanGround = true;
crewVulnerable = true;
weapons[] = {PRACS_M21_GSH23L_Cannon,PRACS_AA8_Launcher};
magazines[] = {PRACS_200rd_M21_GSH23L,PRACS_AA8x6};
envelope[]=
{
// speed relative to max. speed -> lift
// 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 // Percentage of rel. speed
//0.0,0.5,2.0,4.0,4.4,5.9,6.0,6.2,6.3,6.5,6.6,6.8,7. 0,4.0,2.0 // old lift values
0.0, 0.2, 0.9, 2.1, 3.5, 4.3, 5.5, 6.2, 7.5, 5.0, 3.5, 2.0, 1.5, 0.7, 0.5 // lift
};
class MFD
{
borderLeft = 0.020000;
borderRight = 0.020000;
borderTop = 0.020000;
borderBottom = 0.020000;
class AirplaneHUD
{
topLeft = "HUD LH";
topRight = "HUD PH";
bottomLeft = "HUD LD";
borderLeft = 0;
borderRight = 0;
borderTop = 0;
borderBottom = 0;
color[] = {0.900000, 0, 0, 0.900000};
class Pos10
{
pos0[] = {0.500000, 0.500000};
pos10[] = { 1.400000, 1.400000};
type = "vector";
};
class Bones
{
class SpdTextPos
{
type = "fixed";
Pos[] = {0.150000, 0.200000};
};
class FuelTextPos
{
type = "fixed";
Pos[] = {0.975000, 0.760000};
};
class EngTextPos
{
type = "fixed";
Pos[] = {0.965000, 0.805000};
};
class DisTextPos
{
type = "fixed";
Pos[] = {0.240000, 0.810000};
};
class AltTextPos
{
type = "fixed";
Pos[] = {0.900000, 0.200000};
};
class ASLFix
{
type = "fixed";
pos[] = {0.850000, 0.620000};
};
class ASLMove
{
type = "linear";
source = "altitudeASL";
min = 0;
max = 400;
minPos[] = {0.850000, 0.300000};
maxPos[] = {0.850000, 0.620000};
};
class AGLMove
{
type = "linear";
source = "altitudeAGL";
min = 0;
max = 150;
minPos[] = {
0.500000, 1.100000
};
maxPos[] = {
0.500000, 0.500000
};
};
class VertSpeedMove
{
type = "linear";
source = "vSpeed";
min = -50;
max = 50;
minPos[] = {
0.200000, 0.350000
};
maxPos[] = {
0.200000, 0.650000
};
};
class VertSpeedFix
{
type = "fixed";
Pos[] = {
0.200000, 0.500000
};
};
class ILS
{
type = "ils";
pos0[] = {
0.500000, 0.400000
};
pos3[] = {
0.700000, 0.600000
};
};
class WeaponAim : Pos10
{
source = "weapon";
};
class Target
{
source = "target";
pos0[] = {
0.420000, 0.650000
};
pos10[] = {
0.970000, 1.250000
};
type = "vector";
};
class Level0
{
pos0[] = {
0.500000, 0.500000
};
pos10[] = {
1.200000, 1.500000
};
type = "horizon";
angle = 0;
};
class LevelP5 : Level0
{
angle = 5;
};
class LevelM5 : Level0
{
angle = -5;
};
class LevelP10 : Level0
{
angle = 10;
};
class LevelM10 : Level0
{
angle = -10;
};
class LevelP15 : Level0
{
angle = 15;
};
class LevelM15 : Level0
{
angle = -15;
};
class Velocity
{
pos0[] = {
0.500000, 0.500000
};
pos10[] = {
1.200000, 1.200000
};
type = "vector";
source = "velocity";
};
};
class Draw
{
alpha = 1.0;
color[] = {
0, 1.0, 0
};
clipTL[] = {
0, 0
};
clipBR[] = {
1, 1
};
condition = "on";
class Altitude
{
type = "text";
align = "right";
scale = 1;
source = "altitudeAGL";
sourceScale = 1;
pos[] = {
"AltTextPos", {-0.050000, -0.030000}, 1
};
right[] = {
"AltTextPos", {0.010000, -0.030000}, 1
};
down[] = {
"AltTextPos", {-0.050000, 0.040000}, 1
};
};
class SpeedNumber
{
type = "text";
align = "left";
scale = 1;
source = "speed";
sourceScale = 3.600000;
pos[] = {
"SpdTextPos", {-0.050000, -0.030000}, 1
};
right[] = {
"SpdTextPos", {0.010000, -0.030000}, 1
};
down[] = {
"SpdTextPos", {-0.050000, 0.040000}, 1
};
};
class EngNumber
{
type = "text";
align = "left";
scale = 1;
source = "rpm";
sourceScale = 100;
pos[] = {
"EngTextPos", {-0.050000, -0.030000}, 1
};
right[] = {
"EngTextPos", {-0.010000, -0.030000}, 1
};
down[] = {
"EngTextPos", {-0.050000, 0.020000}, 1
};
};
class FuelNumber
{
type = "text";
align = "left";
scale = 1;
source = "fuel";
sourceScale = 100;
pos[] = {
"FuelTextPos", {-0.050000, -0.030000}, 1
};
right[] = {
"FuelTextPos", {-0.010000, -0.030000}, 1
};
down[] = {
"FuelTextPos", {-0.050000, 0.020000}, 1
};
};
class DisNumber
{
type = "text";
align = "left";
scale = 1;
source = "targetDist";
sourceScale = 1;
pos[] = {
"DisTextPos", {-0.050000, -0.030000}, 1
};
right[] = {
"DisTextPos", {-0.010000, -0.030000}, 1
};
down[] = {
"DisTextPos", {-0.050000, 0.020000}, 1
};
};
class AGLBox
{
type = "line";
points[] = {
{"AGLMove", {-0.050000, -0.025000}, 1}, {"AGLMove", {-0.050000, 0.025000}, 1}, {"AGLMove", {0.050000, 0.025000}, 1}, {"AGLMove", {0.050000, -0.025000}, 1}, {"AGLMove", {-0.050000, -0.025000}, 1}
};
};
class ASLLine
{
type = "line";
points[] = {
{"ASLFix", {0.020000, 0}, 1}, {"ASLFix", {0, 0}, 1}, {"ASLMove", {0, 0}, 1}, {"ASLMove", {0.020000, 0}, 1}
};
};
class VertSpeed
{
type = "line";
points[] = {
{"VertSpeedFix", {0.020000, 0}, 1}, {"VertSpeedFix", {0, 0}, 1}, {"VertSpeedMove", {0, 0}, 1}, {"VertSpeedMove", {-0.030000, -0.015000}, 1}, {"VertSpeedMove", {-0.030000, 0.015000}, 1}, {"VertSpeedMove", {0, 0}, 1}
};
};
class Speed
{
};
class PlaneW
{
clipTL[] = {
0.000000, 0.100000
};
clipBR[] = {
1.000000, 0.900000
};
class Velocity
{
type = "line";
points[] = {
{"Velocity", {0, -0.020000}, 1}, {"Velocity", {0.020000, 0}, 1}, {"Velocity", {0, 0.020000}, 1}, {"Velocity", {-0.020000, 0}, 1}, {"Velocity", {0, -0.020000}, 1}
};
};
class Cross
{
type = "line";
points[] = {
{"Velocity", {-0.040000, 0}, 1}, {"Velocity", {0.040000, 0}, 1}, {}, {"Velocity", {0, 0}, 1}, {"Velocity", {0, -0.040000}, 1}
};
};
};
class MGun
{
condition = "mgun";
};
class Missile
{
condition = "missile";
class Target
{
type = "line";
points[] = {
{"Target", {-0.030000, -0.030000}, 1}, {"Target", {0.030000, -0.030000}, 1}, {"Target", {0.030000, 0.030000}, 1}, {"Target", {-0.030000, 0.030000}, 1}, {"Target", {-0.030000, -0.030000}, 1}
};
};
};
class Horizont
{
class Center
{
type = "line";
points[] = {
{"Level0", {-0.250000, 0}, 1}, {"Level0", {-0.070000, 0}, 1}, {"Level0", {-0.070000, 0.040000}, 1}, {}, {"Level0", {0.070000, 0.040000}, 1}, {"Level0", {0.070000, 0}, 1}, {"Level0", {0.250000, 0}, 1}
};
};
class P5
{
type = "line";
points[] = {
{"LevelP5", {-0.400000, 0}, 1}, {"LevelP5", {-0.150000, 0}, 1}, {}, {"LevelP5", {0.400000, 0}, 1}, {"LevelP5", {0.150000, 0}, 1}
};
};
class M5
{
type = "line";
points[] = {
{"LevelM5", {-0.400000, 0}, 1}, {"LevelM5", {-0.150000, 0}, 1}, {}, {"LevelM5", {0.400000, 0}, 1}, {"LevelM5", {0.150000, 0}, 1}
};
};
class P10
{
type = "line";
points[] = {
{"LevelP10", {-0.400000, 0}, 1}, {"LevelP10", {-0.150000, 0}, 1}, {}, {"LevelP10", {0.400000, 0}, 1}, {"LevelP10", {0.150000, 0}, 1}
};
};
class M10
{
type = "line";
points[] = {
{"LevelM10", {-0.400000, 0}, 1}, {"LevelM10", {-0.150000, 0}, 1}, {}, {"LevelM10", {0.400000, 0}, 1}, {"LevelM10", {0.150000, 0}, 1}
};
};
class P15
{
type = "line";
points[] = {
{"LevelP15", {-0.400000, 0}, 1}, {"LevelP15", {-0.150000, 0}, 1}, {}, {"LevelP15", {0.400000, 0}, 1}, {"LevelP15", {0.150000, 0}, 1}
};
};
class M15
{
type = "line";
points[] = {
{"LevelM15", {-0.400000, 0}, 1}, {"LevelM15", {-0.150000, 0}, 1}, {}, {"LevelM15", {0.400000, 0}, 1}, {"LevelM15", {0.150000, 0}, 1}
};
};
};
class ILS
{
condition = "ils";
class Glideslope
{
clipTL[] = {
0.290000, 0.290000
};
clipBR[] = {
0.710000, 0.710000
};
class ILS
{
type = "line";
points[] = {
{"ILS", {-10, 0}, 1}, {"ILS", {10, 0}, 1}, {}, {"ILS", {0, -10}, 1}, {"ILS", {0, 10}, 1}
};
};
};
class AOABracket
{
type = "line";
points[] = {
{{0.420000, 0.780000}, 1}, {{0.400000, 0.780000}, 1}, {{0.400000, 0.880000}, 1}, {{0.420000, 0.880000}, 1}
};
};
class Library
{
libTextDesc = "Developed by the Soviet Union in the 1950s.";
};
};
class PRACS_MiG21_BMB : PRACS_MiG21
{
model = "\PRACS_MiG21\PRACS_MiG21_BMB.p3d";
displayName = "MiG-21 MF Fishbed (BMB)";
weapons[] = {GSh301,PRACS_FAB100_Launcher,FFARLauncher};
magazines[] = {180Rnd_30mm_GSh301,180Rnd_30mm_GSh301,PRACS_FAB10 0X8,38Rnd_FFAR};
};
class PRACS_MiG21_ATK : PRACS_MiG21
{
model = "\PRACS_MiG21\PRACS_MiG21_ATK.p3d";
displayName = "MiG-21 SMT Fishbed (ATK)";
weapons[] = {GSh301,PRACS_KH25_Launcher};
magazines[] = {180Rnd_30mm_GSh301,180Rnd_30mm_GSh301,PRACS_KH25x 4};
};
class PRACS_MiG21_RATK : PRACS_MiG21
{
model = "\PRACS_MiG21\PRACS_MiG21_RATK.p3d";
displayName = "MiG-21 MF Fishbed (RKT)";
weapons[] = {GSh301,57mmLauncher,PRACS_RBK500_Launcher};
magazines[] = {180Rnd_30mm_GSh301,180Rnd_30mm_GSh301,96Rnd_57mm, PRACS_RBK500x2};
class EventHandlers {
init = "[(_this select 0)] exec ""\PRACS_MiG21\scripts\common_init.sqs""";
Fired = "_this execVM ""\PRACS_MiG21\scripts\fall.sqf""";
IncomingMissile = "if ((_this select 0)==(_this select 0)) then {[_this] exec ""\PRACS_MiG21\scripts\CMSe.sqs""}";
};
};
};
class CfgNonAIVehicles
{
class ProxyDriver;
class ProxyWeapon;
class ProxyPRACS_FAB100: ProxyWeapon {model = \PRACS_MiG21\weapons\PRACS_FAB100.p3d; simulation = "maverickweapon";};
class ProxyPRACS_AA8: ProxyWeapon {model = \PRACS_MiG21\weapons\PRACS_AA8.p3d; simulation = "maverickweapon";};
class ProxyPRACS_KH25: ProxyWeapon {model = \PRACS_MiG21\weapons\PRACS_KH25.p3d; simulation = "maverickweapon";};
class ProxyPRACS_RBK500: ProxyWeapon {model = \PRACS_MiG21\weapons\PRACS_RBK500.p3d; simulation = "maverickweapon";};
};