There is no option in my mod to only check for race, that's maybe one of the game's options for its own simplistic random portrait code, which this mod completely replaces.
I think you could achieve this by changing minMatch to -1 ? This would affect more than just the gender filtering though. Right now, for race or gender, if the matches are below minMatch, it aborts. If it's not, but the result is empty, then it ignores that filter. so if these conditions are met:
- minMatch setting set to 0
- No matching portraits for gender
Then instead of aborting like it would with a minMatch, it will discard the filtering on gender. It'll filter on it, see that the result is empty, and continue with the prior list. It'll however apply this to Races too, so if it filters on race and gets 0, it'll revert to using all portraits, then trying to filter on gender, if that's also 0, it'll continue with all portraits (or a set of portraits for a race if you had one).
I think a more ideal way to handle this would be to have settings for whether it aborts or ignores the filter when below minMatch for race, gender, and age.
I haven't been playing the game as much lately and thus not too active on the mod. Not sure if/when that might change.