Hard Light Productions Forums

General FreeSpace => FreeSpace Discussion => Topic started by: potterman28wxcv on April 12, 2015, 05:09:28 pm

Title: Ordering commands to AI
Post by: potterman28wxcv on April 12, 2015, 05:09:28 pm
Let's suppose you have two AI wings Alpha and Beta (8 fighters in total), and you are Gamma 1 (so you are the 9th).
8 AI enemy fighters arrive, having the same fighters and weapons as Alpha and Beta.
You cannot directly participate in the battle, all you can do is giving orders, but you want to make sure your side wins.

Which orders would give to your mates to increase the maximum your chances to win the battle ?
Title: Re: Ordering commands to AI
Post by: jr2 on April 12, 2015, 05:14:58 pm
Order by wing and target one ship per wing at a time.

(Alpha wing attack enemy Alpha 1, Beta wing attack enemy Beta 1, after destruction, attack 2, then 3, then 4).

You may even experience no losses.

At least in my experience.
Title: Re: Ordering commands to AI
Post by: Kie99 on April 12, 2015, 06:07:02 pm
I've always thought the one obvious thing the Comms. menu lacked was an "attack wing" order.
Title: Re: Ordering commands to AI
Post by: Mars on April 12, 2015, 07:24:19 pm
I'd have killed for an "Attack squadron" since FS1, nothing came close to that until BP WiH Act III
Title: Re: Ordering commands to AI
Post by: Phantom Hoover on April 12, 2015, 08:36:24 pm
I've often wished for more tailored, strategic AI commands, on the 'work on this objective' level. The normal way is a bit too micromanagey to really work in a hectic combat game, IMO.
Title: Re: Ordering commands to AI
Post by: NGTM-1R on April 12, 2015, 08:53:06 pm
The only mission I ever felt I was effectively managing my wingmates was Good Luck, and that was because I was Ursaing along so I had plenty of time just flying to the target to direct them onto individual Shivan fighters.
Title: Re: Ordering commands to AI
Post by: General Battuta on April 12, 2015, 08:58:29 pm
I've often wished for more tailored, strategic AI commands, on the 'work on this objective' level. The normal way is a bit too micromanagey to really work in a hectic combat game, IMO.

You can ~do this but it requires a lot of work by the mission designer.
Title: Re: Ordering commands to AI
Post by: z64555 on April 12, 2015, 11:07:40 pm
Assign the hostile wing to a hotkey. With the hostile wing selected from the hotkey, order your wing to attack.

They'll first attack the craft you have targeted, and then go on to attack the other craft in the wing. I think they prioritize the wing leader or whoever is attacking themselves.
Title: Re: Ordering commands to AI
Post by: potterman28wxcv on April 13, 2015, 03:55:01 am
Assign the hostile wing to a hotkey. With the hostile wing selected from the hotkey, order your wing to attack.

They'll first attack the craft you have targeted, and then go on to attack the other craft in the wing. I think they prioritize the wing leader or whoever is attacking themselves.
I didn't know about that. I thought that after having destroyed their target, they would enter in the "Engage everything" state, not particularly the wing you had selected.

Order by wing and target one ship per wing at a time.

(Alpha wing attack enemy Alpha 1, Beta wing attack enemy Beta 1, after destruction, attack 2, then 3, then 4).

You may even experience no losses.

At least in my experience.
That's interesting, I will have to test it out. I have never really tried the C-3-1 or similar stuff, because I would see this as being very risky (while your wingmen focus on one target, they would be vulnerable to the rest of the enemy wing.)

