IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Jet Raptor Question
zz_1984
post 4 Jul 2016, 4:05
Post #1



Group Icon

Group: Members
Posts: 6
Joined: 14 May 2016
Member No.: 12871



I was just trying to modify ROTR mod (which by the way I like it a lot), and figure out how to prevent America Jet Raptor to automaitcally throw its missiles against any kind of infantry (except I command it so), just like Hunter Killer Drone does. I 've been inspecting the following lines of code, with no success:

CODE
Weapon RaptorJetMissileWeapon
  PrimaryDamage               = 105.0            
  PrimaryDamageRadius         = 5.0
  ScatterRadiusVsInfantry     = 10.0    ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 380.0
  MinimumAttackRange          = 50.0
  AcceptableAimDelta          = 30
  DamageType                  = JET_MISSILES
  DeathType                   = EXPLODED
  WeaponSpeed                 = 1000
  ProjectileObject            = RaptorJetMissile
  ProjectileExhaust           = MissileDefenderMissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileDefenderMissileExhaust
  FireFX                      = None
  FireSound                   = RaptorJetMissileWeapon
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 100
  ClipSize                    = 4
  ClipReloadTime              = 5000
  AutoReloadsClip             = RETURN_TO_BASE
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
  WeaponBonus                 = PLAYER_UPGRADE DAMAGE 125%
End


CODE
Weapon HunterKillerDroneMissileWeapon
  PrimaryDamage               = 1.0
  PrimaryDamageRadius         = 0.0
  ScatterRadiusVsInfantry     = 10.0    ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 380.0
  MinimumAttackRange          = 80.0
  AcceptableAimDelta          = 15
  DamageType                  = SUBDUAL_UNRESISTABLE
  DeathType                   = EXPLODED
  WeaponSpeed                 = 1000
  ProjectileObject            = HunterKillerJetMissile
  ProjectileExhaust           = MissileDefenderMissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileDefenderMissileExhaust
  FireSound                   = HunterKillerDroneMissileWeapon
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 2000
  ClipSize                    = 2
  ClipReloadTime              = 5000
  AutoReloadsClip             = RETURN_TO_BASE
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = No
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
End


CODE
Weapon HunterKillerDroneMissileDamagedWeapon
  PrimaryDamage               = 110.0
  PrimaryDamageRadius         = 15.0
  DamageType                  = JET_MISSILES
  DeathType                   = EXPLODED
  FireFX                      = WeaponFX_HunterKillerMissileDetonation
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
End


CODE
Object HunterKillerJetMissile

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

; ***DESIGN parameters ***
  DisplayName       = OBJECT:Missile
  EditorSorting     = SYSTEM
  VisionRange = 0.0  

  ArmorSet
    Conditions      = None
    Armor           = ProjectileArmor
    DamageFX        = None
  End
; *** ENGINEERING Parameters ***
  KindOf = PRELOAD CAN_CAST_REFLECTIONS PROJECTILE SMALL_MISSILE
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 200.0
    InitialHealth   = 200.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 = 200
    SubdualDamageHealRate = 100000
    SubdualDamageHealAmount = 50
  End

  Behavior = WeaponBonusUpgrade ModuleTag_99
    TriggeredBy = Upgrade_AmericaLaserMissiles
  End

; ---- begin Projectile death behaviors
  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
  End
; ---- end Projectile death behaviors

  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 1
  End
  Behavior = MissileAIUpdate ModuleTag_08
    DetonateCallsKill     = Yes
    TryToFollowTarget     = Yes
    FuelLifetime          = 10000
    InitialVelocity       = 75               ; in dist/sec
    IgnitionDelay         = 30
    IgnitionFX            = FX_JetMissileIgnition
  End
  Locomotor = SET_NORMAL RaptorJetMissileLocomotor

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_Detonation01
    StartsActive  = Yes
    DeathTypes    = ALL -LASERED
    ConflictsWith = Upgrade_AmericaLaserMissiles
    DeathWeapon   = HunterKillerDroneMissileDamagedWeapon
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_DetonationUpgraded01
    StartsActive  = No
    DeathTypes    = ALL -LASERED
    TriggeredBy   = Upgrade_AmericaLaserMissiles
    DeathWeapon   = HunterKillerDroneMissileDamagedUpgradedWeapon
  End
  
  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0

End


CODE
Object RaptorJetMissile

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

; ***DESIGN parameters ***
  DisplayName       = OBJECT:Missile
  EditorSorting     = SYSTEM
  VisionRange = 0.0  

  ArmorSet
    Conditions      = None
    Armor           = ProjectileArmor
    DamageFX        = None
  End
; *** ENGINEERING Parameters ***
  KindOf = PRELOAD CAN_CAST_REFLECTIONS PROJECTILE SMALL_MISSILE
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 100.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 = 200
    SubdualDamageHealRate = 100000
    SubdualDamageHealAmount = 50
  End

  Behavior = WeaponBonusUpgrade ModuleTag_99
    TriggeredBy = Upgrade_AmericaLaserMissiles
  End

