Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: WMCoolmon on October 09, 2008, 05:36:24 am

Title: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on October 09, 2008, 05:36:24 am
They should be pretty interchangeable, with the position in weapons.tbl just defining where they show up rather than how. Also, any weapon should be usable as a countermeasure - I don't know why the wiki says it has to have the countermeasure flag. When I did the initial testing I was using Subachs, and that would be a stupid restriction to put on it in any case.

Anyway, you should be able to make primaries that use the POF renderer and secondaries that use the laser renderer, and stick primaries or secondaries on the countermeasures slot of a ship, or make missiles that are also countermeasures. (Or primaries that are also countermeasures?) But mostly they should be more interchangeable than you think, and more rewarding to experiment with.

This isn't anything new but there was a bug that I fixed almost a month ago that prevented this from working properly. This interchangeableness is intended, though. If something isn't already possible then the majority of the code required should already be implemented.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Galemp on October 09, 2008, 07:41:17 am
Huh. Thanks. *thinks about using Piranhas as countermeasures*

This is neat but without proper support in FRED and mission loadouts, all it means is that now everyone (Terrans, Vasudans, Shivans, fighters, bombers) is using a different type of countermeasure. There's no variety, it's only a replacement.

I suppose this is a prerequisite for the integration of 'tertiary' weapons systems, and interface art is needed.

If we're redoing the weapon loadout interface I personally would like to see the option of swapping out the turret-mounted weapon in the loadout screen too, but that's probably beyond the scope of what WMC is doing.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: --Steve-O-- on October 09, 2008, 10:14:38 am
hmm...is this neat stuff already working in released builds, or is it neat stuff to come with the new edition of 3.6.10? either way i can have me some fun with this.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: redsniper on October 09, 2008, 05:43:08 pm
He's saying it's been this way for a long time, but no one uses it because they don't know about it. Hence his post to inform us all. :p
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Backslash on October 09, 2008, 05:56:29 pm
I like this. :yes:

A note from when I tried it a few months ago:  the Swarm system needs to be recoded to work with weapons other than secondaries.  The turret code's swarm system seems to work for primaries and secondaries, so imitating that might be an option.  I gave it a try a while ago but it went slightly over my head.

I've been attempting some interface art but it's slow going.

Another prerequisite for tertiary weapons systems is a block for it in the POF info.  Adding placeholder support for it in PCS2 would be nice. :)  Trick is doing it in such a way that older builds can just ignore it instead of screaming...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Trivial Psychic on October 09, 2008, 09:51:09 pm
Question regarding secondaries:  If I made a model with firepoints in... say, a rear-facing direction, would aspect-seeking secondaries attempt to lock on to targets aft-facing (in rear-view mode), or would it still attempt to lock on to targets ahead?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on October 11, 2008, 06:04:08 am
It's been in for awhile but last time I tried to use it (making placeholder weapons for Diaspora) I had to fix it before it would work. So it's working in recent SVN, not working at some time before that, and working at some time before that.

Question regarding secondaries:  If I made a model with firepoints in... say, a rear-facing direction, would aspect-seeking secondaries attempt to lock on to targets aft-facing (in rear-view mode), or would it still attempt to lock on to targets ahead?

This is the kind of question that even if I did have an answer about what it should be doing, it would be more reliable to test it out.

For the countermeasures slot, my hope is that they would seek backwards by default if you did try it for heat-seeking and the like, and I don't know about the aspect-seeking missiles; they probably wouldn't work (in aspect-seeking mode, they'd probably behave as if you didn't have a lock) if you didn't already have an aspect seeking missile selected in the secondaries slot.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Aardwolf on October 11, 2008, 12:53:14 pm
Does this mean we have homing primaries now?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on October 19, 2008, 03:10:04 am
They always did home in some form. I remember Carl or somebody trying them years ago and reporting that they would turn in the direction of the ship, but not actually change velocity. I don't actually know how this would work now.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 19, 2008, 03:55:17 am
Yeah.. i tried these too about a year ago or something... And end result was that the effect orientation was turned so that the effect pointed at the target but the actual flying or velocity vector of the weapon did not change.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Stormkeeper on October 19, 2008, 03:55:44 am
*snip*
I tried making homing primaries a while back, and they just turned in the direction of the target, not actually haring off after their targets.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 19, 2008, 08:37:02 am
I'd really like to see countermeasures that look like modern flares used on combat aircraft...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Snail on October 19, 2008, 08:54:16 am
I'd really like to see countermeasures that look like modern flares used on combat aircraft...
Shouldn't be too hard with a nice little glowpoint and an invisible model.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Stormkeeper on October 19, 2008, 09:09:21 am
Is there a model for the current countermeasure?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 19, 2008, 09:12:32 am
I'd really like to see countermeasures that look like modern flares used on combat aircraft...
Shouldn't be too hard with a nice little glowpoint and an invisible model.

I'd like to do that right now...do you think a Blip(;)) would work?

Is there a model for the current countermeasure?

Yes, but it's too big...in an unrealistic way, too... :doubt:
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Stormkeeper on October 19, 2008, 09:16:34 am
I have an untextured cube lying around... I think. No glowpoints, tho...

