 |
Forum Info
|
 |
Forum Members: 18,642
Total Threads: 8,744
Posts: 95,513
Administrators:
DeeZire, Redemption
There are currently 20 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
09-30-2004, 09:03 PM
|
#1 (permalink)
|
|
Member
Join Date: Jan 2004
Posts: 80
|
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.
|
|
|
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
|
Try putting a 400.0 in maybe?
|
|
|
09-30-2004, 09:10 PM
|
#3 (permalink)
|
|
Senior Member
Join Date: Feb 2003
Location: USA
Posts: 853
|
You're missing an end on the prerequisites section.

|
|
|
10-01-2004, 10:07 AM
|
#4 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
Yep, that's it. I'm VERY surprised the game didn't catch that itself though...
|
|
|
10-01-2004, 01:22 PM
|
#5 (permalink)
|
|
Senior Member
Join Date: Feb 2003
Location: USA
Posts: 853
|
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.

|
|
|
10-01-2004, 01:28 PM
|
#6 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
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.
|
|
|
10-01-2004, 01:33 PM
|
#7 (permalink)
|
|
Senior Member
Join Date: Feb 2003
Location: USA
Posts: 853
|
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.

|
|
|
10-01-2004, 01:33 PM
|
#8 (permalink)
|
|
Member
Join Date: Jan 2004
Posts: 80
|
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
|
|
|
10-01-2004, 01:35 PM
|
#9 (permalink)
|
|
Senior Member
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
|
: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.
|
|
|
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
|
Put the INI in your Zero Hour->Data->INI folder.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:08 AM.
|