// ------------------------------------------------------ Naming ------------------------------------------------------
Name Nanchang Q-5 Fantan
ShortName Q-5
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon iconq5jia
Model pla.q5
Texture q5
//Third Person Camera Distance
CameraDistance 15.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.8
MaxNegativeThrottle 0.0
//Yaw modifiers
TurnLeftSpeed 2
TurnRightSpeed 2
//Pitch modifiers
LookUpSpeed 2.2
LookDownSpeed 2.2
//Roll modifiers
RollLeftSpeed 3.2
RollRightSpeed 3.2
//Drag 1.0 is standard. Modify to make the plane / heli more or less sluggish
Drag 0.38
//Lift (A lift : mass ratio of 1 : 1 should keep the plane perfectly level at full throttle
Lift 3.2
//Mass (In tons)
Mass 2.7
//Moment of Inertia (in crazy units. Just fiddle with this until you find something nice)
MomentOfInertia 10.0
//More bounciness means the vehicle will bounce more upon going up slopes, but fall through the ground less
//Wheels
NumWheels 3
WheelPosition 0 -9 -9 -38
WheelPosition 1 -9 -9 38
WheelPosition 2 68 -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
ShootParticlesPrimary flansmod.fmflame 0 0 0
ShootParticlesSecondary flansmod.fmflame 0 0 0
Secondary Bomb
//Time between shots in 1/20ths of seconds
ShootDelayPrimary 1
ShootDelaySecondary 5
//Whether to alternate or fire all together
AlternatePrimary False
AlternateSecondary True
//Firing modes. One of SemiAuto, FullAuto or Minigun
ModePrimary FullAuto
ModeSecondary SemiAuto
//Add shoot origins. These are the points on your vehicle from which bullets / missiles / shells / bombs appear
ShootPointPrimary 33 22 -28 leftWing rpd
ShootPointPrimary 31 9 -33 leftWing CVR7
ShootPointPrimary 31 5 -33 leftWing CVR7
ShootPointPrimary 31 7 -35 leftWing CVR7
ShootPointPrimary 31 7 -31 leftWing CVR7
ShootPointPrimary 33 22 28 rightWing rpd
ShootPointPrimary 31 9 33 rightWing CVR7
ShootPointPrimary 31 5 33 rightWing CVR7
ShootPointPrimary 31 7 35 rightWing CVR7
ShootPointPrimary 31 7 31 rightWing CVR7
ShootPointSecondary 27 -2 -11 bay
ShootPointSecondary -26 0 -11 bay
ShootPointSecondary 27 -2 11 bay
ShootPointSecondary -26 0 11 bay
// ------------------------------------------------------ Inventory ------------------------------------------------------
CargoSlots 0
BombSlots 4
MissileSlots 0
AllowAllAmmo False
AddAmmo largeBomb
AddAmmo smallBomb
AddAmmo napalm
AddAmmo PL-2
AddAmmo PL-5
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 6000
// ------------------------------------------------------ Passengers ------------------------------------------------------
Pilot 86 23 0
Passengers 0
// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound Mig15_idle
StartSoundLength 60
PropSound Mig15_engine
PropSoundLength 60
ShootSoundPrimary N37_Fire
ShootSoundSecondary bomb
// ------------------------------------------------------ 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 80 -12 3 -10 90 26 20
SetupPart tail 30 -90 7 -8 78 20 16
SetupPart leftWing 60 -21 4 -100 35 3 200
CollisionPoint 100 24 0 core
CollisionPoint 100 40 0 core
CollisionPoint -14 10 98 leftWing
CollisionPoint -14 10 -98 leftWing
CollisionPoint -78 68 0 tail
CollisionPoint -82 31 -32 tail
CollisionPoint -82 31 32 tail

BulletDetection 10


//Collison Points
IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.21
CollisionDamageTimes 20

//---New Stuff ---
BulletSpeed 3.5

//max speeds sea level and high alt when afterburning or WEPing
maxSpeed 1.93
highAltMax 1.78

//max speeds sea level and high alt when not afterburning dry thrust cruise speed
maxSpeedDry 1.45
highAltMaxDry 1.55

//max speed during a high energy death dive
diveBonus 2.0
//max speed when dying from low energy stall climb
stallSuffering 1.0

//bonus multiplier for gaining energy while diving
energyGainRate 0.8

//how fast energy is lost multiplier
energyLossRate 0.4

//maneuvrability multipliers applied when max energy, if low energy defaults to just x1  you can also use 0.x to simulate controls locking up at high speed
rollBonus 1.7
yawBonus 1.2
pitchBonus 1.3

//maneuvrability multiplier when low energy stall
rollStall 0.9
yawStall 0.8
pitchStall 0.7

hasAfterBurner true

AddEmitter flansmod.fmsmoke 1 [-135,29,7] [1,1,1] [-1,0,0] 0.25 0.5 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-135,29,7] [3,3,3] [-3,0,0] 0.75 2 0 1 leftWing
AddEmitter flansmod.fmsmoke 1 [-135,29,7] [1,1,1] [-1,0,0] 0.25 0.5 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-135,29,7] [3,3,3] [-3,0,0] 0.75 2 0 1 leftWing

AddEmitter flansmod.fmsmoke 1 [-135,29,-7] [1,1,1] [-1,0,0] 0.25 0.5 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-135,29,-7] [3,3,3] [-3,0,0] 0.75 2 0 1 rightWing
AddEmitter flansmod.fmsmoke 1 [-135,29,-7] [1,1,1] [-1,0,0] 0.25 0.5 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-135,29,-7] [3,3,3] [-3,0,0] 0.75 2 0 1 rightWing