Class_name = "CTurret"
object_name = "_SdKfz184_T0"

AimingRay=true

[COCKPIT_LIMITS]
x= -0.25, 0.04
y= -0.25, 0.12
z= -0.13, 0.17
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.25, 0.04
y= -0.25, 0.12
z= -0.13, 0.17
[END]

VisualImage=0,"graphics\Vehicles\_SdKfz184\_SdKfz184-C1-low.mgm",33
VisualImage=1,"graphics\Vehicles\_SdKfz184\_SdKfz184-C1.mgm",8
CollisionBody="graphics\Vehicles\_SdKfz184\_SdKfz184-C1.col"
HitBody="graphics\Vehicles\_SdKfz184\_SdKfz184-C1_DetColl.col"
KeepNetworkImages=true	//high-poly cockpit will be visible from other workstations of the object

//VisualImage=ID,model_or_effect,cast_shadows[,debris_effects]
//ID:					INT:	0 - visible everywhere, 1 - visible inside, 2 - visible outside
//model_or_effect:		STRING:	path to model file (mgm) of effect file (epl)
//cast_shadows: 		BOOL/INT:	cast shadows from object or not (cast_shadows=Attr1+Attr2+...+AttrN)
//						VIF_CASTSHADOWS=1,
//						VIF_BLENDMASKLAST=2,
//						VIF_ALWAYSONTOP=4,
//						VIF_FLATAMBIENT=8,
//						VIF_DONTCAST_COCKPIT_SHADOWS=16,
//						VIF_GRASS_CAPSULES=32
//[,debris_effects]:	BOOL:	optional parameter, show effects on object debris or not

ImageAttrs="IA_NOCLIP"
EnabledDecals=true	//      ,    
MaxDecals=64

TransparentCockpit=false	// If false - Attached bot will be not rendered if cockpit hatch is closed (default =true)
TurnParentForAim=true

//LocalPosRot=true
ConvexAnimThreshold=0.000001	//  

VisualRadius=5.0

mp_site=true

IsCritical=true	//true -       

TurretType = 11	//    ,    (, )
//11 -  
//12 -  
//13 -  

[attach=0]
	object = "LuaScripts/WorldObjects/Bots/BotTankSdKfz184_Gunner.txt"
	position = 0,0,0
	rotation = 0,0,0
	convex="bot_pos",false	//false: Attach object relative to "bot_pos" convex (not absolute)
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, 0.0
	rotation = 0,0,0
	object = "LuaScripts/WorldObjects/Vehicles/Sights/TurretCameraTankByAttach_x5_0.txt"
	convex="gunsight0",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=3]
	position = -0.1, 0.1, 0.0
	rotation = 0,0,-8
	object = "LuaScripts/WorldObjects/Vehicles/Sights/TurretCameraByAttach_Adjuster.txt"
	convex="gunsight0b",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=4]
	position = 0.0, 0.0, 0.0
	rotation = 0,0,0
	object = "LuaScripts/WorldObjects/Vehicles/Sights/_SdKfz184_T0_sight1.txt"
	convex="gunsight0",false	//false: Attach object relative to convex (not absolute)
[end]

[attach=5]
	position = 0.0, 0.0, 0.0
	rotation = 0,0,0
	object = "LuaScripts/WorldObjects/Vehicles/Sights/VisorCameraByAttach.txt"
	convex="visor0",false	//false: Attach object relative to convex (not absolute)
[end]

//AttachedCameras = "LuaScripts\WorldObjects\fixcameras\Vehicles\_SdKfz184_T.txt"

TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_RUS_152_HE_1005ms.bin"

SoundScript="LuaScripts/Sound/Vehicles/SdKfz184_Turret_Main.cfg"

Script="LuaScripts\ObjectScripts\Vehicles\_SdKfz184_T0.sc"

//FetchArgVal= cockpit_arg_num, transfer_number, default_cockpit_arg_val, interpolation_type (clamp - shortest on line scale, wrap - shortest on cyclic scale)

AimAngleLimit=2,10

DirectControl=true
DirectAimSpeed=1
DirectAimPower=3

