// ------------------------------------------------------ Naming ------------------------------------------------------
Name Tupolev Tu-22M3 Backfire
ShortName tu22m3
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon icontu22m3
Model russia.tu22m3
Texture tu22m3
//Third Person Camera Distance
CameraDistance 60.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
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
TurnLeftSpeed 0.6
TurnLeftSpeed 0.6
//Pitch modifiers
TurnLeftSpeed 0.6
TurnLeftSpeed 0.6
//Roll modifiers
TurnLeftSpeed 0.6
TurnLeftSpeed 0.6
//Drag 1.0 is standard. Modify to make the plane / heli more or less sluggish
Drag 1.04
//Lift
//Lift 2.5
//Wheels
NumWheels 3
WheelPosition 0 -92 -28 -15
WheelPosition 1 -92 -28 15
WheelPosition 2 12 -29 0
WheelSpringStrength 0.125
//Propeller <ID> <x> <y> <z> <planePart> <recipeItem>
Propeller 0 54 0 0 core Repair

// ------------------------------------------------------ Weaponry ------------------------------------------------------
//Weapon types. Options are Missile, Bomb, Gun, Shell, None
Primary Bomb
Secondary Missile
//Time between shots in 1/20ths of seconds
ShootDelayPrimary 10
ShootDelaySecondary 9000
//Whether to alternate or fire all together
AlternatePrimary True
AlternateSecondary True
//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 -20 16 10 core
ShootPointPrimary -40 16 10 core
ShootPointPrimary 0 16 10 core
ShootPointPrimary 20 16 10 core 
ShootPointPrimary 40 16 10 core 
ShootPointPrimary 60 16 10 core 
ShootPointPrimary 80 16 10 core 
ShootPointPrimary 100 16 10 core
ShootPointPrimary 120 16 10 core
ShootPointPrimary 140 16 10 core
ShootPointPrimary 160 16 10 core
ShootPointPrimary 180 16 10 core
ShootPointPrimary 200 16 10 core
ShootPointPrimary 220 16 10 core
ShootPointPrimary 240 16 10 core
ShootPointPrimary -20 16 -10 core
ShootPointPrimary -40 16 -10 core
ShootPointPrimary 0 16 -10 core
ShootPointPrimary 20 16 -10 core 
ShootPointPrimary 40 16 -10 core 
ShootPointPrimary 60 16 -10 core 
ShootPointPrimary 80 16 -10 core 
ShootPointPrimary 100 16 -10 core
ShootPointPrimary 120 16 -10 core
ShootPointPrimary 140 16 -10 core
ShootPointPrimary 160 16 -10 core
ShootPointPrimary 180 16 -10 core
ShootPointPrimary 200 16 -10 core
ShootPointPrimary 220 16 -10 core
ShootPointPrimary 240 16 -10 core
ShootPointSecondary 170 45 0 core
ShootPointSecondary 130 45 0 core
ShootPointSecondary -140 45 0 core
ShootPointSecondary -180 45 0 core
// ------------------------------------------------------ Inventory ------------------------------------------------------
CargoSlots 0
BombSlots 6
MissileSlots 3
AllowAllAmmo False
AddAmmo 250_Ib_General-Purpose_Bomb
AddAmmo 500_Ib_General-Purpose_Bomb
AddAmmo 1000_Ib_General-Purpose_Bomb
AddAmmo 1900_Ib_General-Purpose_Bomb
AddAmmo 4000_Ib_General-Purpose_Bomb
AddAmmo KAB-500KR
AddAmmo KAB-500L
AddAmmo KAB-500M64
AddAmmo KAB-500U
AddAmmo KAB-1500KR
AddAmmo KMG-U_II
AddAmmo largeBomb
AddAmmo smallBomb
AddAmmo napalm



ShootPointSecondary 53 17 -93 core 
ShootPointSecondary 53 17 93 core 
ShootPointSecondary 53 17 0 core 
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 6000
// ------------------------------------------------------ Passengers ------------------------------------------------------
Pilot 267 56 -9
Passengers 5
Passenger 1 -4 0 -2 core -1 1 -90 -88 dummygun BombSight
Passenger 2 267 56 9 core
Passenger 3 217 56 -9 core
Passenger 4 217 56 9 core
Passenger 5 -377 66 -2 core 125 235 -50 50 twentyThreeMM TailGun
heliGuiSeat 1 true
heliGUI bombsightgui
passengerZoom 1 0.5 
PassengerAimSpeed 9 4 4 0
flightCeiling 1330
GunOrigin 5 -395 74 4


///----HUD Stuff----/////
///R255 G255.B 0. = yellow/////

hasHUD 0 true
hudColorR 0 0
hudColorG 0 255
hudColorB 0 0


// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound PlaneA
StartSoundLength 60
PropSound JetEngine2
PropSoundLength 47
ShootSoundPrimary bomb
ShootSoundSecondary RocketFire2
PlaceSoundPrimary BF109_PlaceSound
// ------------------------------------------------------ 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 2 Repair
AddRecipeParts rightWing 1 lostWing
AddRecipeParts leftWing 1 lostWing
AddRecipeParts tail 2 Repair
AddRecipeParts engine 2 Repair
AddRecipeParts engine2 2 Repair
AddRecipeParts airframe 1 lostWing
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
// ------------------------------------------------------ Health and hitboxes ------------------------------------------------------

SetupPart airframe 2460 -149 36 -21 545 48 40
SetupPart tail 2460 -370 57 -10 121 143 19
SetupPart rightWing 300 -174 44 -342 100 6 290
SetupPart leftWing 300 -183 41 36 100 6 291
SetupPart engine 420 -370 36 -45 545 48 43
SetupPart engine2 420 -370 36 10 545 48 43
SetupPart core 100 258 47 -14 30 37 15


CollisionPoint 9 10 -80 rightWing
CollisionPoint 9 10 -60 rightWing
CollisionPoint 9 10 -40 rightWing
CollisionPoint 9 10 -20 rightWing
//LeftWing
CollisionPoint 9 10 80 leftWing
CollisionPoint 9 10 60 leftWing
CollisionPoint 9 10 40 leftWing
CollisionPoint 9 10 20 leftWing
//Nose
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
//Tail
CollisionPoint -60 15 0 tail

BulletDetection 25


//Collison Points

IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.21
CollisionDamageTimes 70

ReloadSoundPrimary PlaneBomb_reload1
ReloadTimePrimary 1
ReloadTimeSecondary 300
ReloadSoundSecondary PlaneBomb_reload1

EngineSoundRange 1000

//nu flight model

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

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


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

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

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

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

//if one 50 cal bullet is 10kg but there are 6 guns, enter 60kg
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
labjacFuel 720