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

Forum Info
Forum Members: 18,642
Total Threads: 8,744
Posts: 95,513

Administrators:
DeeZire, Redemption

There are currently 20 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 09-30-2004, 09:03 PM   #1 (permalink)
Member
 
Join Date: Jan 2004
Posts: 80
Default Need Help with Cost\Build time

I'm new to ZH modding so I decided for my first project to make the pilot a buildable unit. Everything worked fine except for the Cost\build time. In the game the unit had no cost! :/ Can someone tell me where the coding mistake is?

Here is the code:

Code:
Object AmericaInfantryPilot

  ; *** ART Parameters ***
  SelectPortrait         = SAPilot_L
  ButtonImage            = SAPilot
  
  ;UpgradeCameo1 = NONE
  ;UpgradeCameo2 = NONE
  ;UpgradeCameo3 = NONE
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model = AIRPlt_SKN
      IdleAnimation = AIRPlt_SKL.AIRPlt_STA 0 20
      IdleAnimation = AIRPlt_SKL.AIRPlt_IDA 
      IdleAnimation = AIRPlt_SKL.AIRPlt_IDB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Stand
    End

    ConditionState = FREEFALL
      Animation = AIRPlt_SKL.AIRPLT_PFL
      AnimationMode = ONCE
      TransitionKey = TRANS_Falling
    End
    AliasConditionState = FREEFALL DYING

    ConditionState = PARACHUTING
      Animation = AIRPlt_SKL.AIRPlt_PHG
      AnimationMode = LOOP
      TransitionKey = TRANS_Chute
      WaitForStateToFinishIfPossible = TRANS_Falling
    End
    AliasConditionState = PARACHUTING DYING

    ConditionState = MOVING
      Animation = AIRPlt_SKL.AIRPlt_RNA 
      AnimationMode = LOOP
      TransitionKey = TRANS_Stand
      ParticleSysBone     = None InfantryDustTrails
    End
    

    ConditionState = DYING
      Animation = AIRPlt_SKL.AIRPlt_DTA 
      Animation = AIRPlt_SKL.AIRPlt_DTB 
      AnimationMode = ONCE
      TransitionKey = TRANS_Dying
    End

    TransitionState = TRANS_Dying TRANS_Flailing
      Animation = AIRPlt_SKL.AIRPlt_ADTE1
      AnimationMode = ONCE
    End

    ConditionState = DYING EXPLODED_FLAILING
      Animation = AIRPlt_SKL.AIRPlt_ADTE2
      AnimationMode = LOOP
      TransitionKey = TRANS_Flailing
    End

    ConditionState = DYING EXPLODED_BOUNCING
      Animation = AIRPlt_SKL.AIRPlt_ADTE3
      AnimationMode = ONCE
      TransitionKey = None
    End

    ConditionState = SPECIAL_CHEERING
      Animation = AIRPLT_SKL.AIRPLT_CHA
      AnimationMode = LOOP
    End

    ;@TODO -- MISSING ANIMATION FILE
    ;TransitionState = TRANS_Falling TRANS_Chute
    ;  Animation = AIRPLT_SKL.AIRPLT_POP
    ;  AnimationMode = ONCE
    ;  Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first
    ;End
    
    TransitionState = TRANS_Chute TRANS_Stand
      Animation = AIRPlt_SKL.AIRPlt_PTD
      AnimationMode = ONCE
    End

  End

  ; ***DESIGN parameters ***
  DisplayName = OBJECT:Pilot
  Side = America
  EditorSorting = INFANTRY
  Prerequisites
    Object = AmericaBarracks
  BuildCost = 400
    BuildTime = 10.0 
  TransportSlotCount = 1               ;how many "slots" we take in a transport (0 == not transportable)
  ExperienceValue    = 10 10 10 10 ;Experience point value at each level
  ExperienceRequired =  0 1 2 3 ;Experience points needed to gain each level
  IsTrainable     = Yes  ;Can gain experience
  CommandSet = AmericaInfantryPilotCommandSet


  
   ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  VisionRange = 150
  ShroudClearingRange = 300
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

  ; *** AUDIO Parameters ***
  VoiceSelect = PilotVoiceSelect
  VoiceMove = PilotVoiceMove
  VoiceAttack = PilotVoiceMove
  VoiceGarrison = PilotVoiceMove 
  VoiceFear = PilotVoiceFear
  UnitSpecificSounds
    VoiceEnter = PilotVoiceEnter
    VoiceEnterHostile     = PilotVoiceEnter
    VoiceGetHealed      = PilotVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY NO_GARRISON SCORE IGNORES_SELECT_ALL

  Behavior = VeterancyGainCreate ModuleTag_02
    ; omit the "ScienceRequired" so that this upgrade always occurs.
    ; Pilots should never (repeat, never) be less than VETERAN status.
    StartingLevel = VETERAN
  End

  Behavior = VeterancyCrateCollide       ModuleTag_03
    RequiredKindOf = VEHICLE      ; we only give our bonus to VEHICLEs we collide with
    ForbiddenKindOf = DOZER       ; but not to TRANSPORTs or DOZERs!
    EffectRange = 0               ; 0=="affect only the thing you collide with"
    AddsOwnerVeterancy = Yes      ; we add our own veterancy to the target (rather than just +1 level)
    IsPilot = Yes                 ; set the pilot flag because it's different than the veterancy crate and has extra checking
  End

  Body = ActiveBody ModuleTag_04
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_05
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior = AutoFindHealingUpdate   ModuleTag_06 ; This update will have the unit go to a healing station if injured. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    NeverHeal = 0.85 ;  don't heal if we are > 85% healthy.
    AlwaysHeal = 0.25 ; if we get below 25%, find healing right away.
  End

  Behavior = PilotFindVehicleUpdate   ModuleTag_07 ; This update will have the unit go to a vehicle. jba 
    ScanRate = 1000 ; once a second.
    ScanRange = 300 ;
    MinHealth = 0.5 ;  don't enter a vehicle less than 50% healthy.
  End

  Locomotor = SET_NORMAL ColonelBurtonGroundLocomotor
  Locomotor = SET_NORMAL_UPGRADED BasicHumanLocomotorPlus25

  Behavior = PhysicsBehavior ModuleTag_08
    Mass = 5.0
  End

  Behavior = LocomotorSetUpgrade ModuleTag_10
    TriggeredBy = Upgrade_Veterancy_HEROIC
  End

  Behavior = SquishCollide ModuleTag_11
    ;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_PilotDie
  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_PilotDie
    FlingForce          = 8
    FlingForceVariance  = 3
    FlingPitch          = 60
    FlingPitchVariance  = 10
  End
  Behavior = SlowDeathBehavior ModuleTag_Death04
    DeathTypes          = NONE +BURNED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByFireUSA
    OCL                 = INITIAL OCL_FlamingInfantry
  End
  Behavior = SlowDeathBehavior ModuleTag_Death05
    DeathTypes          = NONE +POISONED
    DestructionDelay    = 0
    FX                  = INITIAL FX_DieByToxinUSA
    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_DieByToxinUSA
    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_DieByToxinUSA
    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
