logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,798
Posts: 95,842

Administrators:
DeeZire, Redemption

There are currently 35 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 08-17-2006, 01:09 PM   #1 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 21
Default Tank cannot be built in the game

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?
Jarmonator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 02:22 PM   #2 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 110
Send a message via MSN to full_circle
Default

Have you made a CommandButton for it?

I don't think the game crashes if you don't make one but then it will just not let you build the unit.
full_circle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 02:30 PM   #3 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 21
Default

Yes, I've made one. Still doesn't work :/
Jarmonator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 02:34 PM   #4 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 21
Default

...And here's the CommandButton code, if it helps:

Code:
CommandButton Command_ConstructChinaTankT72
  Command       = UNIT_BUILD
  Object        = ChinaTankT72
  TextLabel     = CONTROLBAR:ConstructChinaTankT72
  ButtonImage   = SNBattlemaster
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipChinaBuildT72
End
Jarmonator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 02:36 PM   #5 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 110
Send a message via MSN to full_circle
Default

Can you post it? Are you sure it references the correct object - ChinaTankT72?


[Edit: Gah, you beat me to it...


Ok, I'm stumped. I can't see anything wrong with the code]
full_circle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 02:40 PM   #6 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 110
Send a message via MSN to full_circle
Default

The fact that it doesn't tell you how much it costs implies it can't find the object to get the BuildCost.

And the fact that you can't build it implies Generals can't find it (either the object or the instruction to build the object).

That's as far as my mind can take me.

Perhaps someone a bit better at thinking outside the box can help?
full_circle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2006, 10:03 PM   #7 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 383
Default

Did you remeber to put the CommandButton in the War Factory's CommandSet?
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 02:36 AM   #8 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 21
Default

Yes, otherwise it wouldn't appear in there :P
Jarmonator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 08:19 AM   #9 (permalink)
Junior Member
 
Join Date: Feb 2006
Posts: 21
Default

...Or is there something wrong with the model? Damn
Jarmonator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 08:55 AM   #10 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 110
Send a message via MSN to full_circle
Default

If there was something wrong with the model (the w3d and/or the texture files) then it would just be invisible.

Here's some things to try:

1. Start again. Scrap this unit and re-code a new one. Maybe if there's a problem that we can't see in your current code it will not be present in new code

2. Reinstall Generals. I doubt this will fix it, but you never know...
full_circle is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
anyone interested in map pack built around the Deezire mod? razor Map Authoring 1 11-05-2006 12:10 PM
Built in squads but not like Angry Mob... Indigo Generals & Zero Hour Editing 4 10-17-2005 02:37 PM
choose your turret and or tank chasi. custom a current tank Vger Generals & Zero Hour Editing 18 02-14-2004 03:03 AM
How to have pre-built structure assigned to a player? oli123 Generals & Zero Hour Editing 2 01-12-2004 04:04 PM
How to modify the pre-built upgrades field? borg4 Generals & Zero Hour Editing 0 06-04-2003 07:51 PM


All times are GMT -4. The time now is 09:37 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.