Point Defense....Missile? |
Point Defense....Missile? |
20 Aug 2016, 2:37
Post
#1
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
So I was playing Act of Aggression on Steam the other day and I took notice of something interesting. There is a mechanism on one of the planes that shoots small missiles to intercept other missiles. I decided to see if I can put something similar in Zero Hour and then something bad happened. The missile doesn't follow the other missile, it either just stays in the exact same spot the plane was, or it just slowly drops down. I wanna know exactly what I am missing.
Ps. The weapon itself works, but the missile doesn't follow the enemy missile. This is the missile code. CODE Object CounterMissile ; *** ART Parameters *** Draw = W3DModelDraw ModuleTag_01 ConditionState = NONE Model = UVRockBug_m ParticleSysBone = Object03 TunnelDefenderMissileExhaust ParticleSysBone = Object03 EMissileFlame End End ; ***DESIGN parameters *** DisplayName = OBJECT:Prop EditorSorting = SYSTEM VisionRange = 0.0 ArmorSet Conditions = None Armor = ProjectileArmor DamageFX = None End TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable) ; *** ENGINEERING Parameters *** KindOf = PROJECTILE SMALL_MISSILE NO_COLLIDE 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 ; ---- 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_06 Mass = 1 End Behavior = MissileAIUpdate ModuleTag_07 TryToFollowTarget = Yes FuelLifetime = 1000 InitialVelocity = 300 ; in dist/sec IgnitionDelay = 0 DistanceToTravelBeforeTurning = 35 IgnitionFX = FX_BuggyMissileIgnition End Locomotor = SET_NORMAL ComancheRocketPodLocomotor Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 2.0 End This is the weapon CODE Weapon AntiMissile PrimaryDamage = 200.0 PrimaryDamageRadius = 2.0 AttackRange = 200.0 DamageType = LASER DeathType = EXPLODED WeaponSpeed = 9999.0 ; dist/sec RadiusDamageAffects = ENEMIES NEUTRALS DelayBetweenShots = 500 ClipSize = 1 ; ClipReloadTime = 0 ProjectileObject = CounterMissile ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation ; FireFX = FX_BuggyMissileIgnition AntiSmallMissile = Yes AntiBallisticMissile = Yes AntiGround = No End And this is the point defense behavior CODE Behavior = PointDefenseLaserUpdate ModuleTag_CounterMissile01 WeaponTemplate = AntiMissile PrimaryTargetTypes = BALLISTIC_MISSILE SMALL_MISSILE ScanRate = 100 ScanRange = 175.0 PredictTargetVelocityFactor = 1.0 End Any help would be appreciated. |
|
|
20 Aug 2016, 3:25
Post
#2
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
Try removing the weapon speed field in the weapon codes. Missiles don't need that since they base their speed on the locomotor. Also, over 9000 speeds can only be used for hitscan weapons like bullets and lasers.
Increase the fuel lifetime of the missile to 10 secs for now just to rule out that problem, you can turn it back later. I also suggest removing the clip size and matching the scan rate to the delay between shots to avoid problems. -------------------- |
|
|
20 Aug 2016, 5:17
Post
#3
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
Try removing the weapon speed field in the weapon codes. Missiles don't need that since they base their speed on the locomotor. Also, over 9000 speeds can only be used for hitscan weapons like bullets and lasers. Increase the fuel lifetime of the missile to 10 secs for now just to rule out that problem, you can turn it back later. I also suggest removing the clip size and matching the scan rate to the delay between shots to avoid problems. I did some testing with what you recommended and the good news is that the missile moves. Problem is that it does not target missiles and I cannot get it to do so. I tested it out against aircraft to see if it works at all and it targets them, but it does not target missiles. Also by any chance, do you know how to make the missile come out of the back or bottom of the plane? They only come out like regular missiles. This post has been edited by hawkseye17: 20 Aug 2016, 5:35 |
|
|
20 Aug 2016, 6:06
Post
#4
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
I did some testing with what you recommended and the good news is that the missile moves. Problem is that it does not target missiles and I cannot get it to do so. I tested it out against aircraft to see if it works at all and it targets them, but it does not target missiles. Also by any chance, do you know how to make the missile come out of the back or bottom of the plane? They only come out like regular missiles. When you say does not target, do you mean the weapon doesn't even fire, or that the missiles fire but they can't accurately hit other missiles? If you want them to come out of a specific place, you'll have to code the PDM weapon like the overlord's gattling cannon so you can set it to attack to a firepoint bone. -------------------- |
|
|
20 Aug 2016, 16:10
Post
#5
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
When you say does not target, do you mean the weapon doesn't even fire, or that the missiles fire but they can't accurately hit other missiles? If you want them to come out of a specific place, you'll have to code the PDM weapon like the overlord's gattling cannon so you can set it to attack to a firepoint bone. So when the missile attacks an aircraft, it works just fine. When it comes to other missiles, it doesn't even fire. |
|
|
21 Aug 2016, 12:56
Post
#6
|
|
Enlima Studios Group: Project Leader Posts: 757 Joined: 11 October 2009 From: Jakarta, Indonesia Member No.: 482 |
check RotR Paladin's PDL codes it is like what zeke suggested. importantly you'll need to make your anti-missile weapon has the same damage type with PDL weapon.
-------------------- |
|
|
21 Aug 2016, 16:57
Post
#7
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
check RotR Paladin's PDL codes it is like what zeke suggested. importantly you'll need to make your anti-missile weapon has the same damage type with PDL weapon. Problem is that the Paladin PDL is a laser and coded as a laser. My version of the PDL is not a laser at all. It is a missile that attacks other missiles. Also the damage type is the same. |
|
|
22 Aug 2016, 3:14
Post
#8
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
Problem is that the Paladin PDL is a laser and coded as a laser. My version of the PDL is not a laser at all. It is a missile that attacks other missiles. Also the damage type is the same. He's talking about how the Paladin's PDL uses the overlord turret module instead of the PDL module. -------------------- |
|
|
22 Aug 2016, 3:25
Post
#9
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
He's talking about how the Paladin's PDL uses the overlord turret module instead of the PDL module. Oh. I've never delved into that kind of coding. What do I need to do? Also I still can't get the missile to fire at other missiles, I tried changing the weapon damage type to see if it had anything to do with it and that did not work either. Any suggestions? This post has been edited by hawkseye17: 22 Aug 2016, 3:26 |
|
|
22 Aug 2016, 10:32
Post
#10
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
Oh. I've never delved into that kind of coding. What do I need to do? Also I still can't get the missile to fire at other missiles, I tried changing the weapon damage type to see if it had anything to do with it and that did not work either. Any suggestions? Looking at ROTR's paladin, or simply the USA Avenger or China Overlord Gattling Cannon should give you an idea of what you need to do. Also, Show us your updated codes. -------------------- |
|
|
23 Aug 2016, 0:35
Post
#11
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
Looking at ROTR's paladin, or simply the USA Avenger or China Overlord Gattling Cannon should give you an idea of what you need to do. Also, Show us your updated codes. Weapon CODE Weapon AntiMissile PrimaryDamage = 200.0 PrimaryDamageRadius = 4.0 AttackRange = 200.0 DamageType = LASER DeathType = EXPLODED;LASERED WeaponSpeed = 200.0; dist/sec RadiusDamageAffects = ENEMIES NEUTRALS DelayBetweenShots = 250 ClipSize = 0 ; ClipReloadTime = 0 ProjectileObject = CounterMissile ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation AntiSmallMissile = Yes AntiBallisticMissile = Yes AntiGround = No End Behaviour CODE Behavior = PointDefenseLaserUpdate ModuleTag_CounterMissile01 WeaponTemplate = AntiMissile PrimaryTargetTypes = SMALL_MISSILE BALLISTIC_MISSILE AIRCRAFT ScanRate = 250 ScanRange = 200.0 PredictTargetVelocityFactor = 1.0 End The AIRCRAFT is the only thing that works. (ie. the missile launches) This post has been edited by hawkseye17: 23 Aug 2016, 0:35 |
|
|
24 Aug 2016, 6:24
Post
#12
|
|
The X General Group: Project Leader Posts: 2166 Joined: 7 June 2009 From: Philippines Member No.: 73 Uniqueness is Overrated |
Remove the weapon speed line in the weapon, it'll just interfere with the missile codes.
Try lowering the scan rate, or just set it to 0, and extending the scan range. It could just be the weapon's too slow to respond to missiles. If that doesn't work, you might have to use overlord turret upgrade instead, since the PDL module honestly doesn't work very well. -------------------- |
|
|
24 Aug 2016, 23:16
Post
#13
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
Remove the weapon speed line in the weapon, it'll just interfere with the missile codes. Try lowering the scan rate, or just set it to 0, and extending the scan range. It could just be the weapon's too slow to respond to missiles. If that doesn't work, you might have to use overlord turret upgrade instead, since the PDL module honestly doesn't work very well. THANK YOU SO MUCH, IT WORKED!!! I had to use the overlord thing. Here's the codes for anyone that wants it. CODE Behavior = OverlordContain ModuleTag_CounterMissile01 Slots = 1 DamagePercentToUnits = 100% AllowInsideKindOf = PORTABLE_STRUCTURE PassengersAllowedToFire = Yes PassengersInTurret = Yes PayloadTemplateName = CounterMissileLauncher End CODE Object CounterMissileLauncher
; *** ART Parameters *** Draw = W3DDependencyModelDraw ModuleTag_01 OkToChangeModelColor = Yes AttachToBoneInContainer = Engine01 ConditionState = NONE Model = NONE End End ; ***DESIGN parameters *** Side = America EditorSorting = SYSTEM TransportSlotCount = 1 WeaponSet Conditions = None Weapon = SECONDARY AntiMissile End ArmorSet Conditions = None Armor = InvulnerableAllArmor; End VisionRange = 350 ; *** ENGINEERING Parameters *** KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CLICK_THROUGH IGNORED_IN_GUI Body = StructureBody ModuleTag_02 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = AIUpdateInterface ModuleTag_03 Turret AllowsPitch = Yes ControlledWeaponSlots = SECONDARY TurretTurnRate = 99999 End AutoAcquireEnemiesWhenIdle = Yes MoodAttackCheckRate = 30 End Behavior = DestroyDie ModuleTag_05 End Geometry = BOX GeometryMajorRadius = 6.0 GeometryMinorRadius = 6.0 GeometryHeight = 10.0 GeometryIsSmall = No End |
|
|
25 Aug 2016, 1:11
Post
#14
|
|
Certified Shitposter Group: Tester Posts: 2410 Joined: 30 December 2013 From: Straya' Member No.: 10248 pls join my games im lonely =c |
Any chance we could get a video of it working?
-------------------- Many thanks to IvanMRM for my avatar and Star for drawing my epic signature. You guys rock! Join our Discord Server for a great community and plenty of games and memes! Also, check out our ROTR - Fan group on Facebook. |
|
|
25 Aug 2016, 3:54
Post
#15
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
Any chance we could get a video of it working? Sadly I don't have any recording software. You can copy these codes to have it on a plane. PS, I did this on ROTR using the berkut as the test plane. Put inside plane code CODE Behavior = OverlordContain ModuleTag_CounterMissile01 Slots = 1 DamagePercentToUnits = 100% AllowInsideKindOf = PORTABLE_STRUCTURE PassengersAllowedToFire = Yes PassengersInTurret = Yes PayloadTemplateName = CounterMissile End System Object or Misc or whatever, just somewhere. CODE Object CounterMissile ; *** ART Parameters *** Draw = W3DDependencyModelDraw ModuleTag_01 OkToChangeModelColor = Yes AttachToBoneInContainer = Engine01 ConditionState = NONE Model = NONE End End ; ***DESIGN parameters *** Side = America EditorSorting = SYSTEM TransportSlotCount = 1 WeaponSet Conditions = None Weapon = SECONDARY AntiMissile End ArmorSet Conditions = None Armor = InvulnerableAllArmor End VisionRange = 350 ; *** ENGINEERING Parameters *** KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CLICK_THROUGH IGNORED_IN_GUI Body = StructureBody ModuleTag_02 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = AIUpdateInterface ModuleTag_03 Turret AllowsPitch = Yes ControlledWeaponSlots = SECONDARY TurretTurnRate = 99999 End AutoAcquireEnemiesWhenIdle = Yes MoodAttackCheckRate = 30 End Behavior = DestroyDie ModuleTag_05 End Geometry = BOX GeometryMajorRadius = 6.0 GeometryMinorRadius = 6.0 GeometryHeight = 10.0 GeometryIsSmall = No End Put in Weaponobjects - The locomotor is the same one as the comanche missiles CODE Object CounterMissile ; *** ART Parameters *** Draw = W3DModelDraw ModuleTag_01 ConditionState = NONE Model = UVRockBug_m ParticleSysBone = Object03 TunnelDefenderMissileExhaust ParticleSysBone = Object03 EMissileFlame End End DisplayName = OBJECT:Missile EditorSorting = SYSTEM VisionRange = 0.0 ArmorSet Conditions = None Armor = ProjectileArmor DamageFX = None End ; *** ENGINEERING Parameters *** KindOf = PRELOAD CAN_CAST_REFLECTIONS PROJECTILE CANNOT_RETALIATE;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 ; ---- 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 = 300 ; in dist/sec IgnitionDelay = 0 IgnitionFX = FX_BuggyMissileIgnition End Locomotor = SET_NORMAL CounterMissileLocomotor Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 2.0 End Put in weapon.ini CODE Weapon BerkutAntiMissile PrimaryDamage = 500.0 PrimaryDamageRadius = 4.0 AttackRange = 300.0 DamageType = LASER DeathType = EXPLODED;LASERED ; WeaponSpeed = 200.0 ; dist/sec RadiusDamageAffects = ENEMIES NEUTRALS DelayBetweenShots = 250 ClipSize = 0 ; ClipReloadTime = 0 ProjectileObject = CounterMissile ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation AntiSmallMissile = Yes AntiBallisticMissile = Yes AntiGround = No End Do this and you should have the same thing I have, if not, just tell me. |
|
|
25 Aug 2016, 13:52
Post
#16
|
|
Guardsman Group: Members Posts: 2077 Joined: 22 October 2012 From: Terra Member No.: 9379 Armageddon is here.............. |
Interesting. I think I'll test this on my "Super Aurora". Definitely a much better choice than the generic looking PDL.
This post has been edited by X1Destroy: 25 Aug 2016, 13:53 -------------------- We Die Standing.
|
|
|
25 Aug 2016, 22:44
Post
#17
|
|
Group: Members Posts: 93 Joined: 8 July 2016 Member No.: 13027 |
|
|
|
26 Aug 2016, 1:00
Post
#18
|
|
Guardsman Group: Members Posts: 2077 Joined: 22 October 2012 From: Terra Member No.: 9379 Armageddon is here.............. |
Actually, that one is for ROTR.
-------------------- We Die Standing.
|
|
|
Lo-Fi Version | Time is now: 26 April 2024 - 16:51 |