[TurretsPos=0]
	position = -0.10844, 2.373, 0.0
	PosMoveArg = 21000
	SeatArg=22113
	SeatUpTime=3.5
	SeatDownTime=1.0

	HMDSingleEye = true
	LockTurretCamera = true
	KeepUserDirection = true	// Keep direction after user have switched to another pos or cockpit

	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -12.0
		SectorAngleMax = 12.0
		DefaultPos = 0.5

		AngularSpeed   = 1.3091
		ManualAngularSpeed = 1.3091	//55      , 3   
		PrecisionAngle = 0.5
		MaxInclineAngle = 30

		AnimationArgMin = 0.433333333
		AnimationArgMax = 0.566666667

		AnimationArgNum = 20
		ManualControlAnimationArgNum = 24
		NetworkSend = false	//     CockpitArg

		Point = 0.0, 0.0, 0.0
		Axis = 0.0,1.0,0.0

		SoundNumber = 2

		HaveManualControl=true
		HaveElectroControl=false
		HaveHydraulicControl=false
		HaveSelfPowered=false
	[end]

	[Joint=1]
		SectorAngleMin = -15.0
		SectorAngleMax = 7.5
		DefaultPos = 0.66666667

		AngularSpeed   = 2.596	//26      , 3   
		PrecisionAngle = 1

		AnimationArgMin = 0.333333333
		AnimationArgMax = 0.583333333

		AnimationArgNum = 30
		ManualControlAnimationArgNum = 340

		Point = 0,0,0
		Axis  = 0.0, 0.0, 1.0

		SoundNumber = 1

		GunMovement=true

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 64101
		CockingArg = 9103
	[end]

	[GunAnimation=1]
		FireArg = 60320
	[end]

//	FireLightArg=60220

	relativeBotStand = 0.0, 0.0, 0.0 // not used for tank
	relativeBotSit = 0.0, 0.0, 0.0 // not used for tank
	relativeBotDead = 0.0, 0.0, 0.0 // not used for tank
	TransitionStandPower = 1 // not used for tank
	TransitionDeadPower = 1 // not used for tank

	BotAttachJointId = 0
	BotFirstAnimJointId = 1
	BotSecondAnimJointId  = 0

	SightPosition = 0.0, 1, 0.0

	defaultDirection = 1.0, 0.0, 0.0
	AimSector=-14, 14, -4, 18	//AI aim limits: left, right, down, up

	CamDisplacement = 0.0, 0.00002, 0.0
[end]

[TurretsGun=0]
	LinkedTurretPos = 0
	//Convex = "#^gun1"
	DGroup="MainGun"
	DamageProp = 0.001
	AC = true //    tc_fire,  false
	MG = false //    tc_fire_secondary,  false
	
	ShowAutoReloading = true //   GUI      ( )

	Displacement = 4.76669, 0.00002, 0.0
	GunsightPosition = 0.0, 0.00002, 0.0
	GunType = "LuaScripts/WorldObjects/Weapons/_KwK-43.txt"
	ParallaxDistance = 1000000.0

	ReLoadingStagesTime = 2.0, 6.0, 2.0, 0.3
 
	TriggerPositionArgIdx = 9121	//        
//	FiringPinPositionArgIdx = 9102
//	DrawAnimationArgIdx = 0, 9104	//    
//	AmmunitionMovingArgIdx = 9105
//	AzimuthDeviationArgIdx = 9106
//	ElevationDeviationArgIdx = 9107
//	ReservedMagazinesArgIdx = 9108
//	RoundsInMagazineArgIdx = 0
	HideAmmunitionArgIdx = 9110
//	ReLoadingArgIdx = 9111
//	FlashAnimationArgIdx = 64101
	CartridgesTotalArgIdx = 9109
	MaxRoundsTotal = 50

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0
	BulletDispertionAngleCorrectionCoefficient = 1.0

	Deviation = 0.198, 0.198, 0.0, 0.01, 0.04, 0.08  //0.3   (  -34  -350)
	// /:
	//-      , /
	//-      , /
	//-       (0.9 -    0.1  ,   )
	//-    
	//-     
	//-      100/

	NumOfAnimations = 1

//	BushCoord = 0, 0, 0
//	BushSpeed = 0.0, 0.0, 0.0

//	BushConfig = "LuaScripts/WorldObjects/Trash/BatchTrashBush.txt"

	SoundNumber = 1
	unloadIfSwitched = true
	GunSightTypeArg = 9545

	PoisoningForce = 1.0	//   ,       
