View Single Post
Old 06-25-2006, 03:21 PM   #1 (permalink)
Fezwald
Junior Member
 
Join Date: Jun 2006
Posts: 11
Default First Mini Mod Creation Problem, Help Needed!

I'm trying to make the China Officer buidable for China and I written the codes and pasted them into the .ini files I have extracted from the INIZH.big file. insterted the .ini into the correct locations in the main Zero Hour Folder and the game crashes due to Technical Problems then I saved my files into a .big file and inserted them in the zero hour folder, the game works but it is no different.

Basiclly what I'm trying to do is make the Officer an almost one hit kill, simi hero unit who can work with the red guard soldier and also class as part of a herd. (I also wanted to make him a walking small properganda too as well but I ain't tried to add this to the files)

I think the problem is the scripts I've written for the unit. I'd appriciate it if someone could just have a look and see if they can see if they can find the problem

I thought I'd show you how I laid the files out just to check I'd gotthat right. I've put the files in bold text and the contents are normal.


art+
textures
ChinaOfficer64x64.tga
ChinaOfficer128x128.tga

data+
audio+
sounds

OfficerVoiceAttack.wav
OfficerVoiceCreate.wav
OfficerVoiceFear.wav
OfficerVoiceGuard.wav
OfficerVoiceHealed.wav
OfficerVoiceMove.wav
OfficerVoiceSelect.wav
data
ini+
CommandButton
CommandSet
Weapon
Objects +
ChinaInfantry

As I said before I think the problem might be the contents of the .ini files so I've posted the codes I have pasted at the end of the orgional .ini files below.

I'll start with the contents of the INI folder

Command Button

Code:
CommandButton Command_ConstructChinaInfantryOfficer

  Command       = UNIT_BUILD

  Object        = ChinaInfantryOfficer

  TextLabel     = CONTROLBAR:ConstructChinaInfantryOfficer

  ButtonImage   = ChinaOfficer64x64

  ButtonBorderType        = BUILD

  DescriptLabel           = CONTROLBAR:ToolTipChinaInfantryOfficer

End


Command Set



Code:
 

CommandSet ChinaInfantryOfficerCommandSet

  11 = Command_AttackMove

  13 = Command_Guard

  14 = Command_Stop

End



CommandSet ChinaBarracksCommandSet

  1 = Command_ConstructChinaInfantryRedguard

  2 = Command_ConstructChinaInfantryTankHunter

  3 = Command_ConstructChinaInfantryHacker

  4 = Command_ConstructChinaInfantryBlackLotus

  5 = Command_ConstructChinaInfantryOfficer

  7 = Command_UpgradeChinaRedguardCaptureBuilding

 12 = Command_UpgradeChinaMines

 13 = Command_SetRallyPoint

 14 = Command_Sell 

End


Weapon



Code:
 

Weapon ChinaOfficerAutoPistol

  PrimaryDamage         = 70.0

  PrimaryDamageRadius   = 0.0       

  AttackRange           = 150.0

  DamageType            = SMALL_ARMS

  DeathType             = NORMAL

  WeaponSpeed           = 999999.0          ; dist/sec (huge value == effectively instant)

  ProjectileObject      = NONE

  FireFX                = WeaponFX_GenericMachineGunFire

  VeterancyFireFX       = HEROIC WeaponFX_GenericMachineGunFireWithRedTracers

  FireSound             = GattlingTankWeapon 

  RadiusDamageAffects   = ALLIES ENEMIES NEUTRALS

  DelayBetweenShots     = 100        ; time between shots, msec

  ClipSize              = 0                    ; how many shots in a Clip (0 == infinite)

  ClipReloadTime        = 0              ; how long to reload a Clip, msec

  ContinuousFireOne     = 6 ; How many shots at the same target constitute "Continuous Fire"

  ContinuousFireTwo     = 12 ; How many shots at the same target constitute "Continuous Fire Two"

  ContinuousFireCoast   = 1000 ; msec we can coast without firing before we lose Continuous Fire

  WeaponBonus           = CONTINUOUS_FIRE_MEAN RATE_OF_FIRE 200% ; When the object achieves this state, this weapon gets double the rate of fire

  WeaponBonus           = CONTINUOUS_FIRE_FAST RATE_OF_FIRE 300% ; This is not cumulative, so with Delay of 40, and values of 2 and 4 for these bonuses, you shoot at (40, 20, 10)

  WeaponBonus           = PLAYER_UPGRADE DAMAGE 125%     ; ChainGun upgrade

  AntiAirborneVehicle   = No

  AntiAirborneInfantry  = No

  AntiGround            = Yes

