hey guys,
Modding troubles yet again.
Right, here goes:
I have tried to make a second commandset for the american dozer, I stole the code from the GLA worker commandset to switch to Fake buildings and changed it all so it goes to a second commandset for the dozer, the code is as follows... but first the problem. All the problem is that for some reason the button is un clickable like i havent got an upgrade to allow me to use it yet. soso, the code:
Code:
Upgrade.INI
Upgrade Upgrade_AmericaDozerNextCommandSet
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = SANext
End
;----------------------------
Upgrade Upgrade_AmericaDozerBackCommandSet
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = SABack
End
CommandButton.INI
CommandButton Command_UpgradeAmericaDozerNextCommandSet
Command = OBJECT_UPGRADE
Upgrade = Upgrade_AmericaDozerNextCommandSet
TextLabel = CONTROLBAR:UpgradeAmericaDozerNextCommandSet
ButtonImage = SANext
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUpgradeAmericaDozerNextCommandSet
End
CommandButton Command_UpgradeAmericaDozerBackCommandSet
Command = OBJECT_UPGRADE
Upgrade = Upgrade_AmericaDozerBackCommandSet
TextLabel = CONTROLBAR:UpgradeAmericaDozerBackCommandSet
ButtonImage = SABack
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUpgradeAmericaDozerBackCommandSet
End
CommandSet.INI
CommandSet AmericaDozerNextCommandSet
1 = Command_ConstructAmericaPowerPlant
2 = Command_ConstructAmericaStrategyCenter
3 = Command_ConstructAmericaBarracks
4 = Command_ConstructAmericaSupplyDropZone
5 = Command_ConstructAmericaSupplyCenter
6 = Command_ConstructAmericaParticleCannonUplink
7 = Command_ConstructAmericaPatriotBattery
8 = Command_ConstructAmericaSAMSite
9 = Command_ConstructAmericaFireBase
10 = Command_ConstructAmericaCommandCenter
11 = Command_ConstructAmericaWarFactory
12 = Command_ConstructAmericaAirfield
13 = Command_UpgradeAmericaDozerNextCommandSet
14 = Command_DisarmMinesAtPosition
End
CommandSet AmericaDozerBackCommandSet
13 = Command_UpgradeAmericaDozerBackCommandSet
End
That is for the commands, and here is the dozer code
Code:
AmericaVehicle.INI
;------------------------------------------------------------------------------
;USA Construction Dozer or USDozer
Object AmericaVehicleDozer
; *** ART Parameters ***
SelectPortrait = SACDozer_L
ButtonImage = SACDozer
UpgradeCameo1 = Upgrade_AmericaDozerNextCommandSet
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DTruckDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = AVCONSTDOZ_A
ParticleSysBone = EXHAUSTFX01 DozerSmokeLight
WaitForStateToFinishIfPossible = TRANS_DIGGING
End
ConditionState = PREATTACK_A
Animation = AVCONSTDOZ_A.AVCONSTDOZ_A
AnimationMode = ONCE
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
ParticleSysBone = DIRTFX01 DozerDirtFall ;gush of dirt
TransitionKey = TRANS_DIGGING
End
ConditionState = MOVING
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING
End
ConditionState = REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
Animation = AVCONSTDOZ_AD.AVCONSTDOZ_AD
AnimationMode = ONCE
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
TransitionKey = TRANS_DIGGING_DAMAGED
End
ConditionState = MOVING REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
TrackMarks = EXTireTrack2.tga
Dust = RocketBuggyDust
DirtSpray = RocketBuggyDirtSpray
; These parameters are only used if the model has a separate suspension,
; and the locomotor has HasSuspension = Yes.
LeftFrontTireBone = TIRE01
RightFrontTireBone = TIRE02
LeftRearTireBone = TIRE03
RightRearTireBone = TIRE04
TireRotationMultiplier = 0.2 ; this * speed = rotation.
PowerslideRotationAddition = 0 ; This vehicle doesn't powerslide.
ParticlesAttachedToAnimatedBones = Yes
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Dozer
Side = America
EditorSorting = VEHICLE
TransportSlotCount = 5 ;how many "slots" we take in a transport (0 == not transportable)
BuildCost = 800
BuildTime = 5.0 ; in seconds
VisionRange = 300
ShroudClearingRange = 400
WeaponSet
Conditions = None
Weapon = PRIMARY None
End
WeaponSet
Conditions = MINE_CLEARING_DETAIL
Weapon = PRIMARY DozerMineDisarmingWeapon
End
ArmorSet
Conditions = None
Armor = DozerArmor ;Special Explosion-Proof Armor
DamageFX = TankDamageFX
End
CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaDozerNextCommandSet
; *** AUDIO Parameters ***
VoiceSelect = DozerUSAVoiceSelect
VoiceMove = DozerUSAVoiceMove
VoiceGuard = DozerUSAVoiceMove
VoiceTaskComplete = DozerUSAVoiceBuildComplete
SoundMoveStart = DozerUSAMoveStart
SoundMoveStartDamaged = DozerUSAMoveStart
UnitSpecificSounds
VoiceCreate = DozerUSAVoiceCreate
VoiceNoBuild = DozerUSAVoiceBuildNot
VoiceCrush = DozerUSAVoiceCrush
VoiceRepair = DozerUSAVoiceRepair
VoiceDisarm = DozerUSAVoiceClearMine
TruckLandingSound = NoSound
TruckPowerslideSound = NoSound
VoiceEnter = DozerUSAVoiceMove
VoiceBuildResponse = DozerUSAVoiceBuild
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD VEHICLE SCORE SELECTABLE CAN_CAST_REFLECTIONS DOZER
Body = ActiveBody ModuleTag_02
MaxHealth = 250.0
InitialHealth = 250.0
; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
SubdualDamageCap = 500
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End
Behavior = DozerAIUpdate ModuleTag_03
RepairHealthPercentPerSecond = 2% ; % of max health to repair each second
BoredTime = 5000 ; in milliseconds
BoredRange = 150 ; when bored, we look this far away to do something
; the only "enemies" that workers can acquire are mines, to be disarmed...
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL AmericaVehicleDozerLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 75.0
End
Behavior = StealthDetectorUpdate ModuleTag_05
DetectionRate = 500 ; how often to rescan for stealthed things in my sight (msec)
;DetectionRange = ??? ;Dustin, enable this for independant balancing!
CanDetectWhileGarrisoned = No ;Garrisoned means being in a structure that you units can shoot out of.
CanDetectWhileContained = No ;Contained means being in a transport or tunnel network.
ExtraRequiredKindOf = MINE ; we can only detect MINES, not other stealthed things
End
Behavior = TransitionDamageFX ModuleTag_06
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
; Catch fire, and explode death
Behavior = SlowDeathBehavior ModuleTag_07
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 100
DestructionDelay = 1500
DestructionDelayVariance = 600
FX = INITIAL FX_CrusaderCatchFire
OCL = FINAL OCL_AmericaDozerExplode
FX = FINAL FX_BattleMasterExplosionOneFinal
End
Behavior = CreateCrateDie ModuleTag_CratesChange
CrateData = SalvageCrateData
End
;------------------------------------------------------------------------------
Behavior = CommandSetUpgrade ModuleTag_29
TriggeredBy = Upgrade_AmericaDozerNextCommandSet
RemovesUpgrades = Upgrade_AmericaDozerNextCommandSet
CommandSet = AmericaDozerNextCommandSet
End
Behavior = CommandSetUpgrade ModuleTag_30
TriggeredBy = Upgrade_AmericaDozerBackCommandSet
RemovesUpgrades = Upgrade_AmericaDozerBackCommandSet Upgrade_AmericaDozerNextCommandSet
CommandSet = AmericaDozerBackCommandSet
End
;------------------------------------------------------------------------------
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
;;;;;;;; ClientUpdate = AnimatedParticleSysBoneClientUpdate ModuleTag_22
;;;;;;;; End
Behavior = FXListDie ModuleTag_23
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = DestroyDie ModuleTag_24
DeathTypes = NONE +CRUSHED +SPLATTED
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 15.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
and here is for the upgrade allowance on the commandcenter
Code:
Behavior = GrantUpgradeCreate ModuleTag_35
UpgradeToGrant = Upgrade_AmericaDozerNextCommandSet
ExemptStatus = UNDER_CONSTRUCTION
End
Behavior = GrantUpgradeCreate ModuleTag_36
UpgradeToGrant = Upgrade_AmericaDozerBackCommandSet
ExemptStatus = UNDER_CONSTRUCTION
End
Thanks in advance, kev