[end]

// Weapon Modes (unlocks). Tanks uses them just as filter.

//[WeaponMode0]
//	WMname="default"
//	WMgroup="default"
//[end]
//[WeaponMode1]
//	WMname="CAVITY"
//	WMgroup="1"
//[end]
//[WeaponMode3]
//	WMname="HVAP"
//	WMgroup="3"
//[end]
//[WeaponMode4]
//	WMname="HEAT"
//	WMgroup="4"
//[end]
//[WeaponMode5]
//	WMname="HE"
//	WMgroup="5"
//[end]



////////// AMMUNITIONS (PAYLOADS)


[Ammunition0]	//  (default, duplicates one of 2-types payload)
	name="0-KWK43-CV-25 + 0-KWK43-HE-25"
	WeaponModes=-1,-2,-3,-4,-5
	GunAmmunition0=3,43
	GunAmmunition1=50
[end]

////////// 3 TYPES

[Ammunition1]
	name="0-KWK43-CV-16 + 0-KWK43-HV-16 + 0-KWK43-HE-16"
	WeaponModes=135,-2,-4
	GunAmmunition0=5,25,45
	GunAmmunition1=50
[end]

// 3 types prevail

[Ammunition2]
	name="0-KWK43-CV-34 + 0-KWK43-HV-8 + 0-KWK43-HE-8"
	WeaponModes=135,-2,-4
	GunAmmunition0=2,28,48
	GunAmmunition1=50
[end]
[Ammunition3]
	name="0-KWK43-CV-8 + 0-KWK43-HV-34 + 0-KWK43-HE-8"
	WeaponModes=135,-2,-4
	GunAmmunition0=8,22,48
	GunAmmunition1=50
[end]
[Ammunition4]
	name="0-KWK43-CV-8 + 0-KWK43-HV-8 + 0-KWK43-HE-34"
	WeaponModes=135,-2,-4
	GunAmmunition0=8,28,42
	GunAmmunition1=50
[end]

// 3 types reduced

[Ammunition5]
	name="0-KWK43-CV-8 + 0-KWK43-HV-8 + 0-KWK43-HE-8"
	WeaponModes=135,-2,-4
	GunAmmunition0=8,28,48
	GunAmmunition1=50
[end]

////////// 2 TYPES

[Ammunition6]
	name="0-KWK43-CV-25 + 0-KWK43-HE-25"
	WeaponModes=15,-2,-3,-4
	GunAmmunition0=3,43
	GunAmmunition1=50
[end]
[Ammunition7]
	name="0-KWK43-CV-25 + 0-KWK43-HV-25"
	WeaponModes=13,-2,-4,-5
	GunAmmunition0=3,23
	GunAmmunition1=50
[end]
[Ammunition8]
	name="0-KWK43-HV-25 + 0-KWK43-HE-25"
	WeaponModes=35,-1,-2,-4
	GunAmmunition0=23,43
	GunAmmunition1=50
[end]

// 2 types prevail

[Ammunition9]
	name="0-KWK43-CV-42 + 0-KWK43-HV-8"
	WeaponModes=13,-2,-4,-5
	GunAmmunition0=1,28
	GunAmmunition1=50
[end]
[Ammunition10]
	name="0-KWK43-CV-8 + 0-KWK43-HV-42"
	WeaponModes=13,-2,-4,-5
	GunAmmunition0=8,21
	GunAmmunition1=50
[end]

[Ammunition11]
	name="0-KWK43-CV-42 + 0-KWK43-HE-8"
	WeaponModes=15,-2,-3,-4
	GunAmmunition0=1,48
	GunAmmunition1=50
[end]
[Ammunition12]
	name="0-KWK43-CV-8 + 0-KWK43-HE-42"
	WeaponModes=15,-2,-3,-4
	GunAmmunition0=8,41
	GunAmmunition1=50
[end]

[Ammunition13]
	name="0-KWK43-HV-42 + 0-KWK43-HE-8"
	WeaponModes=35,-1,-2,-4
	GunAmmunition0=21,48
	GunAmmunition1=50
[end]
[Ammunition14]
	name="0-KWK43-HV-8 + 0-KWK43-HE-42"
	WeaponModes=35,-1,-2,-4
	GunAmmunition0=28,41
	GunAmmunition1=50