Sorry about posting all the code since I'm new I don't know which part is needed
Thanks in advance.
tesla3090 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-30-2004, 09:07 PM   #2 (permalink)
Senior Member
 
Join Date: Feb 2004
Location: Glued to the chair in front of my laptop
Posts: 1,158
Default

Try putting a 400.0 in maybe?
GametagAeonFlux is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-30-2004, 09:10 PM   #3 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

You're missing an end on the prerequisites section.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 10:07 AM   #4 (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

Yep, that's it. I'm VERY surprised the game didn't catch that itself though...
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 01:22 PM   #5 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

It looks like more or less all of the stuff that was lost without that end was not critical, and the game just didn't need it. It's a bit odd, but I guess strange things can happen.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 01:28 PM   #6 (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

The game reads everything, not just the stuff it's made to read. Like PHP (you'd know that ). So any typos or errors in settings and flags (the things before the = ) immediately cause a parse error.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 01:33 PM   #7 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

Yeah. I realize that, but there are some flags that either have defaults, or are not required. Most of the engineering settings are that way. There might be something else, but I don't know.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 01:33 PM   #8 (permalink)
Member
 
Join Date: Jan 2004
Posts: 80
Default

I added the End to the prerequisites section and it still didn't work, here is the updated code:

Code:
 ; ***DESIGN parameters ***
  DisplayName = OBJECT:Pilot
  Side = America
  EditorSorting = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 150
  ShroudClearingRange = 300
  
  Prerequisites
     Object = AmericaBarracks
     Object = AmericaWarFactory AmericaAirfield
  End
  BuildCost = 400
  BuildTime = 10.0          ;in seconds    

  ExperienceValue    = 10 10 10 10 ;Experience point value at each level
  ExperienceRequired =  0 1 2 3 ;Experience points needed to gain each level
  IsTrainable     = Yes  ;Can gain experience
  CommandSet = AmericaInfantryPilotCommandSet

   ArmorSet
    Conditions      = None
    Armor           = HumanArmor
    DamageFX        = InfantryDamageFX
  End

  CrushableLevel    = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
tesla3090 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 01:35 PM   #9 (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

:wtf:

Ok, did you even put the INI file in the right place? Try changing the health or something else significantly and see if that DOES work.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2004, 03:11 PM   #10 (permalink)
Senior Member
 
Join Date: Feb 2004
Location: Glued to the chair in front of my laptop
Posts: 1,158
Default

Put the INI in your Zero Hour->Data->INI folder.
GametagAeonFlux 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
Build cost/time RpgNick LOTR: Battle For Middle Earth I & II Editing 2 04-20-2005 05:13 PM
Can unit upgrades change cost and build time as well? schtoogie Generals & Zero Hour Editing 10 12-24-2004 02:27 AM
Build Time and Build Cost problem Tesla-Chrono LOTR: Battle For Middle Earth I & II Editing 23 12-18-2004 09:51 AM
build time error MuRdErOuS Generals & Zero Hour Editing 2 12-28-2003 06:38 PM
changing build time and cost through gen promotion Black_Eagle Generals & Zero Hour Editing 22 05-03-2003 07:20 PM


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


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