File information

Last updated

Original upload

Created by

pointfeev

Uploaded by

pointfeev

Virus scan

Safe to use

About this mod

Adds numerous selection & sorting hotkeys to massively ease the transfer of troops between selected formations, and makes sure empty formations are shown so hotkeys can be used to their full ability. Troop sorting can be used with modifier keys to take into account shields, throwables, ammunition, mounts, troop tiers & more.

Requirements
Permissions and credits
Changelogs
User-defined formation classes
The mod utilizes user-defined formation classes by default, in place of the normally dynamic formation classes. This can be turned off or configured via Mod Configuration Menu if installed. Note that these are only referenced by the mod's own methods; you must utilize the order hotkeys below to set them up as you define (such as by quickly pressing F and then X).

When user-defined formation classes are enabled, you can also specify a formation class for all companions to be sorted as.
By default these are defined as so (they follow the original beta formations from long ago):
  • Formation #1: Infantry
  • Formation #2: Archers
  • Formation #3: Cavalry
  • Formation #4: Horse Archers
  • Formation #5: Skirmishers
  • Formation #6: Heavy Infantry
  • Formation #7: Light Cavalry
  • Formation #8: Heavy Cavalry

Order hotkeys

  • X: Formation Sort order menu key; troops in selected formations will be sorted equally into their best formation(s) if any of its kind is among the selected formations.

  • Left Alt + X: When combined with the Order Key troops will be sorted equally amongst ALL selected formations instead of being put in only their best formations.

  • Left Ctrl + X: When combined with the Order Key javelineers, rock throwers, etc. get put into the Skirmisher formation instead of Infantry.

  • Left Ctrl + Left Alt + X: Same as Left Alt + X, but with the behavior of Left Ctrl + X; it will take into account that Skirmishers would be in their own formation and distribute them equally as such.

  • Left Shift + X: When combined with the Order Key shielded infantry get put into the Infantry formation while unshielded infantry get put into the Heavy Infantry formation.

  • Left Shift + Left Alt + X: Same as Left Alt + X, but with the behavior of Left Shift + X; it will take into account shielded infantry and skirmishers and distribute them equally as such.

  • Left Ctrl + Left Shift + X: Same as Left Ctrl + X and Left Shift + X.

  • L: Tier sorting key; all infantry and cavalry troops will be sorted into separate formations by their tiers. Troops go into formations like so:
    • Formation #1: Tier 0-2 Infantry
    • Formation #2: Tier 3-4 Infantry
    • Formation #3: Tier 5-7 Infantry
    • Formation #4: Ranged w/ Ammo
    • Formation #5: Tier 0-2 Cavalry
    • Formation #6: Tier 3-4 Cavalry
    • Formation #7: Tier 5-7 Cavalry
    • Formation #8: Horse Archers w/ Ammo

Selection hotkeys
  • Left Ctrl + #: When combined with any of the selection keys below, the formations it encompasses will be inverted from their current state, being added or removed from the current selection.

  • F: This key will select all formations.

  • C: This key will select all melee cavalry formations: Cavalry, Light Cavalry, Heavy Cavalry.
  • V: This key will select all ranged cavalry formations: Horse Archers.

  • H: This key will select all ground melee formations: Infantry, Heavy Infantry.
  • J: This key will select all ground ranged formations: Archers, Skirmishers.

  • Y: This key will select all melee formations: Infantry, Heavy Infantry, Cavalry.
  • U: This key will select all ranged formations: Archers, Skirmishers, Horse Archers.

  • N: This key will select all ground formations: Infantry, Heavy Infantry, Archers, Skirmishers.
  • M: This key will select all cavalry formations: Cavalry, Light Cavalry, Heavy Cavalry, Horse Archers.

NOTE: The hotkeys are all configurable and unbindable via Mod Configuration Menu if installed!

How the sorting order works

When the hotkey is pressed, the mod will iterate through currently selected formations and sort units between them based on whether the units: are currently mounted on a horse, have access to their horse, have ranged weapons with any ammo left, have throwables, have shields, etc.

Troops will also yell out the formation that they change to, because why not?


Technics
  • The mod is implemented in a very compatibility-friendly way using Harmony.
  • Any patches and additions my mods make always implement error handling to allow the game to keep running properly when exceptions arise.
  • As far as I know, it should be completely safe to add to or remove from existing saves, as it does not add or change any save-related data.
  • I personally use all the mods I create and thus have heavily tested them, so the mod should be very stable.

Steam Workshop: Formation Sorter
GitHub: FormationSorter