Adding the GLA Hijacker to AmericaStep 1: The Object codeExtract 'Americainfantry.ini' from INIZH.big and place it in 'C or D or whatever:\Program Files (x86)\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI\Object', open the ini and scroll to the bottom of the file.
Now open 'GLAInfantry.ini' and search for the Hijacker object code, copy/paste the Hijacker code into the 'Americainfantry.ini' and adjust the following lines of code.
Code:
Object GLAInfantryHijacker --> Object AmericaInfantryHijacker
Side = GLA --> Side = America
Prerequisites
Object = GLABarracks --> Object = AmericaBarracks
Object = GLAPalace --> Object = AmericaStrategyCenter
Science = SCIENCE_Hijacker --> Science = SCIENCE_AmericaHijacker
End
The whole object code looks like this
Object AmericaInfantryHijacker
; *** ART Parameters ***
SelectPortrait = SUHijacker_L
ButtonImage = SUHijacker
;UpgradeCameo1 = NONE
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = UIHJCK_SKN
IdleAnimation = UIHJCK_SKL.UIHJCK_STA 0 25
IdleAnimation = UIHJCK_SKL.UIHJCK_IDA
IdleAnimation = UIHJCK_SKL.UIHJCK_IDB
AnimationMode = ONCE
TransitionKey = TRANS_Stand
End
AliasConditionState = REALLYDAMAGED
ConditionState = MOVING
Animation = UIHJCK_SKL.UIHJCK_RUN
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = None
ParticleSysBone = None InfantryDustTrails
End
AliasConditionState = REALLYDAMAGED MOVING
ConditionState = DYING
Animation = UIHJCK_SKL.UIHJCK_DTA
Animation = UIHJCK_SKL.UIHJCK_DTB
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = UIHJCK_SKL.UIHJCK_ADTE1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = UIHJCK_SKL.UIHJCK_ADTE2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = UIHJCK_SKL.UIHJCK_ADTE3
AnimationMode = ONCE
TransitionKey = None
End
ConditionState = SPECIAL_CHEERING
Animation = UIHJCK_SKL.UIHJCK_CHA
AnimationMode = LOOP
End
ConditionState = PARACHUTING
Animation = UIHJCK_SKL.UIHJCK_PHG
AnimationMode = LOOP
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING REALLYDAMAGED
AliasConditionState = PARACHUTING DYING
TransitionState = TRANS_Falling TRANS_Chute
Animation = UIHJCK_SKL.UIHJCK_POP
AnimationMode = ONCE
Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
End
TransitionState = TRANS_Chute TRANS_Stand
Animation = UIHJCK_SKL.UIHJCK_PTD
AnimationMode = ONCE
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Hijacker
Side = America
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 100
ShroudClearingRange = 200
Prerequisites
Object = AmericaBarracks
Object = AmericaStrategyCenter
Science = SCIENCE_AmericaHijacker
End
BuildCost = 400
BuildTime = 10.0 ;in seconds
ExperienceValue = 50 100 150 400 ;Experience point value at each level
ExperienceRequired = 0 150 450 900 ;Experience points needed to gain each level
IsTrainable = No ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = GLAInfantryHijackerCommandSet
; *** AUDIO Parameters ***
VoiceSelect = HijackerVoiceSelect
VoiceMove = HijackerVoiceMove
VoiceGuard = HijackerVoiceMove
VoiceAttack = HijackerVoiceAttack
VoiceFear = HijackerVoiceFear
UnitSpecificSounds
VoiceGarrison = HijackerVoiceGarrison
VoiceCreate = HijackerVoiceCreate
VoiceEnter = HijackerVoiceEnter
VoiceEnterHostile = HijackerVoiceEnterHostile
VoiceGetHealed = HijackerVoiceMove
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
EnterGuard = Yes
HijackGuard = Yes
KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE STEALTH_GARRISON
;STEALTH_GARRISON Added per Dustin, 12/14--ML
Behavior = StealthUpdate ModuleTag_02
StealthDelay = 500 ; half second delay before stealthy
StealthForbiddenConditions = MOVING ; only stealthy while stationary
MoveThresholdSpeed = 3
InnateStealth = Yes
OrderIdleEnemiesToAttackMeUponReveal = Yes
End
Body = ActiveBody ModuleTag_03
MaxHealth = 100.0
InitialHealth = 100.0
End
Behavior = HijackerUpdate ModuleTag_04
ParachuteName = AmericaParachute
End
Behavior = AIUpdateInterface ModuleTag_05
AutoAcquireEnemiesWhenIdle = Yes
End
Behavior = CommandButtonHuntUpdate ModuleTag_CBH01
End
Locomotor = SET_NORMAL JarmenKellLocomotor
Behavior = PhysicsBehavior ModuleTag_06
Mass = 5.0
End
Behavior = ConvertToHijackedVehicleCrateCollide ModuleTag_08
RequiredKindOf = VEHICLE ; This is my car now, infidel!
End
Behavior = SquishCollide ModuleTag_09
;nothing
End
; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_HijackerDie
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_HijackerDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireGLA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
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_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
End
Behavior = SlowDeathBehavior ModuleTag_Death07
DeathTypes = NONE +POISONED_GAMMA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryGamma
End
; --- end Death modules ---
Behavior = PoisonedBehavior ModuleTag_14
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
End
;------------------------------------------------------------------------------
Step 2: Make a button to construct the America HijackerOpen 'CommandButton.ini' and make a copy of the 'CommandButton Command_ConstructGLAInfantryHijacker' and adjust it for America use.
Original GLA Hijacker buttonCode:
CommandButton Command_ConstructGLAInfantryHijacker
Command = UNIT_BUILD
Object = GLAInfantryHijacker
TextLabel = CONTROLBAR:ConstructGLAInfantryHijacker
ButtonImage = SUHijacker
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLABuildHijacker
End
America Hijacker buttonCode:
CommandButton Command_ConstructAmericaInfantryHijacker
Command = UNIT_BUILD
Object = AmericaInfantryHijacker
TextLabel = CONTROLBAR:ConstructGLAInfantryHijacker
ButtonImage = SUHijacker
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLABuildHijacker
End
Step 3: Add the Hijacker to the America Barracks CommandSetOpen 'CommandSet.ini' and search for 'CommandSet AmericaBarracksCommandSet'.
Slot 5 is free so you can use it for the Hijacker.
Code:
CommandSet AmericaBarracksCommandSet
1 = Command_ConstructAmericaInfantryRanger
2 = Command_ConstructAmericaInfantryMissileDefender
3 = Command_ConstructAmericaInfantryColonelBurton
4 = Command_ConstructAmericaInfantryPathfinder
5 = Command_ConstructAmericaInfantryHijacker
6 = Command_ConstructAmericaInfantryBiohazardTech
7 = Command_UpgradeAmericaRangerFlashBangGrenade
8 = Command_UpgradeAmericaRangerCaptureBuilding
13 = Command_SetRallyPoint
14 = Command_Sell
End
Step 4: Make a science for the America HijackerOpen 'Science.ini', search for 'Science SCIENCE_Hijacker' and copy it.
Original GLA Hijacker ScienceCode:
Science SCIENCE_Hijacker
PrerequisiteSciences = SCIENCE_GLA SCIENCE_Rank3
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:GLAHijacker
Description = CONTROLBAR:ToolTipGLAScienceHijacker
End
America Hijacker ScienceCode:
Science SCIENCE_AmericaHijacker
PrerequisiteSciences = SCIENCE_AMERICA SCIENCE_Rank3
SciencePurchasePointCost = 1
IsGrantable = Yes
DisplayName = SCIENCE:GLAHijacker
Description = CONTROLBAR:ToolTipGLAScienceHijacker
End
It's a level 3 science, you can place the new America Hijacker Science beneath the Pathfinder science.
Step 4: Make a button to purchase the America Hijacker ScienceOpen 'CommandButton.ini', search for 'CommandButton Command_PurchaseScienceHijacker' and copy it.
Original GLA Purchase Science Hijacker buttonCode:
CommandButton Command_PurchaseScienceHijacker
Command = PURCHASE_SCIENCE
Science = SCIENCE_Hijacker
Object = GLAInfantryHijacker
ButtonImage = SUHijacker
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
America Purchase Science Hijacker buttonCode:
CommandButton Command_PurchaseScienceAmericaHijacker
Command = PURCHASE_SCIENCE
Science = SCIENCE_AmericaHijacker
Object = AmericaInfantryHijacker
ButtonImage = SUHijacker
ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
End
Step 5: Add the Purchase America Hijacker Science to the CommandSetOpen 'CommandSet.ini' and search for 'CommandSet SCIENCE_AMERICA_CommandSetRank3'.
You can put the Hijacker Science in slot 2 of the 'CommandSet SCIENCE_AMERICA_CommandSetRank3'
, it will be beneath the pathfinder on the science screen in game.
Code:
; Rank 3 assign buttons to position like so:
; 1 4 7 10 13
; 2 5 8 11 14
; 3 6 9 12 15
CommandSet SCIENCE_AMERICA_CommandSetRank3
1 = Command_PurchaseSciencePathfinder
2 = Command_PurchaseScienceAmericaHijacker
4 = Command_PurchaseScienceParadrop1
5 = Command_PurchaseScienceParadrop2
6 = Command_PurchaseScienceParadrop3
7 = Command_PurchaseScienceA10ThunderboltMissileStrike1
8 = Command_PurchaseScienceA10ThunderboltMissileStrike2
9 = Command_PurchaseScienceA10ThunderboltMissileStrike3
10 = Command_PurchaseScienceEmergencyRepair1
11 = Command_PurchaseScienceEmergencyRepair2
12 = Command_PurchaseScienceEmergencyRepair3
END
If i made any mistakes feel free to correct it.
Greetz
Edited by user Wednesday, April 30, 2014 4:27:48 PM(UTC)
| Reason: Not specified