<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="carFillable">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <storeData>
        <name>BMW E30 Touring</name>
        <specs>
            <power>200</power>
            <maxSpeed>180</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_car</function>
        </functions>
        <image>store_BMWe30.png</image>
        <price>7800</price>
        <lifetime>900</lifetime>
        <rotation>0</rotation>
        <brand>BMW</brand>
        <category>cars</category>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_car</typeDesc>
        <filename>BMWe30Combi.i3d</filename>
        <size width="1.8" length="4.5" height="1.7"/>
        <components count="1">
            <component centerOfMass="0.00 0.3 -0.15" solverIterationCount="10" mass="1390" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="CAR" />
        <mapHotspot type="CAR" />
        <sounds filename="$data/vehicles/skoda/kodiaq/sounds/kodiaq.xml"/>
    </base>

    <wheels>
        <wheelConfigurations>
			<wheelConfiguration name="Michelin winter" price="2500">
				<wheels autoRotateBackSpeed="2.5">
                    <wheel filename="wheels/wheels.xml"  isLeft="true" hasParticles="true" hasTireTracks="true">
                        <physics rotSpeed="1" restLoad="0.7" repr="wheelFrontLeft" driveNode="wheelFrontLeftTire" forcePointRatio="0.5" initialCompression="15" suspTravel="0.12" spring="12" damper="3" frictionScale="2.5" transRatio="0.95"/>
                    </wheel>
                    <wheel filename="wheels/wheels.xml" isLeft="false" hasParticles="true" hasTireTracks="true">
                        <physics rotSpeed="1" restLoad="0.7" repr="wheelFrontRight" driveNode="wheelFrontRightTire" forcePointRatio="0.5" initialCompression="15" suspTravel="0.12" spring="12" damper="3" frictionScale="2.5" transRatio="0.95"/>
                    </wheel>
                    <wheel filename="wheels/wheels.xml"  isLeft="true" hasParticles="true" hasTireTracks="true">
                        <physics rotSpeed="0" restLoad="0.5" repr="wheelBackLeft" driveNode="wheelBackLeftTire" forcePointRatio="0.5" initialCompression="15" suspTravel="0.18" spring="14" damper="3" frictionScale="3" transRatio="0.95"/>
                    </wheel>
                    <wheel filename="wheels/wheels.xml" isLeft="false" hasParticles="true" hasTireTracks="true">
                        <physics rotSpeed="0" restLoad="0.5" repr="wheelBackRight" driveNode="wheelBackRightTire" forcePointRatio="0.5" initialCompression="15" suspTravel="0.18" spring="14" damper="3" frictionScale="3" transRatio="0.95"/>
                    </wheel>
				</wheels>		
            </wheelConfiguration>
        </wheelConfigurations>
        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="50" rotMax="-42" rotCenterWheel1="3" rotCenterWheel2="4" />
        </ackermannSteeringConfigurations>
    </wheels>

    <lights>
	
        <states>
            <state lightTypes="0" />
			<state lightTypes="0 3" />
        </states>
		<realLights>
		    <low>
				<light node="0>7|2|0" lightTypes="0" />
				<light node="0>7|2|1" lightTypes="3" />
            </low>
            <high>
				<light node="0>7|2|2" lightTypes="0" />
				<light node="0>7|2|3" lightTypes="3" />
				<light node="0>7|2|4" lightTypes="0" />	
				<light node="0>7|2|8" lightTypes="0" />	
				<brakeLight node="0>7|2|4" />				
                <turnLightLeft node="0>7|2|5" />
                <turnLightRight node="0>7|2|6" />
				<reverseLight node="0>7|2|7" />
            </high>
        </realLights>
		
        <defaultLights>
			<defaultLight shaderNode="0>8|1|0" lightTypes="0" intensity="100" />
			<defaultLight shaderNode="0>8|1|1" lightTypes="3" intensity="165" />
			<defaultLight shaderNode="0>8|1|3" lightTypes="0" intensity="2" />
			<defaultLight shaderNode="0>8|4|0" lightTypes="0" intensity="0.5" />
			
			<defaultLight shaderNode="0>8|4|1|0|0" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|2|0|0" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|3|0" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|4|0|0" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|5|0|0" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|6" lightTypes="0" intensity="0.5" />
			<defaultLight shaderNode="0>8|4|13" lightTypes="3" intensity="3.5" />
			<defaultLight shaderNode="0>8|4|11" lightTypes="0" intensity="3.5" />
		</defaultLights>
		
		<brakeLights>
			<brakeLight shaderNode="0>8|1|2" intensity="3.9"/>
		</brakeLights>
		
		<reverseLights>
			<reverseLight shaderNode="0>8|1|6" />	
		</reverseLights>
		
		<turnLights>
            <turnLightLeft shaderNode="0>8|1|8" intensity="2"/>
			<turnLightLeft shaderNode="0>8|1|5" intensity="2"/>
		    <turnLightRight shaderNode="0>8|1|4" intensity="2"/>
			<turnLightRight shaderNode="0>8|1|7" intensity="2"/>
			<turnLightLeft shaderNode="0>8|4|10" intensity="2.55"/>
			<turnLightRight shaderNode="0>8|4|14" intensity="2.55"/>
		</turnLights>
		
		<dashboards>
			<dashboard displayType="ROT"     valueType="turnLight"       node="0>8|5|0|0" minRot="0 0 -12" maxRot="0 0 12" doInterpolation="true" />
        </dashboards>
    </lights>

    <attacherJoints>
        <attacherJointConfigurations title="$l10n_configuration_trailerHitch" isYesNoOption="true">
            <attacherJointConfiguration name="$l10n_configuration_valueNo"/>
                <attacherJointConfiguration name="$l10n_configuration_valueYes" price="500">
                    <attacherJoint node="0>10|2" jointType="trailerCar" lowerRotLimit="25 65 50" allowsJointLimitMovement="false" comboTime="1" canTurnOnImplement="false">
                        <schema position="1 0" rotation="0" invertX="false" />
                    </attacherJoint>
					<attacherJoint node="0>10|2" jointType="trailer" lowerRotLimit="25 65 50" allowsJointLimitMovement="false" comboTime="1" canTurnOnImplement="false">
                        <schema position="1 0" rotation="0" invertX="false" />
                    </attacherJoint>
					<attacherJoint node="0>10|2" jointType="trailerLow" lowerRotLimit="25 65 50" allowsJointLimitMovement="false" comboTime="1" canTurnOnImplement="false">
                        <schema position="1 0" rotation="0" invertX="false" />
                    </attacherJoint>
                    <objectChange node="0>10" visibilityActive="true" visibilityInactive="false"/>
            </attacherJointConfiguration>
        </attacherJointConfigurations>
    </attacherJoints>
	
    <connectionHoses>
        <target attacherJointIndices="1 2 3" type="electric" node="0>10|1" socket="electric"/>
    </connectionHoses>

    <licensePlates defaultPlacement="BOTH">
		<licensePlate node="licensePlateFront" position="FRONT" preferedType="ELONGATED" placementArea="0.10 0.3 0.10 0.3"/>
        <licensePlate node="licensePlateBack"  position="BACK"  preferedType="ELONGATED" placementArea="0.06 0.3 0.15 0.3"/>
    </licensePlates>

    <enterable isTabbable="true" >
        <enterReferenceNode node="0>"/>
        <exitPoint node="0>6"/>
        <cameras count="2">
            <camera node="0>1|0|0" rotatable="true" rotateNode="0>1|0" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="3.5" transMax="40" translation="0 0 5.75" rotation="-10 180 0">
                <raycastNode node="0>1|2"/>
                <raycastNode node="0>1|3"/>
	        	<raycastNode node="0>1|4"/>
            </camera>
            <camera node="0>1|1" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" positionSmoothingParameter="0"  shadowFocusBox="0>1|5"/>
        </cameras>
		
        <mirrors>
            <mirror node="0>8|3|3|0"     prio="1"/>
            <mirror node="0>8|3|5|0"    prio="1"/>
            <mirror node="0>8|3|4|0" prio="2"/>
        </mirrors>
		
        <characterNode node="0>4|0" cameraMinDistance="0.35" spineRotation="-90 0 90" >
            <target ikChain="rightFoot" targetNode="0>4|1" />
            <target ikChain="leftFoot"  targetNode="0>4|2" />
            <target ikChain="rightArm"  targetNode="0>2|0|1"/>
            <target ikChain="leftArm"   targetNode="0>2|0|2"/>
        </characterNode>
		
		<passengerSeats>
            <passengerSeat node="passengerSeat01" exitPoint="passengerSeat01ExitPoint" outdoorCameraIndex="1">
                <camera node="passengerSeat01Camera" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" positionSmoothingParameter="0" shadowFocusBox="0>1|5"/>
                <characterNode node="passengerSeat01PlayerSkin" cameraMinDistance="0.35">
                    <target ikChain="leftArm"   targetNode="passengerSeat01PlayerLeftHand" />
                    <target ikChain="rightArm"  targetNode="passengerSeat01PlayerRightHand" />
                    <target ikChain="leftFoot"  targetNode="passengerSeat01PlayerLeftFoot" />
                    <target ikChain="rightFoot" targetNode="passengerSeat01PlayerRightFoot" />
                </characterNode>
            </passengerSeat>
        </passengerSeats>
    </enterable>

    <drivable>
        <steeringWheel node="0>2|0" indoorRotation="540" outdoorRotation="60" />
		<dashboards>
            <dashboard displayType="ROT" valueType="accelerationAxis" node="0>8|5|6|0"   minRot="0 0 0" maxRot="20 0 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
            <dashboard displayType="ROT" valueType="decelerationAxis" node="0>8|5|5|0" minRot="0 0 0" maxRot="-20 0 0" doInterpolation="true" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </drivable>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="diesel" capacity="62" >
					    <dashboard displayType="ANIMATION" valueType="fillLevel" animName="loadingBarFuel" groups="MOTOR_ACTIVE"/>
                        <exactFillRootNode node="0>7|1|0" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <motorized>
        <consumerConfigurations>
            <consumerConfiguration>
                <consumer fillUnitIndex="1" usage="18" fillType="diesel" /> <!-- usage is per hour at max load and max rpm -->
            </consumerConfiguration>
        </consumerConfigurations>

        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>  
                    <differential torqueRatio="0.5" maxSpeedRatio="1.7" wheelIndex1="3" wheelIndex2="4" /> 
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>

        <motorConfigurations>
           <motorConfiguration name="E30 1.8" hp="200">
                <motor torqueScale="0.515" minRpm="850" maxRpm="6000" maxForwardSpeed="180" maxBackwardSpeed="30" brakeForce="1.35" lowBrakeForceScale="0.1" dampingRateScale="0.1">
                    <torque rpm="1000" torque="0.9"/>
                    <torque rpm="2400" torque="1"/>
                    <torque rpm="3480" torque="1"/>
                    <torque rpm="4560" torque="0.87"/>
                    <torque rpm="5280" torque="0.85"/>
                    <torque rpm="6000" torque="0.8"/>
                </motor>
                <transmission autoGearChangeTime="1" gearChangeTime="0.4" name="$l10n_info_transmission_manual" axleRatio="18" startGearThreshold="0.15">
                    <directionChange useGear="true"/>
                    <backwardGear gearRatio="2.9" name="R"/>
                    <forwardGear gearRatio="2.6"/>
                    <forwardGear gearRatio="1.6"/>
                    <forwardGear gearRatio="1.1"/>
                    <forwardGear gearRatio="0.726"/>
                    <forwardGear gearRatio="0.633"/>
                </transmission>
            </motorConfiguration>
        </motorConfigurations>

        <exhaustEffects>
            <exhaustEffect node="0>3|0" filename="$data/effects/exhaust/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.1" maxRpmColor="0.9 0.9 0.9 0.4" minRpmScale="0.02" maxRpmScale="0.1" />
            <exhaustEffect node="0>3|1" filename="$data/effects/exhaust/exhaust.i3d" minRpmColor="0.9 0.9 0.9 0.1" maxRpmColor="0.9 0.9 0.9 0.4" minRpmScale="0.02" maxRpmScale="0.1" />
        </exhaustEffects>
		<motorStartDuration>3200</motorStartDuration>
		
        <dashboards>	
            <dashboard displayType="ROT" valueType="clutchPedal" node="0>8|5|4|0" minRot="0 0 0" maxRot="-20 0 0" doInterpolation="true" groups="MOTOR_STARTING"/>
            <dashboard displayType="ROT" valueType="clutchPedal" node="0>8|5|4|0|0" minRot="0 0 0" maxRot="-20 0 0" doInterpolation="true" groups="MOTOR_RUNNING"/>		
            <dashboard displayType="ANIMATION" valueType="rpm" animName="rpmDisplay" minValueAnim="0" maxValueAnim="6000" groups="MOTOR_ACTIVE" />
            <dashboard displayType="ANIMATION" valueType="speed" animName="speedDisplay" minValueAnim="0" maxValueAnim="180" groups="MOTOR_ACTIVE" />
            <dashboard displayType="ANIMATION" valueType="motorTemperature" animName="loadingBarTemperature" minValueAnim="0" maxValueAnim="120" groups="MOTOR_ACTIVE" />
		</dashboards>
    </motorized>

    <animations>
 		<animation name="loadingBarFuel">
            <part node="0>8|4|4|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -80 0" />
        </animation>
		<animation name="rpmDisplay">
			<part node="0>8|4|2|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -185 0" />
			<part node="0>8|4|3|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 65 0" />
        </animation>
        <animation name="speedDisplay">
            <part node="0>8|4|1|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -200 0" />
        </animation>
        <animation name="loadingBarTemperature">
            <part node="0>8|4|5|0" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -80 0" />
        </animation>
        <animation name="wiperFront" isKeyframe="true">
            <part node="0>8|5|1|0"  startTime="0" endTime="0.5" startRot="0 0 0" endRot="0.0000905 -1 -45.00000381"/>
            <part node="0>8|5|1|0"  startTime="0.5" endTime="1" startRot="0.0000905 -1 -45.00000381" endRot="0 -3 -90.00000763"/>
            <part node="0>8|5|2|0"  startTime="0" endTime="0.5" startRot="0 0 0" endRot="0 1 -45.00000381"/>
            <part node="0>8|5|2|0"  startTime="0.5" endTime="1" startRot="0 1 -45.00000381" endRot="0 -1 -90.00000763"/>

            <sound template="wiper1" startTime="0" endTime="1" direction="1"   volumeScale="1" pitchScale="0.7" fadeOut="0.1" linkNode="0>8|5|1|0"/>
            <sound template="wiper2" startTime="0" endTime="1" direction="-1"  volumeScale="1" pitchScale="0.7" fadeOut="0.1" linkNode="0>8|5|2|0"/>
        </animation>
        <animation name="wiperBack" isKeyframe="true">
            <part node="0>8|5|3|0"  startTime="0.0" endTime="0.5" startRot="0 0 0" endRot="0 -4 90.00000763"/>
            <part node="0>8|5|3|0"  startTime="0.5" endTime="1.0" startRot="0 -4 90.00000763" endRot="0 0 180.00001526"/>

            <sound template="wiper1" startTime="0" endTime="1" direction="1"   volumeScale="1" pitchScale="0.7" fadeOut="0.1" linkNode="0>8|5|3|0"/>
        </animation>		
    </animations>

    <wipers>
        <wiper animName="wiperFront" >
            <state animSpeed="1.0" animPause="2.0" />
            <state animSpeed="1.0" animPause="0.0" />
            <state animSpeed="2.0" animPause="0.0" />
        </wiper>
        <wiper animName="wiperBack" >
            <state animSpeed="1.0" animPause="2.0" />
        </wiper>
    </wipers>

    <suspensions>
        <suspension useCharacterTorso="true" weight="70" minRotation="0 -5 -5" maxRotation="0 5 5" suspensionParametersY="7 1" suspensionParametersZ="7 1" />
    </suspensions>

    <dashboard>
        <groups>
            <group name="MOTOR_STARTING" electronicsStarting="true"/>
            <group name="MOTOR_ACTIVE"   isMotorStarting="true" isMotorRunning="true"/>
			<group name="MOTOR_ACTIVE_ONLY"   electronicsRunning="true"/>
			<group name="MOTOR_RUNNING" electronicsRunning="true"/>
        </groups>
		<default>
			<dashboard displayType="VISIBILITY" node="0>8|4|7" groups="MOTOR_ACTIVE_ONLY" />
			<dashboard displayType="EMITTER" node="0>8|4|7"   idleValue="0" intensity="0.15" groups="MOTOR_ACTIVE_ONLY" />	
			<dashboard displayType="EMITTER" node="0>8|4|15"   idleValue="0" intensity="2.55" groups="MOTOR_STARTING" />	
			<dashboard displayType="EMITTER" node="0>8|4|16"   idleValue="0" intensity="2.55" groups="MOTOR_STARTING" />	
        </default>
    </dashboard>

    <ai>
        <agent frontWheelNodes="wheelFrontLeft wheelFrontRight"/>
        <collisionTrigger useSize="true"/>
    </ai>

	<design2Configurations title="Front spoiler">
		<design2Configuration name="Variant 1" price="500">
			<objectChange node="0>8|2|1" visibilityActive="true" visibilityInactive="false" />	
        </design2Configuration>
		<design2Configuration name="Variant 2" price="1500" isDefault="true">
			<objectChange node="0>8|2|0" visibilityActive="true" visibilityInactive="false" />	
        </design2Configuration>
    </design2Configurations>

    <foliageBending>
        <bendingNode minX="-0.85" maxX="0.85" minZ="-2.242" maxZ="2.158"/>
    </foliageBending>

    <baseColorConfigurations useDefaultColors="true">
        <baseColorConfiguration materialTemplateName="SKODA_ENERGY_BLUE"/>
        <baseColorConfiguration materialTemplateName="SKODA_STEEL_GREY"/>
        <baseColorConfiguration materialTemplateName="SKODA_VELVET_RED_METALLIC"/>
        <baseColorConfiguration materialTemplateName="SKODA_GRAPHITE_GREY_METALLIC"/>
        <baseColorConfiguration materialTemplateName="SKODA_BRILLIANT_SILVER_METALLIC"/>
        <baseColorConfiguration materialTemplateName="SKODA_RACE_BLUE_METALLIC" isDefault="true"/>
        <baseColorConfiguration materialTemplateName="SKODA_GOLD_BRONZE" />
        <baseColorConfiguration materialTemplateName="SKODA_BLACK_MAGIC"/>
        <baseColorConfiguration materialTemplateName="SKODA_MOON_WHITE"/>

        <material materialSlotName="color"/>
    </baseColorConfigurations>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
	    <i3dMapping id="licensePlateFront" node="0>9" />
        <i3dMapping id="licensePlateBack" node="0>5" />
        <i3dMapping id="wheelFrontLeft" node="0>0|0" />
        <i3dMapping id="wheelFrontRight" node="0>0|1" />
        <i3dMapping id="wheelBackLeft" node="0>0|2" />
        <i3dMapping id="wheelBackRight" node="0>0|3" />
        <i3dMapping id="wheelFrontLeftTire" node="0>0|0|0" />
        <i3dMapping id="wheelFrontRightTire" node="0>0|1|0" />
        <i3dMapping id="wheelBackLeftTire" node="0>0|2|0" />
        <i3dMapping id="wheelBackRightTire" node="0>0|3|0" />
		<i3dMapping id="passengerSeat01" node="0>7|3|0" />
        <i3dMapping id="passengerSeat01Camera" node="0>7|3|0|0" />
        <i3dMapping id="passengerSeat01PlayerSkin" node="0>7|3|0|1" />
        <i3dMapping id="passengerSeat01PlayerLeftFoot" node="0>7|3|0|2" />
        <i3dMapping id="passengerSeat01PlayerRightFoot" node="0>7|3|0|3" />
        <i3dMapping id="passengerSeat01PlayerLeftHand" node="0>7|3|0|4" />
        <i3dMapping id="passengerSeat01PlayerRightHand" node="0>7|3|0|5" />
        <i3dMapping id="passengerSeat01ExitPoint" node="0>7|3|0|6" />
    </i3dMappings>
</vehicle>
