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,844

Administrators:
DeeZire, Redemption

There are currently 32 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 02-07-2004, 09:49 PM   #1 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Texas
Posts: 709
Send a message via ICQ to Vanguard Send a message via AIM to Vanguard Send a message via MSN to Vanguard Send a message via Yahoo to Vanguard
Default A Beginners Guide to Adding New Units.

**NOTE** Too add any type of unit you must follow this process.

Alright guys here’s a very straight forward tutorial on adding a new unit. The files you'll need are ChinaVehicle.ini, AmericaVehicle.ini, CommandButton.ini, CommandSet.ini.

*Areas that are bolded are to be added to the existing code.

You need an INI folder in the Data folder. If you don't have the folders in the right area, you'll wont see your new unit in the commandbar menu or the button will be greyed out, this has to do with the inis. If everything is working you'll see your new unit.

Ok now on to business

First open the ChinaVehicle.ini and then paste this into the AmericaVehicle.ini.

Code:
;------------------------------------------------------------------------------
Object AmericaTankOverlord ;<- This is used by the Command Button so it knows to build this unit when you click on it.

  ; *** ART Parameters ***
  SelectPortrait         = SNOverlord_L ;<- The units portrait.
  ButtonImage            = SNOverlord ;<- Units button Image.

  UpgradeCameo1 = Upgrade_ChinaUraniumShells 
  UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  UpgradeCameo3 = Upgrade_ChinaOverlordBattleBunker
  UpgradeCameo4 = Upgrade_ChinaOverlordGattlingCannon
  UpgradeCameo5 = Upgrade_ChinaOverlordPropagandaTower ;<- Upgrade Cameos are used to tell the user what upgrades a unit currently has, look at a units portrait when you select a unit, see the five small boxes around the unit portrait, those are the upgrade cameos.
  
  
  Draw = W3DOverlordTankDraw ModuleTag_01
    ConditionState        = NONE
      Model               = NVOvrlrd ;<- This is the unit model, this shows up ingame.
      Animation           = NVOvrlrd.NVOvrlrd ;<- This is the units animation, not all units have one.
      AnimationMode       = LOOP ;<- This is the mode of animation you can use ONCE, LOOP, ONCE BACKWARD, The current setting makes the animation play over and over again until the unit dies.
      Turret              = Turret01 ;<- This is the units turret object/bone, in this case object. Some units have it as Turret01 or TURRET.
      WeaponFireFXBone    = PRIMARY Muzzle ;<- Here’s a tricky one, yes the overlord has two fire points, the bones are named, MUZZLE01 and MUZZLE02, but if you put Muzzle for the Fire FX bone then it will cycle through the bones with the word MUZZLE in it.
      WeaponRecoilBone    = PRIMARY Barrel ;<- Same thing as the Muzzle bones but using an object.
      WeaponMuzzleFlash   = PRIMARY MuzzleFX ;<- Same thing as with the Muzzle bones.
      WeaponLaunchBone = PRIMARY Muzzle ;<- Same thing as before.
    End
    ConditionState        = REALLYDAMAGED ;<- This the condition state for when the unit get in to the yellow zone of its health. 
      Model               = NVOvrlrd_d
      Animation           = NVOvrlrd_d.NVOvrlrd_d
      AnimationMode       = LOOP
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End

    ConditionState        = RUBBLE ;<- This is the condition state for when the units health is in the red.
      Model               = NVOvrlrd_d
      Turret              = Turret01
      WeaponFireFXBone    = PRIMARY Muzzle
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Muzzle
    End

    TrackMarks           = EXTnkTrack.tga ;<- This is the texture for the track marks left by a tank/unit, the bones it uses are TREADFX01-TREADFX04.
    OkToChangeModelColor = Yes ;<- Used for house colors.
    TreadAnimationRate = 2.0 ; amount of tread texture to move per second
    TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Overlord ;<- This is the units name that shows up when you put the mouse cursor over the unit, if you don’t have a new units name entered into the CSF file then it will come up as MISSING:OBJECT:UnitName.
  Side                = America ;<- This is the name of the side it is for, it will appear in World Builder under this factions name.
  EditorSorting       = VEHICLE ;<- This is what category under the factions name it shows up under.
  TransportSlotCount  = 3 ;<- This is how many spaces it takes up when you load it into a transport.
  WeaponSet ;<- This is the set of weapons it has.
    Conditions        = None ;<- This can be PLAYER_UPGRADE, CRATE_UPGRADE, or None, when it is None those are the weapons it starts with.
    Weapon            = PRIMARY OverlordTankGun ;<- This is the PRIMARY weapon, you can have up to three weapons on a unit, PRIMANRY, SECONDARY, and TERTIARY.
  End
  WeaponSet
    Conditions        = PLAYER_UPGRADE ;<- This is an upgraded weapon set.
    Weapon            = PRIMARY OverlordTankGun
    Weapon            = SECONDARY GattlingBuildingGunAirDummy ;Dummy weapon that allows manual targeting of air units outside range
                                                              ;gattling cannon upgrade has been made.
  End
  ArmorSet ;<- This is the Armor set where you tell a unit what armor it uses.
    Conditions        = None ;<- This is the default you can have an armor upgrade, but I havn’t tried it yet.
    Armor             = TankArmor ;<- This is what armor the unit uses, to edit or create a new armor, look in Armor.ini.
    DamageFX          = TankDamageFX ;<- FX that plays when something with that armour type gets hit.
  End
  BuildCost       = 2000
  BuildTime       = 20.0          ;<- In seconds, so it takes it 20 seconds to build.    
  VisionRange     = 150 ;<- the units range of sight, this is not the attack range for its weapon.
  ShroudClearingRange = 200 ;<- The amount of area of shroud it clears every foot.
  Prerequisites ;<- The structures that are required for you to build this unit. You can have as many as you want.
    Object = AmericaWarFactory ;<- The first prerequisite required.
    Object = AmericaStrategyCenter ;<- The Second prerequisite required.
  End

  ExperienceValue = 200 200 400 600   ;Experience point value at each level
  ExperienceRequired = 0 400 600 1200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = ChinaTankOverlordDefaultCommandSet ;<- The units commandset. Has the all the commands, like stop and attack move on it.

  ; *** AUDIO Parameters ***
  VoiceSelect = OverlordTankVoiceSelect ;<- Selection Voice.
  SoundMoveStart = OverlordTankMoveStart ;<- The sound made when the unit begins to move.
  SoundMoveStartDamaged = OverlordTankMoveStart ;<- The sound made when the unit begins to move when it’s damaged.
  VoiceMove = OverlordTankVoiceMove ;<- The voice the unit makes when you tell it to move.
  VoiceGuard = OverlordTankVoiceMove ;<- The voice the unit makes when you tell it to guard an area.
  VoiceAttack = OverlordTankVoiceAttack ;<- The voice the unit makes when you tell the unit to attack.

  UnitSpecificSounds ;<- The sounds that are for this unit only.
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate = OverlordTankVoiceCreate ;<- The voice made when you create the unit (when it comes out of the War Factory).
    TurretMoveStart = NoSound ;<- Sound made when the turret starts to move.
    TurretMoveLoop = OverlordTankTurretMoveLoop ;<- Sound made when the turret is in continuous motion like turning 180o.
    VoiceCrush = OverlordTankVoiceCrush ;<- The voice when it crushes a unit. 
    VoiceEnter = OverlordTankVoiceMove ;<- The voice made when you tell the unit to enter a transport.
    VoiceUnload = OverlordTankVoiceUnload ;<- Voice made when you tell the unit to unload all it’s contents.
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT ;<- Shows up as a dot on the radar.
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE HUGE_VEHICLE ;<- Defines what categories a unit fits into.
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 1100.0 ;<- The maximum health a unit can have at any given time.
    InitialHealth   = 1100.0 ;<- The health that a unit starts with, if you make it start with zero, the instant it is made, it dies, so never do that.

    ; 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 = 2200 ;<- Disables the unit when its health it this high.
    SubdualDamageHealRate = 500 ;<- The amount the subdual effect wears off per SubdualDamageHealRate.
    SubdualDamageHealAmount = 50 ;<- The time between reducing the subdual effect if the object is no longer being subdued.

  End

  Behavior = TransportAIUpdate ModuleTag_03
    Turret
      TurretTurnRate = 60 ;30 ;15   // turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY ;<- What weapon the turret controls.
    End
    AutoAcquireEnemiesWhenIdle = Yes ;<- Whether the unit can acquire a target on its own.
  End

  Locomotor = SET_NORMAL OverlordLocomotor ;<- Its normal locomotor.
  Locomotor = SET_NORMAL_UPGRADED NuclearOverlordLocomotor ;<- An upgrade to the units locomotor.

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_04
    DeathWeapon   = NuclearTankDeathWeapon ;<- When the unit dies it fires this weapon.
    StartsActive  = No                        ; turned on by upgrade
    TriggeredBy   = Upgrade_ChinaNuclearTanks ;<- Only fires the weapon when this upgrade is purchased.
  End
  Behavior = LocomotorSetUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaNuclearTanks ;<- When this upgrade is purchased it upgrades the locomotor.
  End

  Behavior = ProductionUpdate ModuleTag_24
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End

  Behavior = OverlordContain ModuleTag_06 ; Like Transport, but when full, passes transport queries along to first passenger (redirects like tunnel) 
    Slots                 = 1 ;<- The number of slots it has to carry something.
    DamagePercentToUnits        = 100% ;<- The amount of damage the garrisoned units weapon’s can do to an enemy.
    AllowInsideKindOf     = PORTABLE_STRUCTURE ;<- This tells the game what type of unit can enter this container. Can be INFANTRY, VEHICLE, AIRCRAFT, PROJECTILE, HUGE_VEHICLE, STRUCTURE, PORTABLE_STRUCTURE, BALISTIC_MISSILE, SMALL_MSSILE.
    PassengersAllowedToFire = Yes ;<- Whether the passengers can fire out at enemy units. 
    PassengersInTurret = Yes ; My passengers ride in my turret, that's where the Firepoint bones are
    ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills
  End

  Behavior = ObjectCreationUpgrade ModuleTag_07
    UpgradeObject = OCL_OverlordGattlingCannon ;<- Gets this Object when it gets a certain upgrade.
    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon ;<- Triggers the game to create the upgrade Object.
    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker ;<- Once you have purchased the certain upgrade, you can’t construct these upgrades.
  End
  Behavior = WeaponSetUpgrade ModuleTag_WeaponSetUpgrade01
    TriggeredBy = Upgrade_ChinaOverlordGattlingCannon ;<- Upgrades the weapon set when you purchase this upgrade.
    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker ;<- Once you have purchased the certain upgrade, you can’t construct these upgrades.
  End
  Behavior = ObjectCreationUpgrade ModuleTag_08
    UpgradeObject = OCL_OverlordPropagandaTower
    TriggeredBy   = Upgrade_ChinaOverlordPropagandaTower
    ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
  End
  Behavior = ObjectCreationUpgrade ModuleTag_09
    UpgradeObject = OCL_OverlordBattleBunker
    TriggeredBy   = Upgrade_ChinaOverlordBattleBunker
    ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
  End
  Behavior = ProductionUpdate ModuleTag_10
    MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End
  Behavior = CommandSetUpgrade ModuleTag_11
    CommandSet = ChinaTankOverlordGattlingCannonCommandSet ;<- Original command set gets upgraded when you purchase a given upgrade.
    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon ;<- When you purchase this upgrade the Commandset gets upgraded so you can’t purchase the other upgrades.
    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
  End
  Behavior = CommandSetUpgrade ModuleTag_12
    CommandSet = ChinaTankOverlordPropagandaTowerCommandSet
    TriggeredBy   = Upgrade_ChinaOverlordPropagandaTower
    ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
  End
  Behavior = CommandSetUpgrade ModuleTag_13
    CommandSet = ChinaTankOverlordBattleBunkerCommandSet
    TriggeredBy   = Upgrade_ChinaOverlordBattleBunker
    ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
  End

  Behavior = PhysicsBehavior ModuleTag_14
    Mass = 50.0
  End



  ; Smoke for a bit then explode
