// ------------------------------------------------------ Naming ------------------------------------------------------
Name Chengdu J-20 Mighty Dragon
ShortName J-20
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon iconj20_tf51
Model pla.j20
Texture j20
//Third Person Camera Distance
CameraDistance 20.0
//Resting Pitch. Set this so the plane spawns level. It will fall onto its collision boxes automatically, but this lets you start it flat
RestingPitch 0.0
HasGear True
HasWing True
ModelScale 1
// ------------------------------------------------------ Movement ------------------------------------------------------
//Mode : One of Plane, Heli or VTOL. The VTOL has a toggle button that switches some model aesthetics and the flight mode
Mode Plane
//Throttle
MaxThrottle 0.85
MaxNegativeThrottle 0.0
//Yaw modifiers
//Yaw modifiers
TurnLeftSpeed 1.8
TurnRightSpeed 1.8
//Pitch modifiers
LookUpSpeed 0.87
LookDownSpeed 0.87
//Roll modifiers
RollLeftSpeed 1.58
RollRightSpeed 1.58
//Drag 1.0 is standard. Modify to make the plane / heli more or less sluggish
Drag 0.3
//Wheels
NumWheels 3
WheelPosition 0 -47 -10 -32
WheelPosition 1 -47 -10 32
WheelPosition 2 75 -10 0
WheelSpringStrength 0.125
//Propeller <ID> <x> <y> <z> <planePart> <recipeItem>
Propeller 0 54 0 0 core metalPropeller
// ------------------------------------------------------ Weaponry ------------------------------------------------------
//Weapon types. Options are Missile, Bomb, Gun, Shell, None
Primary Gun
Secondary Missile
//Time between shots in 1/20ths of seconds
ShootDelayPrimary 2
ShootDelaySecondary 20
//Whether to alternate or fire all together
AlternatePrimary False
AlternateSecondary False
//Firing modes. One of SemiAuto, FullAuto or Minigun
ModePrimary FullAuto
ModeSecondary FullAuto
//Add shoot origins. These are the points on your vehicle from which bullets / missiles / shells / bombs appear
ShootPointPrimary 72 49 31 core minigun
ShootPointSecondary 0 31 -34 core
ShootPointSecondary 0 31 34 core
ShootPointSecondary 0 15 -9 core
ShootPointSecondary 0 15 9 core
// ------------------------------------------------------ Inventory ------------------------------------------------------
CargoSlots 0
BombSlots 0
MissileSlots 4
AllowAllAmmo True
AddAmmo PL-10
AddAmmo PL-12
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 6000
// ------------------------------------------------------ Passengers ------------------------------------------------------
Pilot 111 39 0
Passengers 0
// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound PlaneA
StartSoundLength 60
PropSound PlaneA
PropSoundLength 47
ShootSoundPrimary a10shot2
ShootSoundSecondary RocketFire1
// ------------------------------------------------------ Recipe ------------------------------------------------------
//Each section of the plane may have many parts
//The sections are tailWheel, tail, bay, topWing, leftWingWheel, leftWing, rightWingWheel,
//rightWing, nose, turret, coreWheel, core
AddRecipeParts core 1 advancedMetalCockpit
AddRecipeParts coreWheel 2 wheel
AddRecipeParts nose 1 metalNose
AddRecipeParts rightWing 1 metalWingSmall
AddRecipeParts leftWing 1 metalWingSmall
AddRecipeParts tail 1 metalTail
AddRecipeParts rightWingWheel 1 wheel
AddRecipeParts leftWingWheel 1 wheel
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
AddDye 5 white
AddDye 1 gray
// ------------------------------------------------------ Health and hitboxes ------------------------------------------------------
SetupPart core 86 88 46 -11 45 15 21
SetupPart airframe 460 -173 22 -24 338 34 46
SetupPart tail 460 -211 49 -24 27 54 46
SetupPart rightWing 340 -199 38 49 172 8 81
SetupPart leftWing 340 -199 38 -136 172 8 81
SetupPart engine 135 -226 17 -53 280 34 48
SetupPart engine2 135 -226 17 5 280 34 48

hasHUD 0 true
hudColorR 0 255
hudColorG 0 0
hudColorB 0 0
BulletDetection 7
//Collision points for breaking wings etc. upon crashing
//RightWing
CollisionPoint 9 30 -80 rightWing
CollisionPoint 9 30 -60 rightWing
CollisionPoint 9 30 -40 rightWing
CollisionPoint 9 30 -20 rightWing
//LeftWing
CollisionPoint 9 30 80 leftWing
CollisionPoint 9 30 60 leftWing
CollisionPoint 9 30 40 leftWing
CollisionPoint 9 30 20 leftWing
//Nose
CollisionPoint 50 55 0 core
CollisionPoint 90 55 0 core
CollisionPoint 50 55 0 core
CollisionPoint 90 55 0 core
CollisionPoint 50 55 0 core
CollisionPoint 90 55 0 core
CollisionPoint 50 55 0 core
CollisionPoint 90 55 0 core
//Tail
CollisionPoint -60 35 0 tail
BulletSpeed 9
BulletSpread 0
IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.21
CollisionDamageTimes 80
flightCeiling 2000
hasPlaneRadar true
radarPositionOffset 20
radarRange 2000
radarVisible false
radarRefreshDelay 10
ShootParticlesPrimary flansmod.fmsmoke 0 0 0
ShootParticlesPrimary flansmod.fmsmoke 0 -0.5 0
ShootParticlesPrimary flansmod.fmflame 0 0 0
AddEmitter flansmod.fmflame 1 [-150,28,10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
AddEmitter flansmod.fmflame 1 [-175,28,10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
AddEmitter flansmod.fmflame 1 [-200,28,10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
AddEmitter flansmod.fmflame 1 [-150,28,-10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
AddEmitter flansmod.fmflame 1 [-175,28,-10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
AddEmitter flansmod.fmflame 1 [-200,28,-10] [3,3,3] [0,0,0] 0.7 2 0 1 tail
ReloadSoundPrimary PG_reload
ReloadTimePrimary 50
ReloadTimeSecondary 40
ReloadSoundSecondary PlaneBomb_reload1
EngineSoundRange 1000
HasFlare True
FlareDelay 220
FlareSound Flare
TimeFlareUsing 6
LockedOnSound Lock
SoundTime 8
LockedOnSoundRange 15

//nu flight model

//kilogram mass: somewhere between empty and max takeoff weight
mass 15500

//cruise speed for afterburn planes. default is 610mph, common for most jets, but set higher if you want su
cruiseSpeed 655  

//takeoff speed is anything above stall speed (mph)
//code automatically calculates engine power so this will be real takeoff speed
takeoffSpeed 143

//code learns true lift from this (meter/second)
climbRate 761

//code learns true drag from this (mph)
//diving speed is mechanically accurate by actually adding gravity to acceleration when diving
maximumSpeed 1650

//these two are for gun recoil in M/s
muzzleVelocity 1020

//if one 50 cal bullet is 10kg but there are 6 guns, enter 60kg controls locking up at high speed
projectileMass 0.5

hasAfterBurner true
//use this to rename afterburner to WEP or 110% throttle or Notleistung or whatever the fuck
afterBurnName Afterburner

//multiplier to fuel consumption when afterburner on
afterBurnFuelPenalty 1.5

//measured in seconds at 100%throttle afterburner off

//RadarDetectableAltitude 35
Stealth True