I've modified the script portion into a mod for 0.5.18:
Version 0.2 https://mega.nz/#!sXxmDAqZ!hmiE948bEroR3U2naD3vpNdnlVAh9Rfi2Ckf9l4YmDw
I've modified how the selection logic works in this version, info.txt details it further, but now race takes precedence, and it won't set a portrait for a male unless it can find a portrait for that race that has male and not female.
- Extract into your user mods folder, "%appdata%\Strive\mods" (Alternatively, run game, click mods, then click "open folder"), but may need to re-run to see mod in list.
- Run the game, click mods
- Click "randomportraits" so it is enabled.
- Click apply, game will exit
- re-run the game, mod should work now.
Mod works by replacing "func randomportrait(person):" contents with what is in the mod file, leaving the rest of the character constructor alone. Thus as long as the mods continue to work the same way, this should work with future versions, without worrying about the rest of the file. I did have issues when randomBody function existed, the mod code seems fragile and was inserting in an empty function. Collapsed it down into the main function and all is working.
If you want to revert the mod, I haven't had much luck from in-game. Guessing this will be fixed later, but for now can revert by
- exit game
- Delete FileOrder.ini from "%appdata%\Strive\mods"
- In game folder, copy contents of "Backup" to "files".