Troop Sorting 1.1.4

If you liked this item, please rate it up on Steam Workshop page.

Author: Birke_Vandel

Last revision: 20 May, 2023 at 12:26 UTC

File size: 891.9 KB

On Steam Workshop

Description:

This mod vill be always compatible with Beta releases. There is another mod Troop Sorting Core which will be compatible with latest taleworlds version.

If you think my mod cause any crash, please change ShowExceptionInfo to true in config file. In case my mod throws exception it will be prompted in windows message box. Put focus into that box and press ctrl + c. This will copy whole text from messagebox into clip. Past it later in bug description or in post. Thank you for your help!

Mod supports configuration merge between mod versions support. One config for each used version. If no previous configs are availed the mod will create default one. Support for one previous version only.

This mode auto sorts troops and prisoners in "PartyView" which includes:
Party view
Give tropps view
Garnison view
Clan view
Character
Crafting (Smelting, Craftring, Refinement)
Selecting Governor (new sort order works only for selecting governor from clan view => fief tab, shortcuts 1-8, uses sort description from config file)
Change party leader
Change caravan leader
Change workshop type
Creating parties
Choose party roles

In party overview there is now total count of different troops added:
Hero count "Hrs"
Mounted count "Mnd"
Ranged mounted count "Rng Mnd"
Infantry count "Inf"
Ranged count "Rng"

For Party view sort is done on loading view. After that resort can be done by holding "ctrl" and "s" buttons (ctrl + s).
To change to predefined sort orders (1-9) press "ctrl" + "1-9" (ex ctrl + 1).
Chosen sort order must be defined in config and enabled.
Chosen sort order will be saved as default and can be reused by pressing "ctrl" and "s"

For Selecting Governor last sort order is saved in default. Use 1-8 buttons to choose different predefined sorts.

While choosing governor from clan view, you can uses buttons 1-4 to choose different predefined sort orders.

Sorting can be configured in configuration.xml in mod folder. Supported order terms are:
"MainHero" (1, 0)
"Hero" (1, 0)
"LevelDesc " (6-1)
"LevelAsc" (1-6)
"Mounted" (1, 0)
"MountedArchers" (1,0)
"Ranged" (1, 0)
"Infantry" (1, 0)
"OwnCulture" (1, 0)
"CultureNameDesc" (Z-a)
"CultureNameAsc" (a-Z)
"NameDesc" (Z-a)
"NameAsc" (a-Z)
"Spouse" (1, 0)
"Children" (1, 0)
"Siblings" (1, 0)
"CloseFamily" (1, 0) (slibings, children, spouse)
"Family" (1, 0)
"Grandchildren" (1, 0)
"Male" (1, 0)
"Female" (1, 0)
"AgeAsc" (a-Z)
"AgeDesc" (Z-a)
"CaravanLeader" (1, 0)
"PartyLeader" (1, 0)
"Companion" (1, 0)
TroopCountAsc (1-xxxx)
TroopCountDesc (xxxx-1)
SortByUnspentDeveloperPointsAsc (1-xxxx)
SortByUnspentDeveloperPointsDesc (xxxx-1)
SortByUnasignedPerks (1, 0)
SortBySelectedCityCulture (Change cities governor)
SortBySelectedCityProduction (Change workshop type)
OneHandedAsc
OneHandedDesc
TwoHandedAsc
TwoHandedDesc
PolearmAsc
PolearmDesc
BowAsc, BowDesc
CrossbowAsc, CrossbowDesc
ThrowingAsc, ThrowingDesc
RidingAsc, RidingDesc
AthleticsAsc, AthleticsDesc
SmithingAsc, SmithingDesc
ScoutingAsc, ScoutingDesc
TacticsAsc, TacticsDesc
RogueryAsc, RogueryDesc
CharmAsc, CharmDesc
LeadershipAsc, LeadershipDesc
TradeAsc, TradeDesc
StewardAsc, StewardDesc
MedicineAsc, MedicineDesc
EngineeringAsc, EngineeringDesc
NotFamily
"SkillLevel"
Skill level types Asc and Desc
SortByPerkCountAsc (ex: "SortByPerkCountAsc(ValidPerkName, ValidPerkName)")
SortByPerkCountDesc (ex: "SortByPerkCountAsc(ValidPerkName, ValidPerkName)")
Perks

For companion view mod render beside hero name:
L: Hero level
"-Ca-" if hero leads caravan
"-P-" if hero leads party
"-MP-" if hero is in main party

For family view mod renders beside hero name:
A: Hero age
L: Hero level
"-C-" for child
"-Gc-" for grandchild
"-S-" for spouse

You can combine any sort order you wish, separating supported terms with ";".

To get default sortorders please save your current config copy file in other location then mods. Then remove current and previous versions config files (if you remove just current versions config file, the merge of previous and defaults will be made).

For example if you want to just change the order of tier troops , making less experiance be placed higher and keeping all other things as default, then you can change "TroopTierDesc" to "TroopTierAsc"

Or if you don’t want to have your own culture troops at top you can just remove "OwnCulture;" from the string (Dont forget to remove ";" so you dont end up with multiple ";" next to each other): "MainHero;Hero;TroopTierDesc;Mounted;Ranged;Infantry;CultureNameAsc;TroopNameAsc"

To not sort heros in party view set TroopSortSkipHeros to "true".

To disable any sorting type changed "enabled" attribute to "false".

To hide hero extra information change "true" to "false" for "ShowDetailInformation".

Any changes to config file will result in reload of game configuration.

Nexus page:
https://www.nexusmods.com/mountandblade2bannerlord/mods/edit/?id=3596&game_id=3174&step=details