lionel13
  • lionel13
  • 51% (Neutral)
  • Private Topic Starter
5 years ago
sorry i know i am late for this but i just want to know how can i mod the unit to fire on long range example the patriot missile and tomahawk missile i want them to fire with the range i edit on vision range i already edited the vision range but they still going near before they fire on enemy, i am noob for this editing and i just do it just for fun and past time im not a really gamer but this zero hour is the only game i played since before sorry for my english
Sponsor
tanksarevictory
5 years ago
You'll have to edit AttackRange in the Weapons.ini file for the weapon you want to edit as well as editing VisionRange. As an example I changed the tomahawk missile weapon attack range:


Weapon TomahawkMissileWeapon
  PrimaryDamage               = 150.0            
  PrimaryDamageRadius         = 10.0      
  SecondaryDamage             = 50.0          
  SecondaryDamageRadius       = 25.0    
  ScatterRadiusVsInfantry     = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 500.0 ;350.0  ;INCREASE THIS NUMBER TO INCREASE RANGE
  PreAttackDelay              = 250
  PreAttackType               = PER_SHOT ; Do the delay every single shot
  MinimumAttackRange          = 100.0
  DamageType                  = EXPLOSION 
  DeathType                   = EXPLODED
  FireFX                      = FX_TomahawkIgnition
  ProjectileObject            = TomahawkMissile
  ProjectileExhaust           = TomahawkMissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicTomahawkMissileExhaust
;  ProjectileDetonationFX      = WeaponFX_TomahawkMissileDetonation
  ProjectileDetonationFX      = WeaponFX_BombTruckDefaultBombDetonation
  RadiusDamageAffects         = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  FireSound                   = TomahawkWeapon
  DelayBetweenShots           = 1
  ClipSize                    = 1                   ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 7000               ; how long to reload a Clip, msec
  ; Uses a clip of one to get the Reloading modelcondition
  CapableOfFollowingWaypoints = Yes

  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES
End
lionel13
  • lionel13
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

You'll have to edit AttackRange in the Weapons.ini file for the weapon you want to edit as well as editing VisionRange. As an example I changed the tomahawk missile weapon attack range:


Weapon TomahawkMissileWeapon
  PrimaryDamage               = 150.0            
  PrimaryDamageRadius         = 10.0      
  SecondaryDamage             = 50.0          
  SecondaryDamageRadius       = 25.0    
  ScatterRadiusVsInfantry     = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 500.0 ;350.0  ;INCREASE THIS NUMBER TO INCREASE RANGE
  PreAttackDelay              = 250
  PreAttackType               = PER_SHOT ; Do the delay every single shot
  MinimumAttackRange          = 100.0
  DamageType                  = EXPLOSION 
  DeathType                   = EXPLODED
  FireFX                      = FX_TomahawkIgnition
  ProjectileObject            = TomahawkMissile
  ProjectileExhaust           = TomahawkMissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicTomahawkMissileExhaust
;  ProjectileDetonationFX      = WeaponFX_TomahawkMissileDetonation
  ProjectileDetonationFX      = WeaponFX_BombTruckDefaultBombDetonation
  RadiusDamageAffects         = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  FireSound                   = TomahawkWeapon
  DelayBetweenShots           = 1
  ClipSize                    = 1                   ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 7000               ; how long to reload a Clip, msec
  ; Uses a clip of one to get the Reloading modelcondition
  CapableOfFollowingWaypoints = Yes

  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES
End

Originally Posted by: tanksarevictory 



i already done editing and it works on the attack range but the problem is the missile gone like it dissolve on air on default range i think, so it doesnt reach the target sorry for my english hope you understand me
hobiron18
5 years ago
Check your WeaponObjects.ini and Search for TomahawkMissile, edit the highlighted line and change the value, just remember tho 1000 milliseconds is 1 second, and the Lifetime depends on the distance of the enemy, if it's higher than AttackRange of 400, i suggest making it 6000 - 10000 / 8seconds - 10seconds,

;------------------------------------------------------------------------------
Object TomahawkMissile

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = AVTomahawk_M
    End
    ConditionState = JAMMED
      ParticleSysBone = None SparksMedium
    End
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:TomahawkMissile
  EditorSorting   = SYSTEM
  VisionRange = 0.0  
  ArmorSet
    Conditions      = None
    ;*Be careful with this type, use in conjunction with KindOf = BALLISTIC_MISSILE to restrict targeting
    ;*to select weapons, because ballistic missile armor is weak! Weapons capable of targeting must have
    ;*AntiBallisticMissile = Yes set in the Weapon.ini.
    Armor           = BallisticMissileArmor 
    DamageFX        = None
  End

  ; *** ENGINEERING Parameters ***
  KindOf = PROJECTILE BALLISTIC_MISSILE 
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 100.0

    ; 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.
    ; A projectile is not disabled, but instead loses target and scatters
    SubdualDamageCap = 400
    SubdualDamageHealRate = 100000
    SubdualDamageHealAmount = 50
  End

; ---- begin Projectile death behaviors
  Behavior = InstantDeathBehavior DeathModuleTag_01
    DeathTypes = NONE +DETONATED
    ; we detonated normally.
    FX          = WeaponFX_TomahawkMissileDetonation
  End
  Behavior = InstantDeathBehavior DeathModuleTag_02
    DeathTypes = NONE +LASERED
    ; shot down by laser.
    FX         = FX_GenericMissileDisintegrate
    OCL        = OCL_GenericMissileDisintegrate
  End
  Behavior = InstantDeathBehavior DeathModuleTag_03
    DeathTypes = ALL -LASERED -DETONATED
    ; shot down by nonlaser.
    FX         = FX_GenericMissileDeath
  End
