I've been trying to replace some units into custom ones to the game, mainly some tanks... e.g. T72 main battle tank for China. Everything seems to work BUT: The tank cannot be built and you cannot see the prize of it. The models and code is okay, but I just can't build it... Here's the code strings if they help:
FactionUnit.INI:
Code:
;------------------------------------------------------------------------------
Object ChinaTankT72
; *** ART Parameters ***
SelectPortrait = SNBattlemaster_L
ButtonImage = SNBattlemaster
UpgradeCameo1 = Upgrade_Nationalism
UpgradeCameo2 = Upgrade_ChinaUraniumShells
UpgradeCameo3 = Upgrade_ChinaNuclearTanks
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = NVT72
Turret = Turret
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = REALLYDAMAGED
Model = NVT72_D
Turret = Turret
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = RUBBLE
Model = NVT72_D
Turret = Turret
End
TrackMarks = EXTnkTrack.tga
End
; ***DESIGN parameters ***
DisplayName = OBJECT:T72
Side = China
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY BattleMasterTankGun
End
ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
BuildCost = 700
BuildTime = 8.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = ChinaWarFactory
End
ExperienceValue = 100 100 200 400 ;Experience point value at each level
ExperienceRequired = 0 200 300 600 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
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 = ChinaVehicleBattleMasterCommandSet
; *** AUDIO Parameters ***
VoiceSelect = BattleMasterTankVoiceSelect
VoiceMove = BattleMasterTankVoiceMove
VoiceGuard = BattleMasterTankVoiceMove
VoiceAttack = BattleMasterTankVoiceAttack
SoundMoveStart = BattleMasterTankMoveStart
SoundMoveStartDamaged = BattleMasterTankMoveStart
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = BattleMasterTankVoiceCreate
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
VoiceCrush = BattleMasterTankVoiceCrush
VoiceEnter = BattleMasterTankVoiceMove
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 = 270.0
InitialHealth = 270.0
End
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 120 ; turn rate, in degrees per sec
ControlledWeaponSlots = PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL BattleMasterLocomotor
Locomotor = SET_NORMAL_UPGRADED NuclearBattleMasterLocomotor
Behavior = HordeUpdate ModuleTag_04
RubOffRadius = 150 ; if I am this close to a real hordesman, I will get to be an honorary hordesman
UpdateRate = 1000 ; how often to recheck horde status (msec)
Radius = 75 ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
KindOf = VEHICLE ; what KindOf's must match to count towards horde-ness
AlliesOnly = Yes ; do we only count allies towards horde status?
ExactMatch = Yes ; do we only count units of our exact same type towards horde status? (overrides kindof)
Count = 5 ; how many units must be within Radius to grant us horde-ness
Action = HORDE ; when horde-ing, grant us the HORDE bonus
End
Behavior = PhysicsBehavior ModuleTag_05
Mass = 25.0
End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_06
DeathWeapon = NuclearTankDeathWeapon
StartsActive = No ; turned on by upgrade
TriggeredBy = Upgrade_ChinaNuclearTanks
End
Behavior = LocomotorSetUpgrade ModuleTag_07
TriggeredBy = Upgrade_ChinaNuclearTanks
End
; A crushing defeat
Behavior = DestroyDie ModuleTag_08
DeathTypes = NONE +CRUSHED +SPLATTED
End
Behavior = FXListDie ModuleTag_09
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_10
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = CreateCrateDie ModuleTag_11
CrateData = SalvageCrateData
;CrateData = EliteTankCrateData
;CrateData = HeroicTankCrateData
End
Behavior = SlowDeathBehavior ModuleTag_12
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 25
DestructionDelay = 200
DestructionDelayVariance = 100
OCL = FINAL OCL_ChinaTankBattleMasterDebris
FX = FINAL FX_BattleMasterExplosionOneFinal
End
Behavior = TransitionDamageFX ModuleTag_13
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 2 ; taking this much damage...
AflameDamageDelay = 700 ; this often.
End
Geometry = BOX
GeometryMajorRadius = 13.0
GeometryMinorRadius = 9.0
GeometryHeight = 10
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
CommandSet.INI
Code:
CommandSet ChinaWarFactoryCommandSet
1 = Command_ConstructChinaTankBattleMaster
2 = Command_ConstructChinaVehicleTroopCrawler
3 = Command_ConstructChinaTankT72
4 = Command_ConstructChinaTankGattling
5 = Command_ConstructChinaVehicleInfernoCannon
6 = Command_ConstructChinaTankOverlord
7 = Command_ConstructChinaVehicleNukeLauncher
8 = Command_UpgradeChinaBlackNapalm
9 = Command_UpgradeChinaChainGuns
10 = Command_UpgradeChinaMines
11 = Command_SetRallyPoint
12 = Command_Sell
End
Plus some important changes in generals.csf
What's wrong?