; ---- begin Projectile death behaviors
  Behavior = InstantDeathBehavior DeathModuleTag_01
    DeathTypes = NONE +DETONATED
   ; we detonated normally.
   ; no FX, just quiet destroy ourselves
  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_07
    Mass = 1
  End
  Behavior = MissileAIUpdate ModuleTag_08
    TryToFollowTarget     = Yes
    FuelLifetime          = 10000
    InitialVelocity       = 75               ; in dist/sec
    IgnitionDelay         = 30
    IgnitionFX            = FX_JetMissileIgnition
  End
  Locomotor = SET_NORMAL RaptorJetMissileLocomotor

  Geometry = Sphere
  GeometryIsSmall = Yes
  GeometryMajorRadius = 1.0
  Scale = 0.8

End


I have also checked worlbuilder SkirmishScripts.scb, but found nothing relative to what I'm looking for.
Go to the top of the page
 
+Quote Post
Zeke
post 4 Jul 2016, 4:47
Post #2


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



You could just give the raptor the hunter killer drone's weapon.


--------------------
Go to the top of the page
 
+Quote Post
zz_1984
post 4 Jul 2016, 19:41
Post #3



Group Icon

Group: Members
Posts: 6
Joined: 14 May 2016
Member No.: 12871



QUOTE (Zeke @ 4 Jul 2016, 0:47) *
You could just give the raptor the hunter killer drone's weapon.


Stupid me! Trying to figure out how it worked, I forgot the most obvious answer.

So thanks, I followed your advise and got it working. Both assigning HunterKiller Weapon to JetRaptor and changing ProjectileObject to RaptorMissile did the job.

CODE
Weapon RaptorJetMissileWeapon
  PrimaryDamage               = 105.0            
  PrimaryDamageRadius         = 5.0
  ScatterRadiusVsInfantry     = 10.0    ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 380.0
  MinimumAttackRange          = 50.0
  AcceptableAimDelta          = 30
  DamageType                  = JET_MISSILES
  DeathType                   = EXPLODED
  WeaponSpeed                 = 1000
  [b]ProjectileObject            = HunterKillerJetMissile[/b]
; ProjectileObject            = RaptorJetMissile
  ProjectileExhaust           = MissileDefenderMissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileDefenderMissileExhaust
  FireFX                      = None
  FireSound                   = RaptorJetMissileWeapon
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots           = 100
  ClipSize                    = 4
  ClipReloadTime              = 5000
  AutoReloadsClip             = Yes
; AutoReloadsClip             = RETURN_TO_BASE
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
  WeaponBonus                 = PLAYER_UPGRADE DAMAGE 125%
End


CODE
Object AmericaJetRaptor
WeaponSet
    Conditions            = None
    [b]Weapon                = PRIMARY   HunterKillerDroneMissileWeapon[/b]
   ; Weapon                = PRIMARY   RaptorJetMissileWeapon
End


Of course, I would not only like to get my question solved (which I had), but I would also like to know what makes it work, and that way have a (little) better understanding of the game. I mean, I would like to know I someone could tell me if the piece of code that prevents HunterKiller attack infantry is there, even if I couldn't see it, or I should keep looking somewhere else.
Go to the top of the page
 
+Quote Post
Zeke
post 5 Jul 2016, 2:56
Post #4


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



The damage type used by the weapon, probably doesnt affect infantry.

You can check armor.ini if that's the case


--------------------
Go to the top of the page
 
+Quote Post
zz_1984
post 7 Jul 2016, 0:17
Post #5



Group Icon

Group: Members
Posts: 6
Joined: 14 May 2016
Member No.: 12871



Ok, I'll keep on searching.

Thanks!
Go to the top of the page
 
+Quote Post
hawkseye17
post 27 Jul 2016, 21:22
Post #6



Group Icon

Group: Members
Posts: 93
Joined: 8 July 2016
Member No.: 13027



