Attack move hotkey?

I just tried setting up a hotkey for 'Attack move' (i.e. to be equivalent to pressing the leftmost command button in the UI, 'Attack move'), but it looks like this is not possible?

(In 'Orders', I can see stuff like 'Attack' and 'Move' available for mapping to hotkeys, but nothing for 'Attack move' or 'Aggressive move'.)

Anyone know why this is?

Is there some way I can work around this with a targeted UI mod?

Attack move is bound to alt + right-click

"The needs of the many outweigh the needs of the few" - Spock

@rowey Yeah, I know this, but I still would like to bind a hotkey.

Note that alt + right-click is different from the 'Attack move' command mode you get when you click on the 'Attack move' button, in an important way.

Whether or not alt + right-click actually does an attack move depends on what the mouse is over and the camera zoom level. If you alt + right-click over some reclaim, for example, this will often give a reclaim command instead.

This is not the case when you enter Attack move command mode by clicking the Attack move button in the UI.


"The needs of the many outweigh the needs of the few" - Spock

i would like to bind attack move to middle click

That is not possible, it is defined in the engine.

A work of art is never finished, merely abandoned

@jip Maybe your reply is to cunnismeta, but, for what it is worth, I found out how to do the thing I was looking for.

Try the following, in the game console (with engineer or commander selected):

ui_lua import('/lua/ui/game/commandmode.lua').StartCommandMode("order", {name="RULEUCC_Script", AbilityName='AttackMove', TaskName='AttackMove', Cursor = 'ATTACK_MOVE'})

Interestingly, this works better than clicking the attack move button, because you actually get the correct cursor shown while in the relevant command mode, whereas there is a problem with not seeing a change of cursor when clicking the attack move button.

The lua script I am copying this from is as follows:

local function AttackMoveBehavior(self, modifiers)
    if self:IsChecked() then
        local modeData = {
            cursor = 'ATTACK_MOVE',
        CommandMode.StartCommandMode("order", modeData)

Note the small case 'c' in cursor, which is what makes the difference. I guess this is probably a bug..

@crispweed interesting find, consider it fixed:

A work of art is never finished, merely abandoned

@jip Hmm.. so the following also works correctly (shows the same attack cursor while in the new command mode):

ui_lua import('/lua/ui/game/commandmode.lua').StartCommandMode("order", {name="RULEUCC_Script", AbilityName='AttackMove', TaskName='AttackMove'})

(What I did here, instead of capitalising the C, is to just leave out the 'cursor' table entry.)

So maybe 'Cursor' with capital C is not actually correct, then. (This was really just a random shot in the dark, on my part.) Maybe what is happening here is that there is no 'ATTACK_MOVE' cursor, so if we specify that then we don't get any cursor change, but if we instead just allow it to fall back to a default cursor (which looks like it might be the attack cursor, based on the "RULEUCC_Script" name), either by leaving out the 'cursor' table entry, or misspelling this with a capital C, things look much better..

@Jip @crispweed I see that the latest commit from Jip to Dev branch "fixed" capitalization cursor -> Cursor, but do we know if it was even a bug to begin with (Jip check reply above from crispweed)?