Dozer Build Button Expanding : Succes!
This is what I did.
First, add a "Drone" unit that will be used for dozer.
Object ChinaDozerDrone1
; *** ART Parameters ***
SelectPortrait = SNHacker2_L
ButtonImage = SNHacker2
;UpgradeCameo1 = NONE
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
;NORMAL STANDING
DefaultConditionState
Model = NIHCKR_SKN
IdleAnimation = NIHCKR_SKL.NIHCKR_STA 0 25
;Regular spice animations
IdleAnimation = NIHCKR_SKL.NIHCKR_IDA
IdleAnimation = NIHCKR_SKL.NIHCKR_IDB
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY Bone_SatCom
TransitionKey = TRANS_Stand
End
AliasConditionState = REALLYDAMAGED
ConditionState = MOVING
Animation = NIHCKR_SKL.NIHCKR_RNA 14
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = None
ParticleSysBone = None InfantryDustTrails
End
AliasConditionState = MOVING UNPACKING
AliasConditionState = MOVING UNPACKING REALLYDAMAGED
ConditionState = UNPACKING
Animation = NIHCKR_SKL.NIHCKR_ATB1
AnimationMode = ONCE
End
AliasConditionState = UNPACKING FIRING_A
AliasConditionState = UNPACKING REALLYDAMAGED
AliasConditionState = UNPACKING FIRING_A REALLYDAMAGED
;HACKING ATTACK
ConditionState = FIRING_A
Animation = NIHCKR_SKL.NIHCKR_ATB2
AnimationMode = LOOP
TransitionKey = TRANS_FiringA
End
AliasConditionState = FIRING_A REALLYDAMAGED
ConditionState = PACKING
Animation = NIHCKR_SKL.NIHCKR_ATB3
AnimationMode = ONCE
End
AliasConditionState = PACKING FIRING_A
AliasConditionState = PACKING REALLYDAMAGED
AliasConditionState = PACKING FIRING_A REALLYDAMAGED
TransitionState = TRANS_FiringA TRANS_Stand ; I was stopped by a stop command, so I get no proper PACKING state
Animation = NIHCKR_SKL.NIHCKR_ATB3
AnimationMode = ONCE
End
ConditionState = FREEFALL
Animation = NIHCKR_SKL.NIHCKR_PFL
AnimationMode = LOOP
TransitionKey = TRANS_Falling
End
AliasConditionState = FREEFALL REALLYDAMAGED
AliasConditionState = FREEFALL DYING
ConditionState = PARACHUTING
Animation = NIHCKR_SKL.NIHCKR_PHG
AnimationMode = LOOP
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME ; our bone positions should come from the last frame, rather than the first
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING REALLYDAMAGED
AliasConditionState = PARACHUTING DYING
ConditionState = DYING
Animation = NIHCKR_SKL.NIHCKR_DTA
Animation = NIHCKR_SKL.NIHCKR_DTB
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = NIHCKR_SKL.NIHCKR_ADTG1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = NIHCKR_SKL.NIHCKR_ADTG2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = NIHCKR_SKL.NIHCKR_ADTG3
AnimationMode = ONCE
TransitionKey = None
End
ConditionState = SPECIAL_CHEERING
Animation = NIHCKR_SKL.NIHCKR_CHA
AnimationMode = LOOP
End
; surrender is cut. sorry. (srj)
; ConditionState = SURRENDER
; Animation = NIHCKR_SKL.NIHCKR_SST
; AnimationMode = ONCE
; TransitionKey = TRANS_SurrenderKneeling
; End
; ;@TODO -- ANIMATION FILE MISSING
; ;ConditionState = SURRENDER MOVING
; ; Animation = NIHCKR_SKL.NIHCKR_SWKB
; ; AnimationMode = ONCE
; ; TransitionKey = TRANS_SurrenderMoving
; ;End
; TransitionState = TRANS_Stand TRANS_SurrenderKneeling
; Animation = NIHCKR_SKL.NIHCKR_SUR
; AnimationMode = ONCE
; End
TransitionState = TRANS_Falling TRANS_Chute
Animation = NIHCKR_SKL.NIHCKR_POP
AnimationMode = ONCE
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME ; our bone positions should come from the last frame, rather than the first
End
TransitionState = TRANS_Chute TRANS_Stand
Animation = NIHCKR_SKL.NIHCKR_PTD
AnimationMode = ONCE
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Hacker
Side = China
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = ChinaBarracks
Object = ChinaPropagandaCenter
End
BuildCost = 625
BuildTime = 20.0 ;in seconds
ExperienceValue = 50 100 150 400 ;Experience point value at each level
ExperienceRequired = 0 100 300 500 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
; *** AUDIO Parameters ***
VoiceSelect = HackerVoiceSelect
VoiceMove = HackerVoiceMove
VoiceAttack = HackerVoiceAttack
SoundDie = HackerVoiceDie
SoundDieFire = DieByFireChina
SoundDieToxin = DieByToxinChina
VoiceGuard = HackerVoiceMove
; surrender is cut. sorry. (srj)
; VoiceSurrender = HackerVoiceMove
VoiceFear = HackerVoiceFear
VoiceTaskComplete = HackerVoiceHackComplete
UnitSpecificSounds
VoiceGarrison = HackerVoiceGarrison
VoiceCreate = HackerVoiceCreate
UnitPack = HackerPack
UnitUnpack = HackerUnpack
UnitCashPing = HackerCashPing
VoiceEnter = HackerVoiceMove
VoiceEnterHostile = HackerVoiceMove
VoiceGetHealed = HackerVoiceMove
VoiceHackInternet = HackerVoiceModeInternet
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY SCORE IGNORES_SELECT_ALL
Body = ActiveBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End
Behavior = HackInternetAIUpdate ModuleTag_03
UnpackTime = 7300 ;animation time is 7300 (changing this will scale anim speed)
PackTime = 5133 ;animation time is 5133 (changing this will scale anim speed)
CashUpdateDelay = 2000
RegularCashAmount = 5
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5 ;Adds + or - 20% to pack and unpack time randomly.
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Behavior = SpecialAbility ModuleTag_04
SpecialPowerTemplate = SpecialAbilityHackerDisableBuilding
UpdateModuleStartsAttack = Yes
InitiateSound = HackerVoiceHack
End
Behavior = SpecialAbilityUpdate ModuleTag_05
SpecialPowerTemplate = SpecialAbilityHackerDisableBuilding
StartAbilityRange = 150.0
UnpackTime = 7300 ;animation time is 7300 (changing this will scale anim speed)
PackTime = 5133 ;animation time is 5133 (changing this will scale anim speed)
PreparationTime = 3000
;PersistentPrepTime = 500 ; old setting
PersistentPrepTime = 333 ; NOTE! This drives how often the disable effect gets triggered
; This is also how often a new particle system effect is spawned
EffectDuration = 2000
SpecialObject = BinaryDataStream
DisableFXParticleSystem = DisabledEffectBinaryShower0
PackSound = HackerPack
UnpackSound = HackerUnpack
PrepSoundLoop = HackerPrepLoop
AwardXPForTriggering = 0 ;Careful, this is persistant so it's a DoT xp gain!
;SkillPointsForTriggering = ??? -- Dustin, fill me out if you want different balance values.
End
Behavior = PhysicsBehavior ModuleTag_06
Mass = 5.0
End
Behavior = SquishCollide ModuleTag_08
;nothing
End
; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDie
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDieCrushed
End
Behavior = SlowDeathBehavior ModuleTag_Death03
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_GIDie
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_GIDie
OCL = INITIAL OCL_ToxicInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
DeathTypes = NONE +POISONED_BETA
DestructionDelay = 0
FX = INITIAL FX_GIDie
OCL = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
End
; --- end Death modules ---
Behavior = PoisonedBehavior ModuleTag_11
PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
PoisonDuration = 3000 ; ... for this long after last hit by poison damage
End
Geometry = CYLINDER
GeometryMajorRadius = 10.0
GeometryMinorRadius = 10.0
GeometryHeight = 12.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
BuildCompletion = APPEARS_AT_RALLY_POINT
;Removing Upgrade!
Behavior = UpgradeDie ModuleTag_X1
;This frees the object based upgrade for the producer object.
DeathTypes = ALL
UpgradeToRemove = Upgrade_ShowSecondCommandSet ModuleTag_X2
End
Behavior = UpgradeDie ModuleTag_X3
;This frees the object based upgrade for the producer object.
DeathTypes = ALL
UpgradeToRemove = Upgrade_ShowFirstCommandSet ModuleTag_X4
End
WeaponSet
Conditions = None
Weapon = PRIMARY SuicideWeapon ;This is from the bomb truck. Needed for "Suicide"
End
CommandSet = ChinaDroneSelfDestruct
End
Now add these to the dozer.
Behavior = CommandSetUpgrade ModuleTag_24
CommandSet = ChinaDozerCommandSet
TriggeredBy = Upgrade_ShowFirstCommandSet
End
Behavior = CommandSetUpgrade ModuleTag_25
CommandSet = AdvChinaDozerCommandSet ;new command set here!
TriggeredBy = Upgrade_ShowSecondCommandSet
End
;Need for "Upgrade". Without this, the dozer cannot be upgraded.
Behavior = ProductionUpdate ModuleTag_26
;nothing
End
;Create "Drone" upon upgrade
Behavior = ObjectCreationUpgrade ModuleTag_Dr01
UpgradeObject = OCL_ChinaDozerDrone1
TriggeredBy = Upgrade_ShowSecondCommandSet
End
In upgrade.ini...
Upgrade Upgrade_ShowFirstCommandSet
DisplayName = NEWUPGRADE:MoreOptions
Type = OBJECT
BuildTime = 0
BuildCost = 0
End
Upgrade Upgrade_ShowSecondCommandSet
DisplayName = NEWUPGRADE:MoreOptions
Type = OBJECT
BuildTime = 0
BuildCost = 0
End
in ObjectCreationList.ini.....
ObjectCreationList OCL_ChinaDozerDrone1
CreateObject
Offset = X:0 Y:0 Z:10
ObjectNames = ChinaDozerDrone1
IgnorePrimaryObstacle = Yes
Disposition = LIKE_EXISTING
Count = 1
RequiresLivePlayer = Yes
End
End
in CommandSet.ini...
CommandSet ChinaDozerCommandSet
1 = Command_ConstructChinaPowerPlant
2 = Command_ConstructChinaBarracks
3 = Command_ConstructChinaSupplyCenter
4 = Command_ConstructChinaWarFactory
5 = Command_ConstructChinaTemple
7 = Command_ConstructChinaBunker
8 = Command_ConstructChinaGattlingCannon
9 = Command_ConstructChinaSpeakerTower
10 = Command_ConstructChinaCommandCenter
11 = Command_DisarmMinesAtPosition
12 = Command_ShowSecondCommandSet
End
CommandSet AdvChinaDozerCommandSet
1 = Command_ConstructChinaPowerPlant
2 = Command_ConstructChinaBarracks
3 = Command_ConstructChinaSupplyCenter
4 = Command_ConstructChinaWarFactory
5 = Command_ConstructChinaTemple
7 = Command_ConstructChinaAirfield
8 = Command_ConstructChinaPropagandaCenter
9 = Command_ConstructChinaNuclearMissileLauncher
10 = Command_ConstructChinaCommandCenter
11 = Command_DisarmMinesAtPosition
12 = Command_ShowFirstCommandSet
End
CommandSet ChinaDroneSelfDestruct
12 = Command_BombTruckDetonateNow ;From bomb truck.
End
In CommandButton.ini......
CommandButton Command_ShowSecondCommandSet
Command = OBJECT_UPGRADE
Upgrade = Upgrade_ShowSecondCommandSet
TextLabel = NEWUPGRADE:MoreOptions
ButtonImage = SSScorpionRocketBuild
ButtonBorderType = SYSTEM
DescriptLabel = NEWCONTROLBAR:MoreOptions
PurchasedLabel = NEWCONTROLBAR:MoreOptions
End
CommandButton Command_ShowFirstCommandSet
Command = OBJECT_UPGRADE
Upgrade = Upgrade_ShowFirstCommandSet
TextLabel = NEWUPGRADE:MoreOptions
ButtonImage = SSScorpionRocketBuild
ButtonBorderType = SYSTEM
DescriptLabel = NEWCONTROLBAR:MoreOptions
PurchasedLabel = NEWCONTROLBAR:MoreOptions
End
When "Next Button" is pressed, command set will change and a "Drone"
will be built. If "Next Button" is pressed in the second command set, you
can't press next button anymore. To re-enable "next button", select the
drone and press "Detonate"button. Drone will die and the next button is
enabled again.
|