PDA

View Full Version : Tutorial:How to make a vehicle with the Airlift Ability


rebel5555
08-29-2007, 09:29 AM
In this tutorial I will shou you how to make a vehicle use the airlift ability successfully. I will be using the GDI Rig as an example. This is very easy so don't be scared. (I'm assuming you already have your mod set up)

-Step 1: Open the following files:
GDIRig.xml

GDIV35Ox_SummonedForVehicle.xml

LogicCommandset.xml

-Step 2: Goto GDIRig.xml and add the following that's in the Green text
<?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:GURig.w3x" />
<Include
type="all"
source="ART:GURigR.w3x" />
<Include
type="all"
source="ART:GURigUPAK_SN.w3x" />
<Include
type="all"
source="ART:GURigUPAK_AN.w3x" />
<Include
type="all"
source="ART:FXTracer.xml" />
<Include
type="instance"
source="ART:EXTnkTrack.xml" />
<Include
type="all"
source="ART:GURig_FP.w3x" />
<!-- Base Object -->
<Include
type="instance"
source="DATA:BaseObjects/BaseVehicle.xml" />
</Includes>
<GameObject
id="GDIRig"
inheritFrom="BaseVehicle"
SelectPortrait="Portrait_GDIRig"
ButtonImage="Portrait_GDIRig"
Side="GDI"
EditorSorting="UNIT"
TransportSlotCount="1"
BuildCost="2000"
BuildTime="20"
CommandSet="GDIRigCommandSet"
CommandPoints="100"
KindOf="PRELOAD SELECTABLE CAN_CAST_REFLECTIONS SCORE VEHICLE CAN_REVERSE_MOVE CAN_BE_FAVORITE_UNIT"
RadarPriority="UNIT"
ThreatLevel="10"
ProductionQueueType="VEHICLE"
UnitCategory="VEHICLE"
VoicePriority="72"
EditorName="GDIRig"
Description="Desc:GDIRig"
TypeDescription="Type:GDIRig">
<DisplayName
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:GDIRig</DisplayName>
<GameDependency>
<RequiredObject>GDICommandPost</RequiredObject>
</GameDependency>
<ArmorSet
Armor="GDIRigArmor"
DamageFX="VehicleDamageFX" />
<LocomotorSet
Locomotor="GDIRigLocomotor"
Condition="NORMAL"
Speed="50.0" />
<Draws>
<TankDraw
id="ModuleTag_Draw"
OkToChangeModelColor="true"
TreadAnimationRate="0.15"
TreadDriveSpeedFraction="0.25"
TreadPivotSpeedFraction="0.9"
TrackMarks="EXTnkTrack"
TrackMarksLeftBone="FXTracksL"
TrackMarksRightBone="FXTracksR">
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT"
RetainSubObjects="true">
<Model
Name="GURIG" />
<WeaponFireFXBone
WeaponSlotType="PRIMARY_WEAPON"
BoneName="LIGHTS" />
<WeaponLaunchBone
WeaponSlotType="PRIMARY_WEAPON"
BoneName="LIGHTS" />
<Turret
TurretNameKey="Turret"
TurretID="1" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
RetainSubObjects="true"
ConditionsYes="UNPACKING REALLYDAMAGED">
<Model
Name="GURigUPAK_SN" />
<Texture
Original="GURig"
New="GURig_D" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
RetainSubObjects="true"
ConditionsYes="UNPACKING">
<Model
Name="GURigUPAK_SN" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
RetainSubObjects="true"
ConditionsYes="DAMAGED">
<Model
Name="GURIG" />
<Texture
Original="GURig"
New="GURig_D" />
<ParticleSysBone
BoneName="FXTracksB"
FXParticleSystemTemplate="NODDamagedSmoke"
FollowBone="true" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
RetainSubObjects="true"
ConditionsYes="REALLYDAMAGED">
<Model
Name="GURIG" />
<Texture
Original="GURig"
New="GURig_D" />
<ParticleSysBone
BoneName="FXTracksB"
FXParticleSystemTemplate="NODDamagedSmoke"
FollowBone="true" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
RetainSubObjects="true"
ConditionsYes="DYING">
<Model
Name="GURIGR" />
<ParticleSysBone
BoneName="ROOTTRANSFORM"
FXParticleSystemTemplate="GDIDebrisSmallFire"
FollowBone="true" />
<ParticleSysBone
BoneName="ROOTTRANSFORM"
FXParticleSystemTemplate="GDIDebrisSmallFireDistortion"
FollowBone="true" />
<ParticleSysBone
BoneName="ROOTTRANSFORM"
FXParticleSystemTemplate="GDIDebrisSmallSmoke"
FollowBone="true" />
</ModelConditionState>
<ModelConditionState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="FORMATION_PREVIEW">
<Model
Name="GURIG_FP" />
</ModelConditionState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
Flags="START_FRAME_LAST"
ConditionsYes="UNPACKING">
<Animation
AnimationName="GURigUPAK_AN"
AnimationMode="ONCE_BACKWARDS" />
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="Con_Small"
FollowBone="true" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_DEFAULT">
<!-- Circumvents blend issues when the arrow is being shown... -->
<Script>
CurDrawableShowSubObject("TreadsStop")
CurDrawableHideSubObject("TreadsMove")
CurDrawableHideSubObject("TreadsTurnLeft")
CurDrawableHideSubObject("TreadsTurnRight")
</Script>
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_LEFT">
<!-- Circumvents blend issues when the arrow is being shown... -->
<Script>
CurDrawableHideSubObject("TreadsStop")
CurDrawableHideSubObject("TreadsMove")
CurDrawableShowSubObject("TreadsTurnLeft")
CurDrawableHideSubObject("TreadsTurnRight")
</Script>
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="GDIWheelDustLight"
FollowBone="true" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_RIGHT">
<!-- Circumvents blend issues when the arrow is being shown... -->
<Script>
CurDrawableHideSubObject("TreadsStop")
CurDrawableHideSubObject("TreadsMove")
CurDrawableHideSubObject("TreadsTurnLeft")
CurDrawableShowSubObject("TreadsTurnRight")
</Script>
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="GDIWheelDustLight"
FollowBone="true" />
</AnimationState>
<AnimationState
ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING">
<!-- Circumvents blend issues when the arrow is being shown... -->
<Script>
CurDrawableHideSubObject("TreadsStop")
CurDrawableShowSubObject("TreadsMove")
CurDrawableHideSubObject("TreadsTurnLeft")
CurDrawableHideSubObject("TreadsTurnRight")
</Script>
<ParticleSysBone
BoneName="NONE"
FXParticleSystemTemplate="GDIWheelDustLight"
FollowBone="true" />
</AnimationState>
<LeftTread>"TreadsL"</LeftTread>
<RightTread>"TreadsR"</RightTread>
</TankDraw>
</Draws>
<Behaviors>
<Physics
id="ModuleTag_Physics" />
<ProductionUpdate
id="ModuleTag_ProductionUpdate" />
<!--Mobile Repair-->
<!-- devtrack 913 -->
<!--
<PassiveAreaEffectBehavior
EffectRadius="200"
HealingPercentPerSecond="3"
NonStackable="true">
<AllowFilter
Include="VEHICLE HUGE_VEHICLE"
Relationship="ALLIES"
/>
</PassiveAreaEffectBehavior>
-->
<SlowDeath
id="ModuleTag_Death"
DeathObjectStatusBits="DONT_CLEAR_FOR_BUILD"
SinkDelay="3s"
SinkRate="1.0"
DestructionDelay="7s">
<OCL
Type="INITIAL">
<OCL>OCL_GDIRigDebris</OCL>
</OCL>
<DieMuxData
DeathTypes="ALL"
DeathTypesForbidden="TOPPLED" />
<Sound
Type="INITIAL"
List="GDI_Generic_VoiceDieMS" />
</SlowDeath>
<FXListBehavior
id="ModuleTag_FXList">
<DieMuxData
DeathTypes="ALL" />
<Event
Index="onDeath"
FX="FX_GDIVehicleExplodeNoScorch" />
</FXListBehavior>
<xi:include
href="DATA:Includes/GDICallForTransportForVehicle.xml" />
<xi:include
href="DATA:Includes/GenericUnpackPower.xml" />
<xi:include
href="DATA:Includes/GenericUnpackUpdate.xml" />
<ReplaceSelfUpgrade
id="ModuleTag_ReplaceSelf"
NewObjectUnpackTime="5.0s"
CheckBuildAssistant="true">
<TriggeredBy>Upgrade_UnPack</TriggeredBy>
<ReplacementTemplate>GDIBattleBase</ReplacementTemplate>
</ReplaceSelfUpgrade>
<AISpecialPowerUpdate
id="ModuleTag_RigUnpackAI"
CommandButtonName="Command_UnpackRig"
SpecialPowerAIType="SPECIAL_POWER_AOE_BUFF"
UnitKindOf="VEHICLE"
MinimumCutoff="5" />
</Behaviors>
<AI>
<AIUpdate
id="ModuleTag_AI"
AutoAcquireEnemiesWhenIdle="NO"></AIUpdate>
</AI>
<Body>
<ActiveBody
id="ModuleTag_Body"
MaxHealth="1500" />
</Body>
<Geometry
IsSmall="true">
<Shape
Type="BOX"
MajorRadius="20.0"
MinorRadius="10.0"
Height="10.0"></Shape>
</Geometry>
<AudioArrayVoice>
<!-- Triggered when created by being packed from a Battle Base -->
<AudioEntry
Sound="GDI_Rig_VoicePackedUp"
AudioType="voiceCreated" />
<AudioEntry
Sound="GDI_Rig_VoiceMove"
AudioType="voiceGuard" />
<AudioEntry
Sound="GDI_Rig_VoiceMove"
AudioType="voiceMove" />
<AudioEntry
Sound="GDI_Rig_VoiceRetreat"
AudioType="voiceRetreatToCastle" />
<AudioEntry
Sound="GDI_Rig_VoiceSelectMS"
AudioType="voiceSelect" />
<!-- Triggered when built from factory -->
<ObjectSpecificEntry
Sound="GDI_Rig_VoiceCreate"
AudioType="voiceCreatedFrom"
TargetObject="GDIWarFactory" />
<!-- Safety in case we do this in some campaign mission -->
<ObjectSpecificEntry
Sound="GDI_Rig_VoiceCreate"
AudioType="voiceCreatedFrom"
TargetObject="ReinforcementBay" />
</AudioArrayVoice>
<AudioArraySound>
<AudioEntry
Sound="AudioEvent:RigMoveStart"
AudioType="soundMoveStart" />
<AudioEntry
Sound="AudioEvent:PitbullIdleLoop"
AudioType="soundAmbient" />
</AudioArraySound>
<ShadowInfo
Type="VOLUME" />
<VisionInfo
VisionRange="250"
ShroudClearingRange="320" />
</GameObject>
</AssetDeclaration>-Step 3: Goto GDIV35Ox_SummonedForVehicle.xml and add the line in green text
<?xml version="1.0" encoding="us-ascii"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xai="uri:ea.com:eala:asset:instance">
<Tags></Tags>
<Includes>
<Include
type="instance"
source="GDIV35Ox.xml"
/>
</Includes>
<GameObject
id="GDIV35Ox_SummonedForVehicle"
inheritFrom="GDIV35Ox"
EditorName="GDIV35Ox_SummonedForVehicle"
KindOf="CAN_CAST_REFLECTIONS SELECTABLE AIRCRAFT VEHICLE TRANSPORT SUMMONED NO_COLLIDE IGNORES_SELECT_ALL"
Description="Desc:GDIOx">
<Behaviors>
<HordeTransportContain
xai:joinAction="Overwrite"
id="ModuleTag_Contain"
ObjectStatusOfContained="UNSELECTABLE"
ContainMax="1"
Slots="1"
AllowEnemiesInside="false"
AllowAlliesInside="false"
AllowNeutralInside="false"
AllowOwnPlayerInsideOverride="true"
ShowPips="true"
EnterSound="VehicleEnter"
ExitSound="VehicleExit"
KillPassengersOnDeath="true"
FlyOffMapOnEmpty="true"
ExtendedExitContainerChecks="true">
<PassengerFilter
Rule="NONE">
<IncludeThing>GDIAPC</IncludeThing>
<IncludeThing>GDIPitbull</IncludeThing>
<IncludeThing>GDIPredator</IncludeThing>
<IncludeThing>GDISurveyor</IncludeThing>
<IncludeThing>GDIRig</IncludeThing>
</PassengerFilter>
<DieMuxData
DeathTypes="ALL" />
<PassengerData
BonePrefix="BONEGARRISON">
<Filter
Rule="NONE"
Include="VEHICLE" />
</PassengerData>
</HordeTransportContain>
</Behaviors>
<AI>
<TransportHelicopterAIUpdate
xai:joinAction="Overwrite"
id="ModuleTag_06"
AILuaEventsList="GDIV35Ox_SummonedForVehicleFunctions"
FlyOffMapOnUnload="true">
<UnitAITargetChooserData
SympathyRange="100.0"
/>
</TransportHelicopterAIUpdate>
</AI>
</GameObject>
</AssetDeclaration>-Step 4: Goto LogicCommandSet.xml and find GDIRigCommandSet. Now, add the line that's in green text.
<LogicCommandSet
id="GDIRigCommandSet">
<Cmd>Command_StanceDrillDown</Cmd>
<Cmd>Command_UnpackRig</Cmd>
<Cmd>Command_GDICallForTransportVehicle</Cmd>
<Cmd>Command_AttackMove</Cmd>
</LogicCommandSet>-Step 5: Compile your mod and start airlifting things! I hope you guys enjoyed another tutorial by rebel5555!!