How big, exactly is it? I've never really noticed it tbh.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 19, 2008, 09:23:58 am
If I claim that is almost as big as the cockpit of a fighter I don't exaggerate...not that much.... :nervous:
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Snail on October 19, 2008, 09:27:33 am
I'd like to do that right now...do you think a Blip(;)) would work?
A Blip(:nervous:) with a glowpoint would work... Though it might be a bit big for a countermeasure.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 19, 2008, 09:29:51 am
Which texture glow should I use?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 19, 2008, 09:38:57 am
You have many options.. You can either make a new pof with glowpoint as was suggested. Or then you might just add pair of thrusters to the pof. Or particle spew.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 19, 2008, 09:48:06 am
How do I manage glowpoints? It was possible with PCS, if I remember well, but PCS 2.0 doesn't let me to do it. I'd like to add a trail as well, but I simply don't know how.

Snail, the Blip(:nervous:)is some sort of big triangle. Replacing the texture resulted in an odd effect :ick:

EDIT: Wait, I think I can do it... :)
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Trivial Psychic on October 20, 2008, 03:25:00 pm
Is it possible to create countermeasures that are for specific types of missiles?  Flares for example, would only decoy heat-seeking missiles, and perhaps chaff could decoy aspect-seeking missiles.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 20, 2008, 03:30:40 pm
Yes

http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Countermeasure:
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 24, 2008, 03:06:54 pm
Sorry, but I don't see anything related to specific kinds of missiles in the "Countermeasures" section...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 24, 2008, 03:12:18 pm
Hmm.. seems like it didnt like the link.. Well there are these options...

Code: [Select]
+Heat Effectiveness:
+Aspect Effectiveness:
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 25, 2008, 08:11:26 am
I need to add them under the countermeasure's name, right? Like "+nocreate" in ships.tbl?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 25, 2008, 09:08:49 am
As explained - sorta - in weapons.tbl wiki page...

They go to the weapons table entry and should even work assuming the weapon in question has 'countermeasure' flag.

Code: [Select]
$Countermeasure:
   +Heat Effectiveness: <float - default: 1.0>
   +Aspect Effectiveness: <float - default: 1.0>
   +Effective Radius: <float - 300.0>
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on October 27, 2008, 12:35:03 am
You can also try the laser renderer...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Aardwolf on October 27, 2008, 08:56:39 am
Can we have beam secondaries/countermeasures/spawned weapons?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Topgun on October 27, 2008, 03:09:30 pm
does this mean that we can have countermeasures that spawn little shrapnel missiles?
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on October 27, 2008, 03:12:44 pm
I'd like to know if we can have Terran, Vasudan and Shivan countermeasures...maybe not necessarily different in terms of effectiveness but rather in terms of appeareance...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Wanderer on October 28, 2008, 12:16:50 am
I'd like to know if we can have Terran, Vasudan and Shivan countermeasures...maybe not necessarily different in terms of effectiveness but rather in terms of appeareance...
Yes. It is possible.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on November 01, 2008, 11:03:17 am
How? :)
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Snail on November 01, 2008, 11:05:40 am
You have to make a new countermeasure entry in the weapons.tbl, then you have to define this entry in the $Countermeasure Type: field of the ships.tbl with the relevant ship.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on November 01, 2008, 11:07:05 am
Does that field have to be added? If so, where?

I don't remember that field, it must be a new addition.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Snail on November 01, 2008, 11:08:24 am
Does that field have to be added? If so, where?

I don't remember that field, it must be a new addition.

Yeah, it is a new addition.

You add it just above $Countermeasures: (the retail field dictating how many countermeasures the ship can carry).
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: Mobius on November 01, 2008, 11:10:01 am
In order to do that I need possible candidates...
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on November 10, 2008, 04:08:26 am
Can we have beam secondaries/countermeasures/spawned weapons?

Beams use a different set of code than ordinary weapons so my off-the-cuff guess would be no.

does this mean that we can have countermeasures that spawn little shrapnel missiles?

You should be able to. However, my answer is in the same vein as the above - I can make educated guesses but I can't state for sure. There's a thousand different ways you can set up weapon variables and obviously I didn't test them all. The more reliable thing to do is to create a new modular table

wpntest-shp.tbm
Code: [Select]
#Ship Classes
$Name: GTF Myrmidon
$Countermeasure Type: GTM-10 Piranha
#End

load up a mission with the Myrmidon, and test it out (by launching a countermeasure). Note that I pulled the Piranha name from the wiki, not from the tables, so it might not be correct.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: ssmit132 on November 10, 2008, 05:31:57 am
wpntest-shp.tbm
Code: [Select]
#Ship Classes
$Name: GTF Myrmidon
$Countermeasure Type: GTM-10 Piranha
#End

load up a mission with the Myrmidon, and test it out (by launching a countermeasure). Note that I pulled the Piranha name from the wiki, not from the tables, so it might not be correct.

It's just Piranha if you're defining something using the weapon.
Title: Re: Primaries, Secondaries, and Countermeasures
Post by: WMCoolmon on November 11, 2008, 01:38:39 am
Thanks. :)