<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude">
	<Tags></Tags>
	<Includes>
		<Include
			type="all"
			source="ART:NBDHub.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_ASN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D2SN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D2AN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D3SN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_D3AN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QSBld_SKN.w3x" />	
		<Include
			type="all"
			source="ART:NBDHub_QSBld_AAN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QS_D1_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QS_D2_SKN.w3x" />
		<Include
			type="all"
			source="ART:NBDHub_QS_D3_SKN.w3x" />
		<Include
			type="all"
			source="ART:wire.xml" />
		<Include
			type="all"
			source="ART:FXspotlight.w3x" />
		<!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="NODShredderTurretHub"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_NODHub"
		ButtonImage="Portrait_NODShredderTurret"
		Side="NOD"
		EditorSorting="STRUCTURE"
		BuildCost="600"
		BuildTime="6"
		EnergyProduction="-6"
		CommandSet="NODShredderTurretHubCommandSet"
		KindOf="STRUCTURE IMMOBILE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_SEE_THROUGH_STRUCTURE LINE_OF_SIGHT_IGNORES_BUILDINGS SELECTABLE CAN_CAST_REFLECTIONS FS_BASE_DEFENSE POWERED COVER"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="225d"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="NODShredderTurretHub"
		WeaponCategory="GUN"
		Description="Desc:NODShredderTurret"
		TypeDescription="Type:NODShredderTurret">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODShredderTurret</DisplayName>
		<DisplayUpgrade
			id="Tag_DisplayUpgrade1">Upgrade_NODQuadTurrets</DisplayUpgrade>

		<GameDependency>
			<RequiredObject>NODPowerPlant</RequiredObject>
		</GameDependency>
		<ArmorSet
			Armor="NODBaseDefenceArmor"
			DamageFX="FactionStructureDamageFX" />
		<SkirmishAIInformation
			BaseBuildingLocation="SPREAD" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true"
				InitialRecoilSpeed="16.0"
				MaxRecoilDistance="10.0"
				RecoilDamping="2.0"
				RecoilSettleSpeed="3.0"
				ExtraPublicBone="MuzzleFlash01 MuzzleFlash02 FX_WEAPON01 FX_WEAPON02">				
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBDHub_QSBld_SKN" />
					<WeaponFireFXBone
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="FX_WEAPON" />
					<WeaponRecoilBone
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="MuzzleFlash" />
					<WeaponMuzzleFlash
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="MuzzleFlash" />
					<WeaponLaunchBone
						WeaponSlotID="1"
						WeaponSlotType="PRIMARY_WEAPON"
						BoneName="FX_WEAPON" />
					<Turret
						TurretNameKey="TURRET"
						TurretPitch="TURRET_PITCH"
						TurretID="1" />
				</ModelConditionState>	
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Model
						Name="NBDHub" />
				</ModelConditionState>				
				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING USER_5">
					<Model
						Name="NBDHub_QSBld_SKN" />
				</ModelConditionState>				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="NBDHub_ASN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE">
					<Model
						Name="NBDHub_D3SN" />
				</ModelConditionState>
				
				<!-- quads states -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED USER_5">
					<Model
						Name="NBDHub_QS_D2_SKN" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerDist"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED USER_5">
					<Model
						Name="NBDHub_QS_D1_SKN" />
					<Texture
						Original="NBDHub"
						New="NBDHub_D" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_5">
					<Model
						Name="NBDHub_QSBld_SKN" />
				</ModelConditionState>
				
				<!-- normal d states -->
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED USER_7">
					<Model
						Name="NBDHub_D2SN" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerDist"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED USER_7">
					<Model
						Name="NBDHub" />
					<Texture
						Original="NBDHub"
						New="NBDHub_D" />
					<ParticleSysBone
						BoneName="RootTransform"
						FXParticleSystemTemplate="NODBunkerSmoke"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_7">
					<Model
						Name="NBDHub" />
				</ModelConditionState>
				
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<!-- no anim -->
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="NBDHub_AAN"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING USER_5">
					<Animation
						AnimationName="NBDHub_QSBld_SKN"
						AnimationMode="ONCE" />
				</AnimationState>				
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBDHub_D3AN"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
						CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
						end
					</Script>
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBDHub_QSBld_SKN"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
						CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
						end
					</Script>
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoReallyDamaged">
					<Animation
						AnimationName="NBDHub_QSBld_SKN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="NBDHub_D3AN"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
			<SpotlightDraw
				id="ModuleTag_Spotlight"
				AttachToBoneInAnotherModule="bone_stealthdetector"
				RefreshTime="2.0s"
				SweepTime="1.0s">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="FXspotlight" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Model
						Name="" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="BUILD_PLACEMENT_CURSOR">
					<Script>
						CurDrawableHideSubObject("Plane01")
					</Script>
				</AnimationState>
			</SpotlightDraw>
		</Draws>
		<Behaviors>
      <SquishCollide
        id ="DefaultSquishCollide"/>
			<WeaponSetUpdate
				id="ModuleTag_WeaponSetUpdate">
				<WeaponSlotTurret
					ID="1"
					AllowInterleavedFiring="false"
					InterleavedStyle="INTERLEAVE_FIRST_AVAILABLE"
					WeaponChoiceCriteria="PREFER_MOST_DAMAGE">					
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODShredderTurretHubWeapon"
						ObjectStatus="WEAPON_UPGRADED_01" />
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODShredderTurretSpawnChargedParticleBeamWeapon"
						ObjectStatus="WEAPON_UPGRADED_01 WEAPON_UPGRADED_02" />
					<TurretSettings
						TurretTurnRate="200"
						TurretPitchRate="100"
						AllowsPitch="true"
						MinimumPitch="-30d"
						PitchHeight="90%"
						MinIdleScanTime="1.0s"
						MaxIdleScanTime="5.0s"
						MinIdleScanAngle="0.0"
						MaxIdleScanAngle="180.0">
						<TurretAITargetChooserData />
					</TurretSettings>
				</WeaponSlotTurret>
			</WeaponSetUpdate>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="3.0s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<Sound Type="INITIAL" List="HumanFaction_SmallBuilding_DieMS" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onDeath"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Small" />
			</FXListBehavior>
			<StealthDetectorUpdate
				id="ModuleTag_StealthDetect"
				DetectionRange="200" />
			<StructureUnpackUpdate
				UnpackTime="1.5s" />
			<CompositeStructureInfoModule
				id="ModuleTag_CompositeStructureInfoModule"
				ThingTemplate="NODShredderTurret"
				Count="3"
				BuildableDistance="150">
				<ConnectionShadowInfo
					Type="ALPHA_DECAL_DYNAMIC"
					SizeX="256"
					SizeY="32"
					OpacityStart="0"
					OpacityFadeInTime="3s"
					OpacityPeak="1"
					OpacityFadeOutTime="3s"
					OpacityEnd="0"
					OverrideLODVisibility="true"
					Texture="wire" />
			</CompositeStructureInfoModule>		
			
			<StatusBitsUpgrade
				id="ModuleTag_UpgradeWeapon_01"
				StatusToSet="WEAPON_UPGRADED_01">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</StatusBitsUpgrade>
			
			<StatusBitsUpgrade
				id="ModuleTag_UpgradeWeapon_02"
				StatusToSet="WEAPON_UPGRADED_02">
				<TriggeredBy>Upgrade_NodTechCenterChargedParticleBeam</TriggeredBy>
			</StatusBitsUpgrade>			
			
			<ModelConditionUpgrade
				id="ModuleTag_ShowQuadTurretShredderHub"
				AddConditionFlags="USER_5"
				RemoveConditionFlags="USER_7">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</ModelConditionUpgrade>
			
		<!-- hide quad turret -->
			
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretNOD"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_NODFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretBH"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_BlackHandFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretMOK"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_MarkedOfKaneFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretGDI"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_GDIFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretZOCOM"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_ZOCOMFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretST"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_SteelTalonsFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretSCRIN"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_AlienFaction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretTRAV"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_Traveler59Faction</TriggeredBy>
			</ModelConditionUpgrade>
			<ModelConditionUpgrade
				id="ModuleTag_DontShowQuadTurretREAP"
				AddConditionFlags="USER_7">
				<TriggeredBy>Upgrade_Reaper17Faction</TriggeredBy>
			</ModelConditionUpgrade>
			
			
			<GatherSlavesUpdate
				id="ModuleTag_GatherSlaves"
				SlaveTemplate="NODShredderTurret"
				Radius="500.0"
				Amount="3" />
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericNODBuildingSuicide.xml" />
			<xi:include
				href="../../Includes/RepairAlliesEngineerContain.xml" />
			<AudioLoopUpgrade id="NOD_QuadTurrets_ShredderHubUpgrade" SoundToPlay="NOD_QuadTurrets_ShredderHubUpgrade">
				<TriggeredBy>Upgrade_NODQuadTurrets</TriggeredBy>
			</AudioLoopUpgrade> 
		</Behaviors>
		<AI>
			<AIUpdate
				id="AIUpdate"
				AutoAcquireEnemiesWhenIdle="YES">
				<UnitAITargetChooserData
					CanPickDynamicTargets="false"
					CheckVisionRange="false" />
			</AIUpdate>
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="3600.0" />
		</Body>
		<Geometry
			IsSmall="false">
			<Shape
				Type="CYLINDER"
				MajorRadius="25.0"
				Height="30.0" />
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="NOD_ShredderTurretHubSelect"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry
				Sound="NOD_GenericTurret_Deploy"
				AudioType="soundPrepositioned" />
			<AudioEntry Sound="HumanFaction_SmallBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_SmallBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound> 
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="450"
			ShroudClearingRange="500" />
		<ProjectedBuildabilityInfo
			Radius="0.0"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
    <CrusherInfo
    CrushableLevel="2" />
	</GameObject>
</AssetDeclaration>