[end]

// 2 types reduced

[Ammunition15]
	name="0-KWK43-CV-16 + 0-KWK43-HV-16"
	WeaponModes=13,-2,-4,-5
	GunAmmunition0=5,25
	GunAmmunition1=50
[end]
[Ammunition16]
	name="0-KWK43-CV-16 + 0-KWK43-HE-16"
	WeaponModes=15,-2,-3,-4
	GunAmmunition0=5,45
	GunAmmunition1=50
[end]
[Ammunition17]
	name="0-KWK43-HV-16 + 0-KWK43-HE-16"
	WeaponModes=35,-1,-2,-4
	GunAmmunition0=25,45
	GunAmmunition1=50
[end]

////////// 1 TYPE

[Ammunition18]
	name="0-KWK43-CV-50"
	WeaponModes=1,-2,-3,-4,-5
	GunAmmunition0=0
	GunAmmunition1=50
[end]
[Ammunition19]
	name="0-KWK43-HV-50"
	WeaponModes=3,-1,-2,-4,-5
	GunAmmunition0=20
	GunAmmunition1=50
[end]
[Ammunition20]
	name="0-KWK43-HE-50"
	WeaponModes=5,-1,-2,-3,-4
	GunAmmunition0=40
	GunAmmunition1=50
[end]

// 1 type reduced

[Ammunition21]
	name="0-KWK43-CV-25"
	WeaponModes=1,-2,-3,-4,-5
	GunAmmunition0=3
	GunAmmunition1=50
[end]
[Ammunition22]
	name="0-KWK43-HV-25"
	WeaponModes=3,-1,-2,-4,-5
	GunAmmunition0=23
	GunAmmunition1=50
[end]
[Ammunition23]
	name="0-KWK43-HE-25"
	WeaponModes=5,-1,-2,-3,-4
	GunAmmunition0=43
	GunAmmunition1=50
[end]



////////// GUN BELT AMMUNITIONS



[GunAmmunition0]
	RoundsInMagazine = 50
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition1]
	RoundsInMagazine = 42
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition2]
	RoundsInMagazine = 34
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition3]
	RoundsInMagazine = 25
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition5]
	RoundsInMagazine = 16
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition8]
	RoundsInMagazine = 8
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV_1000ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_CV.txt"
	GunSightTypeArgValue = 0.0
[end]

[GunAmmunition20]
	RoundsInMagazine = 50
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition21]
	RoundsInMagazine = 42
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition22]
	RoundsInMagazine = 34
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition23]
	RoundsInMagazine = 25
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition25]
	RoundsInMagazine = 16
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]
[GunAmmunition28]
	RoundsInMagazine = 8
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV_1130ms.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HV.txt"
	GunSightTypeArgValue = 0.0
[end]

[GunAmmunition40]
	RoundsInMagazine = 50
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]
[GunAmmunition41]
	RoundsInMagazine = 42
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]
[GunAmmunition42]
	RoundsInMagazine = 34
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]
[GunAmmunition43]
	RoundsInMagazine = 25
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]
[GunAmmunition45]
	RoundsInMagazine = 16
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]
[GunAmmunition48]
	RoundsInMagazine = 8
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/SHELL_GER_88_HE_kwk43.txt"
	GunSightTypeArgValue = 1.0
[end]

SightPos = 0.0, 1.3, 0.0
PositionChangeTime = 0.5
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0
ReloadDelay = 0.3
FreezeOnReload = false
AutoRecharge = true

BotRotaionValueZ = 0	// not used for tank
LegsParameter = 0 // not used for tank

BotMaxSecondAngle = 25.0 // not used for tank
BotMinSecondAngle = -5.0 // not used for tank

BotMaxFirstAngle  = 10.0 // not used for tank
BotMinFirstAngle  = -10.0  // not used for tank

FirstToSecondInterp = 0.0 // not used for tank

GunSightDistanceArg = 9544
GunSightYawArg = 9546
//GunSightTypeArg = 9545

//   ,         
//SectorLimits =  -45.0,  +45.0,  25.0, 90.0
//SectorLimits =	-180.0, -140.0, -15.0, 90.0
//SectorLimits =	 140.0,  180.0, -15.0, 90.0

