Page 1 of 2

Gadget: Area Attack for ground units

Posted: 26 Jan 2008, 18:23
by KDR_11k
This gadget allows adding an area attack command to ground units. It's mostly intended for using artillery to attack suspected enemy positions outside of LOS and hitting a wide area without requiring the arty to have inaccuracy.

For a unit to get the command you have to add

Code: Select all

[customParams] {
    canAreaAttack=1;
}
to the unit's FBI.

Re: Gadget: Area Attack for ground units

Posted: 26 Jan 2008, 18:54
by ZellSF
So without lua, bombers are hardcoded to the the only units to have area attack? I've always figured artillery not having area attack was intentional...

Re: Gadget: Area Attack for ground units

Posted: 26 Jan 2008, 19:02
by lurker
Is this a gadget with an fbi tag so it doesn't get spammed on units that would look stupid area attacking or other practical reason, or because you think it shouldn't be a widget? Because all I need to set up a manual area attack is 5-10 seconds of completely brainless micro.

Re: Gadget: Area Attack for ground units

Posted: 26 Jan 2008, 20:03
by KDR_11k
It could be a widget but 1. I'm not good at widgets :P and 2. Area Attack really doesn't make sense on most things.

Re: Gadget: Area Attack for ground units

Posted: 27 Jan 2008, 02:35
by Argh
Thanks much, I will use this.

Re: Gadget: Area Attack for ground units

Posted: 27 Jan 2008, 06:20
by LOrDo
Cool! Im hoping this gets implemented, always thought more units should have area attack...

Re: Gadget: Area Attack for ground units

Posted: 28 Jan 2008, 18:03
by NOiZE
Thanks!

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 02:18
by [Krogoth86]
Nice! Will try it out right now... :-)

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 04:10
by smokingwreckage
This totally makes sense for artillery.

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 15:29
by [Krogoth86]
It still has a problem though. When you go ahead and make your area attack circle and then the mechanism chooses a point which is out of range (what can happen as you don't see the max range when drawing the circle) the unit doesn't try to close in but just holds its position with an attack order it can't complete and does nothing...

At least that's a situation I had - didn't try to reproduce it yet...

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 18:05
by NOiZE
[Krogoth86] wrote:It still has a problem though. When you go ahead and make your area attack circle and then the mechanism chooses a point which is out of range (what can happen as you don't see the max range when drawing the circle) the unit doesn't try to close in but just holds its position with an attack order it can't complete and does nothing...

At least that's a situation I had - didn't try to reproduce it yet...

I did, and indeed the problem occurs :(

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 19:02
by KDR_11k
Strange, just tested it with a pointer in KP and that thing does close in. Maybe it's because I tested with SVN...

EDIT: Hm, no, works with 76b1 too.

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 19:11
by NOiZE
tried with multiple units?

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 23:05
by KDR_11k
Yep, works with multiple units too.

Re: Gadget: Area Attack for ground units

Posted: 29 Jan 2008, 23:36
by Argh
Tried it out. Works well, very cool. I don't suppose you could make a "line attack" variation, so that people could very deliberately set up barrages to block a chokepoint? That'd be cute...

Re: Gadget: Area Attack for ground units

Posted: 30 Jan 2008, 00:47
by [Krogoth86]
Well I now also tried to reproduce it and it worked on the first try. So here comes the video proof (Divx Avi):
http://www.file-upload.net/download-639 ... k.avi.html

You'll see 6 Lugers being given an area-attack order at pretty much their max range (you'll see it in the video). Then you'll see three of em "shut down" with an attack order pretty much exactly at the range border. Well as I still have the raw video in a high resolution here comes a snapshot:
Image

But it becomes even more serious:
When recording (i.e. "playing" this as I taped this from the replay) only two of em dismalfunctioned and it also were different ones. When playing the one to the very left and the one to the very right didn't fire - not so in the replay. This way there have to be some issues. It also is unlikely to be map dependent because I this time chose another map than the one where I noticed it first (-> Charlie in the Hills)...

Re: Gadget: Area Attack for ground units

Posted: 30 Jan 2008, 03:14
by Argh
Hmm. Well, it could get the max ranges of every weapon of every Unit being given the order, and not allow the user to issue a command past the max range of the farthest Unit from the target.

Or, the quick-and-dirty way is to just re-randomize the attack orders faster, and if any Units cannot hit any of the circle at all, then drop them.

Re: Gadget: Area Attack for ground units

Posted: 30 Jan 2008, 10:38
by [Krogoth86]
Besides that I think it has to just calculate some random spots to attack and "handle them over" to the engine so that they are constant even in replays. I don't really know how to achieve that but the way it is it's a replay killer as for example a Commander you killed in your game stays alive in the replay causing lots of confusion...

Re: Gadget: Area Attack for ground units

Posted: 30 Jan 2008, 11:00
by Argh
Lol... I brought up this indeterminacy issue awhile back... that's a new wrinkle...

Re: Gadget: Area Attack for ground units

Posted: 31 Jan 2008, 09:44
by KDR_11k
Argh wrote:Hmm. Well, it could get the max ranges of every weapon of every Unit being given the order, and not allow the user to issue a command past the max range of the farthest Unit from the target.

Or, the quick-and-dirty way is to just re-randomize the attack orders faster, and if any Units cannot hit any of the circle at all, then drop them.
You know, I could just tell them to move into range first.

Being able to desync a replay is a SERIOUS issue but AFAIK not the scope of lua, it's probably an engine issue. I wonder what happens if area attack is used online, maybe the lua random function isn't as synced as we thought?

The lock up seems strange to me, what happens if the map is flat (looked to me like they were on a hill)? Can you get the same result with a regular attack order when given to the same position?

EDIT: Updated the gadget to make the units move in range