Force gender for a pawn kind

Started by qux, June 20, 2021, 08:41:27 AM

Previous topic - Next topic

qux

Hi,
I try to create a new faction,
I would like to know if it was possible to create a pawn kind which can be only
male or female ?
I don't find the line code for this,
thanks for your help

Canute

Hi,
take a look into mods like
Mincho, The Mint Choco Slime
Monstergirls
maybe you find there the answers.

RawCode

post your attempts to solve issue, including code and xml if any.


qux

Thanks but I don't find the solution,
I find the line
            <maleGenderProbability></maleGenderProbability>
but it's for a race,
so I have to create a copy of human race for females and an other for males
I would just like can choose a gender for one pawn kind

RawCode

proper way to solve issue is opening code of game (pawngenerator class) and checking how game picks gender for pawns and what factors are taken in account

if there is specific flag that allows to override default rules, you will see them in code

if there are no override you like, you will need code injection that will take in account faction (or any other factor) and alter normal generation rules

also you may have world component that will react on pawn spawning and changing gender after pawns are generated and placed in the world.

component way is easy and efficient in this specific case.