//maxDamageArgValue=0.98
//DamageArg=5000
damageablePart=""

IsCritical=true	//true -       
LifeK=400			//         ( -  )

KillChildObjectsOnParentDeath = true

SphereHitProtection=80	//       

[SphereProtectionBoxOpen]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=150				//          ,     ,  ArmorFront
							//  5        
	ArmorFront=200
	ArmorBack=80
	ArmorTop=30
	ArmorBottom=25
	ArmorRight=30
	ArmorLeft=80
[end]

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=150				//          ,     ,  ArmorFront
							//  5        
	ArmorFront=200
	ArmorBack=80
	ArmorTop=30
	ArmorBottom=25
	ArmorRight=30
	ArmorLeft=80
[end]

////	Energy loss for bullet travel through HitBody convices	////

energyloss="",true,1,200	//     , true -       -,       ,        

energyloss="tower",true,1,1

//Damageable parts
energyloss="#^gun",true,20,20000				//Main gun
energyloss="#sight3_1053",false,1,1			//Gunner visor
energyloss="#sight4_1054",false,1,1			//Rear visor
energyloss="#^body1006_coll",false,0,1		//Dummy collision for visual damage, fixed part of gun mask
energyloss="#^mask1006a_coll",false,0,1		//Dummy collision for visual damage, moving part of gun mask
energyloss="#^mask1006b_coll",false,0,1		//Dummy collision for visual damage, moving part of gun mask
energyloss="#^mask1006c_coll",false,0,1		//Dummy collision for visual damage, detachable part of gun mask

//Armour

energyloss="#mask_4a",false,30,1			//Gun mask shield armour plate, 30mm, K=1.0, detach by arg 1016 = 0.99
energyloss="#mask_4b",false,30,1			//Gun mask shield armour plate, 30mm, K=1.0, detach by arg 1016 = 0.99
energyloss="#^top_12b",true,15,1			//Cabin aimer hatch armour plate, 15mm, K=1.0
energyloss="#^top_12c",true,15,1			//Cabin aimer hatch armour plate, 15mm, K=1.0
energyloss="#^top_12d",true,15,1			//Cabin aimer hatch armour plate, 15mm, K=1.0

energyloss="front_6a",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6b",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6c",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6d",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6e",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6f",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="front_6g",false,100,1		//Gun mask fixed part armour plate, 100mm, K=1.0
energyloss="mask_1",false,85,1			//Gun mask ball armouring, 100mm, K=0.85
energyloss="#mask_2",false,25,1			//Gun mask ball armouring, 30mm, K=0.85
energyloss="#mask_3",false,85,1			//Gun mask ball armouring, 100mm, K=0.85
energyloss="^top_hatch_1a",false,20,1	//Gunner hatch armour plate, 20mm, K=1.0
energyloss="^top_hatch_1b",false,20,1	//Gunner hatch armour plate, 20mm, K=1.0

[ReflectArmorBox]	//    ,    energyloss=0,1.    ,     ,   ,     Armor=
	FovH=90			//          ,     ,  ArmorFront
	FovV=90		//          ,     ,  ArmorFront
					//  5        
	ArmorFront=100
	ArmorBack=100
	ArmorTop=30
	ArmorBottom=30
	ArmorRight=30
	ArmorLeft=30
[end]

/////Functional Damage Groups

[DGroup=TurretTurn]		//   _SdKfz184.txt     DGroup
	IsCritical=false
	LifeK=200
	convex="turretGN_01",5,30000,"MT_ARMOR"
	[SphereHitArmorBox]	//+5  
		FovH=90
		FovV=90
		ArmorFront=80
		ArmorBack=65
		ArmorTop=30
		ArmorBottom=32
		ArmorRight=65
		ArmorLeft=65
	[end]
	LifeRateFrag=20000
	RepairSpeed=0.008333	// (2 )
	RepairSource=0
	InstantRepair=true
	GuiParam=12, true,true,true
[end]
[DGroup=GunTurn]		//   _KV1s.txt     DGroup
	IsCritical=false
	LifeK=100
	convex="turretVN_01",5,30000,"MT_ARMOR"
	[SphereHitArmorBox]	//+5  
		FovH=90
		FovV=90
		ArmorFront=80
		ArmorBack=65
		ArmorTop=30
		ArmorBottom=32
		ArmorRight=65
		ArmorLeft=65
	[end]
	LifeRateFrag=10000
	RepairSpeed=0.008333	// (2 )
	RepairSource=0
	InstantRepair=true
	RepairDependsOn="TurretTurn", 0.95
	GuiParam=14, true,true,true