End



Weapon ChinaOfficerAutoPistolAir

  PrimaryDamage         = 70.0

  PrimaryDamageRadius   = 0.0       ; 0 primary radius means "hits only intended victim"

  AttackRange           = 450.0

  DamageType            = SMALL_ARMS

  DeathType             = NORMAL

  WeaponSpeed           = 999999.0          ; dist/sec (huge value == effectively instant)

  ProjectileObject      = NONE

  FireFX                = WeaponFX_GenericMachineGunFire

  VeterancyFireFX       = HEROIC WeaponFX_GenericMachineGunFireWithRedTracers

  FireSound             = GattlingTankWeapon

  RadiusDamageAffects   = ALLIES ENEMIES NEUTRALS

  DelayBetweenShots     = 100               ; time between shots, msec

  ClipSize              = 0                    ; how many shots in a Clip (0 == infinite)

  ClipReloadTime        = 0              ; how long to reload a Clip, msec

  ContinuousFireOne     = 6 ; How many shots at the same target constitute "Continuous Fire"

  ContinuousFireTwo     = 12 ; How many shots at the same target constitute "Continuous Fire Two"

  ContinuousFireCoast   = 1000 ; msec we can coast without firing before we lose Continuous Fire

  WeaponBonus           = CONTINUOUS_FIRE_MEAN RATE_OF_FIRE 200% ; When the object achieves this state, this weapon gets double the rate of fire

  WeaponBonus           = CONTINUOUS_FIRE_FAST RATE_OF_FIRE 300% ; This is not cumulative, so with Delay of 40, and values of 2 and 4 for these bonuses, you shoot at (40, 20, 10)

  WeaponBonus           = PLAYER_UPGRADE DAMAGE 125%     ; ChainGun upgrade

  AntiAirborneVehicle   = Yes

  AntiAirborneInfantry  = Yes

  AntiGround            = No

End


The Contents of the Object folder



ChinaInfantry



Code:
 

Object ChinaInfantryOfficer

  ; *** ART Parameters ***

  SelectPortrait         = ChinaOfficer128x128

  ButtonImage            = ChinaOfficer64x64

  UpgradeCameo1 = Upgrade_Nationalism   

  Draw = W3DModelDraw ModuleTag_01



    OkToChangeModelColor = Yes

