Jump to content

INI question for soldier pool size in barracks


mairsil1

Recommended Posts

I know, it's not really a complex mod to just edit INI values, but I can't find the value I'm looking for and hoping someone knows. Also, if there's a better place for strictly INI value discussions, let me know, but the modding forum seemed like the most sensible place here.

 

I have set the starting soldiers to 6 and max to 8 (because I always liked those sizes better after playing Long War) and found those settings easily enough. I find, though, that having 6 guys and more aliens (found those as well) on legendary leads to more soldier churn in the early game unless I save scum shamelessly (which I try not to, but Ironman is not an option while the restart mission button is still buggy and you could lose your whole campaign on the final mission due to a lucky crit). I figure since the pool in vanilla is about 3x the size of your starting squad size (or 2.5 at least), I'd like to increase the number of soldiers that are in the barracks at the start to 15-18, but I can't find that value in the INI files. I've looked through DefaultGameCore and DefaultGameData searching for "soldier", "barracks", and "armory" and haven't managed to find a value that sounds correct, so unless it's hidden in one that has a completely random name (I know that sometimes happened in EU) I'm not thinking of how to search for it further.

 

If this isn't an INI configurable item, does anyone know of a mod which messes with the barracks size that's already out there somewhere?

 

Thanks

Link to comment
Share on other sites

I am interested in this also, because there are a number of things that happen when the armory is filled with rookies that I would like to change.

 

I spent a few minutes looking in the uc files but couldn't get a lead. If anybody finds this, either in the ini file or uc files, please give a pointer here.

Link to comment
Share on other sites

Update to this, although I found the starting and maximum squad size in the INI files and thought I was good to go, they don't appear to actually work correctly. I began my campaign with 6 squad members, but when I completed the GTS, the first mission I had after that showed the "Upgrade squad size in GTS" for the 7th and 8th slots as it should, but when I launched the mission it had thrown 2 rookies in those slots and I had 8 squad members suddenly. I couldn't equip them, but they went on the mission without actually buying the squad size updates. I know setting the starting and max to 6 wouldn't fix this because when I reached the point of buying a squad size upgrade with those settings on a previous campaign, the message about buying the size upgrade went away, but I couldn't send a 7th unit out. This is beginning to get confusing for what should be a pretty simple change.

Link to comment
Share on other sites

So still don't know how to boost the soldiers in barracks out of the gate, but found a mod that only messed with INI files and got the missing piece to the weird starting/max squad size behavior I was seeing. The DefaultGameData.ini element m_iMaxSoldiersOnMission does need to be 6 or when you get the GTS it will boost to 8 without the upgrades. The problem I had when I had that value in place was that I didn't find the UI element. In DefaultUI.ini there's an element called MaxDisplayedSlots that if you don't bump that up, when you buy your upgrades the new slots won't show because the UI still thinks the max slots are 6.

Edited by mairsil1
Link to comment
Share on other sites

After another hour or two searching through the code, I found the simple answer to making your barracks bigger.

 

In DefaultGameCore.ini, find the line:

 

NUM_STARTING_SOLDIERS=8;

 

And change it to whatever you want, like 20. Start a new game; finish gatecrasher; and look in your armory. You will see 24 soldiers, which is the 4 from gatecrasher (assuming they survived) plus this number of new soldiers. Normally you have 12 soldiers, which is the 4, plus 8.

Link to comment
Share on other sites

After another hour or two searching through the code, I found the simple answer to making your barracks bigger.

 

In DefaultGameCore.ini, find the line:

 

NUM_STARTING_SOLDIERS=8;

 

And change it to whatever you want, like 20. Start a new game; finish gatecrasher; and look in your armory. You will see 24 soldiers, which is the 4 from gatecrasher (assuming they survived) plus this number of new soldiers. Normally you have 12 soldiers, which is the 4, plus 8.

 

Hadn't been able to check this forum in several days, but I did manage to find this on my own... kind of. I thought this INI setting was what allowed me to start with 6 soldiers in my squad (I had it set to 6) and I did start the campaign with only 1 extra guy. However, after some digging I did find NUM_STARTING_SOLDIERS in a .uc that seemed to be initializing the original game state, so I went back and changed that number to 15 and I did have more. However, the number in the barracks after Gatecrasher was 16 total, including the 6 that survived, which makes little sense with the value set to 15 (as either it's total including the squad, where it would be 15, or it's in barracks only and doesn't count the squad so it should be 21).

 

The number of starting scientists and engineers is hard coded to subtract 1 on initialization for Tygan and Shen (this I found in XComGameState_HeadquartersXCom.uc). That .uc file treats all crew as a single variable (Crew) with objectids to differentiate between scientists, engineers, and soldiers. I'm wondering if the code is set up to pull the starting soldiers from the config file but scientists/engineers were hardcoded to 0, then someone went "we need to add one to crew values for Tygan and Shen so the HQ code won't start the Avenger without those guys." So they just throw an increment to the starting values for the Crew variable across the board (didn't find code to back this up, just brainstorming). Then someone else went "Well ok, but we have to subtract it back out after initialization so the display doesn't tell you that you have 1 of each when you only have Tygan and Shen" so they implemented that code I found specifically for engineers and scientists so the display is 0 of each (and probably uses the same variable for Shen nagging you about unstaffed engineers which would be annoying if you didn't have any). But when they put in the code to start those guys at -1, they didn't do the same for the soldier objectid, so your actual total starting soldiers is NUM_STARTING_SOLDIERS + 1.

 

Anyway, that settles my initial question regardless, I have the ability to mess with barracks size now. However if that's the case then is the starting squad size governed entirely by the m_iMaxSoldiersOnMission variable in DefaultGameData.ini? Because I have that at 8 and start with 6. Maybe the starting squad size is just that variable minus the number of size upgrades you can buy? There's a mod out there which gets to the 8 maximum by adding 2 more purchasable increases to the GTS, so I'm guessing if you put 8 there with that mod installed, you'd be back to a 4 man starting squad.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...