[end]
[DGroup=MainGun]
	IsCritical=false
	LifeK=100
	convex="#^gun",30,50000,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=30
		ArmorBack=30
		ArmorTop=30
		ArmorBottom=30
		ArmorRight=30
		ArmorLeft=30
	[end]
	LifeRateFrag=25000
	RepairSpeed=0.008333	// (2 )
	RepairSource=0
	InstantRepair=true
	GuiParam=15, true,true,true
[end]
[DGroup=Body]
	IsCritical=true
	LifeK=20
	DamageArg=5000
	MinValidLife=0.02
[end]

//End of Functional Damage Groups
//Graphical Damage Groups:

[DGroup=Mask]
	IsCritical=false
	LifeK=50
	convex="#^body1006_coll",10,25000,"MT_ARMOR"
	convex="#^mask1006a_coll",10,25000,"MT_ARMOR"
	convex="#^mask1006b_coll",10,25000,"MT_ARMOR"
	convex="#^mask1006c_coll",10,25000,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=10
		ArmorBack=280
		ArmorTop=10
		ArmorBottom=10
		ArmorRight=10
		ArmorLeft=10
	[end]
	LifeRateFrag=25000
	DamageArg=1006
	DamageMaxVal=0.98
	RepairSpeed=0.066667	// (15 )
	RepairSource=4			//     ""
	InstantRepair=false
[end]
[DGroup=MaskShield]	// Detachable
	IsCritical=false
	LifeK=50
	convex="#mask_4a",30,20000,"MT_ARMOR"
	convex="#mask_4b",30,20000,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=60
		FovV=90
		ArmorFront=10
		ArmorBack=120
		ArmorTop=10
		ArmorBottom=10
		ArmorRight=10
		ArmorLeft=10
	[end]
	LifeRateFrag=20000
	DamageArg=1016
	RepairSpeed=0.066667	// (15 )
	RepairSource=4			//     ""
	InstantRepair=false
	RepairDependsOn="Mask", 0.95
[end]


[DGroup=Sight]
	IsCritical=false
	LifeK=100
	convex="#sight3_1053",1,500,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=20
		ArmorFront=1
		ArmorBack=1
		ArmorTop=1
		ArmorBottom=25
		ArmorRight=1
		ArmorLeft=1
	[end]
	LifeRateFrag=5000
	DamageArg=1053
	RepairSpeed=0.066667	// (15 )
	RepairSource=0
	InstantRepair=true
	GuiParam=16, true,true,true
[end]
[DGroup=Visor]
	IsCritical=false
	LifeK=100
	convex="#sight4_1054",1,500,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=20
		ArmorFront=1
		ArmorBack=1
		ArmorTop=1
		ArmorBottom=25
		ArmorRight=1
		ArmorLeft=1
	[end]
	LifeRateFrag=5000
	DamageArg=1054
	RepairSpeed=0.066667	// (15 )
	RepairSource=0
	InstantRepair=true
	RepairDependsOn="Sight", 0.95
	GuiParam=16, true,true,true
[end]

[Sights]	//AI will stop aim if all these groups damaged more than assigned level
	SightDGroup="Sight",0.9
[end]

[trashspawner]
	[spawn=0]
		solidtrash="LuaScripts\WorldObjects\Trash\TankTrash\_SdKfz184-trash_twr_mask1.txt"
		Position=0.517657,0.209657,0
		convex="Dummy-col_gun_elevate",false	//false: Attach object relative to convex (not absolute)
		SpawnDir=0,6,4
	[end]
	[spawn=1]
		solidtrash="LuaScripts\WorldObjects\Trash\TankTrash\_SdKfz184-trash_twr_mask2.txt"
		Position=0.517657,-0.096343,0
		convex="Dummy-col_gun_elevate",false	//false: Attach object relative to convex (not absolute)
		SpawnDir=0,2,-4
	[end]
	[spawn=2]
		solidtrash="LuaScripts\WorldObjects\Trash\TankTrash\_SdKfz184-trash_twr_mask1.txt"
		Position=0.517657,0.209657,0
		Rotation=0,180,0
		convex="Dummy-col_gun_elevate",false	//false: Attach object relative to convex (not absolute)
		SpawnDir=0,6,4
	[end]
	[spawn=3]
		solidtrash="LuaScripts\WorldObjects\Trash\TankTrash\_SdKfz184-trash_twr_mask2.txt"
		Position=0.517657,-0.096343,0
		Rotation=0,180,0
		convex="Dummy-col_gun_elevate",false	//false: Attach object relative to convex (not absolute)
		SpawnDir=0,2,-4
	[end]