; this says "we don't use these condition states at all, so completely

    ; ignore them for purposes of matchmaking"... this is useful to help

    ; reduce the number of AliasConditionState clauses you must add in

    ; order to avoid ambiguity in some cases.

    IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A



    ; ------- Standing-Around Animations



    DefaultConditionState

      Model = NIOFCR_SKN

      IdleAnimation = NIOFCR_SKL.NIOFCR_STA 0 21

      IdleAnimation = NIOFCR_SKL.NIOFCR_IDA

      IdleAnimation = NIOFCR_SKL.NIOFCR_IDB

      AnimationMode = ONCE

      WeaponFireFXBone = PRIMARY Muzzle

      WeaponMuzzleFlash = PRIMARY MuzzleFX

      TransitionKey = TRANS_STAND

    End

    ConditionState    = MOVING

      Animation       = NIOFCR_SKL.NIOFCR_RNA

      AnimationMode   = Once

      ParticleSysBone     = None InfantryDustTrails

    End

    ; NORMAL ATTACK

    ;--------------------------------------------------------

    ; Drawing gun

    ConditionState  = PREATTACK_A

      Animation     = NIOFCR_SKL.NIOFCR_ATAST

      AnimationMode = ONCE

    End

    AliasConditionState = PREATTACK_A MOVING

    AliasConditionState = PREATTACK_A FIRING_A

    AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

    ; Firing gun

    ConditionState  = FIRING_A

      Animation     = NIOFCR_SKL.NIOFCR_ATALP

      AnimationMode = LOOP

      TransitionKey = TRANS_FIRING_A

    End

    ConditionState  = BETWEEN_FIRING_SHOTS_A

      Animation     = NIOFCR_SKL.NIOFCR_ATALP

      AnimationMode = LOOP

      TransitionKey = TRANS_FIRING_A

    End

    AliasConditionState = RELOADING_A

    AliasConditionState = MOVING FIRING_A

    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A

    AliasConditionState = MOVING RELOADING_A

    ConditionState  = FIRING_B

      Animation     = NIOFCR_SKL.NIOFCR_ATALP

      AnimationMode = LOOP

      TransitionKey = TRANS_FIRING_B

    End

    ConditionState  = BETWEEN_FIRING_SHOTS_B

      Animation     = NIOFCR_SKL.NIOFCR_ATALP

      AnimationMode = LOOP

      TransitionKey = TRANS_FIRING_B

    End

    AliasConditionState = RELOADING_B

    AliasConditionState = MOVING FIRING_B

    AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_B

    AliasConditionState = MOVING RELOADING_B

    ; This transition allows him to put his gun away when he's finished attacking.

    TransitionState = TRANS_FIRING_A TRANS_STAND

      Animation     = NIOFCR_SKL.NIOFCR_ATAED

      AnimationMode = ONCE

    End

    ;--------------------------------------------------------

    ConditionState  = DYING

      Animation     = NIOFCR_SKL.NIOFCR_DTA

      Animation     = NIOFCR_SKL.NIOFCR_DTB

      AnimationMode = ONCE

      TransitionKey = TRANS_Dying

    End

    TransitionState = TRANS_Dying TRANS_Flailing

      Animation = NIOFCR_SKL.NIOFCR_ADTE1

      AnimationMode = ONCE

    End

    ConditionState = DYING EXPLODED_FLAILING

      Animation = NIOFCR_SKL.NIOFCR_ADTE2

      AnimationMode = LOOP

      TransitionKey = TRANS_Flailing

    End

    ConditionState = DYING EXPLODED_BOUNCING

      Animation = NIOFCR_SKL.NIOFCR_ADTE3

      AnimationMode = ONCE

      TransitionKey = None

    End

    ConditionState  = SPECIAL_CHEERING

      Animation     = NIOFCR_SKL.NIOFCR_CHA

      AnimationMode = LOOP

    End

    ;PARACHUTING ANIMATIONS

    ;@TODO - MISSING ANIMATION FILE

    ;ConditionState   = FREEFALL

    ;  Animation      = NIOFCR_SKL.NIOFCR_PFL

    ;  AnimationMode  = LOOP

    ;  TransitionKey  = TRANS_Falling

    ;End

    ;AliasConditionState = FREEFALL REALLYDAMAGED

    ;AliasConditionState = FREEFALL DYING

    ConditionState  = PARACHUTING

      Animation     = NIOFCR_SKL.NIOFCR_PHG

      AnimationMode = LOOP

      Flags         = PRISTINE_BONE_POS_IN_FINAL_FRAME  ; our bone positions should come from the last frame, rather than the first

      TransitionKey = TRANS_Chute

    End

    AliasConditionState = PARACHUTING REALLYDAMAGED

    AliasConditionState = PARACHUTING DYING

    TransitionState = TRANS_Falling TRANS_Chute

      Animation     = NIOFCR_SKL.NIOFCR_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     = NIOFCR_SKL.NIOFCR_PTD

      AnimationMode = ONCE

    End

