WielkiKaszaniarz
9 years ago
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.
Sponsor
CommieDog
9 years ago
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?
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
WielkiKaszaniarz
9 years ago
No, in-game I don't have even "Deploy" button
CommieDog
9 years ago
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.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
WielkiKaszaniarz
8 years ago
I have it:

id="GDIRigCommandSet">
Command_StanceDrillDown
Command_UnpackRig
Command_AttackMove


Could you check my code?





type="all"
source="DATA:GlobalData/GlobalDefines.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_SKN.w3x" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_SKL.w3x" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_MOVA.w3x" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_DEP.w3x" />

type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_TRL.w3x" />

type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVan_TRR.w3x" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoBase/NBAmmoBase.w3x" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBack.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBackNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanBackSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFront.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontHC.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanFrontSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLeg.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLegNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanLegSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddle.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddleNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanMiddleSPM.xml" />

type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanel.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelHC.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanPanelSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRamp.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampHC.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanRampSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTop.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTopNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTopSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracks.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksHC.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTracksSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyre.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyreNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanTyreSPM.xml" />


type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhP.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhPNRM.xml" />
type="all"
source="DATA:TrainingMod/data/NOD/AmmoVan/NUAmmoVanWhPSPM.xml" />

type="instance"
source="DATA:BaseObjects/BaseVehicle.xml" />

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">
xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:NODAmmoVan
Armor="GDIRigArmor"
DamageFX="VehicleDamageFX" />
Locomotor="NODEmissaryLocomotor"
Condition="NORMAL"
Speed="50.0" />

id="ModuleTag_Draw"
OkToChangeModelColor="true">
ParseCondStateType="PARSE_DEFAULT">
Name="NUAmmoVan_SKN" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DAMAGED">
Name="NUAmmoVan_SKN" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="REALLYDAMAGED">
Name="NUAmmoVan_SKN" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DYING">
Name="NUAmmoVan_SKN" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="UNPACKING">
Name="NUAmmoVan_DEP" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="UNPACKING DAMAGED">
Name="NUAmmoVan_DEP" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="UNPACKING REALLYDAMAGED">
Name="NUAmmoVan_DEP" />

ParseCondStateType="PARSE_DEFAULT">

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_LEFT">
AnimationName="NUAmmoVan_TRL"
AnimationMode="LOOP"
AnimationBlendTime="101" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_LEFT_HIGH_SPEED">
AnimationName="NUAmmoVan_TRL"
AnimationMode="LOOP"
AnimationBlendTime="101" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_RIGHT">
AnimationName="NUAmmoVan_TRR"
AnimationMode="LOOP"
AnimationBlendTime="101" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="MOVING TURN_RIGHT_HIGH_SPEED">
AnimationName="NUAmmoVan_TRR"
AnimationMode="LOOP"
AnimationBlendTime="101" />

ParseCondStateType="PARSE_NORMAL"
Flags="START_FRAME_LAST"
ConditionsYes="UNPACKING">
AnimationName="NUAmmoVan_DEP"
AnimationMode="ONCE_BACKWARDS" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="DYING">



id="ModuleTag_Spotlight"
AttachToBoneInAnotherModule="B_SPOTLIGHT"
RefreshTime="2.0s"
SweepTime="1.0s">
ParseCondStateType="PARSE_DEFAULT">
Name="FXspotlight" />
WeaponSlotType="PRIMARY_WEAPON"
BoneName="FXWEAPON01" />
WeaponSlotType="PRIMARY_WEAPON"
BoneName="FXWEAPON01" />

ParseCondStateType="PARSE_NORMAL"
ConditionsYes="FORMATION_PREVIEW">

Name="" />




id="ModuleTag_04" />
id="ModuleTag_08" />
id="ModuleTag_Death"
DeathObjectStatusBits="DONT_CLEAR_FOR_BUILD"
SinkDelay="3s"
SinkRate="2.0"
DestructionDelay="7s">
Type="INITIAL">
OCL_NODSurveyorDebris

DeathTypes="ALL"
DeathTypesForbidden="TOPPLED" />


id="ModuleTag_FXList">
DeathTypes="ALL" />
Index="onDeath"
FX="FX_GDIVehicleExplodeNoScorch" />

href="DATA:TrainingMod/data/Includes/GenericUnpackPower.xml" />
href="DATA:TrainingMod/data/Includes/GenericUnpackUpdate.xml" />
id="ModuleTag_ReplaceSelf"
CheckBuildAssistant="true">
Upgrade_UnPack
NODAmmoBase

id="ModuleTag_RigUnpackAI"
CommandButtonName="Command_UnpackRig"
SpecialPowerAIType="SPECIAL_POWER_AOE_BUFF"
UnitKindOf="VEHICLE"
MinimumCutoff="5" />


id="ModuleTag_03"
AutoAcquireEnemiesWhenIdle="YES">


id="ModuleTag_02"
MaxHealth="2000.0" />

IsSmall="true">
Type="BOX"
MajorRadius="14.0"
MinorRadius="7.0"
Height="11.5">


Sound="NOD_Emissary_VoiceCreate"
AudioType="voiceCreated" />
Sound="NOD_Emissary_VoiceMove"
AudioType="voiceMove" />
Sound="NOD_Emissary_VoiceRetreat"
AudioType="voiceRetreatToCastle" />
Sound="NOD_Emissary_VoiceSelectMS"
AudioType="voiceSelect" />


Sound="NOD_Emissary_MoveStart"
AudioType="soundMoveStart" />
Sound="NOD_Emissary_IdleLoop"
AudioType="soundAmbient" />

Type="VOLUME" />
VisionRange="100"
ShroudClearingRange="200" />

CommieDog
8 years ago
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?
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
WielkiKaszaniarz
8 years ago

id="NODAmmoVanCommandSet">
Command_UnPackNODAmmoVan


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! 🙂