<_templates Include="trucks">
	<Flare>
		<IgnitionSignalOrange
			AspectRatio="1.4"
			Color="g(255; 140; 0) x 0.3"
			ColorMultAtDay="0.6"
			Dir="(0; 1; 0)"
			DirAngle="135"
			Size="0.1"
		/>
	</Flare>
	<Body>
		<Anchor Collisions="None" Mass="300">
			<Constraint
				AxisLocal="(0; 0; -1)"
				Name="AnchorExt"
				Type="Prismatic"
				MinLimit="0"
				MaxLimit="1.55"
			>
				<Motor Force="4000" Type="Position" />
			</Constraint>
			<Body
				ForceBodyParams="true"
				Mass="200"
				NoFoliageCollisions="true"
			>
				<Constraint
					AxisLocal="(0; -1; 0)"
					Name="Anchor"
					Type="Prismatic"
					MinLimit="0"
					MaxLimit="1.3"
				>
					<Motor Force="4000" Type="Position" />
				</Constraint>
			</Body>
		</Anchor>
	</Body>
</_templates>
<TruckAddon IsChassisFullOcclusion="true">
	<PoweredConstraints>
		<Chain Name="Anchors" ParentBodies="BoneFrontLeftBase_cdt,BoneFrontRightBase_cdt,BoneRearLeftBase_cdt,BoneRearRightBase_cdt">
			<Group Id="anchors_extend">
				<Constraint
					InitialFix="true"
					Name="AnchorExt"
					TerminalFix="true"
					Position="1.7"
				/>
			</Group>
			<Group Id="anchors_push">
				<Constraint
					InitialFix="true"
					Name="Anchor"
					TerminalFix="true"
					Position="1.3"
				/>
			</Group>
		</Chain>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/addons/big_crane_us_ws4964">
		<NetSync Legacy="true" />
		<Body CenterOfMassOffset="(2.5; 0; 0)" Mass="2000">
			<Constraint Type="Fixed" />
			<Body
				CenterOfMassOffset="(-0.5; 1.3; 0.6)"
				Mass="2000"
				ModelFrame="BoneCabin_cdt"
			>
				<Constraint
					AxisLocal="(0; 1; 0)"
					Name="Crane"
					Type="Hinge"
					MinLimit="-355"
					MaxLimit="355"
				>
					<Motor Force="500000" Tau="0.1" Type="Position" />
				</Constraint>
				<Body
					CenterOfMassOffset="(0; 0; 0)"
					Collisions="None"
					Mass="400"
					ModelFrame="BoneShaft_cdt"
				>
					<Constraint
						AxisLocal="(0; 0; 1)"
						Name="Crane"
						Type="Hinge"
						MinLimit="-7"
						MaxLimit="55"
					>
						<Motor Force="800000" Tau="0.4" Type="Position" />
					</Constraint>
					<Body
						CenterOfMassOffset="(0; 0; 0)"
						Collisions="Internal"
						Mass="400"
						ModelFrame="BoneShaft1_cdt"
					>
						<Constraint
							AxisLocal="(1; 0; 0)"
							Name="Crane"
							Type="Prismatic"
							MinLimit="0"
							MaxLimit="5"
						>
							<Motor Force="100000" Tau="0.2" Type="Position" />
						</Constraint>
					</Body>
				</Body>
			</Body>
			<Body _template="Anchor" ModelFrame="BoneFrontLeftBase_cdt">
				<Body ModelFrame="BoneFrontLeftAnchor_cdt" />
			</Body>
			<Body _template="Anchor" ModelFrame="BoneFrontRightBase_cdt">
				<Body ModelFrame="BoneFrontRightAnchor_cdt" />
			</Body>
			<Body _template="Anchor" ModelFrame="BoneRearLeftBase_cdt">
				<Body ModelFrame="BoneRearLeftAnchor_cdt" />
			</Body>
			<Body _template="Anchor" ModelFrame="BoneRearRightBase_cdt">
				<Body ModelFrame="BoneRearRightAnchor_cdt" />
			</Body>
			<Body Collisions="None" Mass="5" ModelFrame="BoneFrameR_cdt">
				<Constraint ExplicitParentFrame="0" Type="Fixed" />
			</Body>
			<Body Collisions="None" Mass="5" ModelFrame="BoneFrameL_cdt">
				<Constraint ExplicitParentFrame="1" Type="Fixed" />
			</Body>
		</Body>
	</PhysicsModel>
	<ModelAttachments>
		<Ignition>
			<Flare _template="IgnitionSignalOrange" Dir="(-1; 0; 0)" Pos="(-2.606; 0.565; -0.835)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="IgnitionSignalOrange" Dir="(-1; 0; 0)" Pos="(-2.606; 0.565; 0.835)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="IgnitionSignalOrange" Dir="(0; 0; -1)" Pos="(2.175; 0.344; -1.134)" />
			<Flare _template="IgnitionSignalOrange" Dir="(0; 0; 1)" Pos="(2.175; 0.344; 1.134)" />
		</Ignition>
		<HeadLight>
			<Model _template="HeadLightRay" Org="(1.091; 0.576; -0.984)" ParentFrame="BoneCabin_cdt" />
			<Model _template="HeadLightRay" Org="(0.697; 0.632; 0.412)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="HeadLight" Color="g(255; 235; 215) x 1" Size=".3" Pos="(1.091; 0.576; -0.984)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="HeadLight" Color="g(255; 235; 215) x 1" Size=".3" Pos="(0.697; 0.632; 0.412)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="BlueStreak" Pos="(1.091; 0.576; -0.984)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="BlueStreak" Pos="(0.697; 0.632; 0.412)" ParentFrame="BoneCabin_cdt" />
		</HeadLight>
	</ModelAttachments>
	<HeadLight
		_template="Default"
		AttenEnd="32"
		Color="g(255; 212; 154) x 3.2"
		Pos="(1.525; 0.536; -0.287)"
		ParentFrame="BoneCabin_cdt"
	/>
	<GameData
		CameraPreset="addon_1"
		Category="frame_addons"
		IsCustomizable="true"
		Price="7500"
		UnlockByExploration="false"
		UnlockByRank="6"
	>
		<UiDesc
			UiDesc="UI_ADDON_BIG_CRANE_US_DESC"
			UiIcon30x30=""
			UiIcon40x40=""
			UiName="UI_ADDON_BIG_CRANE_US_NAME"
		/>
		<SoundPoweredGroupStop Name="addons/common/crane_powergroups_stop" Range="20" Volume="1" />
		<SoundPoweredGroupStart Name="addons/common/crane_powergroups_start" Range="20" Volume="1" />
		<SoundPoweredGroupLoop Name="addons/common/crane_powergroups_loop" Range="20" Volume="1" />
		<SoundIKStop Name="addons/bigcrane_us/bigcrane_us_turn_stop" Range="20" Volume="1" />
		<SoundIKStart Name="addons/bigcrane_us/bigcrane_us_turn_start" Range="20" Volume="1" />
		<SoundIKLoop Name="addons/bigcrane_us/bigcrane_us_turn_loop" Range="20" Volume="1" />
		<InstallSocket Type="BigCraneUsWS4964" />
		<CraneSourceSocket Pos="(8.229; 2.654; 0)" ParentFrame="BoneShaft1_cdt" />
		<AddonType Name="Crane" />
	</GameData>
	<ControlledIK
		CoeffEndMovementSpeedOY=".65"
		CoeffEndMovementSpeedOYWithLoad=".5"
		CoeffEndMovementSpeedXZ=".8"
		CoeffEndMovementSpeedXZWithLoad=".6"
	>
		<Chain EndOffset="(0.1; 0; 0)" ModelFrames="BoneRoot_cdt,BoneCabin_cdt,BoneShaft_cdt,BoneShaft1_cdt" />
	</ControlledIK>
	<AutomaticIK>
		<IKBone ModelFrame="BonePistonBase" ParentFrame="BoneCabin_cdt">
			<IKJoint AxisLocal="(0; 0; 1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneShaft_cdt"
				ModelFrame="BonePiston"
			>
				<IKJoint AxisLocal="(1; 0; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="RollerRear" ParentFrame="BoneCabin_cdt">
			<IKJoint AxisLocal="(0; 0; 1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneShaft_cdt"
				ModelFrame="RollerRearEnd"
			>
				<IKJoint AxisLocal="(1; 0; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="RollerFront" ParentFrame="BoneCabin_cdt">
			<IKJoint AxisLocal="(0; 0; 1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneShaft_cdt"
				ModelFrame="RollerFrontEnd"
			>
				<IKJoint AxisLocal="(1; 0; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneFrontRightBase" ParentFrame="BoneFrontRightBase_cdt">
			<IKJoint AxisLocal="(0; 1; 0)" Type="Hinge2" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneFrontRightAnchor_cdt"
				ModelFrame="BoneFrontRightAnchor"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneFrontLeftBase" ParentFrame="BoneFrontLeftBase_cdt">
			<IKJoint AxisLocal="(0; 1; 0)" Type="Hinge2" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneFrontLeftAnchor_cdt"
				ModelFrame="BoneFrontLeftAnchor"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneRearRightBase" ParentFrame="BoneRearRightBase_cdt">
			<IKJoint AxisLocal="(0; 1; 0)" Type="Hinge2" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneRearRightAnchor_cdt"
				ModelFrame="BoneRearRightAnchor"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
		<IKBone ModelFrame="BoneRearLeftBase" ParentFrame="BoneRearLeftBase_cdt">
			<IKJoint AxisLocal="(0; 1; 0)" Type="Hinge2" />
			<IKBone
				AttachOffset="(0; 0; 0)"
				AttachToFrame="BoneRearLeftAnchor_cdt"
				ModelFrame="BoneRearLeftAnchor"
			>
				<IKJoint AxisLocal="(0; 1; 0)" Type="Slider" />
			</IKBone>
		</IKBone>
	</AutomaticIK>
	<AddonCamera
		FirstPersonDir="(1; 0; 0)"
		FirstPersonPos="(-5.75; 3.76; -3.8)"
		ParentFrame="BoneCabin_cdt"
	/>
</TruckAddon>
