Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: phreak on September 20, 2005, 07:24:37 pm
-
So in my quest for continuosuly customizing freespace, I've looked to the lowly countermeasure system. I've noticed a surprising lack of flexability there on the part of customizing how the countermeasures behave towards different types of missiles, its radius of effectiveness, how many you can carry, and most importantly: how multiple countermeasures would be handled in the weapons selection screen.
So far I've been able to customize the countermeasure's effectiveness against heat and aspect seekers as well its effective radius. You can now also define how well a missile's seeker head tracks its target, making it harder to spoof with countermeasures.
Most of these fields are self-explanatory. All new fields are bolded and optional with the default values filled in.
Countermeasure:
$Name: Type One
$Velocity: 30.0
$Fire Wait: 0.5
$Lifetime Min: 1.0
$Lifetime Max: 2.0
$LaunchSnd: 99
$Model: cmeasure01.pof
[b]$Heat Effectiveness: 1.0
$Aspect Effectiveness: 1.0
$Effective Radius: 300.0
$Cargo Size: 1.0[/b]
Missile's homing info:
$Homing: YES
+Type: HEAT
+Turn Time: 0.85
+View Cone: 100.0
[b]+Seeker Strength 1.5[/b] ;; 2.0 for aspect missiles
The chance of a missile being drawn to a countermeasure is calculated as countermeasure_type_effectiveness/seeker_strength. So Heat seeking missiles have about a 66% chance of being drawn toward a countermeasure within 300m and an aspect seeker has a 50% chance of being drawn to a countermeasure within 300m. This is a hard limit, but i could probably introduce an effectiveness falloff that will attract countermeasures from a range outside its effective radius, but it will be less likely the further you get outside its effective radius.
The fun part occurs upon trying to select the countermeasure in the loadout screen. That lecuture will be presented when I have used photoshoppe to modify how a third loadout screen should look. I will also be using this third loadout screen for tertiary weapons systems whenever i am able to get around to coding them in.
None of these changes are currenly in CVS atm. Im in the middle of testing them.
-
Would it be possible to have a spawning countermeasure? For an example, if you've ever seen the movie "Airfore One" starring Harrison Ford, the plane once ejects a radar countermeasure. It launches this charge, which detonates and releases a bunch of chaff. So the countermeasure would borrow qualities from a Psynaptic bomb. There'd need to be a time figure prior to detonation, and a coutermeasure child. Another feature would be someting like swarm figures with the swarm delay figure, so you could have a series of flares released in sequence, as seen on modern military aircraft.
-
I wonder if it would be possible to integrate the countermeasure and weapons entries.
-
Now how cool would it be if you could choose from different types of countermeasures in the loadout screen? :nod:
-
Well, X-Wing vs. Tie-Fighter had two countermeasures to choose from. The first was called "chaff", which just emited pixels in space. You got no damage, when a missile hit you until the chaff wore off. The other was called "flare". Well, it was just an anti-missile.
-
Yeah. Those same ones are in X-Wing Alliance... Never even tried them though. The Empire didn't really use that many missiles... And it was fun when the missile hit you.
Wooo! I'm spinning! :dizzy:
-
Integrate countermeasures and weapons in the tables?
My plot to turn Freespace into Iwar2 continues apace.
-
This is a funky idea, and eye-opening - I'd always imagined there was some funky code that decided when/which/where a countermeasure was effective. I guess it just shows to go you. :)
However, the idea of a third loadout screen horrifies me. IMO, the loadout screen is already inefficient and cluttered, and adding another whole screen would just be making it worse. The purists would cry, but I believe putting some thought into the ship/weapon select screens could yield a) lots of reclaimed space for new weapons/sorted ships etc and b) more intuitive, faster use.
-
Combining weapons and countermeasures means only two loadouts. You would just have another weapon point that only took countermeasure type secondaries (which, btw, is how IWar2 handles it).
-
Originally posted by Pnakotus
However, the idea of a third loadout screen horrifies me. IMO, the loadout screen is already inefficient and cluttered, and adding another whole screen would just be making it worse. The purists would cry, but I believe putting some thought into the ship/weapon select screens could yield a) lots of reclaimed space for new weapons/sorted ships etc and b) more intuitive, faster use.
I don't think the loadout screen was ever meant to support 150+ ultrashivankillermoddeddoomsdayweapons... When a pilot is getting ready for a mission, he does not have the whole GTVA arsenal to choose from. It's what you are allowed to carry, and what is available...
Though a separate sencondaries list would nice. If there would be three scrollable lists in the loadout screen... One for primaries, secondaries and countermeasures (or is there enought room?). Or three buttons to switch the contents of the scrollable list...
-
Originally posted by mikhael
Combining weapons and countermeasures means only two loadouts. You would just have another weapon point that only took countermeasure type secondaries (which, btw, is how IWar2 handles it).
That's a good point.
However, I was mostly thinking from a code point of view. If we integrate countermeasures and weapons into a single generic 'weapon' type, a lot of the code can be reused for features that people will probably be requesting anyway (eg spawning countermeasures, chaff, etc)
Once I finish my changes to the weapons.tbl parsing, and get them in CVS, it'd be possible to do simply add the countermeasure to the parse_weapon() function.
How extensive the code changes would be to add a "WP_COUNTERMEASURE" type, I don't know, but it's definitely something to look into. Imagine if beam cannons and certain lasers could distract heat seaking missiles. ;7
-
And preventing heat seekers from homing in to cargo containers...
-
Originally posted by WMCoolmon
However, I was mostly thinking from a code point of view. If we integrate countermeasures and weapons into a single generic 'weapon' type, a lot of the code can be reused for features that people will probably be requesting anyway (eg spawning countermeasures, chaff, etc)
To be honest, so was I. I tend to think in terms of classes and objects. As far as I'm concerned, countermeasures are a type of missile, with a "distraction" property set.
Of course, if it were up to me, the entire weapon system would be revamped from the ground up.
-
Well, if the idea for minelayers is still being considered, I think this is going to be invaluable :)
Of course, that would also mean tweaking the AI to make ships try to drop mines in the right place ;)
-
i was just thinking the same thing earlier today... for some odd reason regarding counter meassures too.... strange lol!
secondly, i thought about this too...
tractor beams...... would this be possible? if so how would you go about doing such a thing?
-
Deep_Eyes: Tractor beams were semi-possible already: Make a weapon with a negative mass, no damage, and use it as a beam. At least IIRC.
-
awesome!
Are values beyond 1.0 possible? It would be nice to have more effective CMs :)
[$Heat Effectiveness: 1.0
$Aspect Effectiveness: 1.0]
-
yea thats the whole point of it. The chance something being defeated is Countermeasure Type Strength/Seeker Strength. so having a high countermeasure strength will spoof any missile of that type if it falls within the range.
-
Originally posted by kasperl
Deep_Eyes: Tractor beams were semi-possible already: Make a weapon with a negative mass, no damage, and use it as a beam. At least IIRC.
I wish people would stop suggesting this without trying it.
Negative mass beams do not work.
-
Originally posted by Black Wolf
I wish people would stop suggesting this without trying it.
Negative mass beams do not work.
I thought someone did try it and that's why it entered the repository of tips and tricks?
I'm almost certain someone posted the successful results of this sort of experiment on HLP once before.
-
I remember seeing that post too (tractor beam). But when I tried it, it didn't work. So I just tohught I was dumb and forgot the whole thing ASAP.
It could work in theory, but does it work in reality?
-
I believe it was in the "trick of the week" thread on the VBB
-
I only posted it because I read it.
Read my siggy. The newbie part may be a bit old with 6k posts, but the rest is still correct.
-
Originally posted by Goober5000
I thought someone did try it and that's why it entered the repository of tips and tricks?
It's entered the repository of tips and tricks because it ought to work. :) Negative mass works fine for pulse lasers, so logically, if you want a tractor beam, use the same technique and apply it to a beam. Once a few people thing of it, others pick up on it and pass it along when people ask about it without actually trying it. And the people who're told about it do what Prophet do - try, fail and then assume they're doing something wrong and find a way around the problem/ ignore the fact that they ever had a problem in the first place.
TI had/has a rather awesome mission planned that involves tractor beams, so I played with this awhile ago. No joy.
-
*bump*
still haven't had time to test it, especially when the code changes i made were on the pc that i dont use that often. If i have nothing to do this weekend, i'll be able to get the gameplay and table logic into cvs.
My plot to turn Freespace into Iwar2 continues apace.
where do you think i got the idea?
-
Bless you, Phreak. Bless you.