End

  ; ***DESIGN parameters ***

  DisplayName      = OBJECT:Red Army Elite Officer

  Side = China

  EditorSorting = INFANTRY

  TransportSlotCount = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet

    Conditions = None 

    Weapon = PRIMARY ChinaOfficerAutoPistol

    Weapon = SECONDARY ChinaOfficerAutoPIstolAir

    PreferredAgainst = SECONDARY AIRCRAFT

  End

  ArmorSet

    Conditions      = None

    Armor           = HumanArmor

    DamageFX        = InfantryDamageFX

  End

  VisionRange = 200

  ShroudClearingRange = 400

  Prerequisites

    Object = ChinaBarracks

    Object = ChinaPropagandaCenter

  End

  BuildCost     = 1200

  BuildTime     = 12.0          ;in seconds      

  ExperienceValue = 25 50 100 100   ;Experience point value at each level

  ExperienceRequired = 0 20 40 80  ;Experience points needed to gain each level

  IsTrainable = Yes             

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

  CommandSet    = ChinaInfantryOfficerCommandSet

  ; *** AUDIO Parameters ***

  VoiceSelect = OfficerVoiceSelect

  VoiceMove = OfficerVoiceMove

  VoiceAttack = OfficerVoiceAttack

  VoiceGaurd = OfficerVoiceGuard

  VoiceFear = OfficerVoiceFear

  UnitSpecificSounds

    VoiceCreate          = OfficerVoiceCreate 

    VoiceGetHealed      = OfficerVoiceHealed

  End

  ; *** ENGINEERING Parameters ***

  RadarPriority = UNIT

  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY 



  Body = ActiveBody ModuleTag_02

    MaxHealth       = 190.0

    InitialHealth   = 190.0

  End

  Behavior = VeterancyGainCreate ModuleTag_03

    StartingLevel = HERO

  Behavior = AIUpdateInterface ModuleTag_03

    AutoAcquireEnemiesWhenIdle = Yes

  End



  Locomotor = SET_NORMAL RedguardLocomotor

  Behavior = HordeUpdate ModuleTag_06

    RubOffRadius = 100    ; 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 = 40          ; how close other units must be to us to count towards our horde-ness (~30 feet or so)

    KindOf = INFANTRY    ; what KindOf's must match to count towards horde-ness

    AlliesOnly = Yes     ; do we only count allies towards horde status? 

    ExactMatch = No      ; 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_07

    Mass = 5.0

  End



  Behavior = AutoFindHealingUpdate Module Tag_05

    ScanRate = 1000

    ScanRange = 500

    NeverHeal = 0.5

    AlwaysHeal= 0.5

  End



; --- begin Death modules ---

  Behavior = SlowDeathBehavior ModuleTag_Death01

    DeathTypes          = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED

    SinkDelay           = 3000

    SinkRate            = 0.5     ; in Dist/Sec

    DestructionDelay    = 8000

    FX                  = INITIAL FX_RedGuardDie

  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_RedGuardDie

    FlingForce          = 8

    FlingForceVariance  = 3

    FlingPitch          = 60

    FlingPitchVariance  = 10

  End

  Behavior = SlowDeathBehavior ModuleTag_Death04

    DeathTypes          = NONE +BURNED

    DestructionDelay    = 0

    FX                  = INITIAL FX_DieByFireChina

    OCL                 = INITIAL OCL_FlamingInfantry

  End

  Behavior = SlowDeathBehavior ModuleTag_Death05

    DeathTypes          = NONE +POISONED

    DestructionDelay    = 0

    FX                  = INITIAL FX_DieByToxinChina

    OCL                 = INITIAL OCL_ 

  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_DieByToxinChina

    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_DieByToxinChina

    OCL                 = INITIAL OCL_ToxicInfantryGamma

  End

; --- end Death modules ---

  Behavior = PoisonedBehavior ModuleTag_09

    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


Also I have hosted all the files on sendspace if anyone wants to look at them how they are



http://www.sendspace.com/file/ry1uty - 542KB



Any kinda help fixing this problem would be great and be worth the 20 minutes I spent writing this post
Fezwald is offline   Reply With Quote