This mod allows basic soldiers, who meet certain criteria, to ascend to companion-dom following battle. Now the troops you've had by your side since their peasant days can be rewarded with cushy governor jobs. Version for 1.0.0 available! See it on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2891413076
Requirements
This mod does not have any known dependencies other than the base game.
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Added random skill selection option in Settings.xml
Number of skill selection rounds can be configured in settings
Add-companion-to-party dialogue available for all player-clan-led parties, not just those led by companions
Attempted to remove harmony file logging
Version 5.0.0
Fixed culling of AI-generated companions. It finally works!
Cap on the number of ai-generated companions per party
Added ability to poach defeated enemy companions in the after-battle screen! Probability of success depends on their traits.
Version 4.8.0
Skill point assignment rebalanced around excess kills before promotion
External namelist support added and tested!
Version 4.7.0
Skill point assignments for new heroes is entirely manual, and fleshed out to allow secondary and tertiary assignments
Added a ton of error handling for poorly-configured unit mod compatibility. In the worst case scenario, the game should no longer be brought down along with the error.
Version 4.5.*
Substantially more warning output, which can alert users to potentially unwanted or dangerous options that are enabled
Newly-generated companions are the correct level as soon as they're made
Auto-assigning perk options works as intended
AI lord companions have AlwaysDie enabled, preventing homeless wanderer spam
Companion generation is properly sanitized for potentially mal-formed modded unit equipment XML
Transferring companions out of companion-led parties now works as intended again
Version 4.0.0
AI lords can now promote units into companions after winning battles
An extra, adjustable lethality factor for companions has been introduced
Companions gain points in utility skills based on their unit type
Companions retain their formation class from before their promotion
Version 3.1.0
outperform_percentile added to make battle-nominations more stringent
Version 3.0.0
Fixed compatibility for BL 1.5.6b - removed lethality functionality (obsolete, as it's in-game now), structure for formation saving (also obsolete), and recompiled with the new libraries.
fixed an issue with companion slots per clan tier patch
Version 2.7.0
Added unique name suffixes to Scum and Villainy Cultures
Fixed companions losing their occupation on-load
For 1.4.3: Update for compatibility, removed formation-saving code and had to change up a call to CharacterObject.CreateFrom
Version 2.6.1
Micro-update to remove parameters from a class constructor, allowing a new Scum and Villainy update to interface properly with Distinguished Service methods.
Version 2.6.0
Added the ability to adjust the equipment modifiers for the newly-created companions' items.
Version 2.5.0
Options added to respect the companion limit, as well as to alter this limit and its scaling. These alterations are performed with a targeted Harmony PostFix that should be compatible with other mods that also adjust this value.
Version 2.4.3
In Settings.xml, you can disable formation saving, in case of possible conflicts with other mods with the same functionality.
Version 2.4.2
Fixed the Settings.xml file so it should be back to default now.
Version 2.4.1
The FormationAssignments folder will now be created if it does not exist. There were issues reported about mod managers screwing up and not creating the folder, so this should now be fixed completely in a new way that's incredibly hard to mess up.
Version 2.4.0
he assigned formation (infantry/ranged/cavalry/etc) of units in the player's party will now be saved and loaded. They exist as xml files in the mod's directory, and are distinguished by the main hero's name, to prevent conflicts with multiple games going at the same time. New console commands have been added, and are now under the dservice command directory. Using give_squad [num] will grant the player [num] units from the elite caravan template, to give the player a "starting party" of companions with a broad set of equipment and skills. Be warned, TW seem to have messed up the skills for certain ranged caravan people, so people with bows might be proficient with crossbows, and vice versa. This is not my fault.
Version 2.3.0
Added companion death and nomination in sieges and hideout battles (the ciiiircle of liiife). Also added dialog options when talking with companions who are party leaders to transfer other companions between your parties. It's clunky, but TW made it incredibly difficult to actually let you transfer heroes like normal units, so it's the best I could do. Oh, and the companions you sent off in a new party? They can now die, too.
Version 2.2.0
New optional nomination method to make your squad more like XCom, by making all soldiers who are promoted past tier_threshold into heroes. Pair with a high tier_threshold, and high-lethality options to prevent yourself from getting flooded by heroes. fill_in_perks will also allow you to avoid having to manually assign perks.
Version 2.1.0
Added new console commands for themed campaigns/ease of use (and testing). campaign.uplift_soldier ~ uplifts a single basic troop, selected randomly, without any criteria campaign.convert_party_to_heroes ~ converts all non-hero units in your party to heroes campaign.give_party_heroes_perks ~ assigns perks (that are not already assigned) to non-player heroes in your party up to their current skill value.
Version 2.0.1
You are now able to set the maximum number of nominees you can choose at the end of a battle. Additionally, if you set a party surgeon, their medicine stat and Fortitude Tonic perk will be used for companion lethality. A dialog option with companions has been added to allow you to rename them.
Version 1.7.1
The player is now given a post-battle choice between all units that are above tier_threshold, and had at least nomination_kill_threshold kills in the previous battle. You can exit the dialog to choose nobody. When companions die, you can now choose whether to strip them for equipment (a dishonorable action), or to send it to their families. You will lose or gain a fraction of the equipment's value in honor. Finally, I introduced a bias against ranged units in the killcount tracker to counter their ability to reach out and touch kill someone. This can be adjusted by the user. (Thanks to Dauthmer for the great suggestions)
Newest version compatible with 1.7.0, 1.7.1, 1.7.2, 1.8.0, and 1.0.0!
REMEMBER: ALWAYS MAKE SURE THE FILE VORTEX DOWNLOADED IS CORRECT FOR YOU!
N.B. I'm wrapping up my PhD thesis and defense for the end of the year, so my bandwidth will continue to be low for the next couple months. I'm sorry if updating DS isn't my highest priority, but I fully plan to keep it updated once I'm finished. Thanks for your patience, and I'm sorry if it's inconvenient to your playthroughs.
I have just added this mod to Steam Workshop: steamcommunity.com/sharedfiles/filedetails/?id=2891413076
~~~~~
Randomly, following a battle (with a probability set in a config xml file), an individual soldier will be nominated to ascend to companion-hood, as long as they're a high-enough tier of unit (also set in the xml file). They will be given the stats of their unit type, plus some random bonuses across the board, as well as attribute and focus points for you to assign as you see fit. Not every ascended mook will be useful outside of combat, but it's a possibility.
If a unit of a high-enough tier gets enough kills during a battle, they may be short-tracked to companion-ship. The kill threshold is customizable, and any that have surpassed it on a given mission will be put in a list for nomination at the end of a battle.
You don't have to rely entirely on RNGesus to take the wheel and give you a useful companion - you will get to decide where to assign initial skill bonuses.
The behaviour of the nominations has changed (slightly)! A new parameter, outperform_percentile has been added, and is the percentile of kills that a unit must exceed to qualify for nomination. Set this value to 0 (above the 0th percentile, aka everybody) for the previous versions' behaviour, which was based entirely on meeting a kill threshold. This new parameter makes battle nominations more stringent, but should also keep the nominations list shorter. To explain for people who don't necessarily know - the default value of 0.68 corresponds to the 68th percentile. If the number of kills is normally-distributed among your soldiers, then this means only those who get above one standard deviation (or "sigma") of kills will qualify.
The config file (Settings.xml) has several parameters:
NAMES_FROM_EXTERNAL_FILE, whether to use the external namelist file to generate companion names! This file can be edited on-the-fly, as it's only accessed briefly upon promotion. It also will delete names that have been selected, so keep a backup!
tier_threshold, the minimum tier of unit eligible to become a hero. Set to -1 to only allow units with no further upgrades to be nominated.
base_additional_skill_points, the primary skill point bonus value to manually assign to newly-created companion skills.
leadership_points_per_50_extra_skill_points, how many points of the player's leadership skill translates to 50 additional assignable skill points for the new hero.
lethality_chance, is the chance of a companion (only a player companion, not lords, or anybody else) being killed when reduced to zero HP during a battle. If you're using the Heroes Must Die mod, set this value to zero (or negative), because any interaction between these mods is undefined behaviour.
inf_kill_threshold, the infantry-specific kill threshold to be nominated.
cav_kill_threshold, the cavalry-specific kill threshold to be nominated.
ran_kill_threshold, the archer-specific... You get the idea.
medicine_death_chance_reduction, the reduction in lethality_chance for each 10 skill points in medicine.
max_nominations, the maximum number of nominees you are allowed to pick at the end of a battle.
upgrade_to_hero, changes nomination functionality so that when a unit is upgraded to tier_threshold they automatically become a hero. Pairs best with high tier_threshold, and high lethality
fill_in_perks, sets new hero perks to be automatically filled in on uplift, saving you time.
respect_companion_limit, whether or not to take the game's companion limit into consideration for troop nominations.
bonus_companion_slots_base, the base number of extra companion slots to add, if you're respecting the companion limit. Set to 0 for native. This is applied with a targeted Harmony PostFix that should be compatible with other mods that affect this value.
bonus_companion_slots_per_clan_tier, the number of extra companion slots granted per clan tier. Set to 0 for native. This is applied with a targeted Harmony PostFix that should be compatible with other mods that affect this value.
Inside ModuleData/ds_item_modifiers.xml you are able to adjust the modifiers applied to the equipment of newly-created companions. If you want to remove the resale temptation, then you can set the price_factor to 0, and if you want to incentivize upgrading their armour, you can add maluses to the item stats. The default is 10% of original value, with the original stats.
outperform_percentile, the percentile of kills a unit must exceed to qualify to be nominated. Set to 0 for previous versions' behaviour (only kill thresholds)
ai_promotion_chance: The chance of an AI lord promoting a properly-tiered unit into a companion after winning a battle. This generates heroes in AI lords' parties. If you don't have hero death, you might want to set this to zero.
max_ai_companions_per_party: The maximum allowed number of ai-generated companions per ai-clan party.
cull_ai_companions_on_defeat: Kill ai-generated companions after their party is defeated/disbanded? This should be set to "true", if you are generating ai companions, as the AI lords will not gather them back up.
companion_extra_lethality: Extra chance for a hero with the "Wanderer" occupation (not Nobles, or other characters important to the game) to die when they are wounded. If you set the AI lords' promotion chance higher, you'll want to set this higher, to prevent too many random heroes from being created.
number_of_skill_bonuses: Number of skill bonuses for players to choose for newly-created heroes.
Succession, which changes up the standard vanilla ruling-clan election system for kingdom- and culture-specific priorities!
Attributes Matter, which gives gameplay bonuses for attribute scores, so your new heroes can be more useful than normal soldiers.
Sergeants for Hire, which allows you to hire Sergeant units from towns to increase your party size. This mod takes advantage of Harmony PostFix and reflection libraries to be compatible even if you're using another mod that overrides the default party size function!
~~~~~~~~~~~~~~~~~~~~~~~~ Additional Command Line (Alt+~) functions: (note: these are command line functions, and so input verification is less strict. You can crash the game by providing invalid inputs)
dservice.give_squad [num - optional] : generates units from the player culture's Elite Caravan party template - modified to have 50% chance to be female. Defaults to 10 companions, but can be any other positive number.
dservice.uplift_soldier [tier - optional] : creates a companion from a random soldier from your roster that has a tier > the input value (default -1).
dservice.convert_party_to_heroes : converts all non-hero soldiers in your party into companions.
dservice.give_party_heroes_perks : assigns unassigned perks for all player party heroes. It's random, so useful combinations are not guaranteed.
~~~~~~~~~~~~~~~~~~~~~~~~~
Finally, at the very bottom, here's a patreon for those of you who want to support me. Don't worry, I haven't gone corporate, and every facet of this mod (and all my others, and any new ones) will always be hosted here, for free. The patreon page discusses the reasoning behind itself, and will mostly just resist any further hiatus from happening (because I'm a poor grad student, who's paid for research, not mods). Do not, under any circumstances, feel obligated. I make these mods for fun, and you don't owe me (or any other modder) anything for them.