Attack Move and Countercharge (WH3)
WH3 version. This mod is for anyone who has wished you could give your units standing orders so that they could do the most basic tasks without constant supervision.
Now with a YouTube video.
With this mod, you can tell units to attack enemies on their way to their destination. After they arrive, they will charge anything that gets close enough.
It’s good for guarding supply locations, protecting artillery from summoned and flying units, attack-moving through forests and over ridges that block vision, and so forth.
Similar to my mod from WH2. See the initial Change Notes to know what changed or improved. (For those that didn’t know, this was my favorite WH2 mod after Find Idle Units.)
- If you want to use a keyboard shortcut: go to the game controls menu and set a shortcut for "Sv Bkmark 9 / Attack Move / Countercharge." It will be halfway down the first tab with all the other Save Camera Bookmark shortcuts. (If you don’t want this mod to piggyback on Save Bookmark 9, you can configure this mod instead.
- Select some units.
- (optional) Give a move order.
- Use the hotkey or press the button. Yes, do this after your move order unless the unit is already ordered to be where you want it to be and you are turning on countercharge to tell it to guard that area.
- This mod saves the ordered location for each unit, locking it in.**
- This mod frequently checks to see if your unit should attack nearby units. (If you want hybrid units to charge into melee, put them in melee mode.)
- When there are no appropriate targets, the mod will reorder your units to move toward the locked-in destination.
- When your attack-moving unit reaches the ordered position, the attack-move order turns into a counter charge order. Your unit will attack any units that come near and then return to its locked location.
- IMPORTANT: While this attack-move lock is on, it will override any new orders you are trying to give your units. If you want to give a new move or attack order to the unit, you must unlock the attack order by selecting the unit and using the hotkey or pressing the button.
**This mod cannot determine if you’ve shift-clicked some orders. It will just lock in the final destination and all the other orders in between will be lost (unless your configuration has a sufficiently big "chasing adjustment", perhaps?).
I wish that this mod would auto-unlock units if you try to give them new orders, but scripting limitations for this game prevent that. This is the best I could come up with. The main issues I run into are that the command callback handlers don’t indicate which unit received an order, and that they don’t differentiate between orders given by the user and orders from other sources like unit controllers and AI Planners.
I enabled this version by default in siege and settlement battles because WH3 gives scripts more information than WH2 (thanks CA!). However, it might sometimes still take weird paths when there are walls and barriers. You have the option to disable this mod completely during siege battles if you configure this mod.
While this mod doesn’t need configuration, you might wish to customize variables using either a text file or MCT (either new or legacy).
I only know English, but others have posted these translation submods for the hotkey and the MCT configuration options. Thanks!
Saved Games? Yes. (But if you later want to remove the mod and continue, you might need to enable the "Enable All Saves" checkbox in the game’s configuration so that the game will let you load it.)
My other mods? Yes.
Other mods that don’t run scripts during battle? Yes.
Other mods that do run scripts during battle? Probably. I don’t currently know of any incompatible mods. Please let me know if you find an incompatible mod so I can list it here and/or work with its authors to fix the incompatibility. Technical compatibility details for curious modders.
I have done only basic testing in multiplayer so far. This appears to work in multiplayer BUT this mod will only work correctly with units in armies that are yours. If you try to use Attack Move with units that someone else gifts to you during the battle, this mod will not give those units orders. (Known bug: it will still add the attack-move icon over gifted units if you click the button. But it’s not actually controlling the unit. It lies! You can double-check to see whether Attack Move is controlling the unit by giving it a new order when the lock is supposedly on. If Attack-Move is controlling the unit, it will override your new order very quickly.)
As always, mods only work in multiplayer if all players have the mod enabled.
(Develop-test-develop-test is harder to coordinate for multiplayer. Thanks to @Cosmic Vortex42 and @DeathKitty for their help with testing.)
– The multiplayer issue listed above.
– This mod doesn’t do well with situations where flat-firing units (most gunpowder units, for example) are near hills or units that block the individual unit’s line of sight when other units in the alliance can see their target. In this situation, the mod will still give attack orders. And just like if a player gave a regular attack order in that situation, this can cause them to run forward. I don’t personally give flat-firing units to this mod unless I’m sure they won’t get into this situation.
Revisions:
Old revisions of this mod are available below. Click the link to download.
