XCOM 2
Not enough ratings
AutoPromotion
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
366.209 KB
26 Nov, 2022 @ 3:57am
6 Sep @ 10:59pm
8 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
AutoPromotion

Description
Auto Promotes troops when they are eligible for promotion. You can set progression you want your troops to follow in the config files.



Go to
~\steamapps\workshop\content\268500\2893561181

go to the Config folder, open the XComGameData.ini in whatever text editor of your choice, and follow the instructions at the top of the file.

if you would like to add a custom class you made or a custom class you use, you can open a PR on github.
Simply Click here[github.com] to go the repository, and go to the XComGameData.ini file and add your changes.

Fixes on September 7th, 2025
There was a bug with named soldiers not getting auto promoted. That has now been fixed. Nickname is not taken into account when autopromoting so just have their first and last name as shown in the ini entry with Test Testerson and you will be good.



New Features and Fixes with update released on December 21st 2023

The following has been added:
  • BuyBarracksAbilities => To be used after LevelUpBarracks. Buys the abilities so you don't have to.
  • Fixed PromoteAllSoldiers and PromoteSoldier to work as intended



Console Commands:
  • GetSoldierAbilitiesForRank(string SoldierName, int rank) logs the ability name and position for the given rank in the log file.
  • ListSoldierAbility(string soliderName, int rank, int branch) => prints to the log file what ability is at the rank and branch on the ability tree. Useful for helping you change the presets.
  • BuyBarracksAbilities => To be used after LevelUpBarracks. Buys the abilities so you don't have to.
  • PromoteAllSoldiers(optional int rankUps = 1, optional name className = '') => allows you to promote all your troops. You do not need to run LevelUpBarracks before running this command. Furthermore, you can specify a className so you may promote all troops of a specific class should you need it.
  • PromoteSoldier(string soldierName, option int rankUps = 1) => Promotes a single soldier given the name. Do not include the nickname of the troop.
The promoting commands do not allow you to pick a specific class if the troop is a rookie. If you want the rookie to be a specifc class, use MakeSoldierAClass and then use the PromoteSoldier command.


The following has been implemented upon user request/user aid

Mod Config Menu Integration
Due to demand, the Mod Config Menu has been integrated to enable a more customized auto promoting experience.
  • Enable OnlySquaddies => Enable to make it so that it will only auto promote to rank squaddie. disabled by default. Having this and OnlyVets enabled renders the two options useless as now it will autopromote all troops regardless of rank.
  • Enable OnlyVets => Enable to make it so that it will only auto promote starting at rank squaddie. disabled by default. Having this and OnlySquaddies enabled renders the two options useless as now it will autopromote all troops regardless of rank.
  • Check Barracks => Enable to check the barracks after every mission for troops eligible for promotion and auto promote them.
  • Enable Logging => This is helpful for debugging but also figuring out what the class internal name is. If you want to add a custom class and don't know the internal name, enable to find out. Details below. disabled by default
  • Show Promotion Popup => When a soldier is eligible for promotion, a pop up occurs. You can disable/enable this. This is disabled by default.
  • Ignore Covert Action => Enable to not autopromte soldiers on covert actions. If you have Show Promotion Popup enabled, it will still execute.
  • Rank Up But Not Buy Ability => Rank the soldier up to the next available rank (ex: squaddie to corporal) but do not buy the ability. disabled by default.
  • Enable Buying Random Ability => Enable to have your troops select a random ability when they rank up. Enabling causes the mod to ignore presets for classes as well as the rank no buy option.
  • Use Soldier Full Name => Enable to allow using the soldier's name as well as the class name. So if John Doe is no found, it will default to the class the trooper is. Enabled by default. Credit to RustyDios.

Code Improvement, Logging Improvement, LWOTC Support, Using The Soldier's Name, as well as the new image can be attributed to Rusty Dios. Thanks Rusty.

Code Refactor done by me

If you want to say more than thank you, feel free to Buy me an apple[www.buymeacoffee.com]

How to find the Soldier's Internal Class Name or Full Name
Make sure that you have logging enabled, otherwise you will not see the logs!
Also make sure you have ranked up a soldier to squaddie with the class in question, otherwise you won't see it.
Also make sure that you don't have buying a random ability enabled.
  • Go to this file in your computer
    ..\Documents\my games\XCOM2 War of the Chosen\XComGame\Logs\Launch.log
  • Then, search for "Beat_AutoPromote" or "==========". This will take you to the start of the logs.
  • Scroll down and You should see a line that says "COMPLETED AUTO-PROMOTION", look 1 line above it.
  • The text in the brackets next to "soldierType" is what you are looking for.
  • If for some reason the full name isn't working for you, the line above the one from the previous step has the name you need to enter.
67 Comments
☾olin 7 Sep @ 3:29am 
It's fixed! Thank you, this mod is so necessary for me to play with large barracks.
Beat  [author] 6 Sep @ 11:01pm 
Your problem will soon be fixed. Update has been pushed so be on the look out for the updated version
☾olin 4 Sep @ 4:41pm 
I tried without any mods and it still won't work, so if it works for you the only thing left for me is an ini problem with my xcom game itself.
☾olin 4 Sep @ 2:37pm 
My characters do have nicknames, however I made a brand new character, without a nickname, and it still would not recognize the name. I have tried possibly everything and it won't work, I think if you can't reproduce it locally, it's got to be one of my mods messing with it. I plan on trying the mod by itself tonight to see if it still does it. Both when they're rookies and when they're already squaddies they won't be recognized. Thanks for the help.
Beat  [author] 4 Sep @ 9:51am 
Do your characters have nicknames when going through this or even as rookies to squaddies it won't work with a name?
Beat  [author] 4 Sep @ 9:47am 
I'll see if I can reproduce locally
☾olin 3 Sep @ 5:11pm 
Here's a pastebin of the autopromote logs: https://pastebin.com/V9FFwQfX

Here's a pastebin of what I have in the gamedata: https://pastebin.com/aUe4Q1H3
☾olin 3 Sep @ 5:03pm 
I'm using RPGO, so there's like 18 rows of abilities to pick from when you become that class. I used the GetSoldierAbilitiesForRank command to get the rows I'm using.

I get it working when I don't use a name and it upgrades everyone who is that class to those exact abilities, however I would like specific people to upgrade on their own path that I set.

I don't want to fill your comments with logs, but I'll try to send some of what I see to help you understand a bit of what I'm seeing.
Beat  [author] 3 Sep @ 3:54pm 
Also further in the logs includes more details so if its a name or ability issue that would tell you
Beat  [author] 3 Sep @ 3:47pm 
I'd need to see the mod for this mod class you're using but the values you provided don't make sense. For example, sergeant=10 would mean that on the sergeant column there's 9 empty rows above it