Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Qent on July 21, 2009, 09:23:35 am

Title: Independently Targeted Swarm Missiles
Post by: Qent on July 21, 2009, 09:23:35 am
I want to make a swarm missile that fires 7 missiles in a 30-degree cone so that each missile acquires its own target independently of the other missiles and the firing ship. The problem is that by default, all the missiles (even when heatseekers) robotech their way to my current target. What I want is to fire a swarm at a wing of fighters and have each missile pick a fighter and so take out the whole wing. First I tried decreasing the missile's view cone so that  it barely covers the FOF. That works as intended, but it makes it easier to evade. I am afraid that if I make it a cluster weapon then it will foil the AI, and I would rather not use 3.6.11 features. So is there something clever that I could do to make this work?

Edit: Typo.
Title: Re: Independently Targeted Swarm Missiles
Post by: Spoon on July 21, 2009, 09:32:21 am
Perhaps the easiest way is to create a missile which instantly explodes when launched and then creates a whole load of childs/clusters.
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on July 21, 2009, 09:39:33 am
Take a look at Pilum FF missile from WCS, what you want is essentialy this weapon with swarm setting.
Title: Re: Independently Targeted Swarm Missiles
Post by: Qent on July 21, 2009, 11:37:01 am
Thanks for the Pilum FF. I think the only problem is that it uses a "Spawn" flag to achieve that effect. I have not yet played around with WCS much (since I just downloaded it :D ), but it looks like they made a special Pilum FF (which is just a regular heatseeker) for the AI to use. The missile that I am making is meant as a gift for the Shivans, so it has to work with the AI. So far it looks like shrinking the view cone is the best solution. :(
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on July 21, 2009, 11:47:18 am
For making evasion harder I suggest you to increase it's seeker strenght and decrease turn time.
It should make breaking lock a bit more difficult.
Title: Re: Independently Targeted Swarm Missiles
Post by: Aardwolf on July 21, 2009, 12:23:41 pm
What about making it a fast-firing missile with a low turn time and small ammo space per-missile?
Title: Re: Independently Targeted Swarm Missiles
Post by: Commander Zane on July 21, 2009, 12:32:49 pm
For making evasion harder I suggest you to increase it's seeker strenght and decrease turn time.
It should make breaking lock a bit more difficult.
Is there a way to make them close to undodgeable ala' Wing Commander's Spiculum IR missile?
Title: Re: Independently Targeted Swarm Missiles
Post by: Starman01 on July 21, 2009, 01:08:04 pm
Thanks for the Pilum FF. I think the only problem is that it uses a "Spawn" flag to achieve that effect. I have not yet played around with WCS much (since I just downloaded it :D ), but it looks like they made a special Pilum FF (which is just a regular heatseeker) for the AI to use.

Nope, not really. There is one for player available too. I created that missile using a little hack. The primary missile that can be fitted is invisible ingame and explodes invisible right after launch. It then launches a child that automatically target the "nearest" enemy .

This is actually fun (my favourite WC-Missile). You can flee from an enemy, and shooting the missile without any target lock. It then turns back and hit the pursuing enemy right in the face (as long there isn't any enemy even more closer) :)

The AI-Variant just have higher reload times so that the AI isn't overwhelming you with missile like the FS-AI usually does.

Maybe be modifying the entry you can create the missile you want, just raise the number of spawns
Title: Re: Independently Targeted Swarm Missiles
Post by: Nuke on July 21, 2009, 03:42:33 pm
im not 100% sure bt i think multitargeting can be scripted. you would have to

come up with a list of handles to ships
have controls to add and remove targets from this list
when swarm missiles are created, change their targets to ships on that list
Title: Re: Independently Targeted Swarm Missiles
Post by: Qent on July 21, 2009, 04:29:54 pm
I got pretty much what I wanted by increasing the seeker strength, decreasing the turn time, and also giving the missiles a proximity fuse. Ideally I would use something based on the Pilum, but the AI won't use spawning weapons the way I want it to. I know nothing of scripting, but that sounds like a rather difficult solution for just one missile. Maybe if I planned to base an entire mod around Shivan anti-wing missiles.... :p
Title: Re: Independently Targeted Swarm Missiles
Post by: Getter Robo G on July 21, 2009, 09:34:56 pm
Starman01, that's awesome!

  But how can you make it "visible"? Your missile template sounds interesting but how about if you wanted to see when allies and enemies were firing it instead of just the impact results?

I might be confused how this works: IS the child "invisible" too, or just the briefly existing parent?

 
Title: Re: Independently Targeted Swarm Missiles
Post by: Alan Bolte on July 21, 2009, 11:02:19 pm
I'm pretty sure he meant that the explosion was invisible, not sure about the parent. That way it looks like you're just launching a missile, not launching a missile that explodes and creates a child missile.
Title: Re: Independently Targeted Swarm Missiles
Post by: JGZinv on July 22, 2009, 02:56:56 am
Nuke -
Quote
have controls to add and remove targets from this list

Easiest way I can think of without having to add in a menu Nuke... make it so whatever
is in the field of view of your cockpit is automatically added to the targeted list.
This way you can "sweep" you view and paint several enemies at once.
Just designate some kind of key press for deactivation/deselect all.
Title: Re: Independently Targeted Swarm Missiles
Post by: Starman01 on July 22, 2009, 04:41:14 am
Starman01, that's awesome!

  But how can you make it "visible"? Your missile template sounds interesting but how about if you wanted to see when allies and enemies were firing it instead of just the impact results?

I might be confused how this works: IS the child "invisible" too, or just the briefly existing parent?

 

The missile that is "loaded" in the ship is invisible and has an invisible explosion (and of course no explosionsound either). But the child that is spawned after the explosion is completly visible and reacts like a normal missile, and can even be outrunned with countermeasures and vectorchange (if you're good enough) :) On impact the child has a normal explosion and sound
Title: Re: Independently Targeted Swarm Missiles
Post by: Nuke on July 22, 2009, 07:40:06 am
Nuke -
Quote
have controls to add and remove targets from this list

Easiest way I can think of without having to add in a menu Nuke... make it so whatever
is in the field of view of your cockpit is automatically added to the targeted list.
This way you can "sweep" you view and paint several enemies at once.
Just designate some kind of key press for deactivation/deselect all.

come to think of it that would probibly workbetter and be easyer to use. you can do a frustum cull. loop through ships and find the hostile ones within a defined frustum, then sort those from closest to farthest. i did that with mr radar but its the same code pretty much.

none the lest you build a list of targets, and assign those targets to missiles as theyre created.

Title: Re: Independently Targeted Swarm Missiles
Post by: Qent on July 22, 2009, 11:56:22 am
How do you assign to each missile the target that is closest to its centerline? So instead of getting the closest target, the missiles get distributed across all targets in view (if that makes sense). I suppose you would need a combination of distance and angle from the centerline so that missiles only receive targets that are in range.

Oh and thanks everybody for all your help. :)
Title: Re: Independently Targeted Swarm Missiles
Post by: Nuke on July 22, 2009, 03:37:54 pm
well you just measure the magnitude of the ships y and x coord devided by z i guess. chances of havng 4-8 targets in the same frustum and have them all in range at once are pretty slim, id prioritize by distance first. you could weight the values and then sum up the difference, and prioritize based on that though.
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on July 29, 2009, 06:03:26 am
There's a way without scripting, not the best solution but it works.

All you have to do is check the primitive sensors box in FREDs Ship Editor.
The Missiles i've used are based on the Rockeye, and it works like a charm.
Would be cool to have either a script or a weapons flag that allows the same without dumbing down
the ships targeting abilities, though.

I also would like to know why is there a differnce in behaviour, i thought missiles fired without lock behave like dumbfires in case of flaged as ASPECT, and no change in behaviour when flaged as HEAT ( target only one ship ).



EDIT: Seems to work for the AI too ( primitive sensors have to be checked for them as well ).


Here are some screen shots, ( total missile pawnage  :D ):


(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/Multitarget.jpg)
(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/Multitarget2.jpg)
Title: Re: Independently Targeted Swarm Missiles
Post by: T-Man on July 29, 2009, 12:15:52 pm
Nice one Angelus; looks good so far :yes:. I've been wanting to put a weapon just like this into the latter part of a campaign i'm making (i was hoping for a multi-aspect lock one but i recall someone telling me that's impossible in the past), so i'd be very interested in any progress you make on it. Best of luck with it!
Title: Re: Independently Targeted Swarm Missiles
Post by: JGZinv on July 29, 2009, 01:27:55 pm
Heh better yet... stick it on something like the Galactica.
Multiple banks firing off several salvos.   :nod:
Title: Re: Independently Targeted Swarm Missiles
Post by: Qent on July 29, 2009, 01:36:40 pm
Hey that looks pretty cool! But do primitive sensors prohibit aspect locking missiles? Maybe there's a way to SEXP primitive sensors on and off along with good-secondary-time?
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on July 29, 2009, 03:42:12 pm
I've made a quick mission with the "primitive radar" and it works.
All you need is a Fighter with more then one Secondary bank, and the following Events in the Mission.
Not the most elegant approach, but it works for now.

In the first secondary bank you can have the Missile A ( HEAT flag ) and it needs target lock, in the second bank you can have Missile B ( ASPECT flag ), and in the third you have A again, but once the third is selected, the event triggers and reduces the Radar range to the in the event entered value ( the 150 is only a example i used, you might want to reduce the range further).

You can fire the Missiles and they will head for any target in sight.
After switching to a other secondary bank, the radar range will be restored to maximum.

For a better solution you better ask karajorma ( or anyone else for that matter ) since his Expert-Fu beats my Noob-jitsu, when it comes to FREDing. :)

Anyway, here we go:

Code: [Select]
$Formula: ( when
   ( is-secondary-selected "Blue 1" 3 )
   ( hud-set-max-targeting-range 150 )
)
+Name: Set Primitive
+Repeat Count: 0
+Interval: 1
+Team: 0

$Formula: ( when
   ( is-secondary-selected "Blue 1" 1 )
   ( hud-set-max-targeting-range 0 )
)
+Name: Unset Primitive
+Repeat Count: 0
+Interval: 1
+Team: 0



Enjoy!
Title: Re: Independently Targeted Swarm Missiles
Post by: Akalabeth Angel on July 30, 2009, 04:08:32 am
Did someone just use Robotech as a verb?
Title: Re: Independently Targeted Swarm Missiles
Post by: Spoon on July 30, 2009, 04:50:09 am
Did someone just use Robotech as a verb?
Should have used Macross as a verb...
Title: Re: Independently Targeted Swarm Missiles
Post by: Qent on July 30, 2009, 10:04:21 am
(http://img27.imageshack.us/img27/3759/robotech.png)
That's what I meant. (Don't make me add a link! :P )
Title: Re: Independently Targeted Swarm Missiles
Post by: Commander Zane on July 30, 2009, 05:33:34 pm
That's not really Roboteching. :P
Real Roboteching is up-the-ass twisted insane 90 degree turns. ;)
Title: Re: Independently Targeted Swarm Missiles
Post by: Droid803 on July 30, 2009, 06:53:58 pm
Hrm, I don't get why using the spawn flag won't work.
Just tried it myself - it works fine (except you don't see a range indicator for the missiles but w/e...)
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on July 30, 2009, 07:26:21 pm
The question is, will it work as well on AI?
On player ship there's no problem with it, as proved by WCS Pilum missile (and my new Scythe fighter/bomber suppresion system), but AI ships may not want to fire the missile (WCS have Pilum AI which is simple heatseeker).
I'm currently experimenting with this system (Scythe F/BSS mentioned above), so maybe I will be able to provide more data soon.
Title: Re: Independently Targeted Swarm Missiles
Post by: Droid803 on July 30, 2009, 10:23:38 pm
Well, if I saw correctly the AI did use it.
Though I forgot to give the missile a distinctive trail so...It could have been a mistake.
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on July 31, 2009, 08:04:26 am
I made only a quick AI test with the events above, and it didn't work for them, maybe something was wrong with the setup ( read here weapons loadout on the AI fighter ),  though.

I didn't try something else as trigger for the AI, so there's a chance it might work without checking the <primitive radar> box in the ship editor.
Title: Re: Independently Targeted Swarm Missiles
Post by: Wanderer on July 31, 2009, 08:34:05 am
I made some code changes to enable such missiles to be used (not yet committed). But only heat seekers. Might tweak the code on how they select the targets though as it might cause some issues occasionally.
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on July 31, 2009, 08:48:26 am
Will it magically make AI launch Scythe F/BSS without any changes, or will I need to enable it somehow?
Anyway it will surely be useful.
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on August 01, 2009, 09:20:06 am
Something beautiful...



(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/MissileDancing.jpg)
Title: Re: Independently Targeted Swarm Missiles
Post by: Commander Zane on August 01, 2009, 09:34:20 am
Oooh damn.
Title: Re: Independently Targeted Swarm Missiles
Post by: headdie on August 01, 2009, 02:19:59 pm
ohhhhhhh pretty lights mmmmmmmmmmmm
Title: Re: Independently Targeted Swarm Missiles
Post by: Fury on August 01, 2009, 02:27:11 pm
Something beautiful...



(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/MissileDancing.jpg)

I demand table entry for this!
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on August 01, 2009, 02:48:15 pm
Something beautiful...



(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/MissileDancing.jpg)

I demand table entry for this!



Here's the table entry for the missile in that pic.
You'll need the event mentioned earlier for that, otherwise it wont work.

You have to edit some entries ( model a.s.o. ), since this missile uses a BtrL model.

The new Nightly with the changes Wanderer made should support that too, but i don't know if this is enabled by a flag or whatever.

You could also try to increase the number of shots fired to 50. ;7


Have fun and post some pics! :D

EDIT: The Missile is named Angelic Retribution, thx to Captain-Custard. :)


Code: [Select]
$Name:                                  HS-90 AR Missile
+Title:                                 XSTR("HS-90 AR Missile", 3341)
+Description:
XSTR(
"Medium-to-short range missile
Conventional warhead", 3342)
$end_multi_text
+Tech Title:   XSTR("HS-90 AR Missile", 3343)
+Tech Anim:   Tech_Harpoon
+Tech Description:
XSTR(
"The HS-90 AR Missile is a Experimental Long Range Heat seeking Missile.
AR stands for Angelic Retribution.", 3344)
$end_multi_text
$Model File: Col_missile.pof
$External Model File: Col_missile_ext.pof
$Mass: 15.0
$Velocity: 350.0
$Fire Wait: 0.1
$Damage: 25 ;; damage applied when within inner radius
$Blast Force: 70.0
$Inner Radius: 20.0                                       ;; radius at which damage is full (0 for impact only)
$Outer Radius: 40.0                                       ;; max radius for attenuated damage
$Shockwave Speed: 0                                         ;; velocity of shockwave.  0 for none.
$Armor Factor: 1.0
$Shield Factor: 0.8
$Subsystem Factor: 0.5
$Lifetime: 10.0
$Energy Consumed: 0.0 ;; Energy used when fired
$Cargo Size: 0.01 ;; Amount of space taken up in weapon cargo
$Homing: YES
;; the following indented fields are only required when $Homing is YES
+Type: HEAT ;; Legal: HEAT, ASPECT
+Turn Time: 0.6
$LaunchSnd: 91                                        ;; The sound it makes when fired
$ImpactSnd: 88                                        ;; The sound it makes when it hits something
$FlyBySnd: -1
$Rearm Rate: 2.0 ;; number of missiles/sec that are rearmed
$Flags: ( "player allowed" "in tech database" "corkscrew" )
$Trail: ;; Trail cannot be set if Exhaust is set
+Start Width:   0.55                                      ;; Width of trail nearest missile
+End Width:             1.5                                       ;; Width of trail before it "evaporates"
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life:             2.0
+Bitmap: MissileTrail02 ;; Bitmap used to draw trail
$Icon: iconCrossbow
$Anim: cross
$Impact Explosion: exp20
$Impact Explosion Radius: 8.0
$Corkscrew:
+Num Fired: 20
+Radius: 5
+Fire Delay: 0
+Counter rotate: 1
+Twist: 5





Here's the event you need, replace the banks in it to fit your fighters secondary banks.

Code: [Select]

$Formula: ( when
   ( is-secondary-selected "Blue 1" 3 )
   ( hud-set-max-targeting-range 150 )
)
+Name: Set Primitive
+Repeat Count: 0
+Interval: 1
+Team: 0

$Formula: ( when
   ( is-secondary-selected "Blue 1" 1 )
   ( hud-set-max-targeting-range 0 )
)
+Name: Unset Primitive
+Repeat Count: 0
+Interval: 1
+Team: 0





Also here a pic with 50 missiles per salvo ;7:


(http://i653.photobucket.com/albums/uu258/_Angelus_/Ingame%20Screenshots/Missileownage4.jpg)
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on August 01, 2009, 03:00:34 pm
Now, that's a true Macross Missile Massacre, this missile looks just awesome.  :)
I wonder how to enable changes made by Wanderer.
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on August 01, 2009, 03:02:39 pm
Now, that's a true Macross Missile Massacre, this missile looks just awesome.  :)
I wonder how to enable changes made by Wanderer.

Me too.
Title: Re: Independently Targeted Swarm Missiles
Post by: Wanderer on August 01, 2009, 03:17:15 pm
Weapon flag "untargeted heat seeker" does that.
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on August 01, 2009, 03:18:41 pm
Weapon flag "untargeted heat seeker" does that.

thank you!
Title: Re: Independently Targeted Swarm Missiles
Post by: Spoon on August 01, 2009, 04:22:41 pm
Awesome!

Edit:
(http://xs942.xs.to/xs942/09310/itsthecircus822.png)
Weeeeee
It's almost as i've i'm Itano himself.
Awesome new flag is awesome.
Title: Re: Independently Targeted Swarm Missiles
Post by: Retsof on August 02, 2009, 09:12:32 am
Something is screwed up with the blending on those missile trails.
Title: Re: Independently Targeted Swarm Missiles
Post by: Commander Zane on August 02, 2009, 09:30:30 am
Weapon flag "untargeted heat seeker" does that.
Is that a flag that's just been released or is it still in the works, since I couldn't find it in the Wiki.
Title: Re: Independently Targeted Swarm Missiles
Post by: Dragon on August 02, 2009, 09:36:18 am
It's from last few days, don't expect it to appear in wiki at the moment it's released.
I'm fairly cetrain that somebody will put it there soon.
Title: Re: Independently Targeted Swarm Missiles
Post by: Spoon on August 02, 2009, 09:49:13 am
Something is screwed up with the blending on those missile trails.
ah yeah, it was my own poor attempt at making a trail.

(http://xs142.xs.to/xs142/09310/drunkcircus537.png)
Missile madness, I love this new flag
Title: Re: Independently Targeted Swarm Missiles
Post by: Angelus on August 02, 2009, 10:15:40 am
Weapon flag "untargeted heat seeker" does that.
Is that a flag that's just been released or is it still in the works, since I couldn't find it in the Wiki.


It's a new one, it is in Nightly build 5502.


Title: Re: Independently Targeted Swarm Missiles
Post by: JGZinv on August 02, 2009, 03:16:32 pm
This would certainly be a system buster when paired with Nuke's particle trails.