Just to add to this question, is there away to make 2 weapons (doesn't matter what weapon) that one shoots vehicles only, while the other shoots infantry only? I was thinking about this to make like a sniper that can shoot vehicles and do some damage, without actually losing the ability to insta-kill infantry.
Go to the top of the page
 
+Quote Post
Zeke
post 28 Jul 2016, 3:39
Post #7


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



QUOTE (hawkseye17 @ 28 Jul 2016, 4:22) *
Just to add to this question, is there away to make 2 weapons (doesn't matter what weapon) that one shoots vehicles only, while the other shoots infantry only? I was thinking about this to make like a sniper that can shoot vehicles and do some damage, without actually losing the ability to insta-kill infantry.


Nope.

Multiple weapons for jets doesn't work, unless both fire at the same targets, or they have unlimited ammo. Otherwise, it'll cause "the aircraft not returning home to reload cause the secondary weapon still has ammo thus never firing ever again unless manually commanded to retreat" bug while guarding.


--------------------
Go to the top of the page
 
+Quote Post
hawkseye17
post 28 Jul 2016, 4:31
Post #8



Group Icon

Group: Members
Posts: 93
Joined: 8 July 2016
Member No.: 13027



QUOTE (Zeke @ 27 Jul 2016, 22:39) *
Nope.

Multiple weapons for jets doesn't work, unless both fire at the same targets, or they have unlimited ammo. Otherwise, it'll cause "the aircraft not returning home to reload cause the secondary weapon still has ammo thus never firing ever again unless manually commanded to retreat" bug while guarding.


What about tanks or infantry? Can they have the separate targeting?
Go to the top of the page
 
+Quote Post
Zeke
post 28 Jul 2016, 6:01
Post #9


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



QUOTE (hawkseye17 @ 28 Jul 2016, 11:31) *
What about tanks or infantry? Can they have the separate targeting?


Seperate targeting works for everything except jets.


--------------------
Go to the top of the page
 
+Quote Post
hawkseye17
post 28 Jul 2016, 16:06
Post #10



Group Icon

Group: Members
Posts: 93
Joined: 8 July 2016
Member No.: 13027



So here is my dilemma: I want to make a tank, (could be any but I'm using the ROTR Rhino tank right now) be able to use canister shells (the shotgun shells) against infantry. I made the weapon codes for it but for the life of me I can't get the tank to shoot the canister rounds at infantry only and the regular shells at vehicles. Here's the code

CODE
[/code]

  WeaponSet
    Conditions = None
    
    Weapon             = PRIMARY   RhinoCanisterShell
  ; AutoChooseSources  = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    
    Weapon             = SECONDARY RhinoTankGun
  ; AutoChooseSources  = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
    
    Weapon             = TERTIARY  RhinoCanisterShell
  ; AutoChooseSources  = TERTIARY  NONE
    
    PreferredAgainst = PRIMARY   INFANTRY
    PreferredAgainst = SECONDARY VEHICLE
    PreferredAgainst = TERTIARY  INFANTRY

    ShareWeaponReloadTime = Yes
    WeaponLockSharedAcrossSets = Yes
  End

;Heroic Weaponset
  WeaponSet
    Conditions = HERO
    
    Weapon             = PRIMARY   RhinoCanisterShell
  ; AutoChooseSources  = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    
    Weapon             = SECONDARY HeroicRhinoTankGun
  ; AutoChooseSources  = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
  
    Weapon             = TERTIARY  RhinoCanisterShell
  ; AutoChooseSources  = TERTIARY  NONE
    
    PreferredAgainst = PRIMARY   INFANTRY
    PreferredAgainst = SECONDARY VEHICLE
    PreferredAgainst = TERTIARY  INFANTRY

    ShareWeaponReloadTime = Yes
    WeaponLockSharedAcrossSets = Yes
  End
[code]




And here is the code for the actual canister shell (it's just a modified shotgun)

CODE
[/code]
Weapon RhinoCanisterShell
  PrimaryDamage          = 200.0
  PrimaryDamageRadius    = 20.0
  SecondaryDamage        = 25.0
  SecondaryDamageRadius  = 15.0
  ScatterRadius          = 0.1
  WeaponRecoil = 3.5
  AttackRange            = 150.0
  DamageType             = GATTLING
  DeathType              = EXTRA_4
  WeaponSpeed            = 9999.0
  ProjectileObject       = GenericCanisterGunShotProjectile
  FireFX                 = WeaponFX_PandurCannisterGunFire
  VeterancyFireFX        = HEROIC WeaponFX_PandurCannisterGunFireHeroic
  FireSound              = FrankJaegerPandurShotgunWeapon
  RadiusDamageAffects    = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 0       ; time between shots, msec
  ClipSize = 1                   ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 1800             ; how long to reload a Clip, msec
  ProjectileDetonationFX = WeaponFX_PandurShotgunImpact
End
[code]
Go to the top of the page
 
+Quote Post
Zeke
post 29 Jul 2016, 3:11
Post #11


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



Why are there 2 canister weapons? You can just completely remove the tertiary weapon.

Also, this thread is going waay off topic.


--------------------
Go to the top of the page
 
+Quote Post
hawkseye17
post 29 Jul 2016, 3:39
Post #12



Group Icon

Group: Members
Posts: 93
Joined: 8 July 2016
Member No.: 13027



QUOTE (Zeke @ 28 Jul 2016, 22:11) *
Why are there 2 canister weapons? You can just completely remove the tertiary weapon.

Also, this thread is going waay off topic.


Agreed.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 26 April 2024 - 15:29