This tutorial will show you how to enable the Leopard Hover Tank in Generals. In addition to the code in this tutorial you will need to add several entries to the Generals.csf file (which are listed at the end of this tutorial), as well as the model and textures for the unit. If you don't have these files email me at acid369@gmail.com and I'll send them to you.
Now onto the unit code, first of all open the file FactionUnit.ini located in Data\INI\Object. Add this
Code:
Object AmericaTankLeopard
; ; *** ART Parameters ***
SelectPortrait = SACLeopard_L
ButtonImage = SACLeopard
UpgradeCameo1 = Upgrade_AmericaBattleDrone
UpgradeCameo2 = Upgrade_AmericaScoutDrone
UpgradeCameo3 = Upgrade_AmericaAdvancedTraining
UpgradeCameo4 = Upgrade_AmericaCompositeArmor
UpgradeCameo5 = Upgrade_AmericaLeopardHover
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = AVCrusader
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Drive
End
ConditionState = MOVING
Model = AVCrusader
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Drive
ParticleSysBone = TreadFX01 QuadCannonDust
ParticleSysBone = TreadFX02 QuadCannonDust
End
ConditionState = REALLYDAMAGED
Model = AVCrusader_D
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_DriveDamaged
End
AliasConditionState = DAMAGED
AliasConditionState = MOVING DAMAGED
AliasConditionState = MOVING REALLYDAMAGED
ConditionState = RUBBLE
Model = AVCrusader_D
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = WEAPONSET_PLAYER_UPGRADE
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_Hover
End
ConditionState = WEAPONSET_PLAYER_UPGRADE MOVING
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 QuadCannonDust
ParticleSysBone = TreadFX02 QuadCannonDust
TransitionKey = TRANS_Hover
End
TransitionState = TRANS_Drive TRANS_Hover
Model = AVCrusader_A
HideSubObject = TurretFX01
Animation = AVCRUSADER_A.AVCRUSADER_A
AnimationMode = ONCE
End
ConditionState = WEAPONSET_PLAYER_UPGRADE REALLYDAMAGED
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
TransitionKey = TRANS_HoverDamaged
End
AliasConditionState = WEAPONSET_PLAYER_UPGRADE DAMAGED
AliasConditionState = WEAPONSET_PLAYER_UPGRADE MOVING DAMAGED
AliasConditionState = WEAPONSET_PLAYER_UPGRADE MOVING REALLYDAMAGED
ConditionState = WEAPONSET_PLAYER_UPGRADE RUBBLE
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
TransitionState = TRANS_DriveDamaged TRANS_HoverDamaged
Model = AVCrusader_A
HideSubObject = TurretFX01
Animation = AVCRUSADER_A.AVCRUSADER_A
AnimationMode = ONCE
End
ConditionState = WEAPONSET_PLAYER_UPGRADE OVER_WATER
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
End
ConditionState = WEAPONSET_PLAYER_UPGRADE MOVING OVER_WATER
Model = AVCrusader_H
Turret = Turret
WeaponFireFXBone = PRIMARY TurretMS
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY TurretFX
WeaponLaunchBone = PRIMARY TurretMS
ParticleSysBone = TreadFX01 AmphibWave
End
AliasConditionState = WEAPONSET_PLAYER_UPGRADE MOVING OVER_WATER REALLYDAMAGED
TrackMarks = EXTnkTrack.tga
End
; ***DESIGN parameters ***
DisplayName = OBJECT:Leopard
Side = America
EditorSorting = VEHICLE
TransportSlotCount = 3
WeaponSet
Conditions = None
Weapon = PRIMARY PaladinTankGun
End
WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY PaladinTankGun
End
ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
BuildCost = 1000
BuildTime = 10.0
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = AmericaWarFactory
End
ExperienceValue = 100 100 200 400
ExperienceRequired = 0 200 300 600
IsTrainable = Yes
CrusherLevel = 2
CrushableLevel = 2
CommandSet = AmericaTankLeopardCommandSet
; *** AUDIO Parameters ***
VoiceSelect = CrusaderTankVoiceSelect
VoiceMove = CrusaderTankVoiceMove
VoiceGuard = CrusaderTankVoiceMove
VoiceAttack = CrusaderTankVoiceAttack
SoundMoveStart = CrusaderTankMoveStart
SoundMoveStartDamaged = CrusaderTankMoveStart
UnitSpecificSounds
VoiceCreate = CrusaderTankVoiceCreate
VoiceEnter = CrusaderTankVoiceMove
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = CrusaderTankVoiceCrush
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 480
InitialHealth = 480
End
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 180
ControlledWeaponSlots = PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL CrusaderLocomotor
Locomotor = SET_NORMAL_UPGRADED BasicAmphibiousLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
End
Behavior = ObjectCreationUpgrade ModuleTag_05
UpgradeObject = OCL_AmericanBattleDrone
TriggeredBy = Upgrade_AmericaBattleDrone
ConflictsWith = Upgrade_AmericaScoutDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_06
UpgradeObject = OCL_AmericanScoutDrone
TriggeredBy = Upgrade_AmericaScoutDrone
ConflictsWith = Upgrade_AmericaBattleDrone
End
Behavior = ProductionUpdate ModuleTag_07
MaxQueueEntries = 1
End
Behavior = ExperienceScalarUpgrade ModuleTag_08
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0
End
Behavior = MaxHealthUpgrade ModuleTag_09
TriggeredBy = Upgrade_AmericaCompositeArmor
AddMaxHealth = 100.0
ChangeType = ADD_CURRENT_HEALTH_TOO
End
Behavior = WeaponSetUpgrade ModuleTag_10
TriggeredBy = Upgrade_AmericaLeopardHover
End
Behavior = LocomotorSetUpgrade ModuleTag_11
TriggeredBy = Upgrade_AmericaLeopardHover
End
Behavior = SlowDeathBehavior ModuleTag_10
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 500
DestructionDelayVariance = 100
FX = INITIAL FX_GenericTankDeathEffect
OCL = MIDPOINT OCL_GenericTankDeathEffect
FX = FINAL FX_DragonTankDeathExplosionFinal
OCL = FINAL OCL_CrusaderTurret
End
Behavior = SlowDeathBehavior ModuleTag_11
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 2000
DestructionDelayVariance = 300
FX = INITIAL FX_CrusaderCatchFire
OCL = FINAL OCL_GenericTankDeathEffect
FX = FINAL FX_DragonTankDeathExplosionFinal
End
Behavior = TransitionDamageFX ModuleTag_12
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = DestroyDie ModuleTag_13
DeathTypes = NONE +CRUSHED +SPLATTED
End
Behavior = FXListDie ModuleTag_14
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_15
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = CreateCrateDie ModuleTag_CratesChange
CrateData = SalvageCrateData
End
Behavior = EjectPilotDie ModuleTag_17
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
ExemptStatus = HIJACKED
VeterancyLevels = ALL -REGULAR
End
Behavior = MaxHealthUpgrade ModuleTag_18
TriggeredBy = Upgrade_AmericaCompositeArmor
AddMaxHealth = 100.0
ChangeType = ADD_CURRENT_HEALTH_TOO
End
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000
AflameDamageAmount = 3
AflameDamageDelay = 500
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45
End
Save the file and close it. Now open CommandSet.ini located in Data\INI. Find this:
Code:
CommandSet AmericaWarFactoryCommandSet
1 = Command_ConstructAmericaTankCrusader
2 = Command_ConstructAmericaVehicleTomahawk
3 = Command_ConstructAmericaVehicleHumvee
4 = Command_ConstructAmericaVehicleMedic
5 = Command_ConstructAmericaVehiclePaladin
; 9 = Command_UpgradeAmericaTomahawkRemoteControl ***CUT***
10 = Command_UpgradeAmericaTOWMissile
11 = Command_SetRallyPoint
12 = Command_Sell
End
Change it to:
Code:
CommandSet AmericaWarFactoryCommandSet
1 = Command_ConstructAmericaTankCrusader
2 = Command_ConstructAmericaVehicleTomahawk
3 = Command_ConstructAmericaVehicleHumvee
4 = Command_ConstructAmericaVehicleMedic
5 = Command_ConstructAmericaTankLeopard
6 = Command_ConstructAmericaVehiclePaladin
10 = Command_UpgradeAmericaTOWMissile
11 = Command_SetRallyPoint
12 = Command_Sell
End
Now add this
Code:
CommandSet AmericaTankLeopardCommandSet
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_UpgradeAmericaLeopardHover
9 = Command_AttackMove
11 = Command_Guard
12 = Command_Stop
End
Save the file and close it. Now open CommandButton.ini located in Data\INI. Add this
Code:
CommandButton Command_UpgradeAmericaLeopardHover
Command = OBJECT_UPGRADE
Upgrade = Upgrade_AmericaLeopardHover
TextLabel = CONTROLBAR:UpgradeLeopardHover
ButtonImage = SACCrusader
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:USAUpgradeHover
End
CommandButton Command_ConstructAmericaTankLeopard
Command = UNIT_BUILD
Object = AmericaTankLeopard
TextLabel = CONTROLBAR:ConstructAmericaTankLeopard
ButtonImage = SACLeopard
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipUSABuildLeopard
End
Save the file and close it. Now open Upgrade.ini located in Data\INI. Add this
Code:
Upgrade Upgrade_AmericaLeopardHover
DisplayName = UPGRADE:AmericaLeopardHover
Type = OBJECT
BuildTime = 10.0
BuildCost = 500
ButtonImage = SACCrusader
End
Save the file, close it and you're done. You have now successfully enabled the Leopard Hover Tank. The only thing you will need to do now is create some CSF entries in the Generals.csf file. The entries you'll need to create are:
OBJECT:Leopard
CONTROLBAR:UpgradeLeopardHover
CONTROLBAR:USAUpgradeHover
CONTROLBAR:ConstructAmericaTankLeopard
CONTROLBAR:ToolTipUSABuildLeopard
UPGRADE:AmericaLeopardHover
Bookmarks