;  Behavior = SlowDeathBehavior
;;    ProbabilityModifier = 25
;    DestructionDelay = 1500
;    DestructionDelayVariance = 500
;    FX  = INITIAL   FX_OverlordSmoke
;    OCL = FINAL     OCL_ChinaTankOverlordDebris
;    FX  = FINAL     FX_GenericTankDeathExplosion
;  End
  
  ; Catch fire, and explode death
;  Behavior = SlowDeathBehavior
;;    ProbabilityModifier = 25
;    DestructionDelay = 2000
;    DestructionDelayVariance = 300
;    FX  = INITIAL  FX_CrusaderCatchFire
;    OCL = FINAL    OCL_ChinaTankOverlordDebris
;    FX  = FINAL    FX_GenericTankDeathExplosion 
;  End

  ; Just explode death
  Behavior = SlowDeathBehavior ModuleTag_16
    ProbabilityModifier = 25
    DestructionDelay = 200
    DestructionDelayVariance = 100
    OCL = FINAL    OCL_ChinaTankOverlordDebris
    FX  = FINAL    FX_OverlordExplosionOneFinal
  End
  Behavior = CreateCrateDie ModuleTag_17
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = TransitionDamageFX ModuleTag_18
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_OverlordDamageTransition
  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

  Geometry = BOX
  GeometryMajorRadius = 26.0
  GeometryMinorRadius = 13.0
  GeometryHeight = 15.0     
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME     
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End