Recently, after having read an old 2009 post called "Advanced Dogfighting" (http://www.hard-light.net/forums/index.php?topic=63714.0) (the part where he says that flying in pair is best), I have tried the following :
Beta 1 guards Alpha 1
Beta 2 guards Alpha 2
Beta 3 guards Alpha 3
Beta 4 guards Alpha 4

Then Alpha wing : engage enemy

I tried it in the Hammer and Anvil from FSport, it worked well on insane (I think I lost less team mates than if I was doing plain C-3-9).
Title: Re: Ordering commands to AI
Post by: jr2 on April 13, 2015, 04:48:28 am
It can be risky, yes, but if timed right, you have 4 fighters on 1 = quick (instant?) win, so, by the time your fighters start taking serious damage, the enemy wing is gone.

Difficulty level would affect that, but I'm not sure which way (for or against).
Title: Re: Ordering commands to AI
Post by: potterman28wxcv on April 15, 2015, 03:28:35 pm
I've been playing a bit with commands, and I've noticed a weird behaviour.

If you order Beta 2 to protect Alpha 2 for example, he won't protect Alpha 2 but Alpha 1. Even though he has the state "Guard Alpha 2", he will actually guard alpha 1, not alpha 2.

Though, if you order Alpha 4 to protect Alpha 2, Alpha 4 will actually protect Alpha 2, not Alpha 1.

Also, it seems that Alpha 3 cannot protect Alpha 2 : it seems to be impossible to order that command (it is greyed). But Alpha 3 can be ordered to protect another ship (Beta 1, Beta 2..).
EDIT : with 3 fighters in a wing, it seems that fighter n cannot be ordered  to protect fighter n-1. Though, if ordered via the Wing command (instead of individually), it can be ordered to protect the fighter.

Not sure if this bug belongs to FSO in general, or just in FSport, or maybe it's something written in the scripts that make this happening
Title: Re: Ordering commands to AI
Post by: AdmiralRalwood on April 15, 2015, 08:05:23 pm
I've been playing a bit with commands, and I've noticed a weird behaviour.

If you order Beta 2 to protect Alpha 2 for example, he won't protect Alpha 2 but Alpha 1. Even though he has the state "Guard Alpha 2", he will actually guard alpha 1, not alpha 2.

Though, if you order Alpha 4 to protect Alpha 2, Alpha 4 will actually protect Alpha 2, not Alpha 1.

Also, it seems that Alpha 3 cannot protect Alpha 2 : it seems to be impossible to order that command (it is greyed). But Alpha 3 can be ordered to protect another ship (Beta 1, Beta 2..).
EDIT : with 3 fighters in a wing, it seems that fighter n cannot be ordered  to protect fighter n-1. Though, if ordered via the Wing command (instead of individually), it can be ordered to protect the fighter.

Not sure if this bug belongs to FSO in general, or just in FSport, or maybe it's something written in the scripts that make this happening
I'm not sure why the order is grayed out; could you upload a test mission in which you can reproduce this behavior reliably?

As for ordering fighters in one wing to guard fighters in another wing, this will cause the AI to guard that wing as a whole unless the AI profiles flag "$ai guards specific ship in wing:" is set (which currently doesn't have an entry on the wiki... I'll try to fix that rather than leaving it for somebody else to do).

EDIT: And done (http://hard-light.net/wiki/index.php/Ai_profiles.tbl#.24ai_guards_specific_ship_in_wing:).
Title: Re: Ordering commands to AI
Post by: Megawolf492 on April 15, 2015, 10:15:49 pm
Which orders would give to your mates to increase the maximum your chances to win the battle ?

C-3-0. Wait, I meant C-3-9! C-3-9!!!! No, No! NO!!! :banghead:  :mad: :hopping:
Title: Re: Ordering commands to AI
Post by: potterman28wxcv on April 16, 2015, 04:11:32 am
Which orders would give to your mates to increase the maximum your chances to win the battle ?
C-3-0. Wait, I meant C-3-9! C-3-9!!!! No, No! NO!!! :banghead:  :mad: :hopping:
C-3-9. What ? Why are they all gone ? Did I... Oh no.

I've been playing a bit with commands, and I've noticed a weird behaviour.

If you order Beta 2 to protect Alpha 2 for example, he won't protect Alpha 2 but Alpha 1. Even though he has the state "Guard Alpha 2", he will actually guard alpha 1, not alpha 2.

Though, if you order Alpha 4 to protect Alpha 2, Alpha 4 will actually protect Alpha 2, not Alpha 1.

Also, it seems that Alpha 3 cannot protect Alpha 2 : it seems to be impossible to order that command (it is greyed). But Alpha 3 can be ordered to protect another ship (Beta 1, Beta 2..).
EDIT : with 3 fighters in a wing, it seems that fighter n cannot be ordered  to protect fighter n-1. Though, if ordered via the Wing command (instead of individually), it can be ordered to protect the fighter.

Not sure if this bug belongs to FSO in general, or just in FSport, or maybe it's something written in the scripts that make this happening
I'm not sure why the order is grayed out; could you upload a test mission in which you can reproduce this behavior reliably?
Sure, I will upload tonight a mission where it occurs (and check again that it actually occurs)
Title: Re: Ordering commands to AI
Post by: AdmiralRalwood on April 16, 2015, 02:59:33 pm
So it turns out that the comm menu was comparing an object number to an instance number to see if you were trying to order a ship to do something to itself. This is obviously doomed to failure, although it rarely matters given the rarity of the circumstances.

Fixed in r11305.
Title: Re: Ordering commands to AI
Post by: jr2 on April 17, 2015, 07:34:35 am
How long has it been doing that?
Title: Re: Ordering commands to AI
Post by: AdmiralRalwood on April 17, 2015, 04:19:30 pm
How long has it been doing that?
It's :v:-original code.
Title: Re: Ordering commands to AI
Post by: jr2 on April 18, 2015, 08:31:25 am
Sweet.  :yes:
Title: Re: Ordering commands to AI
Post by: qwadtep on April 18, 2015, 06:53:38 pm
So it turns out that the comm menu was comparing an object number to an instance number to see if you were trying to order a ship to do something to itself. This is obviously doomed to failure, although it rarely matters given the rarity of the circumstances.

Fixed in r11305.
I'm kind of curious what such rare circumstances would be. Sathanas, stop hitting yourself! Sathanas, stop hitting yourself!
Title: Re: Ordering commands to AI
Post by: AdmiralRalwood on April 18, 2015, 07:25:07 pm
I'm kind of curious what such rare circumstances would be.
Pretty much just the kind pointed out by potterman28wxcv: wingmate randomly refusing to guard another because the latter's objnum happened to match former's instance number.