Editing the number of children

KonnoYuuki

Member
Mar 18, 2025
11
9
38
As we fill up Gwyn's nursery with more and more of our children, I was wondering if there are console commands to edit the number of each children?

Some of the are born in large litters while others are sole births. I thought it would be nice to have their numbers align.
 

Tarnakus

Well-Known Member
Oct 31, 2020
631
328
Number of kids is inside general flags like this for example flags.GWYN_PREG_NUM_KIDS (flags.pregkey_NUM_KIDS).
So doing something like flags.GWYN_PREG_NUM_KIDS = 10 - changes number of children with her.

Now the problem is that nursery bunches up diffrent pregnancy results together (depending on the race). So for example Orcs children are Arona's (when she is mom) + Arona (when she is dad + pc mom) + Hretha + Infrith + Ylvid's (only PC father) + generic orc (pc mom + generic orc). Align it all is not worth the effort imo.

Edit: Ylvid + Arona children do not go into nursery there is separate flag for that pairing (as far as code sugest).

If you want to tinker with it:
Code:
PregManager.nurseryPregnancies() - this gives list of pregnancies that actually goes into nursery (as not all goes there)
PregManager.nurseryPregnancies().filter(obj => obj.childRace === "orc") -> this gives you list of pregnacies for a race.
Ofc if your PC is only mom or only dad you need to pick and choose which are even present in your save file (above command checks only for race)
Then you take "key" and go with flags."key"_NUM_KIDS = X.
I'm sure you can somehow chain it more and get one command to changed them in for or foreach loop but im too lazy to do it.
 
Last edited:

KonnoYuuki

Member
Mar 18, 2025
11
9
38
Hmmm, the command works but does not seem to affect the number displayed in the nursery. Like these commands are accepted and generate a reply of 10.

GWYN_PREG_NUM_KIDS = 10
BRINT_PC_PREG_NUM_KIDS = 10

But the number when you check the nursery kids stays the same.

I wonder if there is a separate command that affects that.
 

Tarnakus

Well-Known Member
Oct 31, 2020
631
328
Commands are:
flags.GWYN_PREG_NUM_KIDS = 10
flags.BRINT_PC_PREG_NUM_KIDS = 10
You need to refresh nursery page as majority of text already displayed by the game will not change dynamically.
Sure there are other coresponding flags that can couse trouble or strange behaviour if they are checked like flags.GWYN_PREG_NUM_BIRTHS -> number of births but just for nursery NUM_KIDS is the one used for calculation.
Before:
1791699743086.png
After:
1791699770264.png
 

Tarnakus

Well-Known Member
Oct 31, 2020
631
328
I had some time to experiment to get one line command.

Code:
PregManager.nurseryPregnancies().filter(obj => obj.childRace === "orc").forEach(obj => {
        if (flags[`${obj.key}_NUM_KIDS`] !== undefined) {
            flags[`${obj.key}_NUM_KIDS`] = 10;
        }
    });
Above sets all orc pregnancies to 10 with the if that there was already children from that pregnancy.
Or even less specific - dropping the race condition:
Code:
PregManager.nurseryPregnancies().forEach(obj => {
        if (flags[`${obj.key}_NUM_KIDS`] !== undefined) {
            flags[`${obj.key}_NUM_KIDS`] = 10;
        }
    });
You can also drop the if - but then you start to create children without other flags and states. I would not advise that for main save.
For nursery it will work but if game check flags that do not exists you could get a crash (below I added brint children before one line tries -> that's why I had 20 mino kids)
After all pregnacies set to 10:
1791711802623.png
 
Last edited: