Ludeon Forums

RimWorld => Mods => Help => Topic started by: qux on June 20, 2021, 08:41:27 AM

Title: Force gender for a pawn kind
Post by: qux on June 20, 2021, 08:41:27 AM
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
Title: Re: Force gender for a pawn kind
Post by: Canute on June 20, 2021, 09:37:40 AM
Hi,
take a look into mods like
Mincho, The Mint Choco Slime
Monstergirls
maybe you find there the answers.
Title: Re: Force gender for a pawn kind
Post by: RawCode on June 21, 2021, 07:49:59 AM
post your attempts to solve issue, including code and xml if any.

Title: Re: Force gender for a pawn kind
Post by: qux on June 21, 2021, 07:06:26 PM
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
Title: Re: Force gender for a pawn kind
Post by: RawCode on June 22, 2021, 03:28:13 AM
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.