Jump to content

Recommended Posts

I have been working on an attack move patch.

Currently it works as a move command where the units attack any enemies that come into sight along the route,they attack and then are allowed to act using the same code as idle units, so they will attack other enemy units in sight and chase them etc. Once 80% of the formation becomes idle another move command is issued. It is currently bound to super+right click.

For the hotkey it has been suggested that ctrl-right click would be used because starcraft uses this and it is convenient. Currently garrison is bound to ctrl-right click however. It would be possible to use both with the same hotkey by using attack-move whenever the right click wasn't on a garrisonable object. I think this is confusing though since two unrelated actions would be sharing the same hotkey. Other possibilities are keeping it similar to currently by using super as a modifier key, this might break with windows though since super (windows logo key) tends to open the start menu (I haven't tested though). The other option is to have a modifier such as ctrl-a which then toggles attack-move mode so the next right click will be an attack move.

In terms of the behavior of the attack move I think it would be good to restrict the enemies which are targeted to conquest critical. This would stop random mills and houses disrupting an attack. Another thing is when to resume the walk, someone suggested a maximum distance from the point of sight with the enemy could be used.

Another question is when to break the walk and attack, should we only attack large enough groups of enemies so that a lone scout isn't chased all over the map by your army? There might be a case when a distant siege unit starts firing from out of sight on the formation.

What do you think about the desired behavior?

Edit: The link to the bug report which has the patch is #1001, as I mentioned in the report I have seen some buggy behavior with groups not attacking properly, so I need to try and fix it when I have time.

Link to post
Share on other sites

The super key does open the start menu on my windows machine. I'd prefer it if attack move was ctrl+right-click, because queue rally point move is shift+right-click and therefore both move commands are near each other.

Could garrison be bound to alt+right-click instead? I agree that having both garrison and attack-move commands bound to the same hotkey would be confusing. We could follow AOM and supcom, where attack-move was alt+right-click.

Lets see what everyone else thinks.

Link to post
Share on other sites

