Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Ace on July 31, 2008, 02:34:21 am

Title: Flags for point defense weapons
Post by: Ace on July 31, 2008, 02:34:21 am
At the moment with FS2 Open, point defense weapons seem to indiscriminately target fighters and bombs. The idea behind this suggesting is allowing for modders to have some more control over this behavior than the current setup, so that layered defenses could be done.

It breaks down to two new weapons flags, which could build upon the $huge turret weapons ignore bombs: ai_profile code.

"Bombs only"
"Ignore bombs"

When a weapon has the bombs only flag, it is dedicated to only attacking bombs and will not fire at any other target.
Ignore bombs is the opposite, under  no circumstances will this weapon ever fire at a bomb.

This would allow for instance a ship with two layers of point defense:
Point defense lasers (beam weapons with "bombs only")
Pulse anti-fighter defense ("small only" "ignore bombs")

Attaching these flags to say secondary weapons could allow for the 'interceptors' from Babylon 5 which only target projectiles aimed at EA ships.
Title: Re: Flags for point defense weapons
Post by: IPAndrews on July 31, 2008, 02:42:08 am
Babylon 5's interceptor guns also target fighters.
Title: Re: Flags for point defense weapons
Post by: Wanderer on July 31, 2008, 07:54:47 am
Can you think of any good reason why turrets should target both fighters and bombers if they still would prioritize objects with bomb tag? (bombers and bombs)
Title: Re: Flags for point defense weapons
Post by: Ace on July 31, 2008, 04:25:42 pm
You have me lost there with that reply.

Pretty much, the idea here is pretty simple: some turrets just shoot at bombs, period.

Others can be set to just shoot at fighters and bombers, but not bombs, period. So they would not be prioritizing targets with a bomb tag.

An example of this being useful would be trying to simulate something like the 747 anti-missile nose laser. It's just powerful enough to take out missiles, but isn't point defense for fighters and would be futile shooting at them.
Title: Re: Flags for point defense weapons
Post by: Wanderer on July 31, 2008, 05:11:30 pm
What i meant that as missiles aren't actually that different from fighters why shouldn't the anti-bomb batteries be able to target fighters as well in absence of bombs (or vice versa)... Even the 747 laser thing is in theory capable of intercepting fighters (as its in theory capable of intercepting missiles). The way i see it  i havent seen any reference to a weapon which would be solely capable of engaging only bombs or only small craft. You can however prioritize the targets of the turrets in any which way you like via sexps in FRED.
Title: Re: Flags for point defense weapons
Post by: Ace on July 31, 2008, 05:30:18 pm
The entire idea is to have the option of more tactical gameplay, capital ships with certain turrets specialized to take out bombs *very* well, and only bombs. ...and likewise other turrets that aren't as good for bomb interception (low accuracy) but are good against fighters and so the current AI settings of prioritizing bombs with the "small ships" flag doesn't cut it. While the SEXP can do this, when you're doing it on capships with 20 PD turrets each (5 bomb, 15 fighter+) the setups get nasty for each and every mission.
Title: Re: Flags for point defense weapons
Post by: IceFire on August 02, 2008, 05:24:58 pm
Sort of like the point defense laser that the Paladin tank in C&C Generals had.  It was powerful enough to hit a incoming rocket but didn't have the range or power for anything beyond that.  The opposite flag where the bombs are not targetable would be nice as well...you could have some large anti-cap weapons that aren't doing silly things like firing at bombs during a capital ship battle where they should be targeting the primary threat (leaving the other turrets to shoot at bombs).

The idea has allot of merit...it could be used for a variety of different purposes depending on the MOD involved.  In TBP it probably wouldn't make sense but it might elsewhere.
Title: Re: Flags for point defense weapons
Post by: Wanderer on August 03, 2008, 12:11:26 pm
You can already prevent the big guns from targeting bombs... via ai_profiles flag http://www.hard-light.net/wiki/index.php/Ai_profiles.tbl#.24huge_turret_weapons_ignore_bombs which is several years old...
Title: Re: Flags for point defense weapons
Post by: Bobboau on August 04, 2008, 11:04:54 pm
which is nice, but not what he was asking for, he wants more control, and specificly the opposite of what you just described, targeting ONLY bombs
Title: Re: Flags for point defense weapons
Post by: Wanderer on August 05, 2008, 05:41:00 am
which is nice, but not what he was asking for, he wants more control, and specificly the opposite of what you just described, targeting ONLY bombs

Err? I thought he pretty much just asked about it...
...
The opposite flag where the bombs are not targetable would be nice as well...you could have some large anti-cap weapons that aren't doing silly things like firing at bombs during a capital ship battle where they should be targeting the primary threat (leaving the other turrets to shoot at bombs).
...


In any case we are taking a look at extending the target preference/choice options to a table options and possibly improve them a bit (which might address some of the issues discussed in this thread). It probably wont be ready anytime soon and due code freeze it will probably be added to the code even later.