//Naming
Name Panzerkampfvagen IV
ShortName panzerkampfvagenIV
ItemID 69012
//Visuals
Icon PanzerkampfvagenIV
Model rainfire.PanzerkampfvagenIV
Texture SkinPanzerkampfvagenIV
//Third Person Camera Distance
CameraDistance 12.0
//Throttle
MaxThrottle 1.08
MaxNegativeThrottle 0.2
//Steering modifiers
TurnLeftSpeed 0.42
TurnRightSpeed 0.42
//Drag
Drag 2.0
//For calculating whether wheels are on the ground or not for driving
WheelRadius 1.3
//The damage taken by the vehicle when falling. 1 = default calculated by height dropped from
FallDamageFactor 0.8
//Wheel positions for collision handling. Tanks still have 4 wheels, they are just the corner ones.
NumWheels 4
WheelPosition 0 -32 -9 -24
WheelPosition 1 -32 -9 24
WheelPosition 2 32 -9 24
WheelPosition 3 32 -9 -24
WheelSpringStrength 0.5
//Bouncy bouncy
Bounciness 0.3
//If true, then all wheels will apply drive forces
FourWheelDrive false
//Tank mode activate
Tank true
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 2500
//Inventory Slots
CargoSlots 4
ShellSlots 6
//Driver and passenger positions
Driver 0 25 0 -360 360 -8 20
RotatedDriverOffset -12 0 -2
Passengers 2
Passenger 1 25 5 11 core -35 35 -5 15 machinengewehr42 PassengerGun1
GunOrigin 1 25 2 11
Passenger 2 27 5 -9 core -360 360 -30 60
BarrelPosition 65 27.5 0
//Secondary gun
AddGun 20 27.6 6 turret machinengewehr42
//Delays are in ticks or 1/20ths of seconds
ShootDelay 1
ShellDelay 105
//Sounds
StartSound TankEngine
StartSoundLength 20
EngineSound PanzerIVGo
EngineSoundLength 30
ShootSoundPrimary 7.5cmKwK40
ShootSoundSecondary 30-06Fire
//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 turret 1 tankTurret 1 vehicleSeat
AddRecipeParts core 1 tankBody 1 vehicleSeat 4 blockIron
AddRecipeParts leftTrack 1 catTrack
AddRecipeParts rightTrack 1 catTrack
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
AddDye 6 black
AddDye 2 gray
AddDye 8 white
//Health and collision
SetupPart core 1000 -52 -4 -20 105 25 40 30
SetupPart turret 700 -33 23 -17 52 12 34 30
SetupPart rightTrack 200 -57 -9 20 114 23 10
SetupPart leftTrack 200 -67 -9 -36 114 23 10
BulletDetection 5
Description Armed with a 7.5cm KwK40 L/48 main gun.
RotateWheels True
AllowAllAmmo False
AddAmmo 7.5cmKwK40ShellHE
AddAmmo 7.5cmKwK40ShellAP
AddAmmo WW2_Shell_German75mmAP
AddAmmo shell
IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.35
CollisionDamageTimes 50
BulletSpeed 7
BulletSpread 3
ModelScale 0.8
SetPlayerInvisible false
DriverAimSpeed 1.6 1.5 0
DriverYawBeforePitch false
DriverTraverseSounds true
YawSound TurretTraverse1
YawSoundLength 21
PitchSound TurretTraverse2
PitchSoundLength 20
//Scope
hasScope true
nightScope false
Gunsight mwbarrett
gunsightZoom 2.5
//Shoot stuff
ShootParticlesPrimary explode 0.2 0 0
ShootParticlesPrimary explode 0.4 0 0
ShootParticlesPrimary smoke 0.4 0 0
ShootParticlesPrimary cloud 0.2 0 0
ShootParticlesSecondary cloud 0.2 0 0
ShootParticlesSecondary flansmod.fmflame 0.2 0 0

//Smonk stuff
AddEmitter cloud 1 [-47,13,-3] [1,1,1] [-0.5,-0.5,0] 0.2 0.3 0 1 core
AddEmitter explode 1 [-47,13,-3] [1,1,1] [-0.75,-0.5,0] 0.4 0.6 0 1 core
AddEmitter explode 2 [-47,13,-3] [1,1,1] [-0.75,-1.5,0] 0.6 0.8 0 1 core
AddEmitter largesmoke 2 [-47,13,-3] [1,1,1] [-0.75,-0.5,0] 0.8 1 0 1 core

//Owie
AddEmitter largesmoke 2 [-47,13,-3] [1,1,1] [0,1.5,0] -1 1 0 0.4 core
AddEmitter flame 1 [-47,13,-3] [1,1,1] [0,0.5,0] -1 1 0 0.25 core
AddEmitter largesmoke 3 [-47,13,-3] [1,1,1] [0,1,0] -1 1 0 0.25 core