Should attack-move also target buildings? I always thought it was meant for units only(I never used it much so what I say doesn't mean anything). unsure.gif I don't think it should matter how big the group is, when an enemy unit moves too far from the initial path the units should return and resume their journey.

I would go for Ctrl+Right-click and re-map garrison to Alt+right-click.

Link to post
Share on other sites

Is the "Super" key the same as the Windows key? If so, please don't use it as a hotkey :) On the one hand, it won't matter too much what we choose, as people can change the hotkey at will. We just need a sensible default, and we might as well follow AOM on this. Let's make sure we have a unique cursor for attack-move, so people can also see the difference.

As far as the attack behavior, shouldn't it depend on unit stances? IMO this is better than guessing what the user intends. Let's say you have some archers and you give them "Stand Ground" stance, and some infantry you give "Defensive" stance, then you group them together and attack-move to some point. When an enemy comes in sight of one of them, the formation stops, then we use stances to determine behavior. The archers remain in place, while the infantry are free to move about somewhat. On the other hand, if you gave them all an "Aggressive" stance, they would continue attacking any enemies they found until there were none left in LOS, then they'd return to formation and move again.

Edit: In other words I don't think we need an explicit attack command, just stop the formation, and let existing UnitAI do it's work, then re-form and start moving again.

Link to post
Share on other sites

Should attack-move also target buildings? I always thought it was meant for units only(I never used it much so what I say doesn't mean anything).

I have never used it much either, ignoring buildings is an interesting idea, I quite like it.

As far as the attack behavior, shouldn't it depend on unit stances? IMO this is better than guessing what the user intends. Let's say you have some archers and you give them "Stand Ground" stance, and some infantry you give "Defensive" stance, then you group them together and attack-move to some point. When an enemy comes in sight of one of them, the formation stops, then we use stances to determine behavior. The archers remain in place, while the infantry are free to move about somewhat. On the other hand, if you gave them all an "Aggressive" stance, they would continue attacking any enemies they found until there were none left in LOS, then they'd return to formation and move again.

Edit: In other words I don't think we need an explicit attack command, just stop the formation, and let existing UnitAI do it's work, then re-form and start moving again.

I have considered this behavior, unfortunately there are some issues when actually implementing it. Mainly it is because one unit in the formation gets an enemy in range, then the formation stops, and the single units goes chasing the enemy with the others standing idle. I think it might work to have a move command towards the new enemy, but probably not all of the way there since the enemy unit will probably move towards the attack move units. I might try this idea with a move command to halfway between the current position and the spotted unit. If this approach is workable it is an elegant solution.

For the hotkey it seems like moving garrison to alt and using ctrl is the preferred option. @gudo: I think it would be good to have keys like you say as well, I don't see any problems with having both, since people will be used to that idea.

Link to post
Share on other sites

For the hotkey it seems like moving garrison to alt and using ctrl is the preferred option. @gudo: I think it would be good to have keys like you say as well, I don't see any problems with having both, since people will be used to that idea.

One way to do it (provided we don't need the A and G keys for other things) would be to have Alt and Ctrl affect the right-click and be used while being pressed. A and G could be used to "bring up the function" (showing the cursors for the function in question) with a press of the key and then you would click with the left mouse button to make it happen. I'd say that's similar to how other games do it (don't remember if attack-move exists with a modifier button in any game I've tried, but I think I've seen alt for garrisoning).

Link to post
Share on other sites

Does anyone remember how garrisoning was solved in Age of Kings.

As far as I remember, it was just right-clicking... but how did it work if you had citizens with resources and wanted to garrison them in the towncenter?

Link to post
Share on other sites

I have never used it much either, ignoring buildings is an interesting idea, I quite like it.

Remember that not all units will be able to attack buildings anyway, once we implement capturing :) So in that sense it would be logical to ignore buildings. We could make it more complicated by checking if any units in the group are capable of attacking buildings (siege or other specified units) and if so let them attack the buildings, otherwise ignore them.

I have considered this behavior, unfortunately there are some issues when actually implementing it. Mainly it is because one unit in the formation gets an enemy in range, then the formation stops, and the single units goes chasing the enemy with the others standing idle. I think it might work to have a move command towards the new enemy, but probably not all of the way there since the enemy unit will probably move towards the attack move units. I might try this idea with a move command to halfway between the current position and the spotted unit. If this approach is workable it is an elegant solution.

That sounds more like an issue with formations than desired attack-move behavior, IMO formations are almost totally broken and useless. A formation should not "break up" unless the player orders it, so current formation attack behavior is clearly not correct (there's a ticket describing part of the problem). I don't see why attack-move should be any different. Can we come up with a decent solution to attack-move without a decent solution to formations?

Link to post
Share on other sites

The formations thing is interesting, it needs pretty big changes I guess. If formations are going to change that radically then attack move will definitely need to be changed when that is implemented. I think I will try improving it anyway when I have time but consider it slightly lower priority. My changes to formations would help fix some of the issues in that ticket since I added since it allows formations to be temporarily suspended.

Link to post
Share on other sites

WASD is the standard set of keys for camera movement in PC gaming. However, ZXC are free, so they can be used for high-value commands. I'm thinking R for Run/charge.

You are correct. WASD is the standard set of keys for camera in most PC games. But in 90% on RTS games, it is used for attack-move action. It is better for a game like 0.A.D. to use this system without any change. in RTS games, arrow keys are used for camera move instead of WASD.

Link to post
Share on other sites

You are correct. WASD is the standard set of keys for camera in most PC games. But in 90% on RTS games, it is used for attack-move action. It is better for a game like 0.A.D. to use this system without any change. in RTS games, arrow keys are used for camera move instead of WASD.

I'm simply not going to support using WASD keys for anything but the camera. Z would work just fine for Attack Move.
Link to post
Share on other sites

Why can't we just use alt+right-click - which is available and slightly easier to use than z+right-click

Alt-Right click works too! :) I was just responding to the declaration that 'A' must be used. Alt-right click makes sense too, because it is an alternate move command. I assume Mac keyboards have the Alt key or something comparable?

Also, I think Alt-right click on an enemy unit would toggle attack types, e.g. Persian Immortals switching between Spear and Bow.

Link to post
Share on other sites

Also, I think Alt-right click on an enemy unit would toggle attack types, e.g. Persian Immortals switching between Spear and Bow.

(y) Having Alt+Right click as the general "secondary action command" sounds like a good idea.

Link to post
Share on other sites

I'm simply not going to support using WASD keys for anything but the camera. Z would work just fine for Attack Move.

Just want to point out that those hotkeys are available in the config file, so users can always change attack-move to A and garrison to G if they want, our decision isn't the final word :)

Link to post
Share on other sites
  • 1 year later...

4 - Attack-move Command

Priority: I can live without, but would be nice to have!

Nature: Not so cool micro-managing

Short Description: A command to move to the target location, but attacking every enemy on their path

Detailed Description: Sometimes, even more against AI, i need the units to attack something as soon as they acquire range. I know the thing is there, but the fog-of-war doesn't let me see it, so i have to go there manually, make units stop when they're in range, select those that aren't in range, make them come closer.

Suggestion: This is an unnecessary and annoying thing we could prevent with the Attack-move command. You click the icon of this command, click where you want the units to go and they'll automatically go there, but attacking everything on sight, and then resuming the walk.

sorry i wanna use the argument from Pedro in the right Topic.
Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...