[end]

//End of Graphical Damage Groups

[Entrance]
	EntrancePos= 1.0, 1.0, -2.2
	EntranceRot= 0,270,0
	JumpDir= 0,0,0
	GroundAligned= true
[end]

ColimatorHideArg=9547

//DefaultGun=0	//default=-1, all of the guns are active, switching belts in gun 0. >=0 sets default gun and switshing will be between guns

FixedHatch=false					// True -     
FixedWindow=false					// True -     
NoAimingWhenOpened=false				// True -      
NoAimingWhenClosed=false			// True -      
DenyDisabledTurretCamera=false		// True -         
NoVisorCameraWhenOpened=false		// True -   -   
CanopyOpenByDefault=false
WindowOpenByDefault=false
canopytime=3.5625	//   Arg=0  Arg=0.95.     Arg=0.1  Arg=0.9     (3 ),    0.95/0.8*5=3.5625.
windowtime=2.0

OpenCockpitArg=31
AutoCanopy=false
CockpitLightArg=30000,0.25,0.6,0.6
canopyLockSoundMask=2	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end

OpenWindowArg=33
AutoWindow=false
WindowLightArg=30010,0.3,0.4,0.6

TechChatCrewRole=3	//    (Driver: 1, Gunner: 3, Commander: 5, Machinegunner: 7, Radioman: 9)
NoTechChatHatch=false	//     (..  )

SetCockpitArgs=true	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

CockpitArg = -3, 0000, 0, 60210, 0.0, "smooth_clamp", 0.0, ""			// Electric point lights
CockpitArg = -3, 0000, 1, 60310, 0.0, "smooth_clamp", 0.0, ""			// Electric flood light
CockpitArg = -2, 0100, 0, 9109, 0.0, "", 0.0, "granted_single"			// 

CockpitArg = -2, 0151, 0, 9121, 0.0, "smooth_clamp", 0.1, "med_freq"	// TriggerPositionArgIdx, gun0
CockpitArg = -2, 0151, 1, 9110, 0.0, "", 0.0, "med_freq"				// HideAmmunitionArgIdx, gun0

CockpitArg = -2, 1150, 0, 24, 0.5, "smooth_clamp", 0.5, "low_freq"		// ManualControlAnimationArgNum, [Joint=0]
CockpitArg = -2, 1150, 1, 340, 0.5, "smooth_clamp", 0.5, "low_freq"		// ManualControlAnimationArgNum, [Joint=1]
CockpitArg = -2, 1150, 2, 9544, 0.0, "smooth_clamp", 0.5, "low_freq"	// GunSightDistanceArg
CockpitArg = -2, 1150, 3, 9546, 0.5, "smooth_clamp", 0.5, "low_freq"	// GunSightYawArg

VisorYawMin=-20
VisorYawArgMin=0.444444
VisorYawMax=+110
VisorYawArgMax=0.805556
VisorYawArg=40
VisorYawDefault=0
VisorYawSpeed=0.25
VisorPitchMin=-18
VisorPitchArgMin=0.4
VisorPitchMax=+18
VisorPitchArgMax=0.6
VisorPitchDefault=3.0
VisorPitchArg=35
VisorPitchSpeed=0.25
VisorResetWhileAim=false
VisorResetIfOpened=false
PrecisionAngle=2	//Rotation stop smoothing

[moveBotDeviator]
  HiFreqAmp = 0.2f
  MaxDeviation = 0.3f
  Periods = 2.1, 0.4;
[end]
accelBotDirK = 0.3
accelBotDirSmooth = 0.05
accelBotSideK = 0.3
accelBotSideSmooth = 0.05

