Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nemesis6 on November 19, 2010, 12:33:04 pm

Title: Suggestion: Elaborating the "defend target" command
Post by: Nemesis6 on November 19, 2010, 12:33:04 pm
I've noticed that whenever I set fighters to defend a friendly warship in a battle, they'll interpret this as "Fly over to that giant enemy ship and get torn up by flak and enemy fighters!". So here's my idea: When you select "defend target" in the orders menu, you will reach an additional prompt with these options:

"Defend"
"Defend, 1000 meters"
"Defend, 2000 meters"
"Defend, 3000 meters"
"Defend, prioritize bombers"
"Defend, ignore warships"

Anything beyond the distances above will be ignored, obviously. So what do you say?
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: General Battuta on November 19, 2010, 12:34:53 pm
This would need to be set up to be accessible via the SEXP ai goals system as well (since obviously they are shared.)

Also I believe the defend radius is currently based on the size of the ship being defended.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: Nemesis6 on November 19, 2010, 12:43:58 pm
Well, using the command in, say, the first mission of Vassago's Dirge, telling the AIs to protect the Cretheus, that just has them flying straight into a Ravana with enemy ships picking them off all the whilst!  :wtf:
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: General Battuta on November 19, 2010, 12:57:15 pm
Oh, you literally mean in-game.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: Sushi on November 19, 2010, 01:36:06 pm
Pretty sure we need to make it work via SEXP first, although it would be nice to be able to change the command menu at some point too.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: Galemp on November 19, 2010, 03:27:49 pm
I'd recommend you name them 'Defend Close' and 'Defend Far' instead of setting specific ranges. It's more intuitive and flexible.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: chief1983 on November 19, 2010, 05:03:15 pm
And then what?  Scale close and far based on the size of the ship?
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: Galemp on November 19, 2010, 05:14:22 pm
Sure. Close would be appropriate for bomb intercept and point defense, within the ranges of the ship's own turrets. Far would order fighters to attack any enemy that's targeting the escorted ship, wherever they are.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: karajorma on November 19, 2010, 07:40:23 pm
The ranges could be set via ai or ai_profiles tables. Or via objecttypes.
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: Sushi on November 19, 2010, 09:24:35 pm
The ranges could be set via ai or ai_profiles tables. Or via objecttypes.

Or as part of the SEXP if we do it as a SEXP, and as part of whatever table we invent for custom comm menus. :)
Title: Re: Suggestion: Elaborating the "defend target" command
Post by: ChaosityZ on November 19, 2010, 11:03:45 pm
I think this is a great idea!  one that I also thought of during game play, but forgot by the time I came back to the forums here.