Private Joined: 4/7/2015(UTC) Posts: 19
Thanks: 3 times
|
Would you like to describe me point by point, how to add "unpack" ability to a unit? I've copied original code from GDI Rig and modified it, and a unit looks right in game (with turn left-right, OBBox, textures), so just adding a unit isn't a problem for me. But what is needed to add "Unpack/Repack"? The files which I've created in 3DSMax:
AUTruck_SKN.w3x (Hierarchical Model), AUTruck_SKL.w3x (Skeleton), AUTruckTRL.w3x (or TRR).w3x (Pure Animation, turn left-right), AUTruckDEP.w3x (Pure Animation of deploying), ABTruck.w3x (Hierarchical Model with Skeleton, version after deployment). My unit doesn't have any slots for cannons or repair drones, to make this easier. Do I need more w3x files? And if yes, which ones should be in ModelConditionState and which ones in AnimationState? Which parts of code should I look closer and which xml files do I need to code it right?
If you can, please help me. I'm single-person team (nobody interested cooperating, and even if somebody's declaring help, he does almost nothing) and I don't want to stop work on my mod (even if many think that it's dead).
I appreciate universal tips, but if they won't help, of course I can upload my code here.
|
|
|
|
Administrator Joined: 8/3/2003(UTC) Posts: 3,086 Thanks: 445 times Was thanked: 186 time(s) in 130 post(s)
|
I'm a bit confused here. Have you already gotten the deploy and undeploy abilities to work, and now you're just trying to get the graphics right? |
CommieDog: Because someone has to do your dirty work for you |
|
|
|
Private Joined: 4/7/2015(UTC) Posts: 19
Thanks: 3 times
|
No, in-game I don't have even "Deploy" button
|
|
|
|
Administrator Joined: 8/3/2003(UTC) Posts: 3,086 Thanks: 445 times Was thanked: 186 time(s) in 130 post(s)
|
Then you should probably fix that before you worry about the graphical code.
If you copied the Rig code for your unit, then you'll need to add Command_UnpackRig to your unit's CommandSet. |
CommieDog: Because someone has to do your dirty work for you |
|
|
|
Private Joined: 4/7/2015(UTC) Posts: 19
Thanks: 3 times
|
I have it: <LogicCommandSet id="GDIRigCommandSet"> <Cmd>Command_StanceDrillDown</Cmd> <Cmd>Command_UnpackRig</Cmd> <Cmd>Command_AttackMove</Cmd> </LogicCommandSet> Could you check my code?
<?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="DATA:GlobalData/GlobalDefines.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_SKN.w3x" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_SKL.w3x" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_MOVA.w3x" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_DEP.w3x" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_TRL.w3x" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_TRR.w3x" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoBase/NBAmmoBase.w3x" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBack.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBackNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBackSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFront.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontHC.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLeg.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLegNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLegSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddle.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddleNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddleSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanel.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelHC.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRamp.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampHC.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTop.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTopNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTopSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracks.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksHC.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyre.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyreNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyreSPM.xml" />
<Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhP.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhPNRM.xml" /> <Include type="all" source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhPSPM.xml" /> <!-- Base Object --> <Include type="instance" source="DATA:BaseObjects/BaseVehicle.xml" /> </Includes> <GameObject id="NODAmmoVan" inheritFrom="BaseVehicle" SelectPortrait="Portrait_NODAmmoVan" ButtonImage="Portrait_NodAmmoVan" Side="NOD" EditorSorting="UNIT" TransportSlotCount="2" BuildCost="100" BuildTime="4" BuildFadeInOnCreateTimeSeconds="0.25s" CommandSet="NODAmmoVanCommandSet" CommandPoints="100" KindOf="PRELOAD SELECTABLE CAN_CAST_REFLECTIONS SCORE VEHICLE FS_FACTORY CAN_REVERSE_MOVE EXPANSION_UNIT CAN_BE_FAVORITE_UNIT" RadarPriority="UNIT" ThreatLevel="10" PlacementViewAngle="315d" ProductionQueueType="VEHICLE" UnitCategory="VEHICLE" VoicePriority="165" EditorName="NODAmmoVan" Description="Desc:NODAmmoVan" TypeDescription="Type:NODAmmoVan"> <DisplayName xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODAmmoVan</DisplayName> <ArmorSet Armor="GDIRigArmor" DamageFX="VehicleDamageFX" /> <LocomotorSet Locomotor="NODEmissaryLocomotor" Condition="NORMAL" Speed="50.0" /> <Draws> <TruckDraw id="ModuleTag_Draw" OkToChangeModelColor="true"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="NUAmmoVan_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DAMAGED"> <Model Name="NUAmmoVan_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="REALLYDAMAGED"> <Model Name="NUAmmoVan_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING"> <Model Name="NUAmmoVan_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Model Name="NUAmmoVan_DEP" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING DAMAGED"> <Model Name="NUAmmoVan_DEP" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING REALLYDAMAGED"> <Model Name="NUAmmoVan_DEP" /> </ModelConditionState> <AnimationState ParseCondStateType="PARSE_DEFAULT"> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_LEFT"> <Animation AnimationName="NUAmmoVan_TRL" AnimationMode="LOOP" AnimationBlendTime="101" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_LEFT_HIGH_SPEED"> <Animation AnimationName="NUAmmoVan_TRL" AnimationMode="LOOP" AnimationBlendTime="101" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_RIGHT"> <Animation AnimationName="NUAmmoVan_TRR" AnimationMode="LOOP" AnimationBlendTime="101" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="MOVING TURN_RIGHT_HIGH_SPEED"> <Animation AnimationName="NUAmmoVan_TRR" AnimationMode="LOOP" AnimationBlendTime="101" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" Flags="START_FRAME_LAST" ConditionsYes="UNPACKING"> <Animation AnimationName="NUAmmoVan_DEP" AnimationMode="ONCE_BACKWARDS" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING"> <!-- no anim --> </AnimationState> </TruckDraw> <SpotlightDraw id="ModuleTag_Spotlight" AttachToBoneInAnotherModule="B_SPOTLIGHT" RefreshTime="2.0s" SweepTime="1.0s"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="FXspotlight" /> <WeaponFireFXBone WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWEAPON01" /> <WeaponLaunchBone WeaponSlotType="PRIMARY_WEAPON" BoneName="FXWEAPON01" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="FORMATION_PREVIEW"> <!-- Draw nothing when in Formation Preview --> <Model Name="" /> </ModelConditionState> </SpotlightDraw> </Draws> <Behaviors> <Physics id="ModuleTag_04" /> <ProductionUpdate id="ModuleTag_08" /> <SlowDeath id="ModuleTag_Death" DeathObjectStatusBits="DONT_CLEAR_FOR_BUILD" SinkDelay="3s" SinkRate="2.0" DestructionDelay="7s"> <OCL Type="INITIAL"> <OCL>OCL_NODSurveyorDebris</OCL> </OCL> <DieMuxData DeathTypes="ALL" DeathTypesForbidden="TOPPLED" /> <Sound Type="INITIAL" List="NOD_Generic_VoiceDieMS" /> </SlowDeath> <FXListBehavior id="ModuleTag_FXList"> <DieMuxData DeathTypes="ALL" /> <Event Index="onDeath" FX="FX_GDIVehicleExplodeNoScorch" /> </FXListBehavior> <xi:include href="DATA:TrainingMod/data/Includes/GenericUnpackPower.xml" /> <xi:include href="DATA:TrainingMod/data/Includes/GenericUnpackUpdate.xml" /> <ReplaceSelfUpgrade id="ModuleTag_ReplaceSelf" CheckBuildAssistant="true"> <TriggeredBy>Upgrade_UnPack</TriggeredBy> <ReplacementTemplate>NODAmmoBase</ReplacementTemplate> </ReplaceSelfUpgrade> <AISpecialPowerUpdate id="ModuleTag_RigUnpackAI" CommandButtonName="Command_UnpackRig" SpecialPowerAIType="SPECIAL_POWER_AOE_BUFF" UnitKindOf="VEHICLE" MinimumCutoff="5" /> </Behaviors> <AI> <AIUpdate id="ModuleTag_03" AutoAcquireEnemiesWhenIdle="YES"></AIUpdate> </AI> <Body> <ActiveBody id="ModuleTag_02" MaxHealth="2000.0" /> </Body> <Geometry IsSmall="true"> <Shape Type="BOX" MajorRadius="14.0" MinorRadius="7.0" Height="11.5"></Shape> </Geometry> <AudioArrayVoice> <AudioEntry Sound="NOD_Emissary_VoiceCreate" AudioType="voiceCreated" /> <AudioEntry Sound="NOD_Emissary_VoiceMove" AudioType="voiceMove" /> <AudioEntry Sound="NOD_Emissary_VoiceRetreat" AudioType="voiceRetreatToCastle" /> <AudioEntry Sound="NOD_Emissary_VoiceSelectMS" AudioType="voiceSelect" /> </AudioArrayVoice> <AudioArraySound> <AudioEntry Sound="NOD_Emissary_MoveStart" AudioType="soundMoveStart" /> <AudioEntry Sound="NOD_Emissary_IdleLoop" AudioType="soundAmbient" /> </AudioArraySound> <ShadowInfo Type="VOLUME" /> <VisionInfo VisionRange="100" ShroudClearingRange="200" /> </GameObject> </AssetDeclaration>
Edited by user Tuesday, April 11, 2017 6:51:14 AM(UTC)
| Reason: Not specified
|
|
|
|
Administrator Joined: 8/3/2003(UTC) Posts: 3,086 Thanks: 445 times Was thanked: 186 time(s) in 130 post(s)
|
I see that you reference a NODAmmoVanCommandSet in your new unit, but the CommandSet you posted is for the Rig. What does NODAmmoVanCommandSet look like? |
CommieDog: Because someone has to do your dirty work for you |
|
|
|
Private Joined: 4/7/2015(UTC) Posts: 19
Thanks: 3 times
|
<LogicCommandSet id="NODAmmoVanCommandSet"> <Cmd>Command_UnPackNODAmmoVan</Cmd> </LogicCommandSet>
And that was a mistake, because if I used "NODAmmoVanCommandSet" at the beginning, I shouldn't have in NODAmmoVan.xml:
CommandButtonName="Command_UnpackRig"
but Command_UnpackNODAmmoVan. I've corrected it and returned to GDIRigCommandSet. Now deployment ability works fine. I'm not sure if animations of deployment is right because I have to rescale NBAmmoVan about 50x (it's size is like a shoe of infantry :P). When I check it, I'll write if I have more problems. Thanks a lot, CommieDog! :)
|
|
|
|
Users browsing this topic |
Guest
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.