[moveDeviator]
  HiFreqAmp = 0.2f
  MaxDeviation = 0.3f
  Periods = 2.1, 0.4;
[end]
accelDirK = 0.3
accelDirSmooth = 0.05
accelSideK = 0.3
accelSideSmooth = 0.05


[AimDistHE]
	AimDist= 0.0000,0
	AimDist= 0.0040,100
	AimDist= 0.0071,200
	AimDist= 0.0103,300
	AimDist= 0.0137,400
	AimDist= 0.0171,500
	AimDist= 0.0205,600
	AimDist= 0.0241,700
	AimDist= 0.0276,800
	AimDist= 0.0312,900
	AimDist= 0.0349,1000
	AimDist= 0.0387,1100
	AimDist= 0.0424,1200
	AimDist= 0.0463,1300
	AimDist= 0.0502,1400
	AimDist= 0.0542,1500
	AimDist= 0.0583,1600
	AimDist= 0.0624,1700
	AimDist= 0.0665,1800
	AimDist= 0.0708,1900
	AimDist= 0.0751,2000
	AimDist= 0.0795,2100
	AimDist= 0.0840,2200
	AimDist= 0.0885,2300
	AimDist= 0.0931,2400
	AimDist= 0.0978,2500
	AimDist= 0.1026,2600
	AimDist= 0.1074,2700
	AimDist= 0.1124,2800
	AimDist= 0.1174,2900
	AimDist= 0.1228,3000
	AimDist= 0.1280,3100
	AimDist= 0.1333,3200
	AimDist= 0.1387,3300
	AimDist= 0.1442,3400
	AimDist= 0.1498,3500
	AimDist= 0.1555,3600
	AimDist= 0.1613,3700
	AimDist= 0.1672,3800
	AimDist= 0.1732,3900
	AimDist= 0.1793,4000
	AimDist= 0.1857,4100
	AimDist= 0.1921,4200
	AimDist= 0.1987,4300
	AimDist= 0.2054,4400
	AimDist= 0.2122,4500
	AimDist= 0.2191,4600
	AimDist= 0.2262,4700
	AimDist= 0.2334,4800
	AimDist= 0.2408,4900
	AimDist= 0.2483,5000
	AimDist= 0.2559,5100
	AimDist= 0.2637,5200
	AimDist= 0.2716,5300
	AimDist= 0.2797,5400
[end]

[AimDistCV]
	AimDist= 0.0000,0
	AimDist= 0.0021,100
	AimDist= 0.0036,200
	AimDist= 0.0052,300
	AimDist= 0.0068,400
	AimDist= 0.0084,500
	AimDist= 0.0101,600
	AimDist= 0.0118,700
	AimDist= 0.0135,800
	AimDist= 0.0153,900
	AimDist= 0.0171,1000
	AimDist= 0.0189,1100
	AimDist= 0.0207,1200
	AimDist= 0.0225,1300
	AimDist= 0.0244,1400
	AimDist= 0.0263,1500
	AimDist= 0.0282,1600
	AimDist= 0.0302,1700
	AimDist= 0.0322,1800
	AimDist= 0.0342,1900
	AimDist= 0.0362,2000
	AimDist= 0.0383,2100
	AimDist= 0.0404,2200
	AimDist= 0.0425,2300
	AimDist= 0.0447,2400
	AimDist= 0.0469,2500
	AimDist= 0.0491,2600
	AimDist= 0.0514,2700
	AimDist= 0.0537,2800
	AimDist= 0.0560,2900
	AimDist= 0.0584,3000
[end]

//[AimDistAP]
//	AimDist= 0.0000,0
//[end]

//[AimDistHT]
//	AimDist= 0.0000,0
//[end]

//[AimDistSpHV]
//	AimDist= 0.0000,0
//[end]

//[AimDistHV]
//	AimDist= 0.0000,0
//[end]

//[AimDistMG]
//	AimDist= 0.0000,0
//[end]

GunGasPoisoning = 0.015, -1, 0.043, -1, -1, -1
//1 :       /.
//2 :    
//3 :       /.
//4 :    
//5 :    
//6..11 :    

GunsmokeHatchStart=0.3	//Used by object script

AttackDistance   = 4000.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 2500.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 1.0		//AI max aim distance versus air target

AIStartAimErrModifier = 1.0		//Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 1.0		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=180	//     