; ---- end Projectile death behaviors
    
  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 1
  End
  Behavior = MissileAIUpdate ModuleTag_07
    TryToFollowTarget = Yes 
    [h]FuelLifetime = 4000[/h]                         ;  <<<---------- THIS IS PROBABLY WHAT YOU NEED,
    IgnitionDelay = 0                           ;         HIGHER VALUE = LONGER EXISTENCE
    IgnitionFX = FX_TomahawkIgnition
    InitialVelocity = 50                ; in dist/sec
    DistanceToTravelBeforeTurning = 80
    DistanceToTargetBeforeDiving = 100 ; When I hit this close to target, I ignore PreferredHeight. 
    ; Note, if this is too small, the missile will turn too late to hit.  And, since we have a 2D 
    ; heart, being over the target counts as "there", so we'll give up and just go straight.

    DistanceToTargetForLock = 10 ; Short lock on, as it looks better flying.  jba.
  End
  Locomotor = SET_NORMAL TomahawkMissileLocomotor

  Geometry = Cylinder ; Since collision extents can't tilt, this is a little fake
  GeometryMajorRadius = 8.0
  GeometryHeight = 4.0
  GeometryIsSmall = Yes    

  Shadow = SHADOW_DECAL
End

Kono Hobiron-sama Niwa, Yume ga Aru~De'geso~
lionel13
  • lionel13
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

Check your WeaponObjects.ini and Search for TomahawkMissile, edit the highlighted line and change the value, just remember tho 1000 milliseconds is 1 second, and the Lifetime depends on the distance of the enemy, if it's higher than AttackRange of 400, i suggest making it 6000 - 10000 / 8seconds - 10seconds,

;------------------------------------------------------------------------------
Object TomahawkMissile

  ; *** ART Parameters ***
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = AVTomahawk_M
    End
    ConditionState = JAMMED
      ParticleSysBone = None SparksMedium
    End
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:TomahawkMissile
  EditorSorting   = SYSTEM
  VisionRange = 0.0  
  ArmorSet
    Conditions      = None
    ;*Be careful with this type, use in conjunction with KindOf = BALLISTIC_MISSILE to restrict targeting
    ;*to select weapons, because ballistic missile armor is weak! Weapons capable of targeting must have
    ;*AntiBallisticMissile = Yes set in the Weapon.ini.
    Armor           = BallisticMissileArmor 
    DamageFX        = None
  End

  ; *** ENGINEERING Parameters ***
  KindOf = PROJECTILE BALLISTIC_MISSILE 
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 100.0

    ; 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.
    ; A projectile is not disabled, but instead loses target and scatters
    SubdualDamageCap = 400
    SubdualDamageHealRate = 100000
    SubdualDamageHealAmount = 50
  End

; ---- begin Projectile death behaviors
  Behavior = InstantDeathBehavior DeathModuleTag_01
    DeathTypes = NONE +DETONATED
    ; we detonated normally.
    FX          = WeaponFX_TomahawkMissileDetonation
  End
  Behavior = InstantDeathBehavior DeathModuleTag_02
    DeathTypes = NONE +LASERED
    ; shot down by laser.
    FX         = FX_GenericMissileDisintegrate
    OCL        = OCL_GenericMissileDisintegrate
  End
  Behavior = InstantDeathBehavior DeathModuleTag_03
    DeathTypes = ALL -LASERED -DETONATED
    ; shot down by nonlaser.
    FX         = FX_GenericMissileDeath
  End
; ---- end Projectile death behaviors
    
  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 1
  End
  Behavior = MissileAIUpdate ModuleTag_07
    TryToFollowTarget = Yes 
    [h]FuelLifetime = 4000[/h]                         ;  <<<---------- THIS IS PROBABLY WHAT YOU NEED,
    IgnitionDelay = 0                           ;         HIGHER VALUE = LONGER EXISTENCE
    IgnitionFX = FX_TomahawkIgnition
    InitialVelocity = 50                ; in dist/sec
    DistanceToTravelBeforeTurning = 80
    DistanceToTargetBeforeDiving = 100 ; When I hit this close to target, I ignore PreferredHeight. 
    ; Note, if this is too small, the missile will turn too late to hit.  And, since we have a 2D 
    ; heart, being over the target counts as "there", so we'll give up and just go straight.

    DistanceToTargetForLock = 10 ; Short lock on, as it looks better flying.  jba.
  End
  Locomotor = SET_NORMAL TomahawkMissileLocomotor

  Geometry = Cylinder ; Since collision extents can't tilt, this is a little fake
  GeometryMajorRadius = 8.0
  GeometryHeight = 4.0
  GeometryIsSmall = Yes    

  Shadow = SHADOW_DECAL
End

Originally Posted by: hobiron18 



thank you its working now is it applicable also with the AI enemy?i mean can they use the range i set to tomahawk missile against me if i set my enemy to USA and how about the avenger i dont see any fuellifetime options to mod it but the laser can reach the enemy base but i cant see the laser hits the king raptor its just getting hit
Zatsupachi
5 years ago
Lasers are hitscan meaning the damage dealt is instant, no travel time. Same with machineguns. The laser is an object that draws the visual part of the actual weapon.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
lionel13
  • lionel13
  • 51% (Neutral)
  • Private Topic Starter
5 years ago

Lasers are hitscan meaning the damage dealt is instant, no travel time. Same with machineguns. The laser is an object that draws the visual part of the actual weapon.

Originally Posted by: Zatsupachi 



so that means it can't mod the beam range?its just automatically hits the target without me seeing the beam reaches the target?