Now save your work. Now open the ini called CommandSet.ini. Then Paste this into it.

Code:
CommandSet AmericaWarFactoryCommandSet ;<- A commandset is used so the user is able to select an option in game to be created.
  10  = Command_ConstructAmericaTankOverlord ;<- This is the reference to the CommandButton this is the button that shows up in the 10th box in the command bar.
End


Now save your work, and then open CommandButton.ini.

Code:
CommandButton Command_ConstructAmericaTankOverlord ;<- Name of the command Button that you place in the Command Set.
  Command       = UNIT_BUILD
  Object        = AmericaTankOverlord ;<- Reference to faction unit.
  TextLabel     = CONTROLBAR:ConstructAmericaTankOverlord ;<- This is the unit name that shows up in that box when you place the cursor over the build icons in the game it has the yellow hot key in it, you must add this to the CSF everytime you make a new unit, and place a & for in front of the hot key.
  ButtonImage   = SNOverlord ;<- The buttons image.
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipAmericaBuildOverlord ;<- This is the units description that shows up in the box when you place the cursor over the build icon, you must add this to the CSF every time you make a new unit.
End


Now save your work. Congratulations, you have just added a new unit.
Vanguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 12:03 AM   #2 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Texas
Posts: 709
Send a message via ICQ to Vanguard Send a message via AIM to Vanguard Send a message via MSN to Vanguard Send a message via Yahoo to Vanguard
Default

