module Base
{
	model GAZ21VLAD
	{
		mesh = vehicles/Vehicle_GAZ21_Body|GAZ21Body,
		shader = vehicle_norandom_multiuv_noreflect,
		invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_hood_door
	{
		mesh = vehicles/Vehicle_GAZ21_Body|Hood,
		shader = vehicle_norandom_multiuv_noreflect,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_windshield
	{
		mesh = vehicles/Vehicle_GAZ21_Body|gaz21windshield,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_FL_window
	{
		mesh = vehicles/Vehicle_GAZ21_Body|FL_window,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_FR_window
	{
		mesh = vehicles/Vehicle_GAZ21_Body|FR_window,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_RL_window
	{
		mesh = vehicles/Vehicle_GAZ21_Body|RL_window,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_RR_window
	{
		mesh = vehicles/Vehicle_GAZ21_Body|RR_window,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_rear_windshield
	{
		mesh = vehicles/Vehicle_GAZ21_Body|gaz21_rear_windshield,
		shader = vehicle_multiuv,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLAD_plate_old
	{
		mesh = vehicles/Vehicle_GAZ21_Body|plate_old,
		shader = vehicle_norandom_multiuv_noreflect,
                invertX = false,
		scale = 1,
	}
	model GAZ21VLADfrontwheelleft
	{
		mesh = vehicles/Vehicle_GAZ21_Body|Wheel_GAZ21CAP_L,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21VLADfrontwheelright
	{
		mesh = vehicles/Vehicle_GAZ21_Body|Wheel_GAZ21CAP_R,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21VLADbackwheelleft
	{
		mesh = vehicles/Vehicle_GAZ21_Body|Wheel_GAZ21CAP_L,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	model GAZ21VLADbackwheelright
	{
		mesh = vehicles/Vehicle_GAZ21_Body|Wheel_GAZ21CAP_R,
		texture = vehicles/Vehicle_GAZ21_wheel,
	}
	vehicle GAZ21VLAD
	{
		mechanicType = 3,
		offRoadEfficiency = 50,
		engineRepairLevel = 4,
		playerDamageProtection = 3,

		model
		{
			file = GAZ21VLAD,
			scale = 1.8000,
			offset = 0.0000 0.2278 0.0000,
		}

		skin
		{
			texture = Vehicles/Vehicle_GAZ21_VLAD,
		}

		textureMask = Vehicles/Vehicle_GAZ21_Mask,
		textureLights = Vehicles/Vehicle_GAZ21_lights,
		textureDamage1Overlay = Vehicles/Vehicle_GAZ21_Blood_Mask,
		textureDamage2Overlay = Vehicles/Vehicle_GAZ21_Blood_Hvy,
		textureDamage1Shell = Vehicles/Vehicle_GAZ21_DAMAGE1,
		textureDamage2Shell = Vehicles/Vehicle_GAZ21_DAMAGE2,
		textureRust = Vehicles/Vehicle_GAZ21_Rust,

		sound
		{
			engine = VehicleEngineOffRoad,
			engineStart = VehicleEngineOffRoad,
			engineTurnOff = VehicleEngineOffRoad,
			horn = VehicleHornJeep,
			ignitionFail = VehicleIgnitionFailOffRoad,
		}

		extents = 0.8111 0.4778 2.0222,
		mass = 1350,
		physicsChassisShape = 0.7111 0.5222 1.9000,
		centerOfMassOffset = 0.0000 0.2611 0.0000,
		shadowExtents = 0.7315 1.9009,
		shadowOffset = 0.0000 -0.0005,
		engineForce = 3500,
		engineQuality = 50,
		engineLoudness = 85,
		maxSpeed = 40f,
		gearRatioCount = 4,
		gearRatioR = 5.09,
		gearRatio1 = 1.44,
		gearRatio2 = 2.29,
		gearRatio3 = 3,
		gearRatio4 = 4,
		brakingForce = 25,
		rollInfluence = 0.5f,
		steeringIncrement = 0.03,
		steeringClamp = 0.28,
		suspensionStiffness = 40,
		suspensionCompression = 1.83,
		suspensionDamping = 0.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.4f,
		frontEndHealth = 100,
		rearEndHealth = 100,
		seats = 4,

		part Plate_old
		{
			category = nodisplay,

			model Plate_old
			{
				file = GAZ21VLAD_plate_old,
			}

			lua
			{
				init = ATATuning2.Init.setAllModelsVisible,
			}
		}

		template = EngineDoor,

		part EngineDoor
		{
			model EngineDoor
			{
				file = GAZ21VLAD_hood_door,
			}

			table install
			{
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = TrunkDoor,

		part TrunkDoor
		{
			table install
			{
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = Windshield/part/Windshield,

		part Windshield
		{
			category = bodywork,

			model Windshield
			{
				file = GAZ21VLAD_windshield,
			}

			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Window/part/WindowFrontLeft,

		part WindowFrontLeft
		{
			parent = DoorFrontLeft,
			category = door,

			model WindowFrontLeft
			{
				file = GAZ21VLAD_FL_window,
			}
		}

		template = Window/part/WindowFrontRight,

		part WindowFrontRight
		{
			parent = DoorFrontRight,
			category = door,

			model WindowFrontRight
			{
				file = GAZ21VLAD_FR_window,
			}
		}

		template = Window/part/WindowRearLeft,

		part WindowRearLeft
		{
			parent = DoorRearLeft,
			category = door,

			model WindowRearLeft
			{
				file = GAZ21VLAD_RL_window,
			}
		}

		template = Window/part/WindowRearRight,

		part WindowRearRight
		{
			parent = DoorRearRight,
			category = door,

			model WindowRearRight
			{
				file = GAZ21VLAD_RR_window,
			}
		}

		part Window*
		{
			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Windshield/part/WindshieldRear,

		part WindshieldRear
		{
			category = bodywork,

			model WindshieldRear
			{
				file = GAZ21VLAD_rear_windshield,
			}

			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		wheel FrontLeft
		{
			front = true,
			offset = 0.3111 -0.2500 0.6667,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3167 -0.2500 0.6667,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3111 -0.2444 -0.4889,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3167 -0.2444 -0.4889,
			radius = 0.15f,
			width = 0.2f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.1556 -0.0500 0.0611,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6556 -0.4111 0.0556,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.1611 -0.0500 0.0611,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6556 -0.4778 0.0500,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.1556 -0.0611 -0.3167,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.6556 -0.4111 -0.4111,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.1556 -0.0611 -0.3167,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.6500 -0.4111 -0.3778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.2333 0.5222 0.4556,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.2000 0.5222 0.3778,
		}

		area SeatFrontLeft
		{
			xywh = 0.6278 0.1778 0.4556 0.4000,
		}

		area SeatFrontRight
		{
			xywh = -0.6278 0.1778 0.4556 0.4000,
		}

		area SeatRearRight
		{
			xywh = -0.6278 -0.2167 0.4556 0.3667,
		}

		area SeatRearLeft
		{
			xywh = 0.6278 -0.2167 0.4556 0.3667,
		}

		area GasTank
		{
			xywh = 0.5500 -0.7722 0.2889 0.3000,
		}

		area TireFrontLeft
		{
			xywh = 0.6278 0.6500 0.4556 0.4556,
		}

		area TireFrontRight
		{
			xywh = -0.6278 0.6500 0.4556 0.4556,
		}

		area TireRearLeft
		{
			xywh = 0.6278 -0.4889 0.4556 0.4556,
		}

		area TireRearRight
		{
			xywh = -0.6278 -0.4889 0.4556 0.4556,
		}

		template = Trunk/part/TruckBed,

		part TruckBed
		{
			itemType = Base.SmallTrunk,
		}

		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,

		part Seat*
		{
			table install
			{
				skills = Mechanics:2,
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:2,
				recipes = Basic Mechanics,
			}
		}

		part GloveBox
		{
			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,

			container
			{
				capacity = 7,
				test = Vehicles.ContainerAccess.GloveBox,
			}

			lua
			{
				create = Vehicles.Create.Default,
			}
		}

		template = GasTank,

		part GasTank
		{
			install
			{
				skills = Mechanics:4,
				recipes = Basic Mechanics,
			}

			uninstall
			{
				skills = Mechanics:4,
				recipes = Basic Mechanics,
			}
		}

		template = Battery,
		template = Engine,
		template = Muffler,

		part Muffler
		{
			table install
			{
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		part Window*
		{
			table install
			{
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,
		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,

		part Door*
		{
			table install
			{
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				recipes = Basic Mechanics,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = GAZ21VLADfrontwheelleft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = GAZ21VLADfrontwheelright,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = GAZ21VLADbackwheelleft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = GAZ21VLADbackwheelright,
			}
		}

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:3,
				recipes = Basic Mechanics,
			}
		}

		template = Headlight,

		attachment trailerfront
		{
			offset = 0.0000 -0.2761 1.2270,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.2299 -1.2356,
			rotate = 0.0000 0.0000 0.0000,
		}
	}
}
