module Base
{
	model 88toyotaHiluxCabN
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Body|88hilux_ncab,
		shader = damn_vehicle_shader,
		invertX = FALSE,
		scale = 0.1,
	}
	model 88toyotaHiluxInteriorCabN
	{
		mesh = vehicles/Vehicles_88toyotaHilux_Body|88hilux_interior_ncab,
		texture = vehicles/Vehicles_88toyotaHilux_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	vehicle 88toyotaHiluxSC
	{
		mechanicType = 2,
		offRoadEfficiency = 1.12,
		engineRepairLevel = 4,
		playerDamageProtection = 1.3,

		model
		{
			file = 88toyotaHiluxBase,
			scale = 0.9000,
			offset = 0.0000 0.5333 -0.1778,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_beige,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_black,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_brown,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_darkBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_darkGreen,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_forestGreen,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_darkGray,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_darkGreyDecals,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_junker,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_lightBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_red,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_silver,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_superWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_88toyotaHilux_Shell_offWhiteDecals,
		}

		textureRust = Vehicles/Vehicles_88toyotaHilux_Rust,
		textureMask = Vehicles/Vehicles_88toyotaHilux_Mask,
		textureLights = Vehicles/Vehicles_88toyotaHilux_Lights,
		textureDamage1Shell = Vehicles/Vehicles_88toyotaHilux_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_88toyotaHilux_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_88toyotaHilux_Blood1,
		textureDamage2Overlay = Vehicles/Vehicles_88toyotaHilux_Blood1,

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

		extents = 1.6889 1.1778 4.5556,
		mass = 680,
		physicsChassisShape = 1.6889 1.2222 4.5556,
		centerOfMassOffset = 0.0000 0.8667 -0.1889,
		shadowExtents = 1.7321 4.7372,
		shadowOffset = 0.0000 -0.1214,
		engineForce = 3950,
		maxSpeed = 80f,
		engineLoudness = 85,
		engineQuality = 94,
		brakingForce = 65,
		stoppingMovementForce = 4.0f,
		rollInfluence = 0.98f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 35,
		suspensionCompression = 3.84,
		suspensionDamping = 2.84,
		maxSuspensionTravelCm = 14,
		suspensionRestLength = 0.20f,
		wheelFriction = 1.7f,
		frontEndHealth = 450,
		rearEndHealth = 250,
		seats = 2,

		wheel FrontLeft
		{
			front = true,
			offset = 0.7444 -0.4667 1.5444,
			radius = 0.35f,
			width = 0.25f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.7444 -0.4667 1.5444,
			radius = 0.35f,
			width = 0.25f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.7444 -0.4667 -1.1444,
			radius = 0.35f,
			width = 0.25f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.7444 -0.4667 -1.1444,
			radius = 0.35f,
			width = 0.25f,
		}

		template = PassengerSeat2,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.4111 0.0444 0.2222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1444 -0.7926 -0.2111,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.4000 0.0444 0.2222,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1667 -0.7926 -0.1556,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 2.4778 1.4222 0.7778,
		}

		area TruckBed
		{
			xywh = 0.0000 -2.8556 1.4000 0.7778,
		}

		area Roofrack
		{
			xywh = 0.0000 -1.4000 2.9778 3.4889,
		}

		area SeatFrontLeft
		{
			xywh = 1.2333 0.2333 0.7778 1.1111,
		}

		area SeatFrontRight
		{
			xywh = -1.2333 0.2333 0.7778 1.1111,
		}

		area SeatRearLeft
		{
			xywh = 1.2333 -0.5667 0.7778 0.4889,
		}

		area SeatRearRight
		{
			xywh = -1.2333 -0.5667 0.7778 0.4889,
		}

		area GasTank
		{
			xywh = -1.4444 -1.0000 0.4222 0.4222,
		}

		area TireFrontLeft
		{
			xywh = 1.4444 1.3667 0.4222 0.4222,
		}

		area TireFrontRight
		{
			xywh = -1.4444 1.3667 0.4222 0.4222,
		}

		area TireRearLeft
		{
			xywh = 1.4444 -1.3222 0.4222 0.4222,
		}

		area TireRearRight
		{
			xywh = -1.4444 -1.3222 0.4222 0.4222,
		}

		template = HLX88SeatsFront,
		template = HLX88Trunk,
		template = HLX88TrunkDoorSC,
		template = HLX88EngineDoor,

		template = HLX88Doors,
		template = HLX88ArmorSC,
		template = HLX88BumpersSC,
		template = HLX88Tires,
		template = HLX88SpareTire,
		
		template = HLX88SideSteps,
		template = HLX88MudflapsSC,
		template = HLX88RoofrackSC,

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

			model 88toyotaHiluxCabBackN
			{
				file = 88toyotaHiluxCabN,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			model 88toyotaHiluxBedN
			{
				file = 88toyotaHiluxBed,
				offset = 0.0000 0.0000 0.4047,
				rotate = 0.0000 0.0000 0.0000,
			}

			model 88toyotaHiluxIntCom
			{
				file = 88toyotaHiluxInterior,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			model 88toyotaHiluxIntCabBackN
			{
				file = 88toyotaHiluxInteriorCabN,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}

			model 88toyotaHiluxIntBedN
			{
				file = 88toyotaHiluxInteriorBed,
				offset = 0.0000 0.0000 0.4047,
				rotate = 0.0000 0.0000 0.0000,
			}

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

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

		template = GasTank,

		part GasTank
		{
			install
			{
				skills = Mechanics:7,
				recipes = Intermediate Mechanics,
			}

			uninstall
			{
				skills = Mechanics:7,
				recipes = Intermediate Mechanics,
			}
		}

		template = Battery,

		part Battery
		{
			model 88hiluxBat
			{
				file = 88toyotaHiluxTISBattery,
				offset = 0.0000 0.0000 0.0000,
				rotate = 0.0000 0.0000 0.0000,
			}
		}

		template = Engine,
		template = Muffler,

		part Heater
		{
			category = engine,

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

		part PassengerCompartment
		{
			category = nodisplay,

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

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Radio,
		template = Headlight,
        template = HLX88WindshieldsSC,
		template = HLX88WindowsFront,
        template = HLX88BedExtrasSC,
		useChassisPhysicsCollision = false,

		physics box
		{
			offset = 0.0000 0.6111 -0.1695,
			extents = 1.7111 0.7111 4.5333,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 1.2000 -0.0218,
			extents = 1.4000 0.5111 0.6667,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 1.0778 0.4702,
			extents = 1.4000 0.7556 0.3333,
			rotate = -46.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.2227 -2.3352,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.2227 2.3686,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
