Jump to content

Adjustable Gender Ratios


GeneralArmchair

Recommended Posts

By default, the ratio of female to male recruits seems to be a pitiful 1:10 (That isn't a hard number, that's what I've observed from playing). I personally hate the gears-of-war style bodies they gave the male troopers. In the long term, I'm hoping for custom trooper models, but that's a much larger task. In the short term I will be happy with more female troopers in my force.

 

I've seen some discussion about modifying the .ini files and editing resources in the .exe file. I'm hoping that somewhere in some file is a simple variable that controls whether a new recruit is male or female. I've done a very brief search through some of the .ini files, but I didn't see the variable.

 

I'm hoping that someone here has either already determined how to adjust the gender ratio, or can point me down the right path to find it myself.

Link to comment
Share on other sites

Thirded. As a female player this particularly annoys me. In my current game I'd guess the recruit ratio is 7:3 but maybe I just got "lucky."

 

Seems like most of the non-recruit people in the ant farm are male too.

Edited by ajane
Link to comment
Share on other sites

I personally hate the gears-of-war style bodies they gave the male troopers...

This. Not all men are hulking giant muscle masses awaiting bullets. I do hope someone will give us more variety in this.

 

Good luck!

Link to comment
Share on other sites

XComGame.upk appears to be the key to setting your own ratio. Thanks to this thread over in XCOM Mod Talk, I think I've found the right function.

 

In XGCharacterGeneration, the function CreateTSoldier() will assign a random gender if one is not provided when the function is called.

 

kSoldier.kAppearance.iGender = ((Rand(4) == 0) ? 2 : 1);

 

Rand(4) should generate a number from 0 to 3. If that number is 0, then the gender is set to 2 (female). Otherwise, it's set to 1 (male). So the default is a 25% chance of a female soldier.

 

It should be very easy to test if this is the right function once Daemonjax has the SHA-1 stuff taken care of.

Link to comment
Share on other sites

XComGame.upk appears to be the key to setting your own ratio. Thanks to this thread over in XCOM Mod Talk, I think I've found the right function.

 

In XGCharacterGeneration, the function CreateTSoldier() will assign a random gender if one is not provided when the function is called.

 

kSoldier.kAppearance.iGender = ((Rand(4) == 0) ? 2 : 1);

 

Rand(4) should generate a number from 0 to 3. If that number is 0, then the gender is set to 2 (female). Otherwise, it's set to 1 (male). So the default is a 25% chance of a female soldier.

 

It should be very easy to test if this is the right function once Daemonjax has the SHA-1 stuff taken care of.

Thanks for that insight. I suspected that the information you found was in one of the .upks after the discussion about psi chances in "finding the first step", but never found the time to dl the necessary utilities to check them myself. I'm looking forward to the day that the mod community can repack the .upks.

Link to comment
Share on other sites

In XGCharacterGeneration, the function CreateTSoldier() will assign a random gender if one is not provided when the function is called.

 

kSoldier.kAppearance.iGender = ((Rand(4) == 0) ? 2 : 1);

 

Is your file really showing Rand(4)? Mine says Rand(3), for a 33% chance.

 

At any rate, I've edited two different versions of XComGame.upk, one which fixes it to equalise the gender ratio and one which just reverses the game's default bias, and it seems to have worked just fine. I'd put them up for people to use, but until we have a tool to automatically update the executable with the correct hashes, you have to edit your .exe manually, which I'm guessing most people aren't willing to do. (And it's even less likely they'll trust a modified executable from some random Forumperson like myself.)

 

In theory, it might be possible to modify it to load a ratio from the config files, so users can edit it themselves. Presumably, the game will load ANY value you put in the config files, so it's just a matter of referencing it in CreateTSoldier(), but that would require either a tool to recompile the scripts, or a better understanding of UnrealScript bytecode than I've got.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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