One other thing, you can make your own units like this, but they don't all have to be in the same file you can add them to different files if you want, this is just on adding the Overlord to America, try it with different units untill you get the hang of it.
Vanguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 03:02 AM   #3 (permalink)
ccs
Senior Member
 
Join Date: Sep 2003
Location: the mighty planet of doom (NZ)
Posts: 269
Send a message via AIM to ccs Send a message via MSN to ccs Send a message via Yahoo to ccs
Default

cool but basic :drunk:
ccs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 03:34 AM   #4 (permalink)
Junior Member
 
Join Date: Aug 2003
Posts: 19
Default

awesome. very helpful for those of us new to modding...thanks!
ANBU is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 10:58 AM   #5 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Texas
Posts: 709
Send a message via ICQ to Vanguard Send a message via AIM to Vanguard Send a message via MSN to Vanguard Send a message via Yahoo to Vanguard
Default

wow thanks I have two more as well, but I want the opinion of the public should I post them?
Vanguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 12:13 PM   #6 (permalink)
Senior Member
 
Join Date: Nov 2003
Location: Hell
Posts: 272
Default

this is very basic stuff, you need more than that to add a unit (this is unit copying)
4hammer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 12:25 PM   #7 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

I think it's the step-by-step explanation approach of my guide that makes it easy. Yours is just like "add this" and then you have a unit, you don't really explain everything. If you could actually make whoever reads it learn something, then I'd say it's a good guide though.

But try not to just copy a unit. Make up a new unit and go through the steps of putting it in.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-08-2004, 01:49 PM   #8 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Texas
Posts: 709
Send a message via ICQ to Vanguard Send a message via AIM to Vanguard Send a message via MSN to Vanguard Send a message via Yahoo to Vanguard
Default

I know I don't because your's pretty much did that, I am just giving a straight forward thing on how to add a unit, yes I know you must make a weapon for it health and stuff, but as I said you are the person that makes the unit, this is just what files you need and so yeah I threw together a tutorial in five minutes for beginners.
Vanguard 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
Adding New Units ... help zogle Generals & Zero Hour Editing 5 01-25-2006 01:45 PM
Adding Units Groups -- not seperate Units? Twin Matrix LOTR: Battle For Middle Earth I & II Editing 6 01-13-2005 07:15 PM
Adding units to ZH KG115 Generals & Zero Hour Editing 11 01-13-2004 10:59 AM
Adding Units modsonly Generals & Zero Hour Editing 13 10-07-2003 06:50 PM
Adding Units Jediknight2150 Generals & Zero Hour Editing 13 02-17-2003 08:02 AM


All times are GMT -4. The time now is 05:11 AM.


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