Ludeon Forums

RimWorld => Mods => Releases => Topic started by: GhostData on March 22, 2020, 04:32:51 PM

Title: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on March 22, 2020, 04:32:51 PM
Original thread and mod details: https://ludeon.com/forums/index.php?topic=28747.0 (https://ludeon.com/forums/index.php?topic=28747.0)

Pretext
This is an updated release of Children and Pregnancy (https://ludeon.com/forums/index.php?topic=28747.0) by Thirite.
This modification was not endorsed or authorized by Thirite outside of the permission granted to me as Licensee through the license agreement defined in the original thread
Quote from: Thirite on December 27, 2016, 09:06:22 PM
Permissions
Consider it licensed CC-BY-NC-SA (https://creativecommons.org/licenses/by-nc-sa/3.0/).

This fork is an updated and revised version of Children and Pregnancy that attempts to improve upon inter-mod compatibility and extensibility, repair and update old or incomplete features, and provide new functionality consistent with the current mod direction.

Download
GitLab Releases (https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases)

Discord
https://discord.gg/qGAPs2fj7a

Installation
https://rimworldwiki.com/wiki/Installing_mods

Direction
Current development is focused on the following principles.

Compatibility
Below is a list of known compatibility issues. Some of these mods may be made to work together using in-game toggles, but doing so could have unexpected results. Mods in red below will receive no support on CNPs side, as the mods either break or reimplement core features when used with CNP.

RimJobWorld  - Intentionally breaks CNP pregnancy in favor of its own. Childhood features of CNP may still work. Use at own risk until integration is performed.
Babies and Children  - A derivative on CNP, implements the same feature set. May still work with CNP, but no support will be provided to users attempting to use both mods.
Children, School and Learning  - Overrides pawn generation methods, breaking CNP birth. Hard incompatibility until patched.
Age Matters - Implements some of the same features as CNP. May play together, but currently untested. Expect one mod to "win" when determining pawn capabilities based on age.
Vanilla Expanded - Implements changes to pawn rendering. Use of both mods may cause problems with pawn body type generation - this will effectively "damage" your save file with the affected pawn permanently having the wrong body type. Issues are only cosmetic.

FAQ
Steam Release?
No. While the license does not grant me permission to deny redistribution permission, it would be greatly appreciated if no further versions are uploaded to Steam. I do not intend to maintain it, and having a userbase with an outdated version of the mod making reports makes development more tedious. The latest version of the code will always be on git.
A highly moddable game such as Rimworld rarely has mods that integrate properly. The ability to manually install and maintain a modded installation is assumed.

____ Feature doesn't work
Post with the following information
I cannot fix a problem I cannot replicate. If the issue is with any other mod that adds children, or is listed below as incompatible, reports will be ignored. Please use common sense.

Contributing
Read the git contributions page for details on what is expected of contributors.

Attribution
- Thirite: Mod author
- Cheran: Ported the mod to the v1.0 Release of RimWorld and fixed many bugs
- Jarry1250: Reworked the tolerance level of social joy for babies and toddlers
- lellel: Fixed a notorious and old rendering bug.
- Kori: Patched out pirates from spawning with children

License
Per the original license agreement, this is licensed with the same license:
CC-BY-NC-SA (https://creativecommons.org/licenses/by-nc-sa/3.0/).
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on March 22, 2020, 04:34:11 PM
Let me know if you encounter any issues while using this version. My testing environment is most likely less complex than the typical mod setup, and there may be issues when using certain mods together.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: MagicalFungi on March 22, 2020, 11:50:13 PM
added this to an ongoing modded save and had a weird bug while trying to capture fallen enemies with the ui that made it impossible. the popup window for tasks (ie:capture some guy) flashes repeatedly and doesnt work. the window is also slightly offset. when i removed the mod it went back to normal.

hope that helps, GL with the mod. <3
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Sshodan on March 23, 2020, 02:46:35 PM
Thank you so much for doing this! :) This mod became a bit of a staple for my set up - I need the added difficulty of useless children to balance out some of the OP stuff I'm constantly tempted to use :) I'll be testing it shortly - now I finally can plan the great move to 1.1. :)
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: SneakyRobot on March 23, 2020, 09:13:25 PM
Thanks so much for taking over this mod, it's my favorite and I was so sad to lose it. I've played the update and the only real issue I've seen so far is that the babies that are born seem to be born with, if not all, than a lot of traits. It doesn't show in their bio, they get traits from their parents, but when you look at their mood it's things like depressed, happily nude, greedy for impressive bedroom. It's tanking my baby's mood and they keep having episodes, trying to quit the colony or going on murderous rampages. (Which is very funny because they're babies)
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on March 23, 2020, 09:47:02 PM
Quote from: MagicalFungi on March 22, 2020, 11:50:13 PM
added this to an ongoing modded save and had a weird bug while trying to capture fallen enemies with the ui that made it impossible. the popup window for tasks (ie:capture some guy) flashes repeatedly and doesnt work. the window is also slightly offset. when i removed the mod it went back to normal.

hope that helps, GL with the mod. <3

Without more info, I won't be able to track this one down. Based on the description, I was not able to reproduce.
Mod list and load order? What type of pawn is capturing, and what type of pawn is being captured?

Quote from: SneakyRobot on March 23, 2020, 09:13:25 PM
Thanks so much for taking over this mod, it's my favorite and I was so sad to lose it. I've played the update and the only real issue I've seen so far is that the babies that are born seem to be born with, if not all, than a lot of traits. It doesn't show in their bio, they get traits from their parents, but when you look at their mood it's things like depressed, happily nude, greedy for impressive bedroom. It's tanking my baby's mood and they keep having episodes, trying to quit the colony or going on murderous rampages. (Which is very funny because they're babies)
I'll take a look. I haven't touched the 'inheritance' part of the code yet, but I saw that there was what looked like a 50% chance that each inheritable pawn from each parent would be received. Probably needs to be a bit more logic behind that.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: MagicalFungi on March 24, 2020, 01:20:54 AM
i appear to be having issues with my core mods or something. jecstools in particular, possibly harmony too... will test again after i fix the issue
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: evilbob on March 24, 2020, 07:14:27 AM
what about android children and pregnancy ?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: dusiiaczek on March 24, 2020, 10:26:28 AM
Babies inherit traits from parents fine, but have mood from EVERYTHING. This is what debug log was throwing at me https://pastebin.com/66g73dUw (https://pastebin.com/66g73dUw) [edit. when baby reaches 3 years, the mood calms down]
Also - when there was no babies and pawns were assigned to child care debug log was also throwing funny things at me https://pastebin.com/uSGapsqF (https://pastebin.com/uSGapsqF). This didnt seems to have any influence on game, and it stopped once i unassign everyone from childcare. When babies were born, I reassigned pawns to childcare and didn't throw any new [or old] errors.

I love this mod, so I will continue to use it. If i notice something else I will let you know :P
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Jay12098 on March 24, 2020, 03:51:18 PM
Thanks for updating this mod! It is one of my staple mods for Rimworld now, I can't fully enjoy a game without it!
Just to say as well, from the little amount of time I played testing this mod, I seem to be having the exact same issues as dusiiaczek.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: andythehero on March 25, 2020, 03:30:30 AM
I also have the same problem with the baby pawns taking on every single mood buff and debuff. Scared me pretty bad when that happened and i saw it.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Vrk on March 25, 2020, 04:05:23 AM
Is there an option to acelerate the growth like baby and children?
And another question, I used dev mode to give birth to a baby in an ongoing save, and they only had minor passions, is this a bug or I just got bad luck?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: xrogaan on March 25, 2020, 11:40:59 AM
Quote from: Vrk on March 25, 2020, 04:05:23 AM
Is there an option to acelerate the growth like baby and children?
And another question, I used dev mode to give birth to a baby in an ongoing save, and they only had minor passions, is this a bug or I just got bad luck?
I would like this very much. Or have the baby/children mechanics similar to those of dwarf fortress.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on March 25, 2020, 08:34:09 PM
Thanks for the reports folks. I have identified the issue with toddlers seeming to have every thought and have fixed it for the next release. There are still some other larger changes I'd like to make before releasing this version, as it will not be backwards compatible.

Quote from: xrogaan on March 25, 2020, 11:40:59 AM
Quote from: Vrk on March 25, 2020, 04:05:23 AM
Is there an option to acelerate the growth like baby and children?
And another question, I used dev mode to give birth to a baby in an ongoing save, and they only had minor passions, is this a bug or I just got bad luck?
I would like this very much. Or have the baby/children mechanics similar to those of dwarf fortress.
I'm not opposed (entirely) to adding an accelerated aging mechanism, but I would suggest using another mod to accomplish this, as I am fairly certain there are a few out there already.
I'm an avid dwarf fortress player, but I'm not sure what you mean by "Similar mechanics." The only thing that springs to mind is that at 12 or 13 they become unskilled peasant adults. And are carried everywhere for the first year I suppose.

Bear with me while we work on getting this mod stable. I am changing some of the hediffs around to use components instead, which will require new save files to be generated for children (or for a colony to only have new children post change.)
The 2.0.0 release will be breaking, so I will try to make as many of these changes as possible so we don't go through this often.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: xrogaan on March 26, 2020, 04:16:43 AM
Yeah, having colonists need to take care of every children is a strain on the badly balanced food creation (individual portions instead of a communal pot, wasted time making each portion). So having the baby stuck to its mother for a year, then left to its own means afterward would be fine.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: RikuOrihara on March 26, 2020, 05:15:59 AM
I will test this one out :)

On github are some people who try to update too, just mention it
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Bengto on March 27, 2020, 08:44:43 AM
I moved the file into the mod folder but I cant see it in the modlist, any idea why?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Canute on March 27, 2020, 09:07:51 AM
Did you move the zip archive into the mods folder or did you unzip it ?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Bengto on March 27, 2020, 09:08:48 AM
Quote from: Canute on March 27, 2020, 09:07:51 AM
Did you move the zip archive into the mods folder or did you unzip it ?


I moned the zip file
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Canute on March 27, 2020, 09:17:53 AM
Rimworld can't handle archives, you need to unzip them.
Maybe you should read the sticky here "HELP:How to install mods".
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Bengto on March 27, 2020, 09:19:23 AM
Quote from: Canute on March 27, 2020, 09:17:53 AM
Rimworld can't handle archives, you need to unzip them.
Maybe you should read the sticky here "HELP:How to install mods".

ooh my bad lol
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on March 29, 2020, 08:36:58 AM
Will the v2.0.0 have rotting infant/toddler/child corpses so they don't randomly grow into a full adult without a head (but have 0% missing body parts thus purely visual)
and are there any fixes for the toddler/infant feeding bugs? (present in both the original mod and this 1.1 v1.0.0)


For instance a childcare pawn will attempt to feed a infant/toddler (which are zoned in a "child area") but instead of simply carrying the infant/toddler to their assigned crib they will carry them to a medical bed (regular bed not a hospital one) and either drop them there making the toddler walk back to the zone and leaving the infant to be rescued and no feeding interaction was done. (this happens with perfectly healthy infants and toddlers thus not "patients")

Or a slightly different version of the one above they will carry them to a medical bed put them in the bed then pick them up again to bring them to their assigned crib and to finally feed them, thus just wasting time.

One that is actually more game breaking is when a childcare pawn tries to feed a infant/toddler but for some reason cant feed them thus constantly picking up the infant/toddler putting them in their crib then stopping the interaction to immediately pick up the infant/toddler and rapidly repeating the cycle, creating a noise sounds closest to a wooden wall being melee attacked, now why this happens i could not figure out yet, it did however throw a debug log at me (see pic) so far this happened with simple meals and pemmican, but i assume most food can have this problem. so far I could only fix this by either downing the pawn that was attempting to feed or removing their childcare priority entirely (if I would let them do something else first they would simply finish that task then go back to feeding again not having fixed the bug, letting the pawn sleep does however sometimes fix the bug as they would eat the food in their inventory after sleeping themselves)

these bugs appeared without any other mods and with mods that should not have any interaction with this mod.





Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on March 29, 2020, 12:39:17 PM
Quote from: Geese man on March 29, 2020, 08:36:58 AM
Will the v2.0.0 have rotting infant/toddler/child corpses so they don't randomly grow into a full adult without a head (but have 0% missing body parts thus purely visual)
and are there any fixes for the toddler/infant feeding bugs? (present in both the original mod and this 1.1 v1.0.0)


For instance a childcare pawn will attempt to feed a infant/toddler (which are zoned in a "child area") but instead of simply carrying the infant/toddler to their assigned crib they will carry them to a medical bed (regular bed not a hospital one) and either drop them there making the toddler walk back to the zone and leaving the infant to be rescued and no feeding interaction was done. (this happens with perfectly healthy infants and toddlers thus not "patients")

Or a slightly different version of the one above they will carry them to a medical bed put them in the bed then pick them up again to bring them to their assigned crib and to finally feed them, thus just wasting time.

One that is actually more game breaking is when a childcare pawn tries to feed a infant/toddler but for some reason cant feed them thus constantly picking up the infant/toddler putting them in their crib then stopping the interaction to immediately pick up the infant/toddler and rapidly repeating the cycle, creating a noise sounds closest to a wooden wall being melee attacked, now why this happens i could not figure out yet, it did however throw a debug log at me (see pic) so far this happened with simple meals and pemmican, but i assume most food can have this problem. so far I could only fix this by either downing the pawn that was attempting to feed or removing their childcare priority entirely (if I would let them do something else first they would simply finish that task then go back to feeding again not having fixed the bug, letting the pawn sleep does however sometimes fix the bug as they would eat the food in their inventory after sleeping themselves)

these bugs appeared without any other mods and with mods that should not have any interaction with this mod.
I'll fix bugs that I am able to replicate. All of those listed here have either fallen outside of my testing so far, or I have simply not observed.
The first error with child corpses is definitely an odd one. Do you mean to say that if a child dies, at some point their dead body will "grow" to an adult size and lose it's head? If I had to guess, I would say the render patches stop applying, but I haven't tested child death yet.

Expect a release some time in the next week, but most of the changes so far are to provide other mods a way of integrating and extending this mod. I will fix as many bugs as I can identify while I am working here.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on March 29, 2020, 12:59:18 PM
First bug always happens when a non adult body human (infant, toddler, child) corpse starts rotting. just dev mode "give birth" any pawn punch the newborn to death use the dev mode tool "rot 1 day" a few times then it should show the render bug, just force birthday the infant to toddler age and child age all 3 have the same bug (has always been the case after 30+ attempts)

The feeding bug is fairly rare (few times in 30 hours of regular gameplay) (both albeit the carrying to medical bed being more common) for what it looks like its a malfunction in the "rescue" code as infants are always incapacitated and toddlers get most likely get caught up in the bug due to having the same feeding mechanic as the infant has. so far really no idea how to trigger this. Ill try to record it when it happens again and collect any logs it might create.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on March 29, 2020, 05:10:13 PM
Thanks for the report. I've found the issue with rot rendering. I've fixed it partially.
Babies, toddlers, and children will now rot just as any other pawn will. Once they reach dessication, they will generate a skeleton. I haven't modified the skeleton in anyway, since I don't really have time to go shrink the graphics down to make tiny baby skeletons.
Expect the fix in release 2.0.0
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: doodoodoo on March 29, 2020, 07:07:45 PM
Quote from: MagicalFungi on March 22, 2020, 11:50:13 PM
added this to an ongoing modded save and had a weird bug while trying to capture fallen enemies with the ui that made it impossible. the popup window for tasks (ie:capture some guy) flashes repeatedly and doesnt work. the window is also slightly offset. when i removed the mod it went back to normal.

hope that helps, GL with the mod. <3

I've had this same issue but I did not add the mod in mid save. The first was when trying to rescue a downed pawn. The option to rescue flickers constantly and I am unable to click the option. The down pawn was from the Androids Tier++ mod. The second time was when a shaman (Rimworld of Magic) hiver (Kenshi Hiver race) trader came in. I could not trade with them because when I right click them, the option flashes constantly. I could, however, trade them if I drafted my pawns. I have this mod loaded toward the bottom of my load order. I hope this helps resolve the issue somewhat.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on March 29, 2020, 07:17:45 PM
So I found another bug when a late stage pregnant colonist ran wild on me.
Infant that are "wild" (from either being born wild or using dev mode to run wild) can walk and appear to be capable of most other things as well (although hard to say since you cant control wild humans) they appear to be able to have all mental breakdowns can be arrested so basically act like a adult pawn but in a infant body.
there seems to be no difference from wild infant being born "naturally" from the mod itself and infant that were spawned using dev tool "T:give birth" (mod spawned infants wont have any stats nor backstory, which the dev spawned ones do have)
They keep the ability to walk after getting tamed and dev mode recruited.

I'll post any more bugs I might find with as much details as I can find.
And thanks for updating this mod.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: CrazyMalk on March 29, 2020, 09:22:51 PM
About the faster aging option:
Baby And Children used to do this, along with a number of graphical changes (It was used alongside with Children, School and Learning). However, B&C died off and hasn't updated to 1.1. An option to increase the speed that children, babies and newborns age would be appreciated :)
There is also a mod called "Age Matters Updated", it modifies the stats of children below a certain age. Does this mod already modify the stats (manipulation, speech, etc) of younglings, making that mod useless in this case?
Thank you!
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on March 30, 2020, 06:25:59 AM
Quote from: CrazyMalk on March 29, 2020, 09:22:51 PM
About the faster aging option:
Baby And Children used to do this, along with a number of graphical changes (It was used alongside with Children, School and Learning). However, B&C died off and hasn't updated to 1.1. An option to increase the speed that children, babies and newborns age would be appreciated :)
There is also a mod called "Age Matters Updated", it modifies the stats of children below a certain age. Does this mod already modify the stats (manipulation, speech, etc) of younglings, making that mod useless in this case?
Thank you!

I can recommend "Faster Aging" by verdiss, works OK so far (you need to reload the savefile to get children to "grow" to their age appropriate body) other wise you can have a 3 year old infant (should be a child at that point, having skipped toddler as well)
I use these settings in the mod making a newborn grow to 13 (full adult) in slightly less then 2 years,
you can change the 8 to something less if 2 years is too short for your taste.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: CrazyMalk on March 30, 2020, 08:18:13 AM
Quote from: Geese man on March 30, 2020, 06:25:59 AM
I can recommend "Faster Aging" by verdiss, works OK so far (you need to reload the savefile to get children to "grow" to their age appropriate body) other wise you can have a 3 year old infant (should be a child at that point, having skipped toddler as well)
I use these settings in the mod making a newborn grow to 13 (full adult) in slightly less then 2 years,
you can change the 8 to something less if 2 years is too short for your taste.

That is actually pretty interesting, never heard of Faster Aging before. Thank you for the suggestion! I'm going to wait until this mod is more stable before playing around with it.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Zafireria on March 30, 2020, 02:11:53 PM
Since you have taken over, I was wondering if you plan to add race compatibility. Once you have ironed out the bugs and feel happy with the mod of course.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: furel on April 01, 2020, 10:37:31 AM
Hi,
I noticed some errors.
1- It's something wrong when a pawn is playing with a baby, is like it's getting stuck in playing with the baby but it can easily break the circle and command other task but if the priority of childcare is high enough it can waste time with the baby when it can do other things. Also this error pops-up in the log.

QuoteLucky started 10 jobs in 10 ticks. List: (PlayWithBaby (Job_2104516) A=Thing_Human309639) , (PlayWithBaby (Job_2104519) A=Thing_Human309639) , (PlayWithBaby (Job_2104520) A=Thing_Human309639) , (PlayWithBaby (Job_2104521) A=Thing_Human309639) , (PlayWithBaby (Job_2104523) A=Thing_Human309639) , (PlayWithBaby (Job_2104525) A=Thing_Human309639) , (PlayWithBaby (Job_2104527) A=Thing_Human309639) , (PlayWithBaby (Job_2104529) A=Thing_Human309639) , (PlayWithBaby (Job_2104530) A=Thing_Human309639)  curDriver=JobDriver_PlayWithBaby (toilIndex=3) curJob=(PlayWithBaby (Job_2104530) A=Thing_Human309639)

2 - When a prisoner has a baby, the baby is not receiving the hediff "child growing" meaning it can move.
Because I have the mod "Prison labor" they can move around my base and access the fridge to get food, after eat, it stay in the fridge until it fall down of hipotermie. If I try to arrest before that happens it can fight back, with is more hilarious cause the baby can seriously injure you.
If I try to force to given the hediff thru Dev mode this error happens.

QuoteException ticking hediff (BabyState ticksSinceCreation=0) for pawn Stepan. Removing hediff... Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Hediff_Baby.TickRare () [0x00084] in <1bcd4ed5171a40d4a2447ffa10e88c86>:0
  at RimWorldChildren.Hediff_Baby.Tick () [0x0001c] in <1bcd4ed5171a40d4a2447ffa10e88c86>:0
  at Verse.Pawn_HealthTracker.HealthTick () [0x00033] in <f022d63938c4495c89633af859c233cf>:0

Also I can't assign it a crib.

Otherwise good work with the mod.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Gutierrez on April 01, 2020, 01:35:06 PM
Can this mod be added to existing saves?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Chezzprinn on April 01, 2020, 06:59:15 PM
Would this work fine with CE?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: heyy on April 02, 2020, 05:40:12 AM
I am running the Royalty expansion and I've found your mod makes me unable to trade with visiting caravans. I have the following other mods installed:

Harmony, Hugslib, Allowtool, Tilled Soil, Hospitality.

It's a slaver caravan, i only have my one starting colonist who is male aged 38. He is a Yeoman with the skill burden. I am in a boreal forest biome.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Ryflamer on April 02, 2020, 06:21:06 PM
While I'm not a C# coder I've messed with HAR related xml quite a bit, so if you're ever interested in getting better compatibility with it. Or if you're interested in updating some of the existing textures for CnP feel free to hit me up on discord as I'd be down to contribute Ryflamer#0175
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on April 02, 2020, 09:45:40 PM
Quote from: Zafireria on March 30, 2020, 02:11:53 PM
Since you have taken over, I was wondering if you plan to add race compatibility. Once you have ironed out the bugs and feel happy with the mod of course.
To the extent that this mod makes it easy for other modders to provide support for their own race, yes. Full support will include custom graphics, which I don't intend to provide. The goal is to have pregnancy be extensible such that a modder may easily (through use of components and inheritance) configure a custom race pregnancy. For example, it should ideally be a minor mod and some graphics to have a pregnancy involve laying an egg instead of a mammalian pregnancy.


Quote from: furel on April 01, 2020, 10:37:31 AM
1- It's something wrong when a pawn is playing with a baby, is like it's getting stuck in playing with the baby but it can easily break the circle and command other task but if the priority of childcare is high enough it can waste time with the baby when it can do other things. Also this error pops-up in the log.

QuoteLucky started 10 jobs in 10 ticks. List: (PlayWithBaby (Job_2104516) A=Thing_Human309639) , (PlayWithBaby (Job_2104519) A=Thing_Human309639) , (PlayWithBaby (Job_2104520) A=Thing_Human309639) , (PlayWithBaby (Job_2104521) A=Thing_Human309639) , (PlayWithBaby (Job_2104523) A=Thing_Human309639) , (PlayWithBaby (Job_2104525) A=Thing_Human309639) , (PlayWithBaby (Job_2104527) A=Thing_Human309639) , (PlayWithBaby (Job_2104529) A=Thing_Human309639) , (PlayWithBaby (Job_2104530) A=Thing_Human309639)  curDriver=JobDriver_PlayWithBaby (toilIndex=3) curJob=(PlayWithBaby (Job_2104530) A=Thing_Human309639)

Childcare is fairly high on the priority list, falling directly below "Doctor." This means that if all priorities are the same, a childcare pawn will choose to take care of children over almost every other possible job. The play job will be performed until the baby's joy meter is full.
I would say that your initial description has it working as designed.
As for the 10 jobs per 10 ticks error, I have a suspicion but haven't confirmed it. It might be that the threshold for starting and stopping the job are the same, causing a pawn to accept and complete the job every tick. I'll see if I can find the cause.


Quote from: furel on April 01, 2020, 10:37:31 AM
2 - When a prisoner has a baby, the baby is not receiving the hediff "child growing" meaning it can move.
Because I have the mod "Prison labor" they can move around my base and access the fridge to get food, after eat, it stay in the fridge until it fall down of hipotermie. If I try to arrest before that happens it can fight back, with is more hilarious cause the baby can seriously injure you.
If I try to force to given the hediff thru Dev mode this error happens.

QuoteException ticking hediff (BabyState ticksSinceCreation=0) for pawn Stepan. Removing hediff... Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Hediff_Baby.TickRare () [0x00084] in <1bcd4ed5171a40d4a2447ffa10e88c86>:0
  at RimWorldChildren.Hediff_Baby.Tick () [0x0001c] in <1bcd4ed5171a40d4a2447ffa10e88c86>:0
  at Verse.Pawn_HealthTracker.HealthTick () [0x00033] in <f022d63938c4495c89633af859c233cf>:0

Also I can't assign it a crib.

Otherwise good work with the mod.
This one is really interesting! Looking at your stack trace, it removed the baby hediff due to an error occurring in the hediff. The new version no longer has that class so I can't exactly replicate that specific error. Further testing show some neat things though.
When I replicated, my baby was born missing the recreation, beauty, comfort, and outdoors needs, which is normal for hostile pawns.

With my setup, a baby born to a prisoner has mom's faction and is hostile to the colony. This brings up a number of questions:
1.Should the baby be hostile until "captured?"
If so, I wonder if pawns will automatically attempt to kill the baby at any point? Technically it's already downed, so I wouldn't think so, but maybe there are other mods that use downed as a status indicator. Would this play nicely with the mod that adds a "finish off" task for downed enemies?
2. Should the baby be automatically "captured" if born to a prisoner? Would this require a prison bed or prison crib to be identified? What if one doesn't exist?
3. What to do about the (probably extremely rare) scenario that a sieger or other invader gives birth while on the map? Based on experience, I am fairly certain the raiders would just abandoned the downed baby. Code would have to be adjusted to avoid giving pawns any childcare jobs for enemy babies!
4. What happens when a baby ages up when assigned to a prison crib? Will we need to reassign them to a prison bed? What if one doesn't exist?

This is a neat problem. I'll see what I can come up with, but baby prisoners are a very odd scenario to begin with, so this might be dropped into a longer term "Feature" list instead of a bug fix. And this is just vanilla, so who knows once you throw in other mods.
Let's put a pin in prison babies for right now. I suggest you toss yours into a nutrient paste dispenser in the meantime, since it's not going to be a hotfix.

Quote from: Gutierrez on April 01, 2020, 01:35:06 PM
Can this mod be added to existing saves?
Not recommended. Version 1.0.0 is still very buggy. Version 2.0.0 is on the way and will introduce save breaking changes as well.
More generally speaking, if you add this to an existing save, any child pawns you currently have will not receive the features that this mod adds. Vanilla only supports pawns age 14+ (I think) so that may not be an issue.

Quote from: Chezzprinn on April 01, 2020, 06:59:15 PM
Would this work fine with CE?
While I've used CE, i don't have a good grasp on what it changes, so I can't say for sure. I used the old version of CNP with CE and never saw any problems myself.

Quote from: heyy on April 02, 2020, 05:40:12 AM
I am running the Royalty expansion and I've found your mod makes me unable to trade with visiting caravans. I have the following other mods installed:

Harmony, Hugslib, Allowtool, Tilled Soil, Hospitality.

It's a slaver caravan, i only have my one starting colonist who is male aged 38. He is a Yeoman with the skill burden. I am in a boreal forest biome.
Can you define "can't trade?" Is there no context menu when right clicking the trader pawn? If there is, is "trade with ..." in the menu? if so, does the colonist walk up and initiate trade with the trader, or just ignores the command? If they walk up, does a onscreen dialog for trading open? Does your pawn have any traits or backstory that disables "social?"
I wasn't able to replicate this with the details provided.

Quote from: Ryflamer on April 02, 2020, 06:21:06 PM
While I'm not a C# coder I've messed with HAR related xml quite a bit, so if you're ever interested in getting better compatibility with it. Or if you're interested in updating some of the existing textures for CnP feel free to hit me up on discord as I'd be down to contribute Ryflamer#0175
Right now I believe alienoid races is patching some of the same methods we are, and based on my current testing, this is causing problems. There are a number of patch changes that will be necessary to (correctly) support alien races, but I haven't taken a super close look at yet. Definitely on the todo list, though.
As for textures, I have no plans to change these just yet. The rendering for a pawn has a ton of graphics for heads, bodies, rotting corpses, skeletal remains, and some other things. It seems CNP attempts to get around all of this by simply hiding the baby's heads and then a handful of custom graphics for bodies, along with the occasional resizing of existing graphics. It's probably worth a review at some point, though.

Quote from: doodoodoo on March 29, 2020, 07:07:45 PM
Quote from: MagicalFungi on March 22, 2020, 11:50:13 PM
added this to an ongoing modded save and had a weird bug while trying to capture fallen enemies with the ui that made it impossible. the popup window for tasks (ie:capture some guy) flashes repeatedly and doesnt work. the window is also slightly offset. when i removed the mod it went back to normal.

hope that helps, GL with the mod. <3

I've had this same issue but I did not add the mod in mid save. The first was when trying to rescue a downed pawn. The option to rescue flickers constantly and I am unable to click the option. The down pawn was from the Androids Tier++ mod. The second time was when a shaman (Rimworld of Magic) hiver (Kenshi Hiver race) trader came in. I could not trade with them because when I right click them, the option flashes constantly. I could, however, trade them if I drafted my pawns. I have this mod loaded toward the bottom of my load order. I hope this helps resolve the issue somewhat.
Several reports for this or similar issues. I haven't seen it in my testing, so it could be interacting poorly with mods that I don't have installed. I have been able to replicate one flashing menu scenario, but it involved non-colonist mom and baby on the same cell, and seemed to be due to non-colonist babies missing some vital components. If the colonist and the trader or downed pawn are older than 14 years old (depending on the race,) I'm not sure why this would happen. CNP bases all of its decisions on the age stage rather than age itself. So if a race defines 150 years old to be age stage 1 (toddler) then CNP will slap a "Baby hediff" on them and disable their work skills.

Quote from: Geese man on March 29, 2020, 07:17:45 PM
So I found another bug when a late stage pregnant colonist ran wild on me.
Infant that are "wild" (from either being born wild or using dev mode to run wild) can walk and appear to be capable of most other things as well (although hard to say since you cant control wild humans) they appear to be able to have all mental breakdowns can be arrested so basically act like a adult pawn but in a infant body.
there seems to be no difference from wild infant being born "naturally" from the mod itself and infant that were spawned using dev tool "T:give birth" (mod spawned infants wont have any stats nor backstory, which the dev spawned ones do have)
They keep the ability to walk after getting tamed and dev mode recruited.

I'll post any more bugs I might find with as much details as I can find.
And thanks for updating this mod.
With my version, babies born to wild women seem to be much like babies born to prisoners, so I will have to look into both at the same time.
It seems these babies are generating without some of the dynamic components they ought to have, such as timetableTracker.
When I forced a colony baby to run wild, the new hediff persisted, so the new system seems to work in that regard.


Thanks for the interest everyone, the reports definitely help. There is only so much one person can test in a short time when working with a game like this, so there will always be things I miss.
2.0.0 will drop soon with some of the most egregious bugs corrected, but it looks like there needs to be a pretty solid road map to integrate with other vital mods.

Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: lbmaian on April 03, 2020, 02:50:38 AM
Oh hey, glad to see someone picked this up.

I was working on updating C&P last year, but lost my source due to a hardware failure, got demotivated and distracted by other modding projects, and only was trying to reconstruct my changes out of sense of obligation of sorts, and at a very low priority at that. I'm pretty relieved that someone's now actually working on and maintaining this "full time".

I don't know how much of my changes are still applicable, but here's the only commits I have that have actual changes (which I've just pushed to gitlab):

Given the 1.1 migration and your other code changes, these commits aren't really mergeable for you, but hopefully, they'll prove helpful. The code audit in particular points out some obvious bugs that should be addressed.

Since I've kinda lost interest in C&P, I probably won't be actively helping out or testing, but if you have any questions, you can contact me on Discord at lbmaian#4515
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: furel on April 03, 2020, 08:28:10 AM
Quote from: Tragix on April 02, 2020, 09:45:40 PM

Childcare is fairly high on the priority list, falling directly below "Doctor." This means that if all priorities are the same, a childcare pawn will choose to take care of children over almost every other possible job. The play job will be performed until the baby's joy meter is full.
I would say that your initial description has it working as designed.
As for the 10 jobs per 10 ticks error, I have a suspicion but haven't confirmed it. It might be that the threshold for starting and stopping the job are the same, causing a pawn to accept and complete the job every tick. I'll see if I can find the cause.


I have more information about this problem. When a pawn try to play with the baby, he/she start the task and immediately stops and starts again and then stops and repeat this circle, as a result the baby don't fill the recreation need and the pawn can't leave and the baby don't stop to crying, oh my god, that's the most annoying part.
Sometimes they can visit the baby as a hospitalized pawn was and fill the recreation need, which is other thing. Because it treat like a hospitalized pawn, they pick the baby from the crib, carry the baby to hospital bed, feed the baby and some times return to the crib, some times not.

About the prisoner babies, I think they should not be hostile, if it works correct they can't do anything, so kill the baby is something you need to do as direct order or if other mod is interfering.
Right now when a prisoner give birth, the baby is automatically target as prisoner, even if I don't have any crib or bed available, I think it should be in this way. But if I want to take care about that baby, I should have an option to immediately recruitment, because right now I have to persuade a newborn to join my faction.

I hope this information can help you.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 03, 2020, 04:29:31 PM
Quote from: furel on April 03, 2020, 08:28:10 AM
Quote from: Tragix on April 02, 2020, 09:45:40 PM

Childcare is fairly high on the priority list, falling directly below "Doctor." This means that if all priorities are the same, a childcare pawn will choose to take care of children over almost every other possible job. The play job will be performed until the baby's joy meter is full.
I would say that your initial description has it working as designed.
As for the 10 jobs per 10 ticks error, I have a suspicion but haven't confirmed it. It might be that the threshold for starting and stopping the job are the same, causing a pawn to accept and complete the job every tick. I'll see if I can find the cause.


I have more information about this problem. When a pawn try to play with the baby, he/she start the task and immediately stops and starts again and then stops and repeat this circle, as a result the baby don't fill the recreation need and the pawn can't leave and the baby don't stop to crying, oh my god, that's the most annoying part.
Sometimes they can visit the baby as a hospitalized pawn was and fill the recreation need, which is other thing. Because it treat like a hospitalized pawn, they pick the baby from the crib, carry the baby to hospital bed, feed the baby and some times return to the crib, some times not.

About the prisoner babies, I think they should not be hostile, if it works correct they can't do anything, so kill the baby is something you need to do as direct order or if other mod is interfering.
Right now when a prisoner give birth, the baby is automatically target as prisoner, even if I don't have any crib or bed available, I think it should be in this way. But if I want to take care about that baby, I should have an option to immediately recruitment, because right now I have to persuade a newborn to join my faction.

I hope this information can help you.

I don't think any other faction besides your faction is supposed to have pregnant humans, at least that's what I think is most logical (to avoid things like what you described). now assuming that is true, prisoners from any other faction should not be able to be pregnant thus giving birth should be impossible without developer mode interference, thus there should be no need for any "fixes" as its not intended to work that way.
now if it did happen without developer mode or other mods that might have caused it I don't think that be able to straight recruit them should be a thing, would rather like it to be that the baby would be a prisoner from birth immediately but instead of having to recruit it you can take it away from the mother and raise it like a colonist giving the mom (and potentially also imprisoned dad) a debuff something like "-15 child taken from me" or something, with the child having no knowledge of its parents if taken away (easy way would be to simply clear the pawns social log after birth) perhaps no debuff if they got postpartum depression?, but since am fairly convinced it shouldn't happen unless you have a pregnant colonist run wild and you arrest her that any prisoners should be able to give birth.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Zafireria on April 03, 2020, 04:37:51 PM
Quote from: Tragix on April 02, 2020, 09:45:40 PM
Quote from: Zafireria on March 30, 2020, 02:11:53 PM
Since you have taken over, I was wondering if you plan to add race compatibility. Once you have ironed out the bugs and feel happy with the mod of course.
To the extent that this mod makes it easy for other modders to provide support for their own race, yes. Full support will include custom graphics, which I don't intend to provide. The goal is to have pregnancy be extensible such that a modder may easily (through use of components and inheritance) configure a custom race pregnancy. For example, it should ideally be a minor mod and some graphics to have a pregnancy involve laying an egg instead of a mammalian pregnancy.

That sounds great. I assume that should the modder not have added any support, that this mod at least prevents the offspring from breaking or something? I tried using this mod while using custom races and it seems to just ignore them, which is good. I just hope the modders will add support when that's possible.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: furel on April 03, 2020, 05:46:09 PM
Quote from: Geese man on April 03, 2020, 04:29:31 PM

I don't think any other faction besides your faction is supposed to have pregnant humans, at least that's what I think is most logical (to avoid things like what you described). now assuming that is true, prisoners from any other faction should not be able to be pregnant thus giving birth should be impossible without developer mode interference, thus there should be no need for any "fixes" as its not intended to work that way.
now if it did happen without developer mode or other mods that might have caused it I don't think that be able to straight recruit them should be a thing, would rather like it to be that the baby would be a prisoner from birth immediately but instead of having to recruit it you can take it away from the mother and raise it like a colonist giving the mom (and potentially also imprisoned dad) a debuff something like "-15 child taken from me" or something, with the child having no knowledge of its parents if taken away (easy way would be to simply clear the pawns social log after birth) perhaps no debuff if they got postpartum depression?, but since am fairly convinced it shouldn't happen unless you have a pregnant colonist run wild and you arrest her that any prisoners should be able to give birth.

Is true I use other mod that manages the pregnancy business, however I haved a slaves prisoners that had a romance while holding them at my base, so it seems a possibility.
I don't know if this is a feature that brings other mod, but I needed to imprisonment one of my pregnant colonist and give birth while was prisoner and the same thing happens, the baby don't recibe the hediff.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 03, 2020, 09:05:06 PM
Quote from: furel on April 03, 2020, 05:46:09 PM
Quote from: Geese man on April 03, 2020, 04:29:31 PM

I don't think any other faction besides your faction is supposed to have pregnant humans, at least that's what I think is most logical (to avoid things like what you described). now assuming that is true, prisoners from any other faction should not be able to be pregnant thus giving birth should be impossible without developer mode interference, thus there should be no need for any "fixes" as its not intended to work that way.
now if it did happen without developer mode or other mods that might have caused it I don't think that be able to straight recruit them should be a thing, would rather like it to be that the baby would be a prisoner from birth immediately but instead of having to recruit it you can take it away from the mother and raise it like a colonist giving the mom (and potentially also imprisoned dad) a debuff something like "-15 child taken from me" or something, with the child having no knowledge of its parents if taken away (easy way would be to simply clear the pawns social log after birth) perhaps no debuff if they got postpartum depression?, but since am fairly convinced it shouldn't happen unless you have a pregnant colonist run wild and you arrest her that any prisoners should be able to give birth.

Is true I use other mod that manages the pregnancy business, however I haved a slaves prisoners that had a romance while holding them at my base, so it seems a possibility.
I don't know if this is a feature that brings other mod, but I needed to imprisonment one of my pregnant colonist and give birth while was prisoner and the same thing happens, the baby don't recibe the hediff.

Now as far as i know the "loving" interaction requires a double bed which i don't think is being used by a lot of people in prisons as imprisoned pairs are pretty rare i would say, most common would be a colonist pair that got arrested to stop a mental break or something but then the baby should belong to your faction already anyway. ok so I just tested 2 scenario's I had colonist couple simply arrested them and gave them a double bed to my luck they did some lovin first night and the woman got pregnant, I developer mode added the hediff "birth soon" to cut the pregnancy short. baby works as intended gets taken to a normal prisoner bed and cant move(this rules out that being a prisoner has anything to do with this, at least in my case). perhaps you could tell which mods you are using? I also tested this with the pirate faction simply spawned 2 pawns arrested them and gave them a relation ship and enabled the always do lovin option (not the case with the colonists) that baby had the issues you described(so I don't know if married pawns from other faction would do the lovin act naturally in prison), thus Tragix this will need a fix although this is not a high priority as it should be a very rare scenario in most playthroughs.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Third_Of_Five on April 03, 2020, 10:25:46 PM
Are there multiple people developing this, or is it just you at the moment? I've been looking through your repo on gitlab and I'd be interested in helping out working on this mod if you'd like my help.

What development environment do you use? Visual Studio? Will MonoDevelop work?
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: netenugu on April 04, 2020, 07:02:26 AM
Long-term suggestion: Is it possible, without duplicating all the items, to make children's clothing weigh less? Especially when it comes to armor. Thickness of material (and thus armor values) could stay the same, but it would still be smaller.

With the current version, even pawns capable of breastfeeding sometimes use meals to feed babies. What a waste  ;D
And if you use milkable colonists, milk fulness doesn't decrease while breastfeeding. I guess not many people use milkable colonists, so compatibility shouldn't be a high priority, but it would be neat  ;D

Is it possible to imprison babies? Like if it has inwanted traits and you don't want to feed it for years, it would be interesting to just sell it asap.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: furel on April 04, 2020, 07:49:07 AM
Quote from: Geese man on April 03, 2020, 09:05:06 PM
Now as far as i know the "loving" interaction requires a double bed which i don't think is being used by a lot of people in prisons as imprisoned pairs are pretty rare i would say, most common would be a colonist pair that got arrested to stop a mental break or something but then the baby should belong to your faction already anyway. ok so I just tested 2 scenario's I had colonist couple simply arrested them and gave them a double bed to my luck they did some lovin first night and the woman got pregnant, I developer mode added the hediff "birth soon" to cut the pregnancy short. baby works as intended gets taken to a normal prisoner bed and cant move(this rules out that being a prisoner has anything to do with this, at least in my case). perhaps you could tell which mods you are using? I also tested this with the pirate faction simply spawned 2 pawns arrested them and gave them a relation ship and enabled the always do lovin option (not the case with the colonists) that baby had the issues you described(so I don't know if married pawns from other faction would do the lovin act naturally in prison), thus Tragix this will need a fix although this is not a high priority as it should be a very rare scenario in most playthroughs.

I use RimJobWorld, that why my prisoners can be pregnant.
Tragix said he change for 2.0 how the hediff works for the babies, so now maybe works, maybe don't. I found an error message appears when I force to give the hediff that forces the newborn to stay in place and I thought it was a good idea to report. Tragix already said it is something he could implement or not.

The real problem I hope is resolved in 2.0 is the "play with baby" task, that my colonist paws have with my colonist babies trying to play, but stopping and try again and don't filling the need.
Also mothers prefers give cooked food instead of breastfeeding, this is something it could save food in some scenarios with low resources.

The second thing i'm worry about is if is needed a new game for the 2.0
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 04, 2020, 08:39:34 AM
Quote from: furel on April 04, 2020, 07:49:07 AM
Quote from: Geese man on April 03, 2020, 09:05:06 PM
Now as far as i know the "loving" interaction requires a double bed which i don't think is being used by a lot of people in prisons as imprisoned pairs are pretty rare i would say, most common would be a colonist pair that got arrested to stop a mental break or something but then the baby should belong to your faction already anyway. ok so I just tested 2 scenario's I had colonist couple simply arrested them and gave them a double bed to my luck they did some lovin first night and the woman got pregnant, I developer mode added the hediff "birth soon" to cut the pregnancy short. baby works as intended gets taken to a normal prisoner bed and cant move(this rules out that being a prisoner has anything to do with this, at least in my case). perhaps you could tell which mods you are using? I also tested this with the pirate faction simply spawned 2 pawns arrested them and gave them a relation ship and enabled the always do lovin option (not the case with the colonists) that baby had the issues you described(so I don't know if married pawns from other faction would do the lovin act naturally in prison), thus Tragix this will need a fix although this is not a high priority as it should be a very rare scenario in most playthroughs.

I use RimJobWorld, that why my prisoners can be pregnant.
Tragix said he change for 2.0 how the hediff works for the babies, so now maybe works, maybe don't. I found an error message appears when I force to give the hediff that forces the newborn to stay in place and I thought it was a good idea to report. Tragix already said it is something he could implement or not.

The real problem I hope is resolved in 2.0 is the "play with baby" task, that my colonist paws have with my colonist babies trying to play, but stopping and try again and don't filling the need.
Also mothers prefers give cooked food instead of breastfeeding, this is something it could save food in some scenarios with low resources.

The second thing i'm worry about is if is needed a new game for the 2.0

Thirite made the original mod for rimworld 1.0 incompatible with RJW, now he said that it would simply stop RJW from loading (since he did not like bestiality & furry stuff etc to be used with this mod). now am not exactly sure what changed with the 1.1 royalty update but it seems that with updating this mod that is removed. So in conclusion this mod was never meant to be used along side RJW, although the issues you have are the same for me and my modlist is this mod with some mods that only enhance vanilla mechanics so its not RJW directly screwing things up it just creates scenarios that otherwise would be very rare.

Now the breast feeding issue is actually quite simple to explain since breastfeeding is not a vanilla thing but feeding is pawns will simply prefer to feed meals as they are not made to breastfeed vanilla wise, just micro the breastfeeding is the only advice I can give.

and tragix already said that the 2.0 version will be game breaking so you will have to restart.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on April 04, 2020, 10:58:14 AM
Quote from: lbmaian on April 03, 2020, 02:50:38 AM
Oh hey, glad to see someone picked this up.

I was working on updating C&P last year, but lost my source due to a hardware failure, got demotivated and distracted by other modding projects, and only was trying to reconstruct my changes out of sense of obligation of sorts, and at a very low priority at that. I'm pretty relieved that someone's now actually working on and maintaining this "full time".

I don't know how much of my changes are still applicable, but here's the only commits I have that have actual changes (which I've just pushed to gitlab):

  • Update XML from ~A16-B18 to R1.0 balance and standards, including CDATA-commenting out vanilla def overwriting, and add some TODOs
    https://gitlab.com/lbmaian/children-and-pregnancy-collab/-/commit/f2f3092476c1e50216fe0db812ea1f7c2a599b72
  • Use single Harmony instance, use HarmonyTranspiler instead of manual patching
    https://gitlab.com/lbmaian/children-and-pregnancy-collab/-/commit/1ff9380b76134f9f563502d0c8f535b43db79b4e
  • Code audit: lots of TODOs and code documenting, including transpiler patch analysis, couple minor renames and constant usages (no functional changes in code)
    https://gitlab.com/lbmaian/children-and-pregnancy-collab/-/commit/24592bbe79ea70db0e753055b03f8ce4f2f6e77f

Given the 1.1 migration and your other code changes, these commits aren't really mergeable for you, but hopefully, they'll prove helpful. The code audit in particular points out some obvious bugs that should be addressed.

Since I've kinda lost interest in C&P, I probably won't be actively helping out or testing, but if you have any questions, you can contact me on Discord at lbmaian#4515
Definitely useful notes. I'll look into them when I get around to code cleanup, looks like there is probably several days or more of work there.

Quote from: furel on April 03, 2020, 08:28:10 AM

I have more information about this problem. When a pawn try to play with the baby, he/she start the task and immediately stops and starts again and then stops and repeat this circle, as a result the baby don't fill the recreation need and the pawn can't leave and the baby don't stop to crying, oh my god, that's the most annoying part.
Sometimes they can visit the baby as a hospitalized pawn was and fill the recreation need, which is other thing. Because it treat like a hospitalized pawn, they pick the baby from the crib, carry the baby to hospital bed, feed the baby and some times return to the crib, some times not.

I hope this information can help you.
I think I've got the issue where the caretaker shuffles the baby around during feeding resolved.
I have not been able to replicate the issue with the play with baby job. There are already checks that should prevent it from being immediately reassigned, so I can only assume one of the job fail conditions is being triggered, and then the job is reassigned for round 2+. The only fail conditions I see are if baby is no longer awake or in bed.


Quote from: Geese man on April 03, 2020, 09:05:06 PM
Now as far as i know the "loving" interaction requires a double bed which i don't think is being used by a lot of people in prisons as imprisoned pairs are pretty rare i would say, most common would be a colonist pair that got arrested to stop a mental break or something but then the baby should belong to your faction already anyway. ok so I just tested 2 scenario's I had colonist couple simply arrested them and gave them a double bed to my luck they did some lovin first night and the woman got pregnant, I developer mode added the hediff "birth soon" to cut the pregnancy short. baby works as intended gets taken to a normal prisoner bed and cant move(this rules out that being a prisoner has anything to do with this, at least in my case). perhaps you could tell which mods you are using? I also tested this with the pirate faction simply spawned 2 pawns arrested them and gave them a relation ship and enabled the always do lovin option (not the case with the colonists) that baby had the issues you described(so I don't know if married pawns from other faction would do the lovin act naturally in prison), thus Tragix this will need a fix although this is not a high priority as it should be a very rare scenario in most playthroughs.
For the time being, I will disable pregnancy from non-player factions. Definitely a short term thing, but I would like to improve stability quickly while working through compatibility and bugs.
I will possibly do something similar for prisoners for a while as well. Or perhaps forcefully delay birth until such a time that a colonist is no longer a prisoner. If the player were to leave that colonist imprisoned for years it would certainly make for a strange pregnancy, but it might be preferable to broken pawns, messed up saves, or other unnecessary bugs.

Quote from: Third_Of_Five on April 03, 2020, 10:25:46 PM
Are there multiple people developing this, or is it just you at the moment? I've been looking through your repo on gitlab and I'd be interested in helping out working on this mod if you'd like my help.

What development environment do you use? Visual Studio? Will MonoDevelop work?
Currently just myself. I use visual studio.
You are welcome to make pull requests if you like, but I don't have contribution guidelines up yet, and will probably not prioritize them until some of the larger renovations are complete.

Quote from: netenugu on April 04, 2020, 07:02:26 AM
Long-term suggestion: Is it possible, without duplicating all the items, to make children's clothing weigh less? Especially when it comes to armor. Thickness of material (and thus armor values) could stay the same, but it would still be smaller.

With the current version, even pawns capable of breastfeeding sometimes use meals to feed babies. What a waste  ;D
And if you use milkable colonists, milk fulness doesn't decrease while breastfeeding. I guess not many people use milkable colonists, so compatibility shouldn't be a high priority, but it would be neat  ;D

Is it possible to imprison babies? Like if it has inwanted traits and you don't want to feed it for years, it would be interesting to just sell it asap.
Mass is handled by XML defs, which are configured game-wide rather than per pawn instance. It might be possible to do something hokey with patching the mass get methods on ThingDef, though. It's not a bad idea for a feature.

Baby imprisonment is a hot topic right now. As a general sweeping statement, I suggest you avoid baby prisoners for the time being. Too many variables and has not been properly handled or tested yet.

My expectation of a mod like this is to provide an API for pregnancy, birth, and childhood for all non-animal pawns. It will fall on other mods to choose to support or utilize CNP. Alternatively, and perhaps preferably, an extension or patch could be made for mods like milkable colonists that allows it to interact with CNP. In no (current) case do I want to see mod support brought directly into CNP, as it causes unnecessary bloat.

Quote from: Geese man on April 04, 2020, 08:39:34 AM

Thirite made the original mod for rimworld 1.0 incompatible with RJW, now he said that it would simply stop RJW from loading (since he did not like bestiality & furry stuff etc to be used with this mod). now am not exactly sure what changed with the 1.1 royalty update but it seems that with updating this mod that is removed. So in conclusion this mod was never meant to be used along side RJW, although the issues you have are the same for me and my modlist is this mod with some mods that only enhance vanilla mechanics so its not RJW directly screwing things up it just creates scenarios that otherwise would be very rare.

Now the breast feeding issue is actually quite simple to explain since breastfeeding is not a vanilla thing but feeding is pawns will simply prefer to feed meals as they are not made to breastfeed vanilla wise, just micro the breastfeeding is the only advice I can give.

and tragix already said that the 2.0 version will be game breaking so you will have to restart.
RJW appears to have copied the original code from CNP and revised it to suit their needs. I have referenced the mod in order to identify some of the author's pain points that prompted them to override CNP. While I am probably not providing everything they need yet, steps are being taken to allow better integration between broader mods like RJW and CNP.
With that said, RJW attempts to do far to much. It missed a golden opportunity to be a generic lovin' extension framework and instead attempts to support every micro-niche fetish possible, as well as implementing it's own handler for pregnancy and birth. All of that is well and good for a mod, but modularity improves compatibility. Last I recall, RJW explicitly prevents CNP pregnancy from occurring. It should effectively be considered a hard incompatibility with CNP until that is corrected. My goal is to be able to integrate with the mod, but integration must come from the client side, not the API side.

I don't see anything in the code for CNP that disables RJW, though I do recall some measure of backlash from a couple years back, maybe. It is not for a modder or mod to dictate morality. There are only rare cases in which it is justifiable for a mod to forcefully make itself incompatible with another mod, and there is no justification for causing harm or destruction to a player's game due to personal beliefs.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 04, 2020, 11:08:16 AM
to clarify colonist prisoners do not appears to give birth to "broken" babies (even whilst still imprisoned) thus you only have to worry about imprisoned pawns from other factions.

And for what I read in the original mod reply list thirite only made his mod to stop RJW from loading and the save so it would not break anything, you would just have to disable 1 of the 2 and it would work again, but that's what I understood from it you can read the whole thing starting at page 10, starting with a user asking if the mod would be made compatible with the alien framework mod.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on April 04, 2020, 02:13:13 PM
I've released version 2.0.0 on the gitlab releases page:
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v2.0.0

As with all changes, use at your own risk and keep backups of your save files before installing any new versions.
This version is backwards incompatible. It will not work with previous save files, and requires a new game to work properly.

In the future I will try to limit save breaking changes, though they will be less necessary as the mod reaches stability.
During testing, I noticed that when a child pawn spawns in caravans or from other sources, alien races framework starts spitting out rendering errors. For me this was fixed by selecting the broken pawn. Not sure if this is a newly introduced error, as I was not testing with alien races prior to these changes. I've looked into it, but so far I have not been able to identify the issue. Both mods have transpiler patches on the same pawn rendering method, but I don't suspect that is the problem.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 04, 2020, 04:39:15 PM
you forgot to update the version in the about.xml to v2.0.0,

its also keeping pawns incapacitated when they have no hediff (see screenshots)
the colonist had given birth a few days ago with the "birth soon" hediff.
the pirate was spawned using"spawn pawn" "trasher" then downed using "T: damage legs" then got captured but never showed any injuries immediately after capture. log did not show anything out of the ordinary.
Alright did a little testing:
the colonist was treated like a patient recreation wise (would be cheered up by other colonists) however she would not be fed by the doctor, this led to her starving. I added the birth soon hediff on her again to see if it would maybe fix it, and it sort of did: she miscarried due to being malnourished which also made her able to walk again.
as for the prisoner I also gave it the "birth soon" hediff and removed it which fixed the issue.
so it appears that if female pawns (don't know about about male pawns) get incapacitated they can sometimes stay stuck as incapacitated incorrectly (yes sometimes, tried with another spawned thrasher which did start walking soon after with the correct injuries)
So more testing later this incapacitated after birth long after recovering from birth hediff is gone problem is colonist only it seems, both a wild woman and a tribal gave birth and started walking after the hediff was gone without issue. Ok to prevent the incapacitation to stay simply remove ANY hediff that incapacitates before the "recovering from birth" disappears (colonist had a catatonic breakdown which I removed after I had her give birth and let the rfb go away naturally, she started walking right after)
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: xrogaan on April 04, 2020, 05:10:42 PM
Quote from: Geese man on April 04, 2020, 04:39:15 PM
you forgot to update the version in the about.xml to v2.0.0


And the topic's.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: GhostData on April 04, 2020, 06:59:00 PM
Quote from: Geese man on April 04, 2020, 04:39:15 PM
you forgot to update the version in the about.xml to v2.0.0,

its also keeping pawns incapacitated when they have no hediff (see screenshots)
the colonist had given birth a few days ago with the "birth soon" hediff.
the pirate was spawned using"spawn pawn" "trasher" then downed using "T: damage legs" then got captured but never showed any injuries immediately after capture. log did not show anything out of the ordinary.
Alright did a little testing:
the colonist was treated like a patient recreation wise (would be cheered up by other colonists) however she would not be fed by the doctor, this led to her starving. I added the birth soon hediff on her again to see if it would maybe fix it, and it sort of did: she miscarried due to being malnourished which also made her able to walk again.
as for the prisoner I also gave it the "birth soon" hediff and removed it which fixed the issue.
so it appears that if female pawns (don't know about about male pawns) get incapacitated they can sometimes stay stuck as incapacitated incorrectly (yes sometimes, tried with another spawned thrasher which did start walking soon after with the correct injuries)
So more testing later this incapacitated after birth long after recovering from birth hediff is gone problem is colonist only it seems, both a wild woman and a tribal gave birth and started walking after the hediff was gone without issue. Ok to prevent the incapacitation to stay simply remove ANY hediff that incapacitates before the "recovering from birth" disappears (colonist had a catatonic breakdown which I removed after I had her give birth and let the rfb go away naturally, she started walking right after)
I might have forgot to build after updating the version for release. I just uploaded 2.0.1 to fix the pawn insta-heal shortly after generation. The comp I add on pawn generation did not have a check to prevent it form removing  all hediffs from a newly generated pawn, so spawning someone in while paused and then downing them would cause them to immediately heal once the comp initialized.

As for the permanently downed pawn, I saw this consistently during play testing and thought I had fixed it - I can no longer replicate it the way I had previously.
I took a female colonist, added the birth soon hediff to her, let the doctors whisk are to a bed and then let them deliver. She received the post pregnancy hediff and about 3-ish hours later it is removed and she recovers.
Title: Re: [1.1] Children and Pregnancy - v1.0.0
Post by: Geese man on April 04, 2020, 07:28:50 PM
Quote from: Tragix on April 04, 2020, 06:59:00 PM
Quote from: Geese man on April 04, 2020, 04:39:15 PM
you forgot to update the version in the about.xml to v2.0.0,

its also keeping pawns incapacitated when they have no hediff (see screenshots)
the colonist had given birth a few days ago with the "birth soon" hediff.
the pirate was spawned using"spawn pawn" "trasher" then downed using "T: damage legs" then got captured but never showed any injuries immediately after capture. log did not show anything out of the ordinary.
Alright did a little testing:
the colonist was treated like a patient recreation wise (would be cheered up by other colonists) however she would not be fed by the doctor, this led to her starving. I added the birth soon hediff on her again to see if it would maybe fix it, and it sort of did: she miscarried due to being malnourished which also made her able to walk again.
as for the prisoner I also gave it the "birth soon" hediff and removed it which fixed the issue.
so it appears that if female pawns (don't know about about male pawns) get incapacitated they can sometimes stay stuck as incapacitated incorrectly (yes sometimes, tried with another spawned thrasher which did start walking soon after with the correct injuries)
So more testing later this incapacitated after birth long after recovering from birth hediff is gone problem is colonist only it seems, both a wild woman and a tribal gave birth and started walking after the hediff was gone without issue. Ok to prevent the incapacitation to stay simply remove ANY hediff that incapacitates before the "recovering from birth" disappears (colonist had a catatonic breakdown which I removed after I had her give birth and let the rfb go away naturally, she started walking right after)
I might have forgot to build after updating the version for release. I just uploaded 2.0.1 to fix the pawn insta-heal shortly after generation. The comp I add on pawn generation did not have a check to prevent it form removing  all hediffs from a newly generated pawn, so spawning someone in while paused and then downing them would cause them to immediately heal once the comp initialized.

As for the permanently downed pawn, I saw this consistently during play testing and thought I had fixed it - I can no longer replicate it the way I had previously.
I took a female colonist, added the birth soon hediff to her, let the doctors whisk are to a bed and then let them deliver. She received the post pregnancy hediff and about 3-ish hours later it is removed and she recovers.
hmm strange. on the other hand the feeding bug i have complained about before can now occur and even crash my game (although with the use of the "achtung" mod force) and babies will still be taken to hospital beds and be fed by doctors in their assigned cribs when they are not injured and the doctor is not assigned to child caring, I suggest you make a entirely new state a pawn can be in that will incapacitate them but not in a way doctor will try to "tend" to them in the form of feeding (disable even "rescue" from them to avoid any doctor issues) and only make pawns able to tuck in babies (if they have no injuries ofc) now that might potentially create some minor issues if there are no cribs available but that shouldnt be to hard to fix I think.
I can provide a savefile from a game I saved just on the moment the feeding bug was happening might be of use dm me if you want it.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Third_Of_Five on April 04, 2020, 09:03:57 PM
Been doing some testing with the new release and it looks like the trait inheritance system is broken. I'll post screenshots and send a .rws if you want.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: JMan1008 on April 04, 2020, 10:10:18 PM
So I have a bit of a strange issue in my current save file. I updated to 2.0.1 and now all the androids from the Android Tiers mod are being flagged as children. This didn't happen in 1.0.0 so I guess something you changed for the update borked the androids (since they're all under 10 years old). For now, I have every android that enters the map getting incapacitated upon entry. Any way you guys could fix this issue would be amazing
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Headshotkill on April 05, 2020, 08:00:47 AM
This mod conflicts with Androids mod, all androids act as babies even though some of them are biologically over a century old. This didn't happen in 1.0, atleast not this severe, back them people with childcare jobs would carry androids to cribs though.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: dusiiaczek on April 05, 2020, 09:16:52 AM
I have a weird problem with mod not related to babies. There is some "exception ticking" error that causes when a trader arrives some pawns drop their stuff and leave the map. I don't know if this is because of a conflict with some of my other mods, but when I removed CnP this stopped occurring.
So this happened https://i.imgur.com/ttLzJP0.png (https://i.imgur.com/ttLzJP0.png) and logs https://gist.github.com/HugsLibRecordKeeper/9fe91a641a0263597907156ab7ecef0c (https://gist.github.com/HugsLibRecordKeeper/9fe91a641a0263597907156ab7ecef0c)
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: GhostData on April 05, 2020, 10:50:44 AM
Quote from: dusiiaczek on April 05, 2020, 09:16:52 AM
I have a weird problem with mod not related to babies. There is some "exception ticking" error that causes when a trader arrives some pawns drop their stuff and leave the map. I don't know if this is because of a conflict with some of my other mods, but when I removed CnP this stopped occurring.
So this happened https://i.imgur.com/ttLzJP0.png (https://i.imgur.com/ttLzJP0.png) and logs https://gist.github.com/HugsLibRecordKeeper/9fe91a641a0263597907156ab7ecef0c (https://gist.github.com/HugsLibRecordKeeper/9fe91a641a0263597907156ab7ecef0c)
That would be the incompatibility with Alien Races. Will work on it.
Looks like androids from Android Tiers have only one life stage, which doesn't play well with how we currently determine race life stages. I could change it to look for specific life stage defs which would fix this scenario, but would lock us in on human lifestage defs, causing any mod that rolls their own to be excluded. There will not be a way to get around this for every race without the respective authors providing a patch.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: GhostData on April 05, 2020, 04:46:00 PM
Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Third_Of_Five on April 05, 2020, 05:18:40 PM
Quote from: Tragix on April 05, 2020, 04:46:00 PM
Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**

Downloaded the newest version, it seems this has broken some stuff. Namely it makes it so that the MoveBabyToBedAndFeed job is now the only way to feed babies. The BreastFeed job doesn't work at all and it seems the new HealthAIUtility patches you added prevent the FoodFeedPatient job from being called to feed babies that are not sick.

What I think needs to be done is that a new FeedBaby job needs to be implemented to do what FoodFeedPatient used to be relied upon for. Cuz now with the new health ai patch, any jobs related to doctoring are not called unless the baby is sick and in a medical bed.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: GhostData on April 05, 2020, 05:48:04 PM
Quote from: Third_Of_Five on April 05, 2020, 05:18:40 PM
Quote from: Tragix on April 05, 2020, 04:46:00 PM
Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**

Downloaded the newest version and the bug still happens.
Ah, sorry, reread your post a few times and finally understood the bug you were referring to. I think you should be able to open a pull request from your own fork without any special permissions, assuming you forked my repo or the original source.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Third_Of_Five on April 05, 2020, 05:56:07 PM
Quote from: Tragix on April 05, 2020, 05:48:04 PM
Ah, sorry, reread your post a few times and finally understood the bug you were referring to. I think you should be able to open a pull request from your own fork without any special permissions, assuming you forked my repo or the original source.

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: GhostData on April 05, 2020, 06:03:31 PM
Quote from: Third_Of_Five on April 05, 2020, 05:56:07 PM

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.
You can open a PR from fork to fork without being added to the repo in question.
(https://puu.sh/FtEyZ/8cd20208ee.png)
Title: Re: [1.1] Children and Pregnancy - v2.0.1
Post by: Third_Of_Five on April 05, 2020, 06:08:09 PM
Quote from: Tragix on April 05, 2020, 06:03:31 PM
Quote from: Third_Of_Five on April 05, 2020, 05:56:07 PM

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.
You can open a PR from fork to fork without being added to the repo in question.

Oh, really? I didn't know that.
Cool.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Third_Of_Five on April 05, 2020, 06:12:47 PM
*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: GhostData on April 05, 2020, 07:11:47 PM
Quote from: Third_Of_Five on April 05, 2020, 06:12:47 PM
*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.
With the 2.0.2, baby feeding is handled through the moveBabyToCribAndFeed job. I'll revise once your PR is merged
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Third_Of_Five on April 05, 2020, 08:11:11 PM
Quote from: Tragix on April 05, 2020, 07:11:47 PM
Quote from: Third_Of_Five on April 05, 2020, 06:12:47 PM
*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.
With the 2.0.2, baby feeding is handled through the moveBabyToCribAndFeed job. I'll revise once your PR is merged

Currently working on a fix for that right now, will make a PR when it's ready
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: GhostData on April 05, 2020, 09:10:41 PM
Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.
I think the dropping gear problem is probably due to placing the new growing component on all newly generated pawns. A pawn who isnt an adult will briefly receive the baby hediff and collapse before recovering. I'll get a fix out tomorrow.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Geese man on April 05, 2020, 09:20:00 PM
Quote from: Tragix on April 05, 2020, 09:10:41 PM
Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.
I think the dropping gear problem is probably due to placing the new growing component on all newly generated pawns. A pawn who isnt an adult will briefly receive the baby hediff and collapse before recovering. I'll get a fix out tomorrow.
no there is no collapsing if there is it would be really really really fast cause i cannot see it and there are never any naked pawns neither walking or collapsed or they leave before they rendered maybe?
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Third_Of_Five on April 05, 2020, 10:54:21 PM
I implemented a fix for the MoveBabyToBedAndFeed bug and I implemented a new FoodFeedBaby job to replace the vanilla FoodFeedPatient job that was being used before as a crutch for feeding children in bed. Now, you no longer have to assign pawns to doctoring in order to get them to feed children.

Submitted an MR in gitlab for Tragix to review
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Third_Of_Five on April 06, 2020, 10:36:28 AM
Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")

Implemented a fix for this, added it to my MR
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: hades7600 on April 06, 2020, 01:49:16 PM
Is this not compatible with andriod mods? my andriods are now acting like babies and can't do anything
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: hades7600 on April 06, 2020, 01:50:07 PM
Does this not work with andriods? my andriods have collapsed and are acting like children
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: GhostData on April 06, 2020, 03:42:45 PM
Quote from: hades7600 on April 06, 2020, 01:50:07 PM
Does this not work with andriods? my andriods have collapsed and are acting like children
Nope, not yet. This mod currently uses age stage indexes to determine if a pawn is a baby or not. Androids only have one age stage, and so the mod thinks they are infants. I'll have a quick fix out some time today.
Long term, only races that closely mimic humans are are human like will have native support. Anything that deviates too far will have to have custom patches no matter how flexible CNP is.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: TheBadiator on April 07, 2020, 01:24:43 AM
Hey, love the Mod. Thank you for updating it.

So, I've encountered a bug, where if a Pregnant Pawn goes into labour while in a caravan, she will not actually give birth, and she will be stuck with the "Giving Birth" widget in her health tab. No new baby. Not pregnant once back at the settlement.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Geese man on April 07, 2020, 01:02:16 PM
can it be made that a pawn with a royal title doesn't mind having his/her own baby in their room, got a daze because my praetor did not have his own room whilst he only shared it with his wife and newborn son.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: Third_Of_Five on April 07, 2020, 01:06:18 PM
Quote from: Geese man on April 07, 2020, 01:02:16 PM
can it be made that a pawn with a royal title doesn't mind having his/her own baby in their room, got a daze because my praetor did not have his own room whilst he only shared it with his wife and newborn son.

Making this compatible with royalty is probably going to be a whole separate update of its own
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: GhostData on April 07, 2020, 06:37:22 PM
2.0.3 released.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.3

This version disables the growing component from any race that has fewer than 5 life stages. This is a crude but quick patch to stop interfering with android tiers, but I will need to revisit this and come up with a real design to integrate other races. The goal will be to automatically work with any race that sufficiently implements similar race patterns to humans, but provide a reasonable API to patch more complex races. My instinct is to go with a hediff and allow custom  races to override expected lifestages.

My day job has picked up a bit this week, so expect few updates this week.

Quote from: TheBadiator on April 07, 2020, 01:24:43 AM
Hey, love the Mod. Thank you for updating it.

So, I've encountered a bug, where if a Pregnant Pawn goes into labour while in a caravan, she will not actually give birth, and she will be stuck with the "Giving Birth" widget in her health tab. No new baby. Not pregnant once back at the settlement.
Thanks for the report. I think right now, that baby probably was sent to the world as a world pawn. I don't fully understand that bit of the code yet, but I suspect it just means they now exist as a pawn somewhere else in the world, similar to pawn relations in other factions. Maybe a newborn baby will show up with a caravan now? No idea.
I'll add it to the list to revisit, but for now lets just go with the suggestion that 9 month pregnant colonist hang out in the colony instead of trekking cross country.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: crowman on April 07, 2020, 11:22:51 PM
Thanks, I can finally fulfill my dream of providing children with safe and secure environments where they can earn money learning useful engineering skills such as assembling integrated circuitry into useful components that can then be mass-sold to the fancy North Armoury for exorbitant amounts of money. No, seriously, try putting some of your kids into workshops, your bank will love you for it and your credit score will sky rocket way beyond what is legally allowed. Then again, when has the law stopped the central south-eastern tribe from amassing ungodly amount of wealth only for them to invest said treasury into acquiring ALL of the silver. Because you can't pay for godhood unless we get rid of vaccines and single fatherhood,  Aaron forbid you tried befriending the southern populace lest you be stoned to death and your hair cooked into a delicious pot of french-onion stew.
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: netenugu on April 08, 2020, 12:59:40 PM
QuoteAdd new config to specify the max number of traits a pawn may have - this will determine how many traits they can acquire through childhood.
Speaking of bloat, are you aware that other mods already allow players to choose how many traits they want their pawns to have?
For example [KV] More Trait Slots https://steamcommunity.com/sharedfiles/filedetails/?id=1508292711
Title: Re: [1.1] Children and Pregnancy - v2.0.2
Post by: GhostData on April 08, 2020, 01:07:43 PM
Quote from: netenugu on April 08, 2020, 12:59:40 PM
QuoteAdd new config to specify the max number of traits a pawn may have - this will determine how many traits they can acquire through childhood.
Speaking of bloat, are you aware that other mods already allow players to choose how many traits they want their pawns to have?
For example [KV] More Trait Slots https://steamcommunity.com/sharedfiles/filedetails/?id=1508292711
Yes, I am aware. You misunderstood the note.
Prior to this change, CNP hard coded 3 possible traits to be acquired by child pawns. Since other mods increase the number of possible traits, I have added a config to let the player adjust how many traits are awarded here. This change does not enable more traits on its own.


2.0.4 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.4
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 09, 2020, 05:12:50 PM
There appears to be a conflict with the faster aging mod from verdiss.
It causes a second stage toddler (the walking toddler stage) to be able to age (biological age) and grow in a ancient cryosleep casket, (not tested with a player build casket). (so far I need to always reload to make a child grow properly as their bodies do grow just their stats will still be toddler disabled, reload always fixed it so far) the child was a just released toddler which I immediately ordered to enter a cryosleep casket (reason for the toddlers imprisonment was also an issue ill get to in a sec)
I just noticed it because a pawn in cryosleep will still be displayed on the top of the screen and after reloading my game this toddler turned into a child, did so I got a pawn to open the casket to see wtf was going on so the now child comes out crying as toddler (still having a "-" by all his stats, not having the incapable  of everything list anymore) so I saved and reloaded: fixing the child stats and it didn't cry as a toddler anymore.


Now I also have another issue that first (crawling) and second (walking) stage toddlers wont stop crying was getting annoyed by this so i checked it out. Turns out my baby and toddlers had and issue with sleep and recreation: they would only sleep until most left stick so they would have a permanent drowsy debuff which would be turned into tired for a split second then they would sleep again until it was turned into drowsy again endlessly repeating the cycle. same as with recreation, first a little context I always restrict toddlers to their room until they are 3 as they can get hunted by larger carnivores if walking outside, rooms always have a table with chair so they can relax socially so they can fulfill their recreation.
so as babies cant leave their crib they will have to be played with which was only possible after their recreation went to recreation deprived so when the meter went more left then last left mark and pawns would only play with them until the most left mark so only keeping them from getting recreation starved. now toddlers don't need to be played with as they can do recreation themselves which they always have the possibility to in their room but as with the babies they would only relax socially to just hitting the most left mark repeating the cycle. So i figured I just throw them in jail when they can craw until they are 3 so I wont have to beat up toddlers to stop them having a tantrum which fixed the recreation issue of course entirely but they would still sleep to just being drowsy then wake up walk for a few sec and sleep for a few sec again causing quite a few hide in rooms. now releasing them and having them enter a cryosleep casket then getting them out again (still toddler) appears to somewhat resolve the issue of them refusing to sleep or do any recreation beyond the most left mark but still not always.
Now their schedules are the standard schedule every pawn gets after joining so its not that (tried to put their schedules to only sleep or recreation didn't work at all) but this has been bugging me I dont use many mods again but my modlist consists of (in loading order)
-harmony
-core
-royalty
-hugslib
-edB prepare carefully
-bad can be good
-centipede raid value
-1.0 turrets
-achtung!
-faster aging
-children and pregnancy v.2.0.4
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Third_Of_Five on April 11, 2020, 07:52:10 PM
Quote from: peppybojagger on April 11, 2020, 01:52:53 PM
This mod was working with Dubs Bad Hygiene before one of the version updates, specifically thirst. Babies' thirst would be quenched via breastfeeding or pawns could bring them water. Now neither of those are working and newborns are dying of dehydration. ):

Which version update specifically?
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: miguelsz2 on April 11, 2020, 07:57:26 PM
Quote from: peppybojagger on April 11, 2020, 01:52:53 PM
This mod was working with Dubs Bad Hygiene before one of the version updates, specifically thirst. Babies' thirst would be quenched via breastfeeding or pawns could bring them water. Now neither of those are working and newborns are dying of dehydration. ):

A good temporary workaround is to go into the Dubs Hygiene mod options and disable thirst and hygiene needs on babies.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: RikuOrihara on April 12, 2020, 10:34:49 AM
Hi,

Childs with dark skins looking weird, the shadows didnt take the same color than the skin itself. I had the problem with adults since i bought the game in alpha 14. I dont know if the game changed the skins or alien framework does it, but they look awesome now. The childs unfortunately dont.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 13, 2020, 11:34:43 AM
Could the family member died mood debuff be made a little less extreme or perhaps make it a small separate mod. Cause I don't like having to deal with several stressed people because 1 or 2 of the family died in a raid.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: rozyn on April 13, 2020, 05:13:29 PM
Thanks for the update!

Any hopes you may be able to add a toggle or mute for the baby sounds? They're always a bit too loud and stick out even over the other animal sounds in game, That's always been my only major issue with this great mod.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: TheBadiator on April 13, 2020, 06:51:21 PM
Hello again!

Another bug to report. If you have ambrosia available, and set your infants to the "Nothing" food restriction, so that mothers will breastfeed them, the pawns feeding them will prioritize feeding them ambrosia over breastfeeding them.

I have infants going into drug shock, and I didn't realize because the pawns are feeding them ambrosia over breastmilk.

EDIT: It's also worth noting, that their drug policy is appropriately set to no drugs.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 13, 2020, 10:25:35 PM
Quote from: TheBadiator on April 13, 2020, 06:51:21 PM
Hello again!

Another bug to report. If you have ambrosia available, and set your infants to the "Nothing" food restriction, so that mothers will breastfeed them, the pawns feeding them will prioritize feeding them ambrosia over breastfeeding them.

I have infants going into drug shock, and I didn't realize because the pawns are feeding them ambrosia over breastmilk.

EDIT: It's also worth noting, that their drug policy is appropriately set to no drugs.
perhaps set the babies drug restriction to ambrosia only once every 25 days should prevent most problems, assuming they will actually only get fed ambrosia once every 25 days of course.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Vorltzs on April 14, 2020, 01:23:17 AM
when I play rimworld, I use a whole bunch of mods. some of them are this mod and Android tiers mod. in 'android tiers' mod, you can create your own android to help you.

and of course, when you created your android, their age would be one year old.

the problem is, the android I created is incapable of doing anything because this mod adds status in their health like = child still growing(or whatever it is, I forgot).

maybe you can somehow fix this problem? like adding setting which creature this mod affect?

edit=nvm. after seeing the new update, they already fixed it. once again, nvm.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: JMan1008 on April 14, 2020, 02:04:52 PM
So I've got a bit of a strange issue at the moment. Two of my colonists (a human and a Twi'lek) have two kids. The first was born human and everything was pretty normal about that. Their second kid is an Oni. I guess having too many race mods can cause the game to read any race as a viable child. Figured I'd mention that because I was a bit confused when a little gray child was born to an average human and a tentacle-head
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: BooYah11 on April 17, 2020, 10:30:40 AM
Love that you've upgraded this to 1.1; thank you! I'm just having a bit of a problem with children working; my pawns are just over four years old but all of the work types are still disabled - it says this is due to baby childhood - I've reloaded the game a couple times but this won't change.  I've got a lot of mods running too, including children and schooling and RJW if this affects it but it's nothing new from what I was using in 1.0 and my pawns always were able to do work after they were about three and a half. 
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Third_Of_Five on April 17, 2020, 04:14:06 PM
Quote from: BooYah11 on April 17, 2020, 10:30:40 AM
Love that you've upgraded this to 1.1; thank you! I'm just having a bit of a problem with children working; my pawns are just over four years old but all of the work types are still disabled - it says this is due to baby childhood - I've reloaded the game a couple times but this won't change.  I've got a lot of mods running too, including children and schooling and RJW if this affects it but it's nothing new from what I was using in 1.0 and my pawns always were able to do work after they were about three and a half.

This mod is not currently compatible with children school and learning. The problem you are experiencing is most likely due to the two mods conflicting with each other.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: BooYah11 on April 17, 2020, 06:18:19 PM
Thanks for replying - I'll try disabling children school and learning and see if that solves it :)
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 18, 2020, 10:05:02 PM
Could it be possible to stop toddlers from taking meals as they wont take it out when hungry?

And whilst looking through the mod I saw quite a few things which are either not active or don't work:
things like "hugging" which gives a +3 or +4 mood buff to the receiver. A second postpartum debuff which is -20 and reads: "I can't take care of a child, I can't even take care of myself Am a terrible mother" And although social fight between non psychopath colonists and child colonists don't happen they should either discipline the child or tell them off neither of those have ever occurred for me, it simply stops the fight immediately after starting.
most likely more things in there I didn't see or notice, any plans on getting those things working?
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Canute on April 19, 2020, 03:08:01 AM
QuoteCould it be possible to stop toddlers from taking meals as they wont take it out when hungry?
Never played C&P but can't you assign a different food policy to them ?
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 19, 2020, 06:31:30 PM
Quote from: Canute on April 19, 2020, 03:08:01 AM
QuoteCould it be possible to stop toddlers from taking meals as they wont take it out when hungry?
Never played C&P but can't you assign a different food policy to them ?

Limiting them to raw food will create the same issue they will still pickup food albeit its corn and still never whip it out when hungry and instead charge my freezer to eat.
Now before I used to zone them in their room until they turned 3 (child stage, thus becoming capable of doing more then crawling around, eating, relaxing socially and occasionally cheering up patients) but having to feed 10 toddlers takes quite a lot of time so I allow them to just go to my freezer to eat but they will always grab a meal and simply never eat it without me micromanaging it.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Third_Of_Five on April 19, 2020, 08:42:45 PM
Quote from: Geese man on April 19, 2020, 06:31:30 PM
Now before I used to zone them in their room until they turned 3 (child stage, thus becoming capable of doing more then crawling around, eating, relaxing socially and occasionally cheering up patients) but having to feed 10 toddlers takes quite a lot of time so I allow them to just go to my freezer to eat but they will always grab a meal and simply never eat it without me micromanaging it.

I mean, babies are *supposed* to be high maintenance... so I guess the question is whether this is really a bug or a feature.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 19, 2020, 09:34:11 PM
Quote from: Third_Of_Five on April 19, 2020, 08:42:45 PM
Quote from: Geese man on April 19, 2020, 06:31:30 PM
Now before I used to zone them in their room until they turned 3 (child stage, thus becoming capable of doing more then crawling around, eating, relaxing socially and occasionally cheering up patients) but having to feed 10 toddlers takes quite a lot of time so I allow them to just go to my freezer to eat but they will always grab a meal and simply never eat it without me micromanaging it.

I mean, babies are *supposed* to be high maintenance... so I guess the question is whether this is really a bug or a feature.

No shit I still have to feed and play with the infants but it annoys me that toddlers can and will pick up a meal if they have non but never eat it out of own initiative.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Third_Of_Five on April 19, 2020, 11:57:36 PM
Quote from: Geese man on April 19, 2020, 09:34:11 PM
No shit I still have to feed and play with the infants but it annoys me that toddlers can and will pick up a meal if they have non but never eat it out of own initiative.

Hmm.. I assume you are using the latest version? I'll look into it and see if I can make a patch for it.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 20, 2020, 04:09:36 AM
Quote from: Third_Of_Five on April 19, 2020, 11:57:36 PM
Quote from: Geese man on April 19, 2020, 09:34:11 PM
No shit I still have to feed and play with the infants but it annoys me that toddlers can and will pick up a meal if they have non but never eat it out of own initiative.

Hmm.. I assume you are using the latest version? I'll look into it and see if I can make a patch for it.

Indeed using v2.0.4, toddlers will simply charge my freezer if hungry and if I forbid the door they will cry with that meal in their inventory.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Taylor7500 on April 20, 2020, 05:14:23 PM
I've been looking for ages for a good mod which adds this for 1.1 and this looks just like it. I have a question though - is there any compatibility or interplay between this mod and The Birds and The Bees by Fluffy?

Just since that mod adds reproductive organs and fertility to colonists (without any pregnancy or kids) I figured there was a potential for conflict or at least the fertility added by Fluffy to be completely ignored.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 20, 2020, 06:10:38 PM
Quote from: Taylor7500 on April 20, 2020, 05:14:23 PM
I've been looking for ages for a good mod which adds this for 1.1 and this looks just like it. I have a question though - is there any compatibility or interplay between this mod and The Birds and The Bees by Fluffy?

Just since that mod adds reproductive organs and fertility to colonists (without any pregnancy or kids) I figured there was a potential for conflict or at least the fertility added by Fluffy to be completely ignored.

You can turn off CnP's pregnancy in the mod setting thus there wont be any conflict. Now in my experience the pregnancy chance and duration settings did influence other mod pregnancies so try to keep those type of settings as much duplicated as you can.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 20, 2020, 07:10:26 PM
Could the no children in pirate raids be expanded to no children with royal aid as they usually spawn with weapons to large for them to handle making them a literal meat shield  but with kids HP thus pretty much useless even as shield or make it so children will never spawn with weapons too large for them to handle so that traders wont bring children who are effectively unarmed.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Third_Of_Five on April 20, 2020, 11:35:11 PM
Quote from: Taylor7500 on April 20, 2020, 05:14:23 PM
I've been looking for ages for a good mod which adds this for 1.1 and this looks just like it. I have a question though - is there any compatibility or interplay between this mod and The Birds and The Bees by Fluffy?

Just since that mod adds reproductive organs and fertility to colonists (without any pregnancy or kids) I figured there was a potential for conflict or at least the fertility added by Fluffy to be completely ignored.

There's currently no cross-mod compatibility, we're still working on fixing bugs. We'll get to adding compatibility soon.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: GhostData on April 21, 2020, 04:33:21 PM
Hey all,

Sorry for radio silence. My day job has had possibly 2 of the roughest weeks I have ever faced, working well over 100 hours a week.
I'm starting to look back into this. Expect development to be slow, but I am still on the project.
I have started documenting thoughts and changes as issues on gitlab:
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/1

If you have an account, feel free to weigh in. I don't pretend to have all the answers.

I will start working on documenting outstanding issues, and consider providing a roadmap or something similar through gitlabs.
Race support is at the top of my list for the moment.

I have added contribution guidelines on the repo. For those with development experience, feel free to document and provide contributions. I have attempted to setup the guidelines in such a way as to help me review and merge changes quickly. I am using most of the same expectations that I have when reviewing production code in my day job, so if guidelines are not followed, do not expect a merge.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: rainjays on April 22, 2020, 11:17:58 PM
Are the contraceptives meant to not be 100% effective? I had someone who suddenly went from having the contraceptive buff to being middle-stage pregnant.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: GhostData on April 23, 2020, 11:43:43 AM
Quote from: rainjays on April 22, 2020, 11:17:58 PM
Are the contraceptives meant to not be 100% effective? I had someone who suddenly went from having the contraceptive buff to being middle-stage pregnant.
IIRC Contraceptives only prevent pregnancy, and do nothing to stop an existing pregnancy from progressing. Early stage pregnancy can go undetected for months before being discovered.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 23, 2020, 12:11:38 PM

IIRC Contraceptives only prevent pregnancy, and do nothing to stop an existing pregnancy from progressing. Early stage pregnancy can go undetected for months before being discovered.
[/quote]

When a pregnant pawn reaches middle stage It should always be revealed right? and at most middle stage is reached after 20 days which would be 1 and 1/3 month so can't be several months undetected right?
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: GhostData on April 23, 2020, 08:56:31 PM
you're right on both counts. I forgot Rimworld has the weird 4 month year thing going on.

Spent most of the day trying to sort out the render bug when using alien framework. So far I have no idea what is causing it. Best I can tell it's due to overriding some of the graphics in PawnGraphicSet. It doesn't help that Alien Framework is both immensely complicated, and entirely undocumented. I've worked on 30 year old spaghetti code projects that handle documentation better.
The author is in love with nested ternary statements. All in all the code is good, but it was clearly not intended for anyone else to read.

My plan was to handle this in two steps: Fix the render bug when using both mods, then consider proper support for alien babies.
Looking at this now, I'm considering adding a hard dependency on Alien Races and letting it handle all the rendering instead. Body-wise, we need to patch graphics for baby, toddler, and child bodies and heads. I would expect an implementing race would have to provide the graphics for their different age stages. I'll need a plan for what types of graphics to shrink (tails?) and what graphics must be provided (alien baby sprite?)

Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: Geese man on April 23, 2020, 11:00:17 PM
I understand you want to fix the alien framework render bug but wouldn't it be a better idea to first get this mod in a better state as for now its playable but just has some smaller things that can be done better as that would also mean that you dont find "new" issues after resolving something before you worked on updating this mod for its own purposes first?
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: rainjays on April 24, 2020, 04:52:55 AM
Quote from: Tragix on April 23, 2020, 11:43:43 AM
Quote from: rainjays on April 22, 2020, 11:17:58 PM
Are the contraceptives meant to not be 100% effective? I had someone who suddenly went from having the contraceptive buff to being middle-stage pregnant.
IIRC Contraceptives only prevent pregnancy, and do nothing to stop an existing pregnancy from progressing. Early stage pregnancy can go undetected for months before being discovered.

I've been having them take the contraceptive monthly, but they're still suddenly in mid-stage pregnancy. I've just given up with the contraceptives and just abort them constantly.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: netenugu on April 24, 2020, 07:02:21 AM
Quote from: Tragix on April 23, 2020, 08:56:31 PM
I'll need a plan for what types of graphics to shrink (tails?) and what graphics must be provided (alien baby sprite?)
Wouldn't it be best, for compatibility, to have baby sprites optional and default to just shrinking all the graphics?
Probably more work to do initially, but I would assume that only few alien races would actually provide baby sprites, and having all others just be incompatible doesn't sound very desirable.
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: delalli on April 24, 2020, 01:45:46 PM
Have been playing this for a while, raised 3 children to adulthood in testing. The eldest is now age 24 and has the health modifier of Teenager (still growing) and the hover-text on this suggests they do more activities that get them to grow up? I don't understand if this is tied to skilling but they have skilled up a LOT and are, objectively, adults by now. Anybody else experiencing this? I am not finding any info on this situation anywhere else.

Apologies if this is just a normal part of the mod but I have not seen this before. Any clues would be appreciated.

Otherwise all good so far, thanks for keeping this mod alive! :)
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: GhostData on April 24, 2020, 02:07:39 PM
Quote from: rainjays on April 24, 2020, 04:52:55 AM
Quote from: Tragix on April 23, 2020, 11:43:43 AM
Quote from: rainjays on April 22, 2020, 11:17:58 PM
Are the contraceptives meant to not be 100% effective? I had someone who suddenly went from having the contraceptive buff to being middle-stage pregnant.
IIRC Contraceptives only prevent pregnancy, and do nothing to stop an existing pregnancy from progressing. Early stage pregnancy can go undetected for months before being discovered.

I've been having them take the contraceptive monthly, but they're still suddenly in mid-stage pregnancy. I've just given up with the contraceptives and just abort them constantly.

Okay, I took a look at this, but was not able to replicate. Your pawn should have a health status "contraceptive" like so:
(https://puu.sh/FBZbA/8207c8007d.png)
I know there are a number of other mods that add contraceptives, so be aware that only the contraceptive specifically added by this mod will work.
There is also now verbose logging message that will display if a pregnancy is blocked by contraceptive.
[CNP]Impregnation attempt failed due to use of contraceptives
To see this message, you will need to enable dev mode in the CNP config.

Quote from: netenugu on April 24, 2020, 07:02:21 AM
Wouldn't it be best, for compatibility, to have baby sprites optional and default to just shrinking all the graphics?
Probably more work to do initially, but I would assume that only few alien races would actually provide baby sprites, and having all others just be incompatible doesn't sound very desirable.
Yeah, I'm still in the planning phase for this change. One option would be just as you said, optional custom graphics and shrinking when not provided. This could look weird for toddlers and children though, especially in the case where an alien race doesn't support a small form body type. They would potentially look like 2ft tall adult aliens. If you compare that scenario to human children, they would look very different. I don't know what Thirite's thought process was when he decided to use a custom child head instead of adjusting the size of normal adult heads. I'd like to be consistent with aliens, however.
I am open to adjusting appearances.

Another problem to sort out, is that I really have no idea how Alien Races works. Depending on how it adds "attachments" like tails and horns and the like, it could be very simple to provide consistent support for aliens and have them look like believable children. I'll need to dig up some example races and do some experimentation.

Quote from: delalli on April 24, 2020, 01:45:46 PM
Have been playing this for a while, raised 3 children to adulthood in testing. The eldest is now age 24 and has the health modifier of Teenager (still growing) and the hover-text on this suggests they do more activities that get them to grow up? I don't understand if this is tied to skilling but they have skilled up a LOT and are, objectively, adults by now. Anybody else experiencing this? I am not finding any info on this situation anywhere else.

Apologies if this is just a normal part of the mod but I have not seen this before. Any clues would be appreciated.

Otherwise all good so far, thanks for keeping this mod alive! :)
Definitely a bug. The description of that hediff is intended to be a hint to the player that what a child experiences as they grow up will determine what type of person they become. For example, if a child manages to kill 50 animals + humans before age 13 (i think) they should acquire the psychopath trait. There is more work to be done on trait acquisition, however.
The hediff should be gone around 13 years old. I'll take a look and see if I can identify an issue with the birthday code.


I've released version 2.0.5 with a patch for the render error that was being thrown when using alien races.
For the time being, this only prevents the two mods from complaining about each other. No race support yet.
I tested alongside the Android Tiers and Ratkin races to confirm the functionality.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.5


Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: GhostData on April 25, 2020, 11:29:20 AM
Quote from: delalli on April 24, 2020, 01:45:46 PM
Have been playing this for a while, raised 3 children to adulthood in testing. The eldest is now age 24 and has the health modifier of Teenager (still growing) and the hover-text on this suggests they do more activities that get them to grow up? I don't understand if this is tied to skilling but they have skilled up a LOT and are, objectively, adults by now. Anybody else experiencing this? I am not finding any info on this situation anywhere else.

Apologies if this is just a normal part of the mod but I have not seen this before. Any clues would be appreciated.

Otherwise all good so far, thanks for keeping this mod alive! :)

Thanks for the report.
I have release a correction that should remove the hediff when a pawn ages up from child to teen or teen to adult.
This probably won't fix anything for pawns who are already fully developed. You may safely use removeHediff from the debug menu in such a case.

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.6
Title: Re: [1.1] Children and Pregnancy - v2.0.4
Post by: delalli on April 25, 2020, 01:55:32 PM
Quote from: Tragix on April 25, 2020, 11:29:20 AM
Thanks for the report.
I have release a correction that should remove the hediff when a pawn ages up from child to teen or teen to adult.
This probably won't fix anything for pawns who are already fully developed. You may safely use removeHediff from the debug menu in such a case.

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.6

Thanks so much!

I just briefly tested this and further birthdays did not remove it naturally, but it's easy enough to get rid of manually so I just did that. :)

There was a brief moment (like a few days) when the colonists were around age 17 and they were running around trying to "woo" each other, then never again. So I figured something in there was broken lol. Will def report back if I notice anything else weird! Really appreciate the work. :D
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Third_Of_Five on April 26, 2020, 03:13:20 PM
Ok so I've been looking into doing a fix for the aforementioned bug where toddlers take food into their inventory and never eat it, and I think this bug could be fixed with a simple harmony postfix to the 'PackFood' JobGiver. (https://github.com/josh-m/RW-Decompile/blob/master/RimWorld/JobGiver_PackFood.cs)

I can probably just add a postfix so that the jobgiver fails if the pawn is a toddler, so they'll never take food into their inventory until they grow older.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 26, 2020, 03:26:04 PM
Quote from: Third_Of_Five on April 26, 2020, 03:13:20 PM
Ok so I've been looking into doing a fix for the aforementioned bug where toddlers take food into their inventory and never eat it, and I think this bug could be fixed with a simple harmony postfix to the 'PackFood' JobGiver. (https://github.com/josh-m/RW-Decompile/blob/master/RimWorld/JobGiver_PackFood.cs)

I can probably just add a postfix so that the jobgiver fails if the pawn is a toddler, so they'll never take food into their inventory until they grow older.

Careful with that source, as it's a couple years out of date. Grab dotpeak and decompile the assembly in your game folder to get a more accurate version.
Please take a look at the contributor guidelines on git and open an issue if you decide to work on it.

2.1.0 released, courtesy of Third_of_five
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.1.0

This release fixes some interactions, adds several memories, a growth acceleration feature, and some other tweaks.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: teddylion333 on April 26, 2020, 10:59:18 PM
Hey, thanks for the mod!
I just wanted to report a bug where the child's background story doesn't change from baby, making them incapable of doing anything even after when they grow up to be 20.
I'm wondering if I'm the only one experiencing this issue or this is a general bug
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 27, 2020, 05:12:43 PM
Quote from: teddylion333 on April 26, 2020, 10:59:18 PM
Hey, thanks for the mod!
I just wanted to report a bug where the child's background story doesn't change from baby, making them incapable of doing anything even after when they grow up to be 20.
I'm wondering if I'm the only one experiencing this issue or this is a general bug
How are you testing this? If you are using the force birthday command, be sure to allow 250 ticks (about 5 seconds) between each use so the component can tick.
If the pawn ages too fast, the steps that handle the removal of the backstory are skipped.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: malistaticy on April 27, 2020, 05:22:24 PM
i dont know the extent of how much you intend to support alien races, but do you think you could add some sort of user defined race filter option? i would like to disable androids (android tiers) from being seen as babies, as the vast majority of them spawn <5 years old and my colonists keep putting them to bed and playing pattycake with them lol
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 27, 2020, 07:22:50 PM
Quote from: malistaticy on April 27, 2020, 05:22:24 PM
i dont know the extent of how much you intend to support alien races, but do you think you could add some sort of user defined race filter option? i would like to disable androids (android tiers) from being seen as babies, as the vast majority of them spawn <5 years old and my colonists keep putting them to bed and playing pattycake with them lol
Hah, that's some nice imagery. Must be missing a filter on the new work giver from the last release. I'll fix that up soon.

Long term, the goal is to have native support for as many alien races as possible, along with race specific config to allow the player to tweak settings by race. End goal is to allow a modder to quickly and easily define how their custom race is render as babies/toddlers/children, as well as how child hood works for those races.
I have some ideas on how to accomplish this, but will take some time to sort it out. I suspect it may also represent a major release, potentially requiring a new or clean save.

In the meantime, there are definitely still bugs to correct with the code we have today.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Chezzprinn on April 28, 2020, 02:14:43 AM
Hi tragix,

Would you have any issues with me putting this mod up onto the steam workshop?

Additionally, is the mod compatible with psychology? I remember the old version having a bit of difficulty.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 28, 2020, 01:04:58 PM
Quote from: Chezzprinn on April 28, 2020, 02:14:43 AM
Hi tragix,

Would you have any issues with me putting this mod up onto the steam workshop?

Additionally, is the mod compatible with psychology? I remember the old version having a bit of difficulty.
I have not tested with Psychology, so I couldn't say. IIRC, that mod alters how traits and mental breaks work. I would guess that there should not be many issues with the two, but would need to look into it.

You may put the mod on the workshop provided you follow the license agreement per Thirite - I believe a link to the thread and callout to Thirite is necessary.
I will not provide any support to users on the workshop itself, but they may post here for support.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Chezzprinn on April 28, 2020, 10:41:01 PM
Thanks for the permission, mate!

I've uploaded it to the workshop.

Do you want me to add you as a contributor?
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: 7Lephyr on April 29, 2020, 02:45:25 AM
Hi tragix,
I like this mod a lot and wait its 1.1ver for a long time.So I translated it into Chinese as soon as I find its 1.1ver in steamworkshop.But I can't use github for some special problems. So I make a Chinese translation mod (just a language pack without main mod)and upload it to steamworkshop.
If I can't get your authorization ,I will delect my mod in steamworkshop.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 29, 2020, 10:00:50 AM
Quote from: Chezzprinn on April 28, 2020, 10:41:01 PM
Thanks for the permission, mate!

I've uploaded it to the workshop.

Do you want me to add you as a contributor?
I don't need to be added as a contributor.

Quote from: 7Lephyr on April 29, 2020, 02:45:25 AM
Hi tragix,
I like this mod a lot and wait its 1.1ver for a long time.So I translated it into Chinese as soon as I find its 1.1ver in steamworkshop.But I can't use github for some special problems. So I make a Chinese translation mod (just a language pack without main mod)and upload it to steamworkshop.
If I can't get your authorization ,I will delect my mod in steamworkshop.
No problem, just check back when new versions are released as there will probably be new strings needing translation.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: malistaticy on April 29, 2020, 07:01:49 PM
it would be nice if babies had recreation boredom turned off so that their one (or nearly only one) option of recreation, social interacting, didnt take hours to filfill
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Ruisuki on April 30, 2020, 06:02:06 PM
whoa no way...i never expected to see this leave the unfinished section. I had been waiting on this mod before starting a new game...yes!!!!

does it support alien races? or is that something id need to contact the author of those races about?
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on April 30, 2020, 09:28:10 PM
Quote from: malistaticy on April 29, 2020, 07:01:49 PM
it would be nice if babies had recreation boredom turned off so that their one (or nearly only one) option of recreation, social interacting, didnt take hours to filfill
This should be the case for social already, but we may need to consider it for recreation if that's what the new play-with-baby interaction is using.

Quote from: Ruisuki on April 30, 2020, 06:02:06 PM
whoa no way...i never expected to see this leave the unfinished section. I had been waiting on this mod before starting a new game...yes!!!!

does it support alien races? or is that something id need to contact the author of those races about?
Alien race support is planned, but still in the planning phase. My hope is to not require explicit patches for most features, but it will be a pretty big change.
Gotta work around my day job.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: lbmaian on May 01, 2020, 03:07:31 AM
Quote from: Tragix on April 30, 2020, 09:28:10 PM
Quote from: malistaticy on April 29, 2020, 07:01:49 PM
it would be nice if babies had recreation boredom turned off so that their one (or nearly only one) option of recreation, social interacting, didnt take hours to filfill
This should be the case for social already, but we may need to consider it for recreation if that's what the new play-with-baby interaction is using.

Have you taken a look at my commits I linked weeks ago (https://ludeon.com/forums/index.php?topic=51258.msg476125#msg476125 - make sure to expand all the collapsed diffs)?

They include a note that the social joy tolerance negation hack doesn't work, and what should be done to fix it.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: pumacatrun2 on May 01, 2020, 04:45:16 AM
So I'm running RJW, Children School & Learning and now Children and Pregnancy. Before adding this, disabling children worked for CS&L to allow RJW to be the main fertility, but even with pregnancy disabled in this mod my colonist with an IUD (which drops RJW fertility to 0%) got pregnant.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: GhostData on May 01, 2020, 04:53:09 PM
Quote from: lbmaian on May 01, 2020, 03:07:31 AM
Quote from: Tragix on April 30, 2020, 09:28:10 PM
Quote from: malistaticy on April 29, 2020, 07:01:49 PM
it would be nice if babies had recreation boredom turned off so that their one (or nearly only one) option of recreation, social interacting, didnt take hours to filfill
This should be the case for social already, but we may need to consider it for recreation if that's what the new play-with-baby interaction is using.

Have you taken a look at my commits I linked weeks ago (https://ludeon.com/forums/index.php?topic=51258.msg476125#msg476125 - make sure to expand all the collapsed diffs)?

They include a note that the social joy tolerance negation hack doesn't work, and what should be done to fix it.
I've actually been referencing your comments for some parts of the code I've touched. I wasn't aware the social joy tolerance thing was busted. I'll take a look and get that fixed.
For toddlers+, I think the real solution is to add more joy sources, which is what ThirdOfFive seems to be doing. Babies are relegated to the baby box, so it's fair to remove tolerances in their case.

Edit:
So I tested the last version out, and for babies I do not see that there is any issue with the social joy tolerance. I went ahead and made some changes to the patch anyway since I was taking a look.

Quote from: pumacatrun2 on May 01, 2020, 04:45:16 AM
So I'm running RJW, Children School & Learning and now Children and Pregnancy. Before adding this, disabling children worked for CS&L to allow RJW to be the main fertility, but even with pregnancy disabled in this mod my colonist with an IUD (which drops RJW fertility to 0%) got pregnant.
As of right now, I would consider RJW a hard incompatibility due to how it handles pregnancy. It explicitly prevents this mod's pregnancy hediff from being added in favor of its own. Our hediff is essential for the full functionality of the mod to take place, as a number of things are configured in the hediff that are used post-birth. If I had to guess, at a minimum the child would be born without genetic traits, assuming the birth doesn't cause an error.

RJW copied the original source for this mod and modified it to suit their needs, which kind of makes it a complicated scenario when it comes to making the mods play together. As this mod develops, it is likely that more features will be added that cause a divergence in how the two mods handle pregnancy, birth, and childhood.
My personal take, is that a mod like RJW shouldn't be dealing with pregnancy or birth at all. It ought to be a framework for advanced lovin' interactions, and at worst use an API or another mod to handle pregnancy and children. In a perfect world, this mod would provide that API, and RJW would only need to extend our classes in order to provide the additional functionality they need. Some of my changes so far have been aimed at allowing that, though admittedly I stink at writing APIs.

I will double check disabling pregnancy in the config. It's not something I have tested since I started working on this.
edit: I wasn't able to see any problems with the pregnancy config. Are you certain it was a CNP pregnancy?
I know RJW and Babies and Children copied the code for CNP at one point, but I'm not familiar with CSL. Is it another derivative?
I saw some folks trying to uses Babies and Children alongside CNP, and I'm honestly not sure what will happen in that case. IIRC both mods have the exact same namespace, which I haven't encountered before.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 01, 2020, 08:53:12 PM
Quick QoL addition for 2.1.1: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.1.1
Added a volume config for folks who are sick of vocal babies.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Meester on May 01, 2020, 11:21:21 PM
Does this work with CSL?

The author of it said regarding CP

QuoteWell it was a long tome ago, most of the stuff is still in the mod that disables my routines for humans when it is active, but it is based on the name of the mod, so I don't know if that was kept the same (when you turn on dev mode and all logs in my mod-options it would tell you if it was recognized when loading a game)

So naturally I am unsure.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: lbmaian on May 03, 2020, 04:12:13 AM
Quote from: Tragix on May 01, 2020, 04:53:09 PM
I've actually been referencing your comments for some parts of the code I've touched. I wasn't aware the social joy tolerance thing was busted. I'll take a look and get that fixed.
For toddlers+, I think the real solution is to add more joy sources, which is what ThirdOfFive seems to be doing. Babies are relegated to the baby box, so it's fair to remove tolerances in their case.

Edit:
So I tested the last version out, and for babies I do not see that there is any issue with the social joy tolerance. I went ahead and made some changes to the patch anyway since I was taking a look.

IIRC, the bug manifested in two ways:
1) Social joy tolerance approaches but never actually reaches 0. Practically speaking, this happens quickly enough and the tolerance value becomes so close to 0, that it is effectively 0. So that patch did accomplish its goal for all intents and purposes despite doing it incorrectly.
2) Users reported a baby or toddler somehow getting bored of social joy. I don't recall exactly how this happens, but once they do become bored, that patch couldn't remove the bored flag.

BTW, in response to your comment "Why is this patch necessary?" regarding the next patch "WGWDF_FAIRT_Patch"...
This patch was added in commit "Fixed bug where wardens would not deliver food to child prisoners": https://gitlab.com/Thirite/children-and-pregnancy-collab/-/commit/73126fc71afaffbe2451058d37ff08d92ba65009
Hence my TODO note: https://gitlab.com/lbmaian/children-and-pregnancy-collab/-/commit/24592bbe79ea70db0e753055b03f8ce4f2f6e77f#ce9fdf96a8e5eb90865b472cdca808d6109d7fa7_432_520
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Third_Of_Five on May 04, 2020, 10:26:50 AM
Quote from: Chezzprinn on April 28, 2020, 10:41:01 PM
Thanks for the permission, mate!

I've uploaded it to the workshop.

Do you want me to add you as a contributor?

Can I be added as a contributer? My steam username is ThirdOfFive.
Title: Re: [1.1] Children and Pregnancy - v2.0.6
Post by: Third_Of_Five on May 04, 2020, 10:31:40 AM
Quote from: lbmaian on May 03, 2020, 04:12:13 AM
IIRC, the bug manifested in two ways:
1) Social joy tolerance approaches but never actually reaches 0. Practically speaking, this happens quickly enough and the tolerance value becomes so close to 0, that it is effectively 0. So that patch did accomplish its goal for all intents and purposes despite doing it incorrectly.
2) Users reported a baby or toddler somehow getting bored of social joy. I don't recall exactly how this happens, but once they do become bored, that patch couldn't remove the bored flag.

I created an issue (https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/4 (https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/4)) in gitlab to address the lack of recreation variety for toddlers. I'm currently working on feature updates for this, once they are added I'll remove the patch which removes tolerance for social joy as it will no longer be needed once toddlers have additional options for recreation.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 04, 2020, 03:55:31 PM
Could there be looked into the issue that imprisoned infants and toddlers wont sleep after reaching the -6 drowsy debuff, they will start sleeping when they hit the -12 but will wake up immediately after going back to -6 drowsy. children don't have this issue. (this is a tad problematic for when the toddler is wild and you want to tame but they will always sleep before the tame is finished, that happens after a pregnant colonist runs wild and gives birth soon after)

wild toddlers will also constantly leave the crib whilst trying to sleep making it impossible to operate on them without bashing them into a painshock.

Perhaps make tame rate for wild toddlers 100% as they are toddlers I don't see a reason why he/she wouldn't just be "adopted", maybe add a Adoption action for infants and toddlers?.


And maybe remove the possibility that toddlers start a prison break (or join one) as they should be too young to even understand how a door lock works, and they die way too easily making them well not very likely to escape or even survive for that matter.
and perhaps remove the possibility of a toddler going berserk cause that 17 melee tribal Berserker in the cell is not gonna go easy on it.

I forgot to mention that wardens with childcare job will take imprisoned toddlers to a colonist crib (or bed when there is non) to feed them instead of feeding them in their prison cribs.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Chezzprinn on May 05, 2020, 09:21:45 AM
Quote from: Third_Of_Five on May 04, 2020, 10:31:40 AM
Quote from: lbmaian on May 03, 2020, 04:12:13 AM
IIRC, the bug manifested in two ways:
1) Social joy tolerance approaches but never actually reaches 0. Practically speaking, this happens quickly enough and the tolerance value becomes so close to 0, that it is effectively 0. So that patch did accomplish its goal for all intents and purposes despite doing it incorrectly.
2) Users reported a baby or toddler somehow getting bored of social joy. I don't recall exactly how this happens, but once they do become bored, that patch couldn't remove the bored flag.

I created an issue (https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/4 (https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/4)) in gitlab to address the lack of recreation variety for toddlers. I'm currently working on feature updates for this, once they are added I'll remove the patch which removes tolerance for social joy as it will no longer be needed once toddlers have additional options for recreation.

Sure, couldn't find you on Steam, but you can add me: Engadine Maccas, 1997
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 05, 2020, 11:18:30 AM
Working on some graphics for new baby toys, let me know what you guys think
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: StatikMilk30 on May 05, 2020, 12:53:16 PM
Seems like there is a bug where androids from Androids Tiers can be treated as children and ya cant rescue or oporate on them. On one particular case the pop-up menu to rscue them just flickered and wouldnt allow any input.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 05, 2020, 04:54:17 PM
Quote from: Third_Of_Five on May 05, 2020, 11:18:30 AM
Working on some graphics for new baby toys, let me know what you guys think
I would add some numbers or letters on the cubes as they feel a little empty.
If you are working on toys perhaps make a few different toys which toddlers can learn skills from to a certain level, 7 maybe?

And found a tiny "bug": a child with under grounder trait will still have the -8 scared of the dark debuff.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 05, 2020, 05:00:33 PM
Added the item ingame to see how it looks. Texture needs more detailing, but it looks pretty good otherwise.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 05, 2020, 07:34:20 PM
Quote from: Geese man on May 04, 2020, 03:55:31 PM
Could there be looked into the issue that imprisoned infants and toddlers wont sleep after reaching the -6 drowsy debuff, they will start sleeping when they hit the -12 but will wake up immediately after going back to -6 drowsy. children don't have this issue. (this is a tad problematic for when the toddler is wild and you want to tame but they will always sleep before the tame is finished, that happens after a pregnant colonist runs wild and gives birth soon after)

wild toddlers will also constantly leave the crib whilst trying to sleep making it impossible to operate on them without bashing them into a painshock.

Perhaps make tame rate for wild toddlers 100% as they are toddlers I don't see a reason why he/she wouldn't just be "adopted", maybe add a Adoption action for infants and toddlers?.


And maybe remove the possibility that toddlers start a prison break (or join one) as they should be too young to even understand how a door lock works, and they die way too easily making them well not very likely to escape or even survive for that matter.
and perhaps remove the possibility of a toddler going berserk cause that 17 melee tribal Berserker in the cell is not gonna go easy on it.

I forgot to mention that wardens with childcare job will take imprisoned toddlers to a colonist crib (or bed when there is non) to feed them instead of feeding them in their prison cribs.
I've created a backlog issue to address the problems we have with children and birth in prison. Not sure what all we will need to fix yet, as it is kind of an untouched topic up to now. Right now my thinking is that we will attempt to make some common sense changes such as prisoners being able to give birth and babies being able to be adopted/captured more easily. We will need rules for certain prison interactions (maybe) based on age stage of a child. I agree that a toddler probably has no need to escape, though that may be beyond my ability to patch depending on how it's implemented in the RW source.
We will not make changes that reward a certain play style. For example, if a player chooses to have a toddler be the cellmate of a psychotic cannibal, that's on them. We won't try to patch out  or prevent scenarios that lead to baby death due to the player's questionable judgement.

Quote from: StatikMilk30 on May 05, 2020, 12:53:16 PM
Seems like there is a bug where androids from Androids Tiers can be treated as children and ya cant rescue or oporate on them. On one particular case the pop-up menu to rscue them just flickered and wouldnt allow any input.
Are you using the latest version? I was fairly certain this was addressed previously, as we no longer apply the component on non humans.
Either way, I will revisit this as I work on the alien race support.

Quote from: lbmaian on May 03, 2020, 04:12:13 AM
IIRC, the bug manifested in two ways:
1) Social joy tolerance approaches but never actually reaches 0. Practically speaking, this happens quickly enough and the tolerance value becomes so close to 0, that it is effectively 0. So that patch did accomplish its goal for all intents and purposes despite doing it incorrectly.
2) Users reported a baby or toddler somehow getting bored of social joy. I don't recall exactly how this happens, but once they do become bored, that patch couldn't remove the bored flag.
I was never able to replicate this, but I modified the patch anyway to update the tolerance and boredom fields directly. I think the new patch should cover these cases if it ever crops up.

As an aside, looking through the code and some of your comments, I'd be interested in hearing what you think about the decision to override numerous rendering methods instead of providing new body types that are already adjusted with appropriate graphics and scales. My first guess is that the author didn't want to have to deal with changing back to the generated/adult body type when no longer rendering the pawn as a child.
As part of alien races support, I want to provide a way for the developer to provide an override for the graphics we render at each life stage, but the more I look at it, it seems it would make more sense to just make a custom body type that contains all of these graphics.

I haven't looked in depth how body types are actually used in the RW source, so maybe there are other reasons changing body type is a bad idea.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 05, 2020, 09:21:14 PM
With my current mods I am able to capture infants (ill try testing all mods that might make it possible later)

I think the easiest way for supporting prisoners giving birth is that there is a small chance for female pawns to be 1 day early stage pregnant,
and if they leave the map with the random chance pregnancy it will simply be removed to prevent them from returning and randomly giving birth.
now as for sieges if they are besieging for 44 days then I don't see a reason why a spawned pregnant pawn can't give birth as 44 day long sieges are quite rare to say the least as far as my experience goes.

Now to make this somewhat more doable perhaps add a second pregnancy hediff which will be used for non player faction pawns generating on a tile with the same properties as the normal pregnancy hediff except it always start at 1 day early stage (forced 1 day to prevent pregnancies that are further) but will disappear if the pawn leaves the tile, now to make it a bit more "realistic" the pregnancy should always be from a current spouse or lover if they are with them (generating at same event) but never from the spouse or lover if they are either a colonist or prisoner as they would not have been able to love, the pregnancy should however not be removed if it reached middle stage whilst on the tile usually from being rescued or imprisoned now since injuries will usually cause a miscarriage this should be rare anyway so maybe just ignore that part.

Now for the toddler imprisonment issues if they have a certain amount of recruitment chance (high %) they should not ever start a prison break at the very least I could be wrong but I saw a will never prison break on a pawn before, should also eliminate the recruit/adopt issue, still keeps the issue with wild toddlers, however without mods like human farming they should be very rare to come by tho so maybe that can be put aside for a while.

hope all that makes sense.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: lbmaian on May 05, 2020, 11:45:39 PM
Quote from: Tragix on May 05, 2020, 07:34:20 PM
As an aside, looking through the code and some of your comments, I'd be interested in hearing what you think about the decision to override numerous rendering methods instead of providing new body types that are already adjusted with appropriate graphics and scales. My first guess is that the author didn't want to have to deal with changing back to the generated/adult body type when no longer rendering the pawn as a child.
As part of alien races support, I want to provide a way for the developer to provide an override for the graphics we render at each life stage, but the more I look at it, it seems it would make more sense to just make a custom body type that contains all of these graphics.

I haven't looked in depth how body types are actually used in the RW source, so maybe there are other reasons changing body type is a bad idea.

Well the historical reason was that body type used to be a hardcoded enum rather a proper BodyTypeDef that we have nowadays. Note how hacked on the baby/toddler graphics are (head & body graphics are combined into a single body graphics with the head rendering omitted). A BodyTypeDef-based baby/toddler implementation with minimal PawnRendering patching may be possible now, but you may want to stick with the existing body types for non-baby/toddler children to have maximal compatibility with existing apparel graphics.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 06, 2020, 09:54:57 AM
Quote from: Geese man on May 05, 2020, 04:54:17 PM
And found a tiny "bug": a child with under grounder trait will still have the -8 scared of the dark debuff.

This has been fixed in my latest MR
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 06, 2020, 05:28:26 PM
Just thought I would share this abomination from the POC:
(https://puu.sh/FHaCm/9a9191dda0.png)

For some reason, Alien Races shifts the body graphics up a good amount when using a new BodyTypeDef. When assigning a graphic override this doesn't happen. I've tried narrowing it in the alien races code, but haven't been able to find where an offset might be applied. Best I can tell is it happens when assigning graphics.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 06, 2020, 07:25:59 PM
there is a issue with the "babies will cry when wounded" imprisoned wild toddlers will not cry if they have untended wounds but the game will spam "X is fully healed"

they will also always prefer eating a human corpse over (nutrient paste) meals in their cell but if they are just roaming on the map they will always go for meals and eat corpses last.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Laconique on May 07, 2020, 07:48:43 PM
Hello everyone, thanks for the mod author contribution.

I happen to stumble on an annoyinbg bug that make trading with NPC impossible. Fairly well explained in this reddit link :

https://www.reddit.com/r/RimWorld/comments/gck463/unable_to_trade_with_trading_visitors/

I can also provide a video if needed.

And here is my error log :

[Children_and_Pregnancy][ERR] Failed to apply Harmony patches for children.and.pregnancy. Exception was: HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.Pawn_HealthTracker::CheckForStateChange(System.Nullable`1<Verse.DamageInfo> dinfo, Verse.Hediff hediff) ---> System.Exception: Wrong null argument: br NULL
  at HarmonyLib.MethodBodyReader+<>c__DisplayClass21_0.<FinalizeILCodes>b__2 (HarmonyLib.CodeInstruction codeInstruction) [0x0015c] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x001f7] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x00209] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] in <2161c8330234450b8141397c32c11571>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <2161c8330234450b8141397c32c11571>:0
  at HugsLib.ModBase.ApplyHarmonyPatches () [0x00095] in <16781bf8b2ce4f1e84cb63572631a10b>:0

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[HugsLib] initializing Children_and_Pregnancy
Mod BabyAndChildren CE Patch is missing packageId in About.xml! (example: <packageId>AuthorName.ModName.Specific</packageId>)

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Mod Smart Speed: targetVersion field is obsolete, use supportedVersions instead.

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

PS : I run the mod with CE enabled.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 07, 2020, 09:26:02 PM
Quote from: Laconique on May 07, 2020, 07:48:43 PM
Hello everyone, thanks for the mod author contribution.

I happen to stumble on an annoyinbg bug that make trading with NPC impossible. Fairly well explained in this reddit link :

https://www.reddit.com/r/RimWorld/comments/gck463/unable_to_trade_with_trading_visitors/

I can also provide a video if needed.


CE is not supported yet, and I have not performed any compatibility testing with it.
Be sure to vet the mods you're installing, as the Babies and Children CE patch you're using is for a different iteration of this mod.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: FrozenSnowFox on May 11, 2020, 12:17:59 AM
I put my female colonist on priority 1 for Childcare but it results in her just standing around at the crib a lot of the time.  Checking the log a lot of errors are being thrown.  I do have Dubs Bad Hygiene with thirst enabled so I'm not sure if that makes any difference.  Also it seems that I can't tell my people to give the baby water to satisfy the thirst need.

Seara started 10 jobs in 10 ticks. List: (Wait_MaintainPosture (Job_967478)) , (PlayWithBaby (Job_967480) A=Thing_Human128246) , (PlayWithBaby (Job_967482) A=Thing_Human128246) , (PlayWithBaby (Job_967486) A=Thing_Human128246) , (PlayWithBaby (Job_967489) A=Thing_Human128246) , (PlayWithBaby (Job_967491) A=Thing_Human128246) , (PlayWithBaby (Job_967496) A=Thing_Human128246) , (PlayWithBaby (Job_967501) A=Thing_Human128246) , (PlayWithBaby (Job_967503) A=Thing_Human128246) , (PlayWithBaby (Job_967507) A=Thing_Human128246)  curDriver=JobDriver_PlayWithBaby (toilIndex=3) curJob=(PlayWithBaby (Job_967507) A=Thing_Human128246)
Verse.Log:Warning(String, Boolean)
Verse.AI.JobUtility:DMD<DMD<TryStartErrorRecoverJob_Patch0>?1878566016::TryStartErrorRecoverJob_Patch0>(Pawn, String, Exception, JobDriver)
Verse.AI.Pawn_JobTracker:FinalizeTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:DMD<DMD<Tick_Patch1>?-520848384::Tick_Patch1>(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:DMD<DMD<UpdatePlay_Patch1>?-2126437376::UpdatePlay_Patch1>(Game)
Verse.Root_Play:Update()
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 11, 2020, 09:34:17 PM
Quote from: FrozenSnowFox on May 11, 2020, 12:17:59 AM
I put my female colonist on priority 1 for Childcare but it results in her just standing around at the crib a lot of the time.  Checking the log a lot of errors are being thrown.  I do have Dubs Bad Hygiene with thirst enabled so I'm not sure if that makes any difference.  Also it seems that I can't tell my people to give the baby water to satisfy the thirst need.

A few folks have reported issues with Bad Hygiene. I believe the new way we handle the feed baby job doesn't allow doctors or parents to bring water to the baby. Definitely on the todo list. For now, I believe Bad Hygiene allows you to disable thirst for babies - another user mentioned something to that effect around page 4 I think?

For anyone working on contributions, CNP will be under a code freeze until the Alien Race changes are merged - probably a week or two at best. As part of this change, I am refactoring large parts of the project to match my preferred coding standards and adding a linter to help enforce these standards. As such, there will likely be a large number of merge conflicts if PRs are merged prior, and I do not want to deal with that.
Feel free to continue development, but I will not be reviewing or merging PRs until after the changes are complete and conflicts are resolved.

The body type POC worked out well enough, so some of the nasty code in the PawnRenderer patch can be replaced soon. I am implementing a racial def that allows configurations at any number of lifestages so each race can decide how CNP handles their different life cycles.
Currently working on a new settings interface so we can enable or disable individual races at play-time.
Races without a custom racial def will attempt to use the default (human) def, which may not work in all cases, or at the least may not make sense for some race.

This will obviously be a major change, so expect a new major release version 3.0.0, which will not be backwards compatible.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Doctrine on May 12, 2020, 05:57:09 AM
I think this is incompatible with androids right now. The droids (haven't tried the androids) were unable to bedrest for surgeries or repairs. Also they become unable to recharge from power sources so they need to eat droid batteries or die.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Sshodan on May 12, 2020, 06:44:41 AM
First - thank you so much for updating this! :) I love this mod and can't imagine playing without it!
I do have a couple of issues I never had before - one is the mentioned inability to give water to the baby... I did switch the thirst need off, but I have to say I'd love to have it back.
The second one is with Facial Stuff - I never used to have this issue before, but atm the infants have facial features floating over their heads and they are offset when laying in the crib. Does not seam to have any negative gamplay effects so far but it could look better :)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: peppybojagger on May 12, 2020, 03:41:38 PM
If I use any version above 2.0.3, my colonists will wash people (I'm using Dubs Bad Hygiene mod) with no injuries who are sleeping in private, non-medical beds. If I stay on 2.0.3 it doesn't happen so I'm pretty sure it's coming from this mod even though I'm the only one I've seen having this problem. I'm okay staying on 2.0.3 for now but I would like to update eventually!

Code from running 2.1.1:
11213194 Donna: CheckForJobOverride
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:CheckForJobOverride()
RimWorld.<>c__DisplayClass2_0:<LayDown>b__1()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213194 Donna: StartJob [washPatient (Job_3143876) A=Thing_Human127922 B=Thing_DBH_WaterBottle322249] lastJobEndCondition=InterruptOptional, jobGiver=RimWorld.JobGiver_Work, cancelBusyStances=False
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<StartJob_Patch2>?2041608320::StartJob_Patch2>(Pawn_JobTracker, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:CheckForJobOverride()
RimWorld.<>c__DisplayClass2_0:<LayDown>b__1()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213194 Donna: CleanupCurrentJob LayDown condition InterruptOptional
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<CleanupCurrentJob_Patch1>?1584573312::CleanupCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:DMD<DMD<StartJob_Patch2>?2041608320::StartJob_Patch2>(Pawn_JobTracker, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:CheckForJobOverride()
RimWorld.<>c__DisplayClass2_0:<LayDown>b__1()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213950 Donna: JobDriver_washPatient ends current job washPatient (Job_3143876) A=Thing_Human127922 B=Thing_DBH_WaterBottle322249 because of toils[1].endConditions[2]
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.JobDriver:CheckCurrentToilEndOrFail()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213950 Donna: EndCurrentJob washPatient (Job_3143876) A=Thing_Human127922 B=Thing_DBH_WaterBottle322249 condition=Succeeded curToil=1
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.JobDriver:EndJobWith(JobCondition)
Verse.AI.JobDriver:CheckCurrentToilEndOrFail()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213950 Donna: CleanupCurrentJob washPatient condition Succeeded
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<CleanupCurrentJob_Patch1>?1584573312::CleanupCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.JobDriver:EndJobWith(JobCondition)
Verse.AI.JobDriver:CheckCurrentToilEndOrFail()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213950 Donna: StartJob [Wait_MaintainPosture (Job_3143914)] lastJobEndCondition=None, jobGiver=, cancelBusyStances=False
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<StartJob_Patch2>?2041608320::StartJob_Patch2>(Pawn_JobTracker, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.JobDriver:EndJobWith(JobCondition)
Verse.AI.JobDriver:CheckCurrentToilEndOrFail()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-1859684352::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213951 Donna: Job expire
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213951 Donna: EndCurrentJob Wait_MaintainPosture (Job_3143914) condition=Succeeded curToil=0
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213951 Donna: CleanupCurrentJob Wait_MaintainPosture condition Succeeded
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<CleanupCurrentJob_Patch1>?1584573312::CleanupCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213951 Donna: TryFindAndStartJob
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

11213951 Donna: StartJob [UseToilet (Job_3143915) A=Thing_ToiletAdvStuff26104] lastJobEndCondition=None, jobGiver=DubsBadHygiene.JobGiver_UseToilet, cancelBusyStances=False
Verse.Log:Message(String, Boolean)
Verse.AI.Pawn_JobTracker:DebugLogEvent(String)
Verse.AI.Pawn_JobTracker:DMD<DMD<StartJob_Patch2>?2041608320::StartJob_Patch2>(Pawn_JobTracker, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch1>?73835520::EndCurrentJob_Patch1>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Sshodan on May 12, 2020, 04:18:34 PM
@peppybojagger I have this problem as well, I was just not sure what mod was doing it - I have a long list. But yep, creepy doctors go around washing people at night :D
Although one of my infants grew up a bit... Now it has a whole second head floating over it... So yep Facial Stuff conflict is here and strong.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Zarak on May 12, 2020, 07:51:27 PM
Happy to see this mod being maintained. I used to use this with the Baby mod, that would have newborns appear as Babies and not fully grown adults at one years old. Does this mod have such a feature, or should I try using the abandoned Baby mod?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 13, 2020, 07:34:24 AM
Quote from: Zarak on May 12, 2020, 07:51:27 PM
Happy to see this mod being maintained. I used to use this with the Baby mod, that would have newborns appear as Babies and not fully grown adults at one years old. Does this mod have such a feature, or should I try using the abandoned Baby mod?
IIRC, Babys and Children is a fork of CNP with some features stripped and a different focus.
CNP broadly handles the following:
Pregnancy and birth
Child rendering (1 year olds look like 1 year olds)
Pawn development with age

Personally I would hold off on this mod for the time being, as it's still in a transition phase with a lot of changes coming. Other mod support is spotty at the moment. Once the primary feature list is finished out, I will start adding other mods to my test setup and workout some of the incompatibilities we've introduced.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 13, 2020, 08:36:16 AM
Perhaps make a carry mechanic that allows a pawn with childcaring to carry 1 or 2 infants/toddlers around using a "baby wrap" first one on the back only adding a very slight movement debuff due to weight and the second one in front adding more to the slowdown and add a lets say a 10% manipulation debuff.
This can be used to make other factions take their infants and toddler with them although unless you are planning on adding a chance for female pawns to be pregnant upon generation this should be a very rare occasion. Add somewhat decent insulation to the wrap so infants and toddlers dont freeze/overheat to easily maybe also add a tiny cowboy hat for warmer climates?

I would also reccomend removing the need to bring a infant/toddler to a crib to feed them as this might become troublesome if a pawn attempts to feed a infant/toddler it is carrying, instead they should be able to get fed anywhere use the mechanics of "stabilize here" if this proves difficult to implement.

As for handling imprisoment I think its best that infants and toddlers can simply be adopted without reducing resistance, to balance this however perhaps a colony wide debuff something like "-5 great another noise generator to feed" for 15 days? And to make this better still remove the need for a crib to feed as for now imprisoned toddlers will be taken out the prison to a colonist crib to feed them which is kinda annoying having to micromanage the escorting them back to bed (infants will always be fed inside their assigned prison cribs and occasionally toddlers too)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 13, 2020, 10:20:01 AM
Yeah, it might be worth it to cut the crib out of feeding. The original relied partly on logic used to feed patients, which isn't really necessary anymore.
Faction babies is on the todo list, but there are a lot of problems to solve there.

2.1.2 released: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.1.2
Courtesy of ThirdofFive. Trait rework, new memories for colonists, and some bugfixes. Full details on the git page.

Another eldritch horror for the photo album:
(https://puu.sh/FK6Ap/96d1650b41.png) (https://puu.sh/FK7ep/2bc3012d50.png)
(https://puu.sh/FKALX/cf6e9f62c4.png)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: 2Foldri on May 13, 2020, 10:37:17 PM
Is there no alien race support? Not only from reading but also testing it doesn't seem there is. Is there no patch for alien races? I practically only ever use them and the incompatibility makes me miss the "Baby and Children" 'fork' of the original which hasn't been updated for 1.1.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: jager666 on May 14, 2020, 03:22:22 PM
Hi,

I'm using the 2.1.1 version and it taxes the TPS quite a lot with Childcare job and some things constantly running in the background. You might want to pop into Dubs Discord to #performance-analyzer to figure this out, lots of people there helping with lag problems.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 14, 2020, 04:26:28 PM
Quote from: 2Foldri on May 13, 2020, 10:37:17 PM
Is there no alien race support? Not only from reading but also testing it doesn't seem there is. Is there no patch for alien races? I practically only ever use them and the incompatibility makes me miss the "Baby and Children" 'fork' of the original which hasn't been updated for 1.1.
Working on it.

Quote from: jager666 on May 14, 2020, 03:22:22 PM
Hi,

I'm using the 2.1.1 version and it taxes the TPS quite a lot with Childcare job and some things constantly running in the background. You might want to pop into Dubs Discord to #performance-analyzer to figure this out, lots of people there helping with lag problems.
Post your test results for a point of comparison, please.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: peppybojagger on May 14, 2020, 04:58:45 PM
@Sshodan so happy I'm not the only one, it was driving me nuts. I have a night owl doctor/researcher who instead of researching, just washes people all night, so it's actually a pretty inconvenient bug. You can revert back to 2.0.3 if you don't mind them falling out of the crib. Hopefully it'll be fixed in the next release so I can finally update!

I'm dealing with the Facial Stuff human-head hats as well. Terrifying.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: jager666 on May 15, 2020, 02:04:52 AM
Quote from: jager666 on May 14, 2020, 03:22:22 PM
Hi,

I'm using the 2.1.1 version and it taxes the TPS quite a lot with Childcare job and some things constantly running in the background. You might want to pop into Dubs Discord to #performance-analyzer to figure this out, lots of people there helping with lag problems.
Post your test results for a point of comparison, please.
[/quote]

Those are my screens from a freshly started game.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Tenshi~Akari on May 15, 2020, 10:49:38 AM
Quote from: peppybojagger on May 14, 2020, 04:58:45 PM
@Sshodan so happy I'm not the only one, it was driving me nuts. I have a night owl doctor/researcher who instead of researching, just washes people all night, so it's actually a pretty inconvenient bug. You can revert back to 2.0.3 if you don't mind them falling out of the crib. Hopefully it'll be fixed in the next release so I can finally update!

I'm dealing with the Facial Stuff human-head hats as well. Terrifying.

Coming back from a long time of not having touched RW to play again (Thank you Tragix & everyone else involved in keeping this mod alive, as I find myself not able to play for long without it.) Also playing w/ Facial Stuff enabled, and I am also very much experiencing the "baby body" bugs I've seen in screenshots... already left a comment about it on Killface's Github about it. (That, and I actually was going to request the animations be carried over to child pawns anyways, whether it be an extension of both mods or otherwise. But I digress.)

I'm playing now even with the 2.1.2 version, and this error came up on startup:

[Children_and_Pregnancy][ERR] Failed to apply Harmony patches for children.and.pregnancy. Exception was: HarmonyLib.HarmonyException: IL Compile Error ---> System.FormatException: Method System.Void Verse.PawnGraphicSet::ResolveApparelGraphics() cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) Verse.PawnGraphicSet:DMD<DMD<ResolveApparelGraphics_Patch2>?763692800::ResolveApparelGraphics_Patch2> (Verse.PawnGraphicSet): IL_0067: call      0x0000001b


  at HarmonyLib.Memory.DetourMethodAndPersist (System.Reflection.MethodBase original, System.Reflection.MethodBase replacement) [0x00021] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00081] in <2161c8330234450b8141397c32c11571>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <2161c8330234450b8141397c32c11571>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <2161c8330234450b8141397c32c11571>:0
  at HugsLib.ModBase.ApplyHarmonyPatches () [0x0009a] in <fc2a11f71b6d4afa9609174d33be98a1>:0
Verse.Log:Error(String, Boolean)
HugsLib.Utils.ModLogger:Error(String, Object[])
HugsLib.ModBase:ApplyHarmonyPatches()
HugsLib.HugsLibController:EnumerateChildMods(Boolean)
HugsLib.HugsLibController:LoadReloadInitialize()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()


I also have the latest versions of Harmony & HugsLib to be sure. This basically isn't the only mod having issues w/ Harmony patches on my end, but it's one of the more noticeable ones in my error log.

(Will come back w/ my mod list when I'm back on the right computer.)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 15, 2020, 11:46:08 AM
Quote from: jager666 on May 15, 2020, 02:04:52 AM
Those are my screens from a freshly started game.
Interesting, your test is 4x higher response time than mine. I suppose hardware differences might come into play here. As part of the current WIP change, I'll be revisiting all of these jobs anyway, so I'll take a look at performance while I'm here.

Quote from: Tenshi~Akari on May 15, 2020, 10:49:38 AM

I also have the latest versions of Harmony & HugsLib to be sure. This basically isn't the only mod having issues w/ Harmony patches on my end, but it's one of the more noticeable ones in my error log.

(Will come back w/ my mod list when I'm back on the right computer.)

The patch that's failing is a transpiler, which is pretty untypical. My first guess would be that another mod is also transpiling ResolveApparelGraphics, which could cause the resulting IL to be bogus.
I've never used Facial Stuff before, but I can add it to the list of mods to look into later. My current view of other-mod support is more or less "Don't break them." I can't say what mods we'll explicitly support, but most likely those that involve rendering changes will be patched on CNP's side. Things like school/training, growth vats, etc should be patched on the other side.

For some reason, Alien races recalculates the pawn body graphic based on the body type name instead of just using the graphic on the body itself. Thanks to this, using BodyType instead of direct graphics paths will probably be impossible. When we change body types, Alien Races will just start throwing errors instead.
Looking at the sheer number of patches and complexity of AR, I'm starting to think there isn't a "good" way to integrate these mods. Competing with transpiler patches is going to be complex at best and disastrous at worst. Technically, both mods will now want to accomplish the exact same thing with scaling and offset changes, but with different rules applied.

My best guesses on how to proceed:
1. Assume that CNP has a more restrictive rendering flow due to graphics changing in-play, patch the render methods AFTER Alien Races, effectively overriding it's decisions if certain conditions in CNP are met.
2. Scrap CNP's attempts to patch PawnRenderer directly and instead utilize Alien Races as a hard dependency. Modify scale, offset, graphics, and body types prior to render. Not sure how this would be done, or if it's possible without patching  AR patches, which is out of the question.

#1 is probably the best bet for complexity and time to develop. To a degree, this is what CNP is already doing with graphics overrides - by providing a new graphic at render time instead of letting it render the body's graphic, it essentially ignores any other patches that modify the graphic. I'm not 100% sure yet, but there may be some methods we both need to patch where the transpilations may conflict in a way that this will not work. It might require some hokey patches to forcefully ignore what AR is doing in these cases.

The short of what we want to accomplish is not far from having a different ThingDef_AlienRace for each lifestage, preferably without a hard dependency on Alien Races.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Sshodan on May 15, 2020, 04:31:46 PM
@peppybojagger I'm currently using Work Tab by Fluffy to get around it by lowering the priority of "washing the patient" job to minimum - if I need the doctor to do it I'll force the issue, but other ways they never get around to it :)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 16, 2020, 01:24:34 AM
I just encountered a bug in the newest version where cribs are built instantly with no progress bar or animation. Seems like just a minor bug that might have resulted from a typo in the defs or something, not really worth making an issue in gitlab.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Tocato on May 19, 2020, 04:54:47 AM
Can't wait for alien kijin and Logan babies
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Lazla on May 20, 2020, 06:12:30 PM
Anyone knows how this plays with RJW, or is children and education better compatible..
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on May 22, 2020, 05:32:48 PM
Quick update - Currently hung up on Alien Races support. In order to display younglings properly, I need to be able to scale down Alien Race's Body Graphics. I'd like to be able to do this per bodypart, which would require context to which body part is preparing to be rendered. Only way I can see how to do that right now is to patch Alien Race's DrawAddons method. Attempting to do so seems to cause a few confusing errors however.
I'll see what I can come up with. May need to consider other ways to add scaling and offsets to these parts.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: crowman on May 23, 2020, 06:40:21 PM
Are my beavers supposed to mate with the main machiavellian colonist? You know, the dude with the amazing mane of hair, blonde, ocean-blue eyes and a schlong the size of Antarctica? Not that I mind, I think it gives the play-through an interesting dynamic between the sentient castors and those bipedal monkeys whose main activity is eat hot chip and lie. In retrospect, I can't even recall why I chose humanoids as the starting race when those nocturnal, semiaquatic rodents are on a whole other step of evolutionary scale. Besides their 4-digit IQ figure (after you account for unsupervised anomaly-detection algorithms) their unparalleled hydrophilic adaptations allows them to build under water which, for obvious reasons, provides fantastic defense against their natural predator, the north-american coyote and high-school potheads, both of which appear frequently in late-game sieges and art-schools.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Errant_Gunner on May 23, 2020, 07:29:15 PM
Currently having an issue with the "set up camp" mod. Brand new babies that are rescued and brought to the crib immediately remain downed on top of the crib location. If doctoring is set to priority number 1 the pawn will continually 'rescue' the downed pawn over and over again at a rate of one job per tick. Since the baby never leaves the 'wait_downed' state, they can't be fed, washed, or given water. This only occurs on camps, at permanent settlements the baby leaves the downed state when brought to the crib.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 23, 2020, 09:31:05 PM
Quote from: Errant_Gunner on May 23, 2020, 07:29:15 PM
Currently having an issue with the "set up camp" mod. Brand new babies that are rescued and brought to the crib immediately remain downed on top of the crib location. If doctoring is set to priority number 1 the pawn will continually 'rescue' the downed pawn over and over again at a rate of one job per tick. Since the baby never leaves the 'wait_downed' state, they can't be fed, washed, or given water. This only occurs on camps, at permanent settlements the baby leaves the downed state when brought to the crib.

Caravan related stuff hasn't been worked on yet, we'll get to that. In the mean time I would not recommend bringing babies or pregnant colonists on caravans
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 24, 2020, 10:09:51 AM
Children with night owl trait are still scared of the dark, exactly the same as with the undergrounder trait before.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 24, 2020, 10:18:30 AM
Quote from: Geese man on May 24, 2020, 10:09:51 AM
Children with night owl trait are still scared of the dark, exactly the same as with the undergrounder trait.

iirc night owl isn't a genetically inheritable trait, so your child colonists shouldn't have that trait in the first place. Are you using the latest version?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 24, 2020, 10:33:59 AM
Quote from: Third_Of_Five on May 24, 2020, 10:18:30 AM
Quote from: Geese man on May 24, 2020, 10:09:51 AM
Children with night owl trait are still scared of the dark, exactly the same as with the undergrounder trait.

iirc night owl isn't a genetically inheritable trait, so your child colonists shouldn't have that trait in the first place. Are you using the latest version?

its not a child from pregnancy, she was one of the starters and other random generated children can also have the night owl trait.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Lenins Cat on May 24, 2020, 07:19:54 PM
My log is getting spammed by Pawns getting assigned to 10 jobs in 10 ticks
https://gist.github.com/d694f9db83905a389d701c7452e9051a
The job it keeps assigning is playing with the baby.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on May 24, 2020, 09:47:16 PM
Quote from: Lenins Cat on May 24, 2020, 07:19:54 PM
My log is getting spammed by Pawns getting assigned to 10 jobs in 10 ticks
https://gist.github.com/d694f9db83905a389d701c7452e9051a
The job it keeps assigning is playing with the baby.

Does this bug show up in an unmodded save?
Also, try drafting the pawn to reset their tasks and then undraft them. It might be that this bug resulted from you exiting the game and reloading while the pawn was in the middle of a job, which I have experienced issues with in the past.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: dusiiaczek on May 25, 2020, 06:45:30 AM
Quote from: Lenins Cat on May 24, 2020, 07:19:54 PM
My log is getting spammed by Pawns getting assigned to 10 jobs in 10 ticks
https://gist.github.com/d694f9db83905a389d701c7452e9051a
The job it keeps assigning is playing with the baby.

Its incompatibility with [D] Interests. When i removed Interests spam with ticks stopped. (It was funny time, had two babies, spam was so intense I couldn't play at x3 speed)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on May 26, 2020, 08:00:28 PM
The pregnancy duration settings are not functioning as it will always be 45 days.

Prisoners from other factions will get the +10 baby mood buff when a baby is born but the description says: "A child was born into our colony. How wonderful!" I assume this is not intended with that description?

And please change the miscarriage from starvation to be -26 because the the shitty AI will prioritize almost everything above eating then starving themselves whilst working or doing something recreational just long enough to miscarry  (when using nutrient paste dispensers so no meals in their inventory) It's really annoying to having to make sure pregnant colonists eat enough.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Midorihime on May 26, 2020, 09:21:25 PM
Could someone maybe offer some insight as to why I get this error?

Love: Invalid/No-opposite Gender. Pawn: Leonie 'Leonie' Leiva Partner: Manfera 'Richy' Kale
Verse.Log:Message(String, Boolean)
ChdLogger.ChdLogging:LogMessage(String)
Children.MorePawnUtilities:Loved(Pawn, Pawn, Boolean)
Children.JobDriver_Lovin_Patch:JobDriver_Lovin_Done(JobDriver_Lovin)
RimWorld.JobDriver_Lovin:DMD<DMD<GenerateRandomMinTicksToNextLovin_Patch1>?1424360320::GenerateRandomMinTicksToNextLovin_Patch1>(JobDriver_Lovin, Pawn)
RimWorld.JobDriver_Lovin:<MakeNewToils>b__11_4()
Verse.AI.Toil:Cleanup(Int32, JobDriver)
Verse.AI.JobDriver:DMD<DMD<Cleanup_Patch1>?636211200::Cleanup_Patch1>(JobDriver, JobCondition)
Verse.AI.Pawn_JobTracker:DMD<DMD<CleanupCurrentJob_Patch0>?1622310784::CleanupCurrentJob_Patch0>(Pawn_JobTracker, JobCondition, Boolean, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:DMD<DMD<EndCurrentJob_Patch2>?-1528896000::EndCurrentJob_Patch2>(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.JobDriver:EndJobWith(JobCondition)
Verse.AI.JobDriver:CheckCurrentToilEndOrFail()
Verse.AI.JobDriver:DMD<DMD<DriverTick_Patch1>?-592704000::DriverTick_Patch1>(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:DMD<DMD<Tick_Patch2>?-493317632::Tick_Patch2>(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DMD<DMD<DoSingleTick_Patch1>?825686144::DoSingleTick_Patch1>(TickManager)
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


I have no idea what mod is causing my pawns to have invalid genders. I took out CE thinking it was the problem but turns out it wasn't. Here's a list of my mods:
https://i.imgur.com/zWqg36s.png
https://i.imgur.com/iCCTJ73.png
https://i.imgur.com/TiCyl0x.png
https://i.imgur.com/Hz7JqBI.png
https://i.imgur.com/5WaXrm5.png
https://i.imgur.com/wT7UJx5.png
https://i.imgur.com/8sQKPhd.png
https://i.imgur.com/yU79w6h.png
https://i.imgur.com/ypatiCN.png
https://i.imgur.com/tfDdxcw.png
https://i.imgur.com/MHzeOnL.png

I moved C&P to the bottom from the top as a 'just in case' but this error still persists.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: sidfu on May 26, 2020, 09:40:00 PM
looks like alien babies dont get sized right. might want to check the children and babies one to see how he did the code for none humans. it shouldnt be much of a change
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: MissStrobo on May 27, 2020, 08:09:23 AM
error when used with Combat Extended

[Children_and_Pregnancy][ERR] Failed to apply Harmony patches for children.and.pregnancy. Exception was: HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.Pawn_HealthTracker::CheckForStateChange(System.Nullable`1<Verse.DamageInfo> dinfo, Verse.Hediff hediff) ---> System.Exception: Wrong null argument: br NULL
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: IskeAhi on May 28, 2020, 06:51:27 AM
Hey man, great mod, really helps add some depth and longevity to the playthrough.

I am unfortunately having an issue with Android Tiers, I went through the thread to see if anybody else had and it seems like similar things had popped up before. My androids can work, but my human pawns keep dragging them to the charging station and 'playing' with them as if they were babies. Basically this causes an infinite loop where if I have a charging station built, the android is constantly being dragged off, meaning I cant repair them or charge their batteries.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: malistaticy on May 30, 2020, 06:55:59 AM
Quote from: IskeAhi on May 28, 2020, 06:51:27 AM
My androids can work, but my human pawns keep dragging them to the charging station and 'playing' with them as if they were babies. Basically this causes an infinite loop where if I have a charging station built, the android is constantly being dragged off, meaning I cant repair them or charge their batteries.
a workaround is to turn off childcare on most of your pawns except any mothers you might have, and then put  those mothers in a restricted area where they can go anywhere except to the tiles surrounding your charge port
this mod doesnt play well with alien races yet

also, suggestion, it'd be nice if the Allowed Age Range scenario part was patched to allow younger pawns than 15
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 02, 2020, 04:30:28 PM
Sorry for infrequent updates, lots to do and little time to do it.
I am aware the existing version still has a lot of bugs, and will address the most grievous in the next release.

Finally working out the kinks with HAR's body addons. Since every body is different, I don't really have a way to do a one-size-fits-all scale adjustment for races that do not provide a specific def for these adjustments. I will probably also need a new way to identify body addons, as right now I believe part names are not unique, which won't work so great.

For now, something for the horror album, and another for the success album:
(https://puu.sh/FRVwu/debb3d0132.png)
(https://puu.sh/FRVoo/72d836eef1.png)

Edit:
Testing Orassan kittens:
(https://puu.sh/FT1Ky/ecf24c3d37.png)
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 07, 2020, 02:37:10 PM
Version 3.0.0 released: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.0
Consider this a development release, it may still have numerous problem - use at your own risk. Be sure to perform a clean install - completely delete the previous version and replace it with this one. This will not work with previous saves, but should(?) work on a clean save that has never used CNP.

This version is a rework of almost every age-based feature. We now use a def file to define how different races and ages should be treated by the mod. You will find that some settings have been removed and moved to the def file - these are settings that ought to be provided by the author of a race. Modifiers may be added at a later time to give the player some leverage. Most previously hard coded configs such as graphics and offsets are now configurable via the def file.

What this means: We have limited support for races using Humanoid Alien Races. As HAR allows for body addons, there is no way that I could identify to have a single catch-all configuration that correctly resizes and lines up every part for every race. As such, races that have additional body parts or special graphics will still need a def patch to look proper. Currently I have prepared defs for Ratkin and Orassan races for the proof of concept.

By default, lifecycle and pregnancy are disabled for races that do not sufficiently match humans. Right now, that means human-like intelligence, and precisely 5 life stages. Other races may be enabled by the user (restart after enabling,) but if the race doesn't have a sufficient def and cannot use the default def, you will see errors.

Since this change reworked so many features, it's probable that some of them are now broken or buggy. I have gone through the usual testing, but things always slip through the cracks. For example, I still can't figure out how to replicate the 10 jobs per tick bug reported previously.

I have also taken a stab at improving the performance of a few of the job drivers. There are probably a lot of performance tweaks that can be done in the rendering.
This should still work without HAR installed, but I have performed most testing with it enabled.

Let me know if there are issues. If there is a specific race you would like to see support for, let me know. I would much prefer race author's to provide the patch themselves as they care far more for their race than I do, but it only takes 1-2 hours to setup a basic patch so I'm not completely opposed to it. I'm also not an artist, so any new or modified graphics are out of the question.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Third_Of_Five on June 07, 2020, 03:17:23 PM
So does this mod require humanoid alien races as a dependency now? or is HAR optional?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 07, 2020, 07:01:27 PM
Quote from: Third_Of_Five on June 07, 2020, 03:17:23 PM
So does this mod require humanoid alien races as a dependency now? or is HAR optional?
Optional.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Fakeaccount123 on June 08, 2020, 11:45:54 AM
Thanks for keep working on this mod.
Can i make a weird request? Would you consider give support to alien races that lay eggs instead of having mammal pregnancy?
I think it would be fun to have some kind of reptilian race that lay eggs instead of giving birth directly. However i can´t make humanoid races to lay eggs by editting xml files :-\
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 08, 2020, 01:10:23 PM
Quote from: Fakeaccount123 on June 08, 2020, 11:45:54 AM
Thanks for keep working on this mod.
Can i make a weird request? Would you consider give support to alien races that lay eggs instead of having mammal pregnancy?
I think it would be fun to have some kind of reptilian race that lay eggs instead of giving birth directly. However i can´t make humanoid races to lay eggs by editting xml files :-\

I personally have no plans to implement something like this, but I have made a point to account for egg laying races when preparing the API. It should be fairly trivial for a mod author to write a pregnancy class for egg layers. Maybe once I work through the current backlog I can add something like that for native support or for an extension, but i suspect that will be a very long ways off.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: NeonTheCoder on June 09, 2020, 08:43:17 AM
Quote from: Tragix on June 07, 2020, 02:37:10 PM
Let me know if there are issues. If there is a specific race you would like to see support for, let me know. I would much prefer race author's to provide the patch themselves as they care far more for their race than I do, but it only takes 1-2 hours to setup a basic patch so I'm not completely opposed to it. I'm also not an artist, so any new or modified graphics are out of the question.

Working on a patch for now, but it seems that Alien Races with head pieces that have extra graphics for facing west, flip their headpieces when facing west while still loading the west textures, so the headpieces end up facing the wrong way when facing west.
Wondering if it would be possible to patch it so it could auto detect this and not flip parts if there are specific west graphics for them.
(the race in question is Star Wars Races, so far only noticed it with Twileks, but Rodians, Ewoks, and Wookies(?) have a western textures as well that would likely also need to be patched by hand without an autofix)
I'm still new to Rimworld modding so forgive me if it isn't possible to do this automatically in the CS source, but I figure you could look at an extra HAR part, check it's textures and if it has a texture for west, don't flip the body part when the pawn is facing west.

I've also noticed that Races that have hard incompatibility with CnP (or are possibly not humanlike) if they are enabled in the Mod Settings to have age progression cause a index out of bounds exception when trying to get the default age progression of that race, and it loops indefinately causing you to be unable to generate a planet and start a new game.

Edit: It appears that It's not possible to flip a texture using the scale offset, I even edited the source code of the ModifyScale function and built the solution on my own only to find a negative value won't draw at all. I have no idea what the issue is now, but it's likely the mod I am using also patches the HAR DrawAddons function to even allow for these west facing textures because from what I see there is nothing in CnP's code that flips textures or reuse east textures for west, but I'm still new to this and I have no idea what the harmony Transpiler functions do so if it's on CnP's end it's somewhere in there. Unfortunately SWAR source code isn't available or else I would patch that instead.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 09, 2020, 11:22:33 AM
Quote from: NeonTheCoder on June 09, 2020, 08:43:17 AM
Quote from: Tragix on June 07, 2020, 02:37:10 PM
Let me know if there are issues. If there is a specific race you would like to see support for, let me know. I would much prefer race author's to provide the patch themselves as they care far more for their race than I do, but it only takes 1-2 hours to setup a basic patch so I'm not completely opposed to it. I'm also not an artist, so any new or modified graphics are out of the question.

Working on a patch for now, but it seems that Alien Races with head pieces that have extra graphics for facing west, flip their headpieces when facing west while still loading the west textures, so the headpieces end up facing the wrong way when facing west.
Wondering if it would be possible to patch it so it could auto detect this and not flip parts if there are specific west graphics for them.
(the race in question is Star Wars Races, so far only noticed it with Twileks, but Rodians, Ewoks, and Wookies(?) have a western textures as well that would likely also need to be patched by hand without an autofix)
I'm still new to Rimworld modding so forgive me if it isn't possible to do this automatically in the CS source, but I figure you could look at an extra HAR part, check it's textures and if it has a texture for west, don't flip the body part when the pawn is facing west.

I've also noticed that Races that have hard incompatibility with CnP (or are possibly not humanlike) if they are enabled in the Mod Settings to have age progression cause a index out of bounds exception when trying to get the default age progression of that race, and it loops indefinately causing you to be unable to generate a planet and start a new game.

Edit: It appears that It's not possible to flip a texture using the scale offset, I even edited the source code of the ModifyScale function and built the solution on my own only to find a negative value won't draw at all. I have no idea what the issue is now, but it's likely the mod I am using also patches the HAR DrawAddons function to even allow for these west facing textures because from what I see there is nothing in CnP's code that flips textures or reuse east textures for west, but I'm still new to this and I have no idea what the harmony Transpiler functions do so if it's on CnP's end it's somewhere in there. Unfortunately SWAR source code isn't available or else I would patch that instead.
Could you show an example of the error you're seeing? Or steps to reproduce it?
If you're on gitlab, you can open an issue there to track it. I believe I'm familiar with the HAR code that handles the flip for body addons. Until I replicate the issue, I'm not sure how complicated it would be to fix it. Right now, I'm not certain why this would be an issue for CNP's addons and not for adult pawns too, as I don't believe there are any qualifications on the flip.

QuoteI've also noticed that Races that have hard incompatibility with CnP (or are possibly not humanlike) if they are enabled in the Mod Settings to have age progression cause a index out of bounds exception
So races that are incompatible without a patch cause errors when manually enabled without a patch. I'm not sure what you expected here.
When you first run the mod, it will go through every race and select candidates that are "pretty close" to humans, that should theoretically work without special patches. I think there needs to be a few more checks on this process, of course.
If a player goes into the settings and enables one of the disabled races, they should expect errors unless a patch/def is provided. I plan to refine HAR support as we progress, but I highly doubt there will be a one-size-fits-all method to support HAR. I suppose we could just do a global shrink on adult pawn graphics when a def isn't provided. I suspect the result will look pretty bad - granted the current iteration looks pretty bad without custom graphics.

(https://puu.sh/FUzfY/6004e0447c.png)
Admittedly, for some races shrinking the head looks pretty alright.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: NeonTheCoder on June 09, 2020, 06:45:00 PM
Quote from: Tragix on June 09, 2020, 11:22:33 AM
Could you show an example of the error you're seeing? Or steps to reproduce it?
Yeah, the mod I used was https://steamcommunity.com/sharedfiles/filedetails/?id=1662194938&searchtext=star+wars+races I am unaware of any other mods that add specific west facing textures.
Reproduction, start a new colony, use dev mode to spawn in a twilek colonist pawn, draft them, move them west. attached is a image of the behavior I am talking about, as well as a comparison when facing east. (https://i.imgur.com/DH2vmre.png)
Quote from: Tragix on June 09, 2020, 11:22:33 AM
QuoteI've also noticed that Races that have hard incompatibility with CnP (or are possibly not humanlike) if they are enabled in the Mod Settings to have age progression cause a index out of bounds exception
So races that are incompatible without a patch cause errors when manually enabled without a patch. I'm not sure what you expected here.
I mean, I expect the errors, but not being able to make a new colony was frustrating as I had enabled the mod for all the "humanlike" races that I believed were humanlike. One or more of Outpost 21's the outer rim star wars races seem to cause these errors as well even though all of them are human like with different heads and or head pieces. But the debug mode doesn't log which race caused the error and you can't even get to the colonists menu to see which race is causing the issue.
Also scailing the head seems to be a good catch all for most races, and of course if there are issues it might be easier for one to make a patch and only worry about those specific issues not head scailing/offsets.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 09, 2020, 07:32:21 PM
Quote from: NeonTheCoder on June 09, 2020, 06:45:00 PM
Quote from: Tragix on June 09, 2020, 11:22:33 AM
Could you show an example of the error you're seeing? Or steps to reproduce it?
Yeah, the mod I used was https://steamcommunity.com/sharedfiles/filedetails/?id=1662194938&searchtext=star+wars+races I am unaware of any other mods that add specific west facing textures.
Reproduction, start a new colony, use dev mode to spawn in a twilek colonist pawn, draft them, move them west. attached is a image of the behavior I am talking about, as well as a comparison when facing east.
Quote from: Tragix on June 09, 2020, 11:22:33 AM
QuoteI've also noticed that Races that have hard incompatibility with CnP (or are possibly not humanlike) if they are enabled in the Mod Settings to have age progression cause a index out of bounds exception
So races that are incompatible without a patch cause errors when manually enabled without a patch. I'm not sure what you expected here.
I mean, I expect the errors, but not being able to make a new colony was frustrating as I had enabled the mod for all the "humanlike" races that I believed were humanlike. One or more of Outpost 21's the outer rim star wars races seem to cause these errors as well even though all of them are human like with different heads and or head pieces. But the debug mode doesn't log which race caused the error and you can't even get to the colonists menu to see which race is causing the issue.
Also scailing the head seems to be a good catch all for most races, and of course if there are issues it might be easier for one to make a patch and only worry about those specific issues not head scailing/offsets.

(https://puu.sh/FUATQ/29bb9c6306.png)
Okay, so I've been testing with this version of Twileks:
https://steamcommunity.com/sharedfiles/filedetails/?id=2018388859
I don't see the same issue here. Looking at the code for HAR, your statement seems to be true - that west facing graphics are not supported. HAR is open source, so any developer can post a PR to change that, but the issue lies with HAR. Of course, I haven't found any documentation for HAR's defs, so as far as I know the race mod you posted may be violating the contract/assumptions made by HAR, hence the break. Hard to say without poring through both mods.


For the purpose of CNP, humanlike means "uses human lifestages."
If you review CNP's def, you'll see something like this:
<lifeStageDef>HumanlikeToddler</lifeStageDef>
<lifestageType>Toddler</lifestageType>
<minAge>2</minAge>

The first is used to identify a pawn's current lifestage. The second is used to assign a broad categorization to that lifestage (how should the pawn be treated by CNP at this stage.) The last is a qualifier to expand the "primary key" so we can have more than one development stage per lifestage.

The important part here for native support without a patch is lifeStageDef. This maps directly to a race's lifeStageAges. In order to properly support a race, that race needs to use the same lifestages as a human. For example, Ratkin and Orassan both clones the lifestages of the human race, so CNP will automatically tick those as valid candidates (even if they still need a patch for alignment and scaling.)
For Twileks, they use custom stages such as BabyTwiStage, ChildTwiStage, etc. If enabled without a patch, they will cause errors like you're seeing.

Personally I view modding as either a plug-and-play, or a hobbyist process. I assume that a person modding their game is prepared to deal with the consequences if they get under the panel and adjusting settings without understanding what's going on. That said, there might be some checks I can perform to at least provide more context when a player breaks something. What I most likely cannot do is let the player enable an incompatible race and then swallow all of the errors. We add a component to the race at runtime if it is enabled, and trying to fuss with that would not be worth the effort. I can probably throw some errors on game load warning the player, though.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: NeonTheCoder on June 09, 2020, 08:23:47 PM
Quote from: Tragix on June 09, 2020, 07:32:21 PM
Okay, so I've been testing with this version of Twileks:
https://steamcommunity.com/sharedfiles/filedetails/?id=2018388859
I don't see the same issue here. Looking at the code for HAR, your statement seems to be true - that west facing graphics are not supported. HAR is open source, so any developer can post a PR to change that, but the issue lies with HAR. Of course, I haven't found any documentation for HAR's defs, so as far as I know the race mod you posted may be violating the contract/assumptions made by HAR, hence the break. Hard to say without poring through both mods.
...

Personally I view modding as either a plug-and-play, or a hobbyist process. I assume that a person modding their game is prepared to deal with the consequences if they get under the panel and adjusting settings without understanding what's going on. That said, there might be some checks I can perform to at least provide more context when a player breaks something. What I most likely cannot do is let the player enable an incompatible race and then swallow all of the errors. We add a component to the race at runtime if it is enabled, and trying to fuss with that would not be worth the effort. I can probably throw some errors on game load warning the player, though.
Yeah that version of twileks is a good substitute, but I dislike that it adds an entire faction to the game, and the lekku are hair pieces rather than body parts. Plus SWR plays nicely with Outpost 21's mods, and also has a bit more accurate depiction of their heads, and also includes twilek specific clothing. I've left a comment about this experince on his mod page as well, not sure when they will see it but it's likely they won't patch it themselves as someone else had the same issue with Children and Schooling, and he just put the blame onto that mod instead. There always is the hacky fix of litterally just flipping the images though, which I will probably end up doing, but I have no idea if I would be able to distrbute such a patch or if just shoving the new textures into a new mod folder would do anything, figure I would have to overwrite them in the SWR mod folder itself.

As for the modding aspect, it would be nice to get a few catches and error logging in there. One of the races that I was having the issue with were naga, which I thought could easily scale down but the way the mod operates that's not the case, unless you were to make it so which seems like a decent catch all imo.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Venusgate on June 10, 2020, 11:47:33 AM
Quote from: Fakeaccount123 on June 08, 2020, 11:45:54 AM
Thanks for keep working on this mod.
Can i make a weird request? Would you consider give support to alien races that lay eggs instead of having mammal pregnancy?
I think it would be fun to have some kind of reptilian race that lay eggs instead of giving birth directly. However i can´t make humanoid races to lay eggs by editting xml files :-\

Actually, you could add a new bodydef, make the bodydef texture an egg, and make the new lifestage def for that reptilian race to replace the child bodydef with the egg bodydef. At least thaat's how I'd butcher it.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 10, 2020, 01:08:48 PM
Took a close look at Twileks and spotted some problems with the way we're rendering right now - the issue is with CNP.
I'll work on it.

Quote from: Venusgate on June 10, 2020, 11:47:33 AM
Quote from: Fakeaccount123 on June 08, 2020, 11:45:54 AM
Thanks for keep working on this mod.
Can i make a weird request? Would you consider give support to alien races that lay eggs instead of having mammal pregnancy?
I think it would be fun to have some kind of reptilian race that lay eggs instead of giving birth directly. However i can´t make humanoid races to lay eggs by editting xml files :-\

Actually, you could add a new bodydef, make the bodydef texture an egg, and make the new lifestage def for that reptilian race to replace the child bodydef with the egg bodydef. At least thaat's how I'd butcher it.
This definitely true. There is even some prep work for egg lifestages in case another modder wanted to do something special with them. It would probably still need a custom pregnancy hediff or class, as it probably doesnt make sense for a reptilian birth and mammalian birth to operate in the same way.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: NeonTheCoder on June 10, 2020, 01:43:48 PM
Quote from: Tragix on June 10, 2020, 01:08:48 PM
Took a close look at Twileks and spotted some problems with the way we're rendering right now - the issue is with CNP.
I'll work on it.
Thanks man! I really appreciate it!
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Venusgate on June 10, 2020, 02:32:16 PM
Quote from: Tragix on June 10, 2020, 01:08:48 PM

Quote from: Venusgate on June 10, 2020, 11:47:33 AM

Actually, you could add a new bodydef, make the bodydef texture an egg, and make the new lifestage def for that reptilian race to replace the child bodydef with the egg bodydef. At least thaat's how I'd butcher it.
This definitely true. There is even some prep work for egg lifestages in case another modder wanted to do something special with them. It would probably still need a custom pregnancy hediff or class, as it probably doesnt make sense for a reptilian birth and mammalian birth to operate in the same way.

I'm for an egg in toddler texture that just "walks" around. Realism is nice, but half-assed features are better than no-assed ones :P
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 10, 2020, 07:34:25 PM
3.0.1 released: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.1

Includes some def validation for enabled races. Basically the assumptions we make about modder-made defs are now enforced. Also includes a few fixes to how body addon offsets and scales work, including the east-west flip problem. Twileks will still need a patch for now to deal with the actual offsets, since it looks like the default scales don't work. The race also has a custom head graphic used to connect the head tentacle things, which isn't present on the toddler graphics, so some graphic work would be needed.

I have defaulted the child stage for unsupported races to use the adult head graphic scaled. We'll see how well it works.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: NeonTheCoder on June 10, 2020, 07:52:15 PM
Quote from: Tragix on June 10, 2020, 07:34:25 PM
3.0.1 released: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.1

Includes some def validation for enabled races. Basically the assumptions we make about modder-made defs are now enforced. Also includes a few fixes to how body addon offsets and scales work, including the east-west flip problem. Twileks will still need a patch for now to deal with the actual offsets, since it looks like the default scales don't work. The race also has a custom head graphic used to connect the head tentacle things, which isn't present on the toddler graphics, so some graphic work would be needed.

I have defaulted the child stage for unsupported races to use the adult head graphic scaled. We'll see how well it works.

awesome thanks man, I really appreciate it. Going to start making patches for the races in SWR, as well as the Outpost 21 outer rim races now, been wanting to do this all day.
Might even make a patch for Naga if I have the time.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Meester on June 10, 2020, 08:31:48 PM
Any update to the Steam version?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 10, 2020, 08:35:45 PM
Quote from: NeonTheCoder on June 10, 2020, 07:52:15 PM
Quote from: Tragix on June 10, 2020, 07:34:25 PM
3.0.1 released: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.1

Includes some def validation for enabled races. Basically the assumptions we make about modder-made defs are now enforced. Also includes a few fixes to how body addon offsets and scales work, including the east-west flip problem. Twileks will still need a patch for now to deal with the actual offsets, since it looks like the default scales don't work. The race also has a custom head graphic used to connect the head tentacle things, which isn't present on the toddler graphics, so some graphic work would be needed.

I have defaulted the child stage for unsupported races to use the adult head graphic scaled. We'll see how well it works.

awesome thanks man, I really appreciate it. Going to start making patches for the races in SWR, as well as the Outpost 21 outer rim races now, been wanting to do this all day.
Might even make a patch for Naga if I have the time.

Let me know what issues you run into. I tried to give enough levers for folks to handle most races, but I really have no idea what's out there.

Quote from: Meester on June 10, 2020, 08:31:48 PM
Any update to the Steam version?
'Fraid not, I don't support the steam release.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Meester on June 10, 2020, 08:44:00 PM
Quote from: Tragix on June 10, 2020, 08:35:45 PM

'Fraid not, I don't support the steam release.

Does this mean you will make your own Steam version?

Im unsure if it will work with Children and Learning too.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Chezzprinn on June 10, 2020, 10:44:02 PM
Steam version has been updated!
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: TheBadiator on June 10, 2020, 11:31:01 PM
After the Update, all of my infants immediately grew up, and all of them glitched, so that even though they have 100 manipulation, they can't interact with objects. I had roughly 3 children old enough to hold pistols that they can't use now, and I had 5 more on the way that I don't have a bed or room for.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: NeonTheCoder on June 11, 2020, 02:20:04 AM
Quote from: Tragix on June 10, 2020, 08:35:45 PM
Let me know what issues you run into. I tried to give enough levers for folks to handle most races, but I really have no idea what's out there.
I got most of it setup and going pretty well, but for some reason they skip toddler phase straight to toddler upright phase, it wouldn't be too much of an issue I guess? Not sure if it's my code (I used the default one as a template and only replaced what I needed, made new body types for newborn, toddler, toddler upright, but not child bc head code line) but it was just disappointing because I made a texture for the toddler phase. Also this may be because of that but the alignment tool didn't seem to work in that toddler stage either, even if the body is forcibly changed with character edit. Speaking of, it seems that the child stage head doesn't render well with certain colors, pictured is a twilek child with same color as an adult but the colors look if it has been posterized, not sure if this is an issue with my textures but the other body textures I made don't do this.
(https://i.imgur.com/IWhyWEc.png)
Not sure if these issues are due to something with the mod or a conflict or what. Another thing that is a bit of an annoyance is that the body parts get a random direction for newborns so sometimes infant twi'leks can look fine, but other times the lekku are on left or right. I'm guessing because the infant is a torso texture it doesn't display the rotation, so I would have to try to fix that by adding directional graphics (just one more I don't think it would be that big of an issue) I just went off the example of the default textures, seemed like their rotation was locked.

But these problems are probably just me not understanding everything completely, sorry for being such a nuisance haha
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: zbysiek12345 on June 11, 2020, 06:03:09 AM
I came from steam to post my bug reports after update.

https://gist.github.com/HugsLibRecordKeeper/e665507509c7230cf373fa260d47ae9d
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Morrneyo on June 11, 2020, 10:50:14 AM
Bug list :
1. When a baby is born, they appear as a adult torso without head
2. Toddlers try to escape when they are fed, crawling toward to a food source
3. "RimWorldChildren.AcquirableTrait" is missing, keep popping up as red text
4. Cannot access to a debug action menu because of a thing I copied under

Exception filling window for Verse.ImmediateWindow: System.TypeLoadException: Could not resolve type with token 01000096 (from typeref, class/assembly AlienRace.AlienPartGenerator, AlienRace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)

5. Tons of crashes while loading a game
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Shydragon on June 11, 2020, 02:13:12 PM
Some glitches popped up this morning.

- The infant in my current save looked like a headless naked torso. When she started crawling at 2 quadrums she looked normal, but her clothes don't appear on her sprite.
- Childcarers take other adults to their beds to feed them.
- I have a colonist that I recruited as a 12 year old. His child sprite looked completely normal even after the update, but the moment he turned 13 his sprite became a headless naked child torso (unless he's in bed, then it only shows his head like normal).

I loaded up my other save where there's like 10 babies and all the sprites are messed up, but differently than my current save.
- The age 2 quadrum to 2 year old babies look either like headless naked adults or like walking sausages with onesies (in the crawling pose) stuck on them. This doesn't seem to correlate with age, since I have 2 year olds, 1 year olds, and >1 year olds with both versions of the glitched sprite.
- The 3 kids aged 3-5 look like headless adults. Their clothes appear normally.
- Teenagers look like adults but with child sized heads and clothes.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Unit501 on June 11, 2020, 03:39:14 PM
Quote from: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0
so in my explorations with playing with the modlist just to bug test it, the mods that I have that were being trouble with the world gen were,
Racc:https://steamcommunity.com/sharedfiles/filedetails/?id=2018388533
Thrumbkin: https://steamcommunity.com/sharedfiles/filedetails/?id=2017359567
Avali by Eriss
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 11, 2020, 03:45:12 PM
Quote from: TheBadiator on June 10, 2020, 11:31:01 PM
After the Update, all of my infants immediately grew up, and all of them glitched, so that even though they have 100 manipulation, they can't interact with objects. I had roughly 3 children old enough to hold pistols that they can't use now, and I had 5 more on the way that I don't have a bed or room for.
I'm not sure what part of  "This is incompatible with previous saves" wasn't clear.

Quote from: NeonTheCoder on June 11, 2020, 02:20:04 AM
Quote from: Tragix on June 10, 2020, 08:35:45 PM
Let me know what issues you run into. I tried to give enough levers for folks to handle most races, but I really have no idea what's out there.
I got most of it setup and going pretty well, but for some reason they skip toddler phase straight to toddler upright phase, it wouldn't be too much of an issue I guess? Not sure if it's my code (I used the default one as a template and only replaced what I needed, made new body types for newborn, toddler, toddler upright, but not child bc head code line) but it was just disappointing because I made a texture for the toddler phase. Also this may be because of that but the alignment tool didn't seem to work in that toddler stage either, even if the body is forcibly changed with character edit. Speaking of, it seems that the child stage head doesn't render well with certain colors, pictured is a twilek child with same color as an adult but the colors look if it has been posterized, not sure if this is an issue with my textures but the other body textures I made don't do this.
(https://i.imgur.com/IWhyWEc.png)
Not sure if these issues are due to something with the mod or a conflict or what. Another thing that is a bit of an annoyance is that the body parts get a random direction for newborns so sometimes infant twi'leks can look fine, but other times the lekku are on left or right. I'm guessing because the infant is a torso texture it doesn't display the rotation, so I would have to try to fix that by adding directional graphics (just one more I don't think it would be that big of an issue) I just went off the example of the default textures, seemed like their rotation was locked.

But these problems are probably just me not understanding everything completely, sorry for being such a nuisance haha
Lot's to unravel here.
The lifestages in CNPs def are mapped to a pawn using the pawn's LifeStage as well as age if minAge is provided. CNP alters the human baby lifestage to end at .5 years instead of 1.2 years that vanilla uses. Most other races probably use the same scale, so it's probable that your pawn is actually reaching stage 3 (toddler upright) before they even qualify for stage 2 - This happened a lot in testing because the birthday tool jumps from 0 years to 1 years, skipping the human toddler stage. Take a look at the XML patch in the root folder, as it's adjusting the human lifestage ages.

The child head color is another thing I notice with the Orassan children. Right now, I don't really know enough about how colors are applied to pawn bodies and faces to say what's going on here. Definitely on the todo list, however.

The infant lifestage currently uses a non-directional graphic. I've been working around these limitations up to now as I don't have the ability to modify or create graphics myself. The random direction on infant body addons is due the pawn technically facing in some other direction when downed, but still being forced to use the south facing graphic. For this reason, the current defs actually disable body addons for infants.

I appreciate you working on a patch, as your learnings will certainly help make CNP more accessible to others who want to support their own races.

Quote from: zbysiek12345 on June 11, 2020, 06:03:09 AM
I came from steam to post my bug reports after update.

https://gist.github.com/HugsLibRecordKeeper/e665507509c7230cf373fa260d47ae9d
Unfortunately, this tells me where a problem is occurring, but not with enough context to fix it. I will need to know more about the pawns that are throwing this errors - age, race, faction, etc.
There are also some unrelated errors to do with minified vents.

Quote from: Morrneyo on June 11, 2020, 10:50:14 AM
Bug list :
1. When a baby is born, they appear as a adult torso without head
2. Toddlers try to escape when they are fed, crawling toward to a food source
3. "RimWorldChildren.AcquirableTrait" is missing, keep popping up as red text
4. Cannot access to a debug action menu because of a thing I copied under

Exception filling window for Verse.ImmediateWindow: System.TypeLoadException: Could not resolve type with token 01000096 (from typeref, class/assembly AlienRace.AlienPartGenerator, AlienRace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)

5. Tons of crashes while loading a game
Please provide actual log files. A mod list wouldn't hurt either, as the typeload exception can occur when we reference AlienRaces without it installed - I may need patch out some more direct references.
As with any other report, I will need to know the ages and races of the pawns involved - parents and children.

Quote from: Shydragon on June 11, 2020, 02:13:12 PM
Some glitches popped up this morning.

- The infant in my current save looked like a headless naked torso. When she started crawling at 2 quadrums she looked normal, but her clothes don't appear on her sprite.
- Childcarers take other adults to their beds to feed them.
- I have a colonist that I recruited as a 12 year old. His child sprite looked completely normal even after the update, but the moment he turned 13 his sprite became a headless naked child torso (unless he's in bed, then it only shows his head like normal).

I loaded up my other save where there's like 10 babies and all the sprites are messed up, but differently than my current save.
- The age 2 quadrum to 2 year old babies look either like headless naked adults or like walking sausages with onesies (in the crawling pose) stuck on them. This doesn't seem to correlate with age, since I have 2 year olds, 1 year olds, and >1 year olds with both versions of the glitched sprite.
- The 3 kids aged 3-5 look like headless adults. Their clothes appear normally.
- Teenagers look like adults but with child sized heads and clothes.
Sounds like you installed over a previous save. 3.0.0 is a save breaking change - It is wholly incompatible with a game that started when using 2.x.x.

Quote from: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0

Good Lord, your logs are like a treasure trove of alien races I didn't even know existed. So far I am unable to replicate the problem, but I am downloading some of races I see in your logs to test with.

Quote from: Unit501 on June 11, 2020, 03:39:14 PM
Quote from: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0
so in my explorations with playing with the modlist just to bug test it, the mods that I have that were being trouble with the world gen were,
Racc:https://steamcommunity.com/sharedfiles/filedetails/?id=2018388533
Thrumbkin: https://steamcommunity.com/sharedfiles/filedetails/?id=2017359567
Avali by Eriss
Very helpful, thank you. Will get back once I figure it out.
edit: Do you have any mods that effect world gen or factions? A mod load order may also be helpful.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Unit501 on June 11, 2020, 04:41:00 PM
Quote from: Tragix on June 11, 2020, 03:45:12 PM
Quote from: TheBadiator on June 10, 2020, 11:31:01 PM
After the Update, all of my infants immediately grew up, and all of them glitched, so that even though they have 100 manipulation, they can't interact with objects. I had roughly 3 children old enough to hold pistols that they can't use now, and I had 5 more on the way that I don't have a bed or room for.
I'm not sure what part of  "This is incompatible with previous saves" wasn't clear.

Quote from: NeonTheCoder on June 11, 2020, 02:20:04 AM
Quote from: Tragix on June 10, 2020, 08:35:45 PM
Let me know what issues you run into. I tried to give enough levers for folks to handle most races, but I really have no idea what's out there.
I got most of it setup and going pretty well, but for some reason they skip toddler phase straight to toddler upright phase, it wouldn't be too much of an issue I guess? Not sure if it's my code (I used the default one as a template and only replaced what I needed, made new body types for newborn, toddler, toddler upright, but not child bc head code line) but it was just disappointing because I made a texture for the toddler phase. Also this may be because of that but the alignment tool didn't seem to work in that toddler stage either, even if the body is forcibly changed with character edit. Speaking of, it seems that the child stage head doesn't render well with certain colors, pictured is a twilek child with same color as an adult but the colors look if it has been posterized, not sure if this is an issue with my textures but the other body textures I made don't do this.
(https://i.imgur.com/IWhyWEc.png)
Not sure if these issues are due to something with the mod or a conflict or what. Another thing that is a bit of an annoyance is that the body parts get a random direction for newborns so sometimes infant twi'leks can look fine, but other times the lekku are on left or right. I'm guessing because the infant is a torso texture it doesn't display the rotation, so I would have to try to fix that by adding directional graphics (just one more I don't think it would be that big of an issue) I just went off the example of the default textures, seemed like their rotation was locked.

But these problems are probably just me not understanding everything completely, sorry for being such a nuisance haha
Lot's to unravel here.
The lifestages in CNPs def are mapped to a pawn using the pawn's LifeStage as well as age if minAge is provided. CNP alters the human baby lifestage to end at .5 years instead of 1.2 years that vanilla uses. Most other races probably use the same scale, so it's probable that your pawn is actually reaching stage 3 (toddler upright) before they even qualify for stage 2 - This happened a lot in testing because the birthday tool jumps from 0 years to 1 years, skipping the human toddler stage. Take a look at the XML patch in the root folder, as it's adjusting the human lifestage ages.

The child head color is another thing I notice with the Orassan children. Right now, I don't really know enough about how colors are applied to pawn bodies and faces to say what's going on here. Definitely on the todo list, however.

The infant lifestage currently uses a non-directional graphic. I've been working around these limitations up to now as I don't have the ability to modify or create graphics myself. The random direction on infant body addons is due the pawn technically facing in some other direction when downed, but still being forced to use the south facing graphic. For this reason, the current defs actually disable body addons for infants.

I appreciate you working on a patch, as your learnings will certainly help make CNP more accessible to others who want to support their own races.

Quote from: zbysiek12345 on June 11, 2020, 06:03:09 AM
I came from steam to post my bug reports after update.

https://gist.github.com/HugsLibRecordKeeper/e665507509c7230cf373fa260d47ae9d
Unfortunately, this tells me where a problem is occurring, but not with enough context to fix it. I will need to know more about the pawns that are throwing this errors - age, race, faction, etc.
There are also some unrelated errors to do with minified vents.

Quote from: Morrneyo on June 11, 2020, 10:50:14 AM
Bug list :
1. When a baby is born, they appear as a adult torso without head
2. Toddlers try to escape when they are fed, crawling toward to a food source
3. "RimWorldChildren.AcquirableTrait" is missing, keep popping up as red text
4. Cannot access to a debug action menu because of a thing I copied under

Exception filling window for Verse.ImmediateWindow: System.TypeLoadException: Could not resolve type with token 01000096 (from typeref, class/assembly AlienRace.AlienPartGenerator, AlienRace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)

5. Tons of crashes while loading a game
Please provide actual log files. A mod list wouldn't hurt either, as the typeload exception can occur when we reference AlienRaces without it installed - I may need patch out some more direct references.
As with any other report, I will need to know the ages and races of the pawns involved - parents and children.

Quote from: Shydragon on June 11, 2020, 02:13:12 PM
Some glitches popped up this morning.

- The infant in my current save looked like a headless naked torso. When she started crawling at 2 quadrums she looked normal, but her clothes don't appear on her sprite.
- Childcarers take other adults to their beds to feed them.
- I have a colonist that I recruited as a 12 year old. His child sprite looked completely normal even after the update, but the moment he turned 13 his sprite became a headless naked child torso (unless he's in bed, then it only shows his head like normal).

I loaded up my other save where there's like 10 babies and all the sprites are messed up, but differently than my current save.
- The age 2 quadrum to 2 year old babies look either like headless naked adults or like walking sausages with onesies (in the crawling pose) stuck on them. This doesn't seem to correlate with age, since I have 2 year olds, 1 year olds, and >1 year olds with both versions of the glitched sprite.
- The 3 kids aged 3-5 look like headless adults. Their clothes appear normally.
- Teenagers look like adults but with child sized heads and clothes.
Sounds like you installed over a previous save. 3.0.0 is a save breaking change - It is wholly incompatible with a game that started when using 2.x.x.

Quote from: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0

Good Lord, your logs are like a treasure trove of alien races I didn't even know existed. So far I am unable to replicate the problem, but I am downloading some of races I see in your logs to test with.

Quote from: Unit501 on June 11, 2020, 03:39:14 PM
Quote from: Unit501 on June 11, 2020, 02:49:47 PM
Updated to the new version, am now unable to generate a world.

https://gist.github.com/cccbeccbd75c38ad8e32d008c0939bf0
so in my explorations with playing with the modlist just to bug test it, the mods that I have that were being trouble with the world gen were,
Racc:https://steamcommunity.com/sharedfiles/filedetails/?id=2018388533
Thrumbkin: https://steamcommunity.com/sharedfiles/filedetails/?id=2017359567
Avali by Eriss
Very helpful, thank you. Will get back once I figure it out.
edit: Do you have any mods that effect world gen or factions? A mod load order may also be helpful.
I'm not entirely sure, where the modlist note is but,
The only WorldGen, Faction, changes come from the Race mods, and their own factions.
I loaded CnP at the end of the modlist, and CharGen and  World gen occured properly this time and I was able to enter a map, (with the Pregnancy and Lifespan settings for all Races turned off,).
Seeing that it was functional, decided to work through the races turning on the settings for the humanoid races. (Human, Fersian, Orassan, Thrumbkin, etc.) Execption errors began to float in.
Exception drawing Saski: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Children_Drawing.ModifyClothingForChild (UnityEngine.Material origMat, Verse.Pawn pawn, Verse.Rot4 bodyFacing) [0x0006f] in <4bb0865954144f9390712108e62e96fc>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnInternal_Patch2>?800333056::RenderPawnInternal_Patch2>(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool,bool)
  at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.RotDrawMode draw, System.Boolean headStump, System.Boolean invisible) [0x0001a] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnAt_Patch0>?540681344::RenderPawnAt_Patch0>(Verse.PawnRenderer,UnityEngine.Vector3,Verse.RotDrawMode,bool,bool)
  at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc) [0x0002b] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Thing.Draw () [0x00007] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.ThingWithComps.Draw () [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

So in summary, I'm not sure what is different this time execept the organization of the mod list.

Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 11, 2020, 04:51:55 PM
Quote from: Unit501 on June 11, 2020, 04:41:00 PM
I'm not entirely sure, where the modlist note is but,
The only WorldGen, Faction, changes come from the Race mods, and their own factions.
I loaded CnP at the end of the modlist, and CharGen and  World gen occured properly this time and I was able to enter a map, (with the Pregnancy and Lifespan settings for all Races turned off,).
Seeing that it was functional, decided to work through the races turning on the settings for the humanoid races. (Human, Fersian, Orassan, Thrumbkin, etc.) Execption errors began to float in.
Exception drawing Saski: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Children_Drawing.ModifyClothingForChild (UnityEngine.Material origMat, Verse.Pawn pawn, Verse.Rot4 bodyFacing) [0x0006f] in <4bb0865954144f9390712108e62e96fc>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnInternal_Patch2>?800333056::RenderPawnInternal_Patch2>(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool,bool)
  at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.RotDrawMode draw, System.Boolean headStump, System.Boolean invisible) [0x0001a] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnAt_Patch0>?540681344::RenderPawnAt_Patch0>(Verse.PawnRenderer,UnityEngine.Vector3,Verse.RotDrawMode,bool,bool)
  at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc) [0x0002b] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Thing.Draw () [0x00007] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.ThingWithComps.Draw () [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

So in summary, I'm not sure what is different this time execept the organization of the mod list.
Couple of things:
You have a ton of unsupported races - races that don't meet the native support criteria and will need patches at the moment. Ultimate goal would be to support all races natively, but the current setup can't handle that. Maybe if we changed offsets/scales from direct values to multipliers, we could get a better result for unpatched races? After all, changing the scale of a head and all body addons by 50% ought to keep the alignments closer than reducing them by 0.5 points. I'll have to think on this.

Second, if you DO enable a race in the configs, be sure to reboot the game. I should probably add a notice or automatically reboot when they player leaves that menu. We setup some required component changes at start up, as well as perform def checks. We perform a few checks that should warn you on startup if a race absolutely will not work.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Unit501 on June 11, 2020, 04:54:00 PM
Copy that, if you'd like I'll see what I can do to put these other races through the system and see what kinda of trouble I can find?

And just to confirm, the unsupported races are the Ferisans and the Racc correct?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: phutureeros on June 11, 2020, 07:48:27 PM
Quote from: Shydragon on June 11, 2020, 02:13:12 PM
Some glitches popped up this morning.

- The infant in my current save looked like a headless naked torso. When she started crawling at 2 quadrums she looked normal, but her clothes don't appear on her sprite.
- Childcarers take other adults to their beds to feed them.
- I have a colonist that I recruited as a 12 year old. His child sprite looked completely normal even after the update, but the moment he turned 13 his sprite became a headless naked child torso (unless he's in bed, then it only shows his head like normal).

I loaded up my other save where there's like 10 babies and all the sprites are messed up, but differently than my current save.
- The age 2 quadrum to 2 year old babies look either like headless naked adults or like walking sausages with onesies (in the crawling pose) stuck on them. This doesn't seem to correlate with age, since I have 2 year olds, 1 year olds, and >1 year olds with both versions of the glitched sprite.
- The 3 kids aged 3-5 look like headless adults. Their clothes appear normally.
- Teenagers look like adults but with child sized heads and clothes.

I am having the same issue with colonists taking adult colonists to beds to be fed. This save already had children and pregnancy activated but this only started happening today. Is this possible to fix or is the save scrapped? Thank you. (P.S. first time posting please let me know if i formatted my question incorrectly)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: notfood on June 11, 2020, 08:05:46 PM
Just to let you know that 3.0 breaks Multiplayer support. You need to use 2.1.2.

Why break away from HAR though? What was the issue?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: TheBadiator on June 11, 2020, 10:19:17 PM
Quote from: Tragix on June 11, 2020, 03:45:12 PM
Quote from: TheBadiator on June 10, 2020, 11:31:01 PM
After the Update, all of my infants immediately grew up, and all of them glitched, so that even though they have 100 manipulation, they can't interact with objects. I had roughly 3 children old enough to hold pistols that they can't use now, and I had 5 more on the way that I don't have a bed or room for.
I'm not sure what part of  "This is incompatible with previous saves" wasn't clear.

Serves me right for just clicking download, huh? I'll just wait until you settle upon a stable version of the mod. Because I'm tired of saves breaking.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 11, 2020, 10:39:14 PM
Quote from: notfood on June 11, 2020, 08:05:46 PM
Just to let you know that 3.0 breaks Multiplayer support. You need to use 2.1.2.

Why break away from HAR though? What was the issue?
As far as I am aware, there was never any official support for multiplayer. At least, there is no special code or mention of it in the codebase.
I've never used the multiplayer plugin myself, so I can't begin to speculate as to what is required of a mod to work with the multiplayer mod - or what broke it.

Prior to this change, there was no official support for HAR in CNP. This release is the first step towards integrating the two on CNP's side.

Quote from: Unit501 on June 11, 2020, 04:54:00 PM
Copy that, if you'd like I'll see what I can do to put these other races through the system and see what kinda of trouble I can find?

And just to confirm, the unsupported races are the Ferisans and the Racc correct?
So far I have not been able to spot the same issue you ran into on world gen, so I've got no lead on that at the moment.
I can certainly tell you that Thrumkin, Racc, and Ferisans all need to be patched. You can determine this by looking at the race def in each mod, and checking for custom life stages:
(https://puu.sh/FVqHI/e1c9cb1aa6.png)
This iteration relies on known lifestages, so custom lifestages have to have a definition so we know what to do with a pawn of a race when it reaches that lifestage.

Quote from: phutureeros on June 11, 2020, 07:48:27 PM
I am having the same issue with colonists taking adult colonists to beds to be fed. This save already had children and pregnancy activated but this only started happening today. Is this possible to fix or is the save scrapped? Thank you. (P.S. first time posting please let me know if i formatted my question incorrectly)
Per previous posts, this version cannot be used on previous save files - you will need a new save file.
When I first patched this to 1.1, I moved it to the release section assuming that it was a mature mod. However, the modded ecosystem has changed since CNP was last in development, so there are many transformations to come in order for it to reach a new point of maturity. Unfortunately, that means that some releases will introduce new mechanisms that simply won't work on an existing save.

There's still a tremendous amount of work to be done here, sadly. In order to be useful for the average mod user, we need to at a minimum not break race mods, support non player factions, handle caravans, support CE, and play nice with other derivative mods. CNP under my management will focus on handling children, pregnancy, and birth and doing so to the best of my ability to make it do so. This will eventually mean that other mods that can't make up their minds on what they want to be will step on each others toes - Babys and children, children and learning, and even RJW all derive from this original mod. I intend for CNP to provide a flexible enough implementation that any other mods wishing to use it for handling these three features may do so, but there will come a point in time where I will have to abandon any support for players who try to mix-and-match.

All of this takes a lot of time, which I unfortunately don't have. Stability will return in time, until then there are new features to write.
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: Geese man on June 12, 2020, 12:04:57 AM
Umm how are you guys even getting to see any infants?
my pawns cannot get pregnant naturally and when forced through dev mode it wont deliver a baby.
I'm seeing this in the log:
https://gyazo.com/43ee31441f6eca23d19d15acc8908d17
currently only using harmony and hugslib with base game (adding royalty does not chance anything)
so any idea why I can only produce infants with the: "T: Give Birth" ?
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: zbysiek12345 on June 12, 2020, 07:05:49 AM
Quote from: Unit501 on June 11, 2020, 04:41:00 PM

Quote from: zbysiek12345 on June 11, 2020, 06:03:09 AM
I came from steam to post my bug reports after update.

https://gist.github.com/HugsLibRecordKeeper/e665507509c7230cf373fa260d47ae9d
Unfortunately, this tells me where a problem is occurring, but not with enough context to fix it. I will need to know more about the pawns that are throwing this errors - age, race, faction, etc.
There are also some unrelated errors to do with minified vents.


The errors are caused by my only child in colony. Human female Andrea aged 1 year and 40 days from my colony called Lechici.
In my case Andrea didn't change to a leg or something strange. I only observed that something is not good, because of few micro shuttering and then I cheked logs. I opened game today and I get this error every time. I don't see now any more errors:

Exception drawing Andrea: System.NullReferenceException: Object reference not set to an instance of an objectat RimWorldChildren.Children_Drawing.ModifyClothingForChild (UnityEngine.Material origMat, Verse.Pawn pawn, Verse.Rot4 bodyFacing) [0x0004a] in <f1be4809cdb24fa1b4d128854812276f>:0at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnInternal_Patch2>?-1857377408::RenderPawnInternal_Patch2>(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool,bool)at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.RotDrawMode draw, System.Boolean headStump, System.Boolean invisible) [0x0001a] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at (wrapper dynamic-method) Verse.PawnRenderer.DMD<DMD<RenderPawnAt_Patch1>?1380000896::RenderPawnAt_Patch1>(Verse.PawnRenderer,UnityEngine.Vector3,Verse.RotDrawMode,bool,bool)at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc) [0x0002b] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at Verse.Thing.Draw () [0x00007] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at Verse.ThingWithComps.Draw () [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0Verse.Log:Error(String, Boolean)Verse.DynamicDrawManager:DrawDynamicThings()Verse.Map:DMD<DMD<MapUpdate_Patch1>?-545372928::MapUpdate_Patch1>(Map)Verse.Game:UpdatePlay()Verse.Root_Play:Update()

(https://steamuserimages-a.akamaihd.net/ugc/1188335431777517801/605BC56D6E9059F1CD960B188BFA0185B1E9AB54/)
Title: Re: [1.1] Children and Pregnancy - v2.1.1
Post by: GhostData on June 12, 2020, 02:14:16 PM
Found the issue with opening the debug menu without alien races installed. Will be fixed in the next release.

For those complaining of pawns being born at age 14 with an adult body: Stop using Children, School, and Learning.
CSL breaks basic method contracts to accomplish its goals, and in doing so is incompatible with CNP. CSL patches the pawn generation method and explicitly ignores several parameters the class provides to control pawn age at generation, forcing the method to return a minimum of 14. This could be easily remedied on CSL's part by simply adjusting the age when the pawn is born, so I'm not sure why they patched such a crucial method.

CSL will need changes in order to be compatible with CNP, as this is not something I can fix on my side. Based on CSLs mission statement, it appears the mod is geared heavily towards being an education/RP style mod, not interested necessarily in the believability of childhood, choosing to implement a very stripped down version of pregnancy and childhood in order to better accomplish the primary goal. This is perfectly fine, though my question would be "Why handle something poorly, when you could not handle it at all?"

For the mods to play nicely, at a minimum I believe CSL would need to stop patching pawn generation classes. There are probably other issues as well. For example, both mods patch the lovin' jobs to inject pregnancy code.

I will be updating the OP with a list of mods that are incompatible. I'm certain it will not prevent anyone from trying and failing to use those incompatible mods with CNP, but I will no longer feel bad ignoring those users.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Dolore9000 on June 12, 2020, 06:37:10 PM
I had a problem where this mod and RJW together were only generating one base per faction.  If I used CNP by itself, without RJW, or RJW without CNP, then bases were spread as normal.  I updated to 3.01 from the gitlab and the issue seems fixed.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: quicklikefire on June 13, 2020, 02:39:57 PM
Hi,

I was just wondering if there's plans to expand on the mod, like adding toys, ways to study, improving children behavior, birthdays, etc or if the plan is just to keep it stable with whatever the current release is.

Also: I'm new to modding as a concept, including making them, but wondered if it was possible to bring the old Baby and Children mod to this patch or disable pregnancy so that the mod is usable with CSL. I know this branch isn't usable with it unless the other mod changes.

Thanks!
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Shydragon on June 13, 2020, 02:41:27 PM
I made a new save, but I'm still getting a couple of issues. Childcarers still try to feed adults, baby clothes don't appear on the baby's sprite, and newborns randomly become capable of walking for a bit when being carried.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: JMan1008 on June 13, 2020, 07:25:36 PM
So I started up a new game on 3.0.1 recently and recruited a 12-year old. After she turned 13, she immediately turned into a floating naked torso and my debug log was spammed with messages. Just to clarify, I am running a few incompatible race mods, but they are all disabled in the mod settings. This kid was a human, not an alien. And another one of my colonists is a sixteen-year old (not sure what age was the cut-off for teenager, but I think she's still considered one) and she's completely normal. I can hop back into my save game to get a screenshot and the exact debug log notification if that would help.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 13, 2020, 09:59:21 PM
Quote from: JMan1008 on June 13, 2020, 07:25:36 PM
So I started up a new game on 3.0.1 recently and recruited a 12-year old. After she turned 13, she immediately turned into a floating naked torso and my debug log was spammed with messages. Just to clarify, I am running a few incompatible race mods, but they are all disabled in the mod settings. This kid was a human, not an alien. And another one of my colonists is a sixteen-year old (not sure what age was the cut-off for teenager, but I think she's still considered one) and she's completely normal. I can hop back into my save game to get a screenshot and the exact debug log notification if that would help.
Thanks for actually mentioning ages and races - that part is vital. A save file would be even more helpful. We generate a few fields on pawn gen that may be screwed up for children generated for other factions.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: JMan1008 on June 14, 2020, 12:08:51 PM
Quote from: Tragix on June 13, 2020, 09:59:21 PM
Quote from: JMan1008 on June 13, 2020, 07:25:36 PM
So I started up a new game on 3.0.1 recently and recruited a 12-year old. After she turned 13, she immediately turned into a floating naked torso and my debug log was spammed with messages. Just to clarify, I am running a few incompatible race mods, but they are all disabled in the mod settings. This kid was a human, not an alien. And another one of my colonists is a sixteen-year old (not sure what age was the cut-off for teenager, but I think she's still considered one) and she's completely normal. I can hop back into my save game to get a screenshot and the exact debug log notification if that would help.
Thanks for actually mentioning ages and races - that part is vital. A save file would be even more helpful. We generate a few fields on pawn gen that may be screwed up for children generated for other factions.

Here's the save file. Hopefully you can access it through Drive. https://drive.google.com/file/d/1DoDSiocaqjbmcOGNBg65IY3zoEJ_uF7v/view?usp=sharing (https://drive.google.com/file/d/1DoDSiocaqjbmcOGNBg65IY3zoEJ_uF7v/view?usp=sharing)
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: ProfZelonka on June 14, 2020, 12:22:42 PM
Three issues in my session:

1. Running into body type issues with all human children.. Headless children..
Made a thread not knowing it was caused by this mod. Provided logs in thread:
https://ludeon.com/forums/index.php?topic=52447.0

I don't believe the issue was there in the prev version.. but not sure, maybe just never encountered. It's happening on all human children now tho for sure.

2. I'm also having the issue of Childcare job taking machine/android races to the crib. lol Any chance to add a line of code to exclude machine races? I believe the following races have the issue: Android Tiers including The Old World and TX series, Geth, Kenshi Skeleton Race. Not sure about: Automatons, Syntho, or Borg?

3. And any chance to add that a kid above say.. 2, shouldn't be in a crib any more? I have my settings to adult age being 18 and have a 17 year old sleeping in a crib..
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 15, 2020, 08:27:48 AM
Fixed a few issues from the last version. Alien race dependency should be soft now. Child body types not changing to adult at 13 should be fixed.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.2

I still cannot replicate the childcare android problem. There are numerous checks on all childcare jobs that should prevent them from being valid targets for those jobs, and so far I have not seen them being taken to cribs. What other criteria are present when you notice this issue? Android has a low energy? Specific tier of android?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: zbysiek12345 on June 15, 2020, 04:26:50 PM
I create new colony to share log with you. No big problems for me now (No children, hehe) but when I was playing i get few errors and I get one game crash. I never get game crash in my 740h gameplay before update to 3.0.0, but after update CHaP sometimes I get 3 chrashes and sometimes exiting to windows last forewer. I can test on ubuntu 20.04 if you want. cheers
https://gist.github.com/4c01c15b136951553167e3d9f3cbf3af
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Tenshi~Akari on June 15, 2020, 08:55:14 PM
I came back back to this mod slightly confused with the way children are working in terms of apparel. Naturally, I'm getting the pink boxes bug & associated red error because there aren't any available apparel textures for the "Child" body type. For example:


Failed to find any textures at Accessorello/Cargopants/Pants_Child while constructing Multi(initPath=Accessorello/Cargopants/Pants_Child, color=RGBA(0.439, 0.318, 0.255, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))
Verse.Log:Error(String, Boolean)
Verse.Graphic_Multi:Init(GraphicRequest)
Verse.GraphicDatabase:GetInner(GraphicRequest)
Verse.GraphicDatabase:Get(String, Shader, Vector2, Color)
RimWorld.ApparelGraphicRecordGetter:DMD<DMD<TryGetGraphicApparel_Patch1>?562716416::TryGetGraphicApparel_Patch1>(Apparel, BodyTypeDef, ApparelGraphicRecord&)
FactionColors.HarmonyPatches:ResolveApparelGraphicsOriginal(PawnGraphicSet)
Verse.PawnGraphicSet:DMD<DMD<ResolveApparelGraphics_Patch3>?986609792::ResolveApparelGraphics_Patch3>(PawnGraphicSet)
Verse.PawnGraphicSet:DMD<DMD<ResolveAllGraphics_Patch5>?407691904::ResolveAllGraphics_Patch5>(PawnGraphicSet)
Verse.PawnRenderer:DMD<DMD<RenderPawnAt_Patch4>?-1435562496::RenderPawnAt_Patch4>(PawnRenderer, Vector3, RotDrawMode, Boolean, Boolean)
Verse.PawnRenderer:DMD<DMD<RenderPawnAt_Patch2>?-207425280::RenderPawnAt_Patch2>(PawnRenderer, Vector3)
Verse.Pawn_DrawTracker:DrawAt(Vector3)
Verse.Pawn:DrawAt(Vector3, Boolean)
Verse.Thing:Draw()
Verse.ThingWithComps:Draw()
Verse.DynamicDrawManager:DMD<DMD<DrawDynamicThings_Patch1>?1976350336::DrawDynamicThings_Patch1>(DynamicDrawManager)
Verse.Map:DMD<DMD<MapUpdate_Patch1>?-536885120::MapUpdate_Patch1>(Map)
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


The only way it goes away is if children don't wear clothing... which is pretty much impossible to stay that way in order for them to survive in this game.  :P

I do get the concept of adding a fully functional Child body type, seeing as the original method also had bugs when drawing re-scaled Thin apparel on children (with any apparel item that had the same material & was warn by both a child & thin pawn ended up with both having the child-sized clothing). It seems like a massive effort ahead in terms of compatibility with the many apparel mods available on this part, though. :o Is this part something that is still in the works in terms of expansion graphic-wise, or is it going to be something else that is bound to change again in future updates? (Asking since I'm working on my own personal graphics replacement project for Rimworld.)

I also still seem to get this bug that pops up whenever I load/save or generate new worlds:


Exception getting types in assembly RimWorldChildren, Version=1.0.7471.13166, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
RimWorld.Planet.World:FillComponents()
RimWorld.Planet.World:ExposeComponents()
RimWorld.Planet.World:ExposeData()
Verse.Scribe_Deep:Look(World&, Boolean, String, Object[])
Verse.Scribe_Deep:Look(World&, String, Object[])
Verse.Game:ExposeData()
Verse.Scribe_Deep:Look(Game&, Boolean, String, Object[])
Verse.Scribe_Deep:Look(Game&, String, Object[])
Verse.<>c:<SaveGame>b__13_0()
Verse.SafeSaver:DoSave(String, String, Action)
Verse.SafeSaver:Save(String, String, Action, Boolean)
Verse.GameDataSaveLoader:DMD<DMD<SaveGame_Patch4>?369603200::SaveGame_Patch4>(String)
aRandomKiwi.ARS.<>c__DisplayClass0_0:<Listener>b__0()
Verse.LongEventHandler:UpdateCurrentSynchronousEvent(Boolean&)
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:DMD<DMD<Update_Patch1>?-90420992::Update_Patch1>(Root)
Verse.Root_Play:Update()
[code]

The above error happens both with and without other mods enabled (outside of the required for this to run).
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: devestatingconsequences on June 15, 2020, 11:55:24 PM
I'm having an issue with the game speed when one baby aged up to crawling. The game speed won't allow for any adjustments, and slows to slow motion, lower than even the base speed. This continues to happen until the baby either eats or is fed. This happens with any crawling or older aged baby, and seems related to when the babies cry.

None of the babies/toddlers can reach a sleep value over 15% either, and even if assigned to sleep they wake up at that point.

I do have other mods, but none that should conflict with this (just psychology, hospitality and prepare carefully).
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 16, 2020, 09:05:48 AM
[quote author=Tenshi~Akari link=topic=51258.msg480154#msg480154 date=1592268914]
I came back back to this mod slightly confused with the way children are working in terms of apparel. Naturally, I'm getting the pink boxes bug & associated red error because there aren't any available apparel textures for the "Child" body type. For example:


The only way it goes away is if children don't wear clothing... which is pretty much impossible to stay that way in order for them to survive in this game.  :P

I do get the concept of adding a fully functional Child body type, seeing as the original method also had bugs when drawing re-scaled Thin apparel on children (with any apparel item that had the same material & was warn by both a child & thin pawn ended up with both having the child-sized clothing). It seems like a massive effort ahead in terms of compatibility with the many apparel mods available on this part, though. :o Is this part something that is still in the works in terms of expansion graphic-wise, or is it going to be something else that is bound to change again in future updates? (Asking since I'm working on my own personal graphics replacement project for Rimworld.)

I also still seem to get this bug that pops up whenever I load/save or generate new worlds:


The above error happens both with and without other mods enabled (outside of the required for this to run).

[/quote]

The way we handle clothing right now is technically the same as before with some changes. The def has an optional setting for clothesBodyType, which is basically a secondary body to use as a reference for grabbing and scaling clothing graphics designed for a different body. The "thin" body graphics are close enough to what we need, so we just scale them. I will say that all features are subject to change, but I intend to focus my efforts on the more-broken parts of this mod for a long while, so I don't see apparel changing.
Curious though that you're getting null graphics on an apparel mod. Do they not provide a thin graphic?

Someone else has also reported the types exception. I'll look into it again. edit: Was this with or without alien races? I have tried both and cant replicate the error on world gen or save/load

Quote from: devestatingconsequences on June 15, 2020, 11:55:24 PM
I'm having an issue with the game speed when one baby aged up to crawling. The game speed won't allow for any adjustments, and slows to slow motion, lower than even the base speed. This continues to happen until the baby either eats or is fed. This happens with any crawling or older aged baby, and seems related to when the babies cry.

None of the babies/toddlers can reach a sleep value over 15% either, and even if assigned to sleep they wake up at that point.

I do have other mods, but none that should conflict with this (just psychology, hospitality and prepare carefully).
When you say it wont allow any adjustments, do you mean it locked the other 3 settings, or that it just slowed to a crawl even on max speed?
Sounds like a performance issue with the job.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Tenshi~Akari on June 16, 2020, 05:36:33 PM
Quote from: Tragix on June 16, 2020, 09:05:48 AM
The way we handle clothing right now is technically the same as before with some changes. The def has an optional setting for clothesBodyType, which is basically a secondary body to use as a reference for grabbing and scaling clothing graphics designed for a different body. The "thin" body graphics are close enough to what we need, so we just scale them. I will say that all features are subject to change, but I intend to focus my efforts on the more-broken parts of this mod for a long while, so I don't see apparel changing.
Curious though that you're getting null graphics on an apparel mod. Do they not provide a thin graphic?

That's the weird part. It's just any apparel, and naturally all the apparel mods I have enabled have the Thin body type... it's just for some odd reason, something is looking for the "_Child" body type version instead of drawing from the Thin graphic already available, which is why I was initially confused. This happened without other mods enabled outside of Harmony and HugsLib, so I don't know...  :o

Quote from: Tragix on June 16, 2020, 09:05:48 AM
Someone else has also reported the types exception. I'll look into it again. edit: Was this with or without alien races? I have tried both and cant replicate the error on world gen or save/load

Nope, I don't have HAR enabled... I was going to try it finally, but there was some bug that was preventing pawns from eating for some reason and I was waiting on an update for that.

But coming to realize it now, it probably matters to mention that I do have the Royalty DLC installed (all game data is updated currently to ver. 1.1.2654), and that might be the main answer a lot of the issues I'm coming across.  :-[
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: junkmetal on June 17, 2020, 05:41:53 AM
Sorry, I can't english

Use Kijin race, Faction generation bug
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: devestatingconsequences on June 17, 2020, 06:07:18 AM
Quote from: Tenshi~Akari on June 15, 2020, 08:55:14 PM
When you say it wont allow any adjustments, do you mean it locked the other 3 settings, or that it just slowed to a crawl even on max speed?
Sounds like a performance issue with the job.

The latter. It's slowed to a crawl regardless of what you press, but you can press things. It stays in crawl mode regardless of anything else until the baby is picked up to be fed, or feeds itself. It also only happens with crawling aged and higher babies (crib babies are fine), and continues even to the "standing" aged babies.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Hilvon1984 on June 17, 2020, 06:58:55 AM
Quote from: Tragix on June 16, 2020, 09:05:48 AM
When you say it wont allow any adjustments, do you mean it locked the other 3 settings, or that it just slowed to a crawl even on max speed?
Sounds like a performance issue with the job.

I am having similar issue. Possibly related I noticed that when a child is hungry somewhere, pawns assigned to Childcare might grab a grown up colonist, drag them to bed and feed. So there is likely a bug with "feed baby" job making iterate over too many targets.
Also might be a pathfinding bug, because the lag seems to get worse if there are doors between the baby and possible food.

Also it is a bit annoying that babies don't seem to seek food on their own till they are completely starving, while the lags and "Feeding abductions" starts when they get slightly hungry.

Also a major problem I am having with my setup is with Hygiene mod. Basically crib babies can't get drinks for themselves, childcare does not seem to include "GiveDrink" job, and they don't count as ill, so nurces don't bring them drink as well. I managed to work around it by making "administer Garden Tea" bills as an operation every day... but that was tidious. Might help if you add "bring drink" task to Childcare job, and potentially making "Breastfeeding" fulfill Thirst need...
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: birdthany on June 17, 2020, 09:00:54 PM
Hi! I just made an account on the forums for this, since in Steam comments you said to come here.

I started a new save with androids tiers installed once I saw that the 3.0 version of this mod works with them. And it does work better than before for sure, but the socialization is still funny- in addition to having normal conversations, androids will still have people play pattycake etc. with them pretty often.

Am also experiencing the bug where pawns grab each other to try and feed them whenever there's a hungry baby somewhere.

There's an issue with toddler/infant clothing that insulates against heat- The value for insulation is negative, which makes it so that it's actually worse than wearing nothing.

There's a really annoying bug where babies and toddlers won't sleep until they become Tired instead of just when they're Drowsy, even if they're scheduled to sleep. They wake up as soon as they hit 15% rest. Even anesthetizing didn't work for me. This is really annoying because Childcare pawns won't do Recreation with babies when they're asleep, and so the constant drifting in and out of sleep makes a caretaker who's far away start running to the baby as soon as it wakes up, then abandon them again when the baby falls asleep, repeat ad infinitum.

This isn't about a bug, but I am curious: Is there support for Psychology as far as inherited traits goes? For example could a baby inherit Heavy Sleeper? Could they even inherit something like Polyamorous?
Also not really a bug but a mod interaction that you might want to patch, not sure- sorting by Skill in the Numbers tab allows the player to see what a baby or toddler's passions will be when they age up.

As for a suggestion, can I suggest that children maybe have a slight boost to their learning speed at the cost of some self-control? Similar to the Too Smart trait, but tweaked a bit. As it is there aren't really any strong benefits to having children around, especially ones who are recruited rather than birthed, but something like that could make them more of a viable long-term skill investment. I'd also suggest that the mood debuffs for "Innocent prisoner died," "Observed corpse," "Colonist died," etc be separated from vanilla in the case of children's deaths, so it can be slightly higher without stacking an additional time.

Anyway, thank you for the great mod! I'm sure it's a ton of hard work. :D
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 18, 2020, 01:15:50 PM
Quote from: Tenshi~Akari on June 16, 2020, 05:36:33 PM
That's the weird part. It's just any apparel, and naturally all the apparel mods I have enabled have the Thin body type... it's just for some odd reason, something is looking for the "_Child" body type version instead of drawing from the Thin graphic already available, which is why I was initially confused. This happened without other mods enabled outside of Harmony and HugsLib, so I don't know...  :o

Nope, I don't have HAR enabled... I was going to try it finally, but there was some bug that was preventing pawns from eating for some reason and I was waiting on an update for that.

But coming to realize it now, it probably matters to mention that I do have the Royalty DLC installed (all game data is updated currently to ver. 1.1.2654), and that might be the main answer a lot of the issues I'm coming across.  :-[
If you're getting this issue with only CNP and dependencies, have you performed a clean CNP install? That is, delete the CNP folder entirely and reinstall it.  Especially with vanilla clothing, i can't think of any reason why it would try to resolve the clothing graphics using the Child body type - unless the def has been modified or something like that. If you want to upload a save file that is currently experiencing the bug, I can try it out on my side.

Quote from: devestatingconsequences on June 17, 2020, 06:07:18 AM
The latter. It's slowed to a crawl regardless of what you press, but you can press things. It stays in crawl mode regardless of anything else until the baby is picked up to be fed, or feeds itself. It also only happens with crawling aged and higher babies (crib babies are fine), and continues even to the "standing" aged babies.
I took a look at this and made some changes based on the vanilla Rescue job. I was able to get the driver runtime from 1.2ms to 0.5ms, which seemed to clear up the stutter for me. I do run a fairly high end rig, so performance on other PCs may still stink. I've got a handful of PCs i could test with, but the only one that would have any performance issues with Rimworld won't run the game at all! Try out the latest version and see if that helps. I'll keep working on fixing performance issues as we go.

Quote from: Hilvon1984 on June 17, 2020, 06:58:55 AM
Also it is a bit annoying that babies don't seem to seek food on their own till they are completely starving, while the lags and "Feeding abductions" starts when they get slightly hungry.

Also a major problem I am having with my setup is with Hygiene mod. Basically crib babies can't get drinks for themselves, childcare does not seem to include "GiveDrink" job, and they don't count as ill, so nurces don't bring them drink as well. I managed to work around it by making "administer Garden Tea" bills as an operation every day... but that was tidious. Might help if you add "bring drink" task to Childcare job, and potentially making "Breastfeeding" fulfill Thirst need...
So i keep getting reports for the "take androids to crib" and now apparently "Take adults to crib" bugs, but I haven't been able to replicate these at all. There are a number of checks that should prevent both from happening with a standard config setup.
Did you perform a clean install of CNP and start a new save after the 3.0.0 release?
One of the checks we perform on the "take to crib and feed" job is whether or not a pawn should use a crib at all at their current life stage. The only I can think that this check would fail is if an adult pawn was somehow reporting a toddler's lifestage index, which should also cause them to render weird.

After the trouble getting Alien Races to cooperate, I don't plan any additional mod support until I can figure out how to properly handle soft dependencies. I need to be able to compile with Bad Hygiene as a dependency to support it, but allow players to run CNP without Bad Hygiene installed. I thought I had figured it out with HAR, but I still see reports of type load exceptions when running CNP, so who knows.
I think Bad Hygiene handled thirst by patching the feeding jobs, which old versions of CNP also used. We now have our own job, hence thirst is no longer handled. Fixing this is definitely on the to-do list, just a lower priority right now.

Quote from: birdthany on June 17, 2020, 09:00:54 PM
Hi! I just made an account on the forums for this, since in Steam comments you said to come here.

I started a new save with androids tiers installed once I saw that the 3.0 version of this mod works with them. And it does work better than before for sure, but the socialization is still funny- in addition to having normal conversations, androids will still have people play pattycake etc. with them pretty often.

Am also experiencing the bug where pawns grab each other to try and feed them whenever there's a hungry baby somewhere.

There's an issue with toddler/infant clothing that insulates against heat- The value for insulation is negative, which makes it so that it's actually worse than wearing nothing.

There's a really annoying bug where babies and toddlers won't sleep until they become Tired instead of just when they're Drowsy, even if they're scheduled to sleep. They wake up as soon as they hit 15% rest. Even anesthetizing didn't work for me. This is really annoying because Childcare pawns won't do Recreation with babies when they're asleep, and so the constant drifting in and out of sleep makes a caretaker who's far away start running to the baby as soon as it wakes up, then abandon them again when the baby falls asleep, repeat ad infinitum.

This isn't about a bug, but I am curious: Is there support for Psychology as far as inherited traits goes? For example could a baby inherit Heavy Sleeper? Could they even inherit something like Polyamorous?
Also not really a bug but a mod interaction that you might want to patch, not sure- sorting by Skill in the Numbers tab allows the player to see what a baby or toddler's passions will be when they age up.

As for a suggestion, can I suggest that children maybe have a slight boost to their learning speed at the cost of some self-control? Similar to the Too Smart trait, but tweaked a bit. As it is there aren't really any strong benefits to having children around, especially ones who are recruited rather than birthed, but something like that could make them more of a viable long-term skill investment. I'd also suggest that the mood debuffs for "Innocent prisoner died," "Observed corpse," "Colonist died," etc be separated from vanilla in the case of children's deaths, so it can be slightly higher without stacking an additional time.

Anyway, thank you for the great mod! I'm sure it's a ton of hard work. :D

For androids, was this on a new save with a clean install of cnp? Androids should no longer qualify "living" races anymore, and shouldn't be eligible for any CNP features outside of maybe the childcare job. Is it a young android? Which tier is it?
For Adults being babied, when you say hungry baby, do you mean a crib-bound infant? Or any toddler? Having trouble replicating this one, so any additional information or a save file that demonstrates it will be helpful.

I went ahead and adjusted the insulation values on the baby onesie and hat. I haven't visited clothing since I started maintaining  the project. I pulled the new values from the tuque and jacket.

We force babies and toddlers to wake up at 15% minimum rest if they are "unhappy." So if they are wounded, hungry, or need social. I'll replicate and see if there's anything we can do to mitigate the problem. It should probably handle similar to social needs of a bed ridden pawn, i think.

Support for Psychology is not planned, but the framework for the mod to register its traits it in place already. I feel this is a case where the other mod ought to provide a patch if they're interested. In the case of Bad Hygiene, the other mod does not work due to CNPs features, so a patch on our side makes sense. In Psychology's case, both mods function perfectly fine independently. I'm not on a mission to bring in every mod under the sun for support.

Your last point brings up a really interesting question. Why use CNP at all? What do children bring to the gameplay? As an oldschool Dwarf Fortress player, my answer would be "It doesn't have to add anything at all." I think it is perfectly fine for children to be nothing but a burden on the colony. Both DF and Rimworld suffer from timescale problems - Rimworld even more so. The average long colony may last a decade, and at that point the player will have researched everything, outfitted everyone in fancy gear, and will have basically done everything there is to do. The average fort on DF will last maybe 10-15 years assuming FPS death doesn't kill the game for you.
In both of these cases, there is barely enough time for a newborn pawn at the beginning of the game to mature and be useful.

The timescale problem is a difficult one to fix in a game like Rimworld. Every single thing a pawn does needs to be slowed down. Researching a nuclear reactor would need to take years for the life cycles of pawns to ever come into play. One reason I love the hardcore SK modlist is that it makes the entire game last longer. But because of this timescale, it's difficult to try to justify a children mod using rewards like better skills or what have you.

So, my take on why someone would choose to use this mod: They want to roleplay. I think the only reason someone might use this mod is for the additional challenge and RP/story telling opportunities that comes with having children in a game like this. To that end, while I won't say there will be no changes to make children more viable or useful, I will never set out to make children rewarding. I believe an overseer who allows children into their colony should be taking on a liability rather than an asset.
I believe there are already some "child colonist died" memories. I definitely agree on that mark, there should be bigger consequences when dealing with children in certain scenarios - slave trading, vat growing, other ethical questions.

3.0.3 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.3
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Hilvon1984 on June 18, 2020, 01:28:29 PM
Quote from: Tragix on June 18, 2020, 01:15:50 PM
Did you perform a clean install of CNP and start a new save after the 3.0.0 release?

No. And truth be told there are many potential mod conflicts that might be causing this. Will try a fresh start and let you know if problem surfaces again. Though it is a little tricky to replicate since you have to get a child born first... :)

Quote from: Tragix on June 18, 2020, 01:15:50 PM
One of the checks we perform on the "take to crib and feed" job is whether or not a pawn should use a crib at all at their current life stage.
They are not actually taking the adults to the crib. They drag them to their designated bed/sleeping spot.
The activity in on the pawn doing the feeding though says "Taking [NAME] to crib to feed [FOOD]".

Quote from: Tragix on June 18, 2020, 01:15:50 PM
Fixing this is definitely on the to-do list, just a lower priority right now.

Fair enough. And I do appreciate your great work on this mod!
On a separate side note, would it be possible to expose pregnancy chance to Mod options? Might help with debugging issues like above...
Also can you add "fertile" and "barren" character traits that modify base pregnancy chance?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Unit501 on June 18, 2020, 01:53:44 PM
Quote from: Tragix on June 16, 2020, 09:05:48 AM
[quote author=Tenshi~Akari link=topic=51258.msg480154#msg480154 date=1592268914]
I came back back to this mod slightly confused with the way children are working in terms of apparel. Naturally, I'm getting the pink boxes bug & associated red error because there aren't any available apparel textures for the "Child" body type. For example:


The only way it goes away is if children don't wear clothing... which is pretty much impossible to stay that way in order for them to survive in this game.  :P

I do get the concept of adding a fully functional Child body type, seeing as the original method also had bugs when drawing re-scaled Thin apparel on children (with any apparel item that had the same material & was warn by both a child & thin pawn ended up with both having the child-sized clothing). It seems like a massive effort ahead in terms of compatibility with the many apparel mods available on this part, though. :o Is this part something that is still in the works in terms of expansion graphic-wise, or is it going to be something else that is bound to change again in future updates? (Asking since I'm working on my own personal graphics replacement project for Rimworld.)

I also still seem to get this bug that pops up whenever I load/save or generate new worlds:


The above error happens both with and without other mods enabled (outside of the required for this to run).


The way we handle clothing right now is technically the same as before with some changes. The def has an optional setting for clothesBodyType, which is basically a secondary body to use as a reference for grabbing and scaling clothing graphics designed for a different body. The "thin" body graphics are close enough to what we need, so we just scale them. I will say that all features are subject to change, but I intend to focus my efforts on the more-broken parts of this mod for a long while, so I don't see apparel changing.
Curious though that you're getting null graphics on an apparel mod. Do they not provide a thin graphic?

Someone else has also reported the types exception. I'll look into it again. edit: Was this with or without alien races? I have tried both and cant replicate the error on world gen or save/load

Quote from: devestatingconsequences on June 15, 2020, 11:55:24 PM
I'm having an issue with the game speed when one baby aged up to crawling. The game speed won't allow for any adjustments, and slows to slow motion, lower than even the base speed. This continues to happen until the baby either eats or is fed. This happens with any crawling or older aged baby, and seems related to when the babies cry.

None of the babies/toddlers can reach a sleep value over 15% either, and even if assigned to sleep they wake up at that point.

I do have other mods, but none that should conflict with this (just psychology, hospitality and prepare carefully).
When you say it wont allow any adjustments, do you mean it locked the other 3 settings, or that it just slowed to a crawl even on max speed?
Sounds like a performance issue with the job.
[/quote]

https://gist.github.com/fdd68c63b331ad0db9d6052fa8c02f6f

Here's my github of the log with the same error if maybe this helps with pinpointing, the only mods I have that effect clothing are Vanilla apparel expanded, Avali mod, Orassan. I'm only using Vanilla clothes on the child pawn.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: lbmaian on June 18, 2020, 02:35:09 PM
Quote from: Tragix on June 18, 2020, 01:15:50 PM
After the trouble getting Alien Races to cooperate, I don't plan any additional mod support until I can figure out how to properly handle soft dependencies.

To get soft dependencies to work, you must be aware of .NET type lazy loading works.

When a method that directly references a type - regardless of runtime checks (like only conditionally patching) - the .NET runtime will attempt to load that type. Obviously, if that type is in another assembly and that assembly doesn't exist at runtime, a TypeLoadException is thrown. (This also matters for whether the static constructor is run.)

You have two alternative ways of accessing another type while respecting runtime conditions within a method:

1) Use only reflection. Never directly reference a type in the other assembly in the method.

2) Wrap all access to types in the other assembly in its own type (and methods), even as a nested type (loading a type does NOT automatically load types nested within that type), and conditionally use that type (and call its methods).

2a) One very convenient trick is to wrap all access to those types in a lambda like this:
((Action)(() =>
{
    // all code that access types in other assembly goes here
}))();

This takes advantage of the fact that lambdas are compiled into an internal class (i.e. another type) which the calling method then uses.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Tenshi~Akari on June 18, 2020, 03:57:23 PM
Okay, I have found my derp moment here: the pink box bug actually ended up being a conflict with Ohu's Faction Colors mod (https://steamcommunity.com/sharedfiles/filedetails/?id=1682608908). For some reason, I had it enabled on my "bare bones/test" mod list by accident. After disabling it, childrens' clothing started showing up as normal.

(This ends up as a minor tragedy on my end. That was the only alternative I could work with for advanced apparel recoloring in lieu of the GraphicApparelDetour.dll file that used to work in Ancient Rim's Core prior to the move to 1.1... oh well.)

The "Exception getting types in assembly RimWorldChildren, Version=1.0.7471.13166, Culture=neutral, PublicKeyToken=null" error is still appearing, however. Not sure what to do about that. I also triple checked this time to make sure it was JUST the necessary mods, and it's still throwing it upon loading and saving.

If you still need a save for this one, I can gladly upload my test map when I get back to my laptop. But I think the major concern with the graphics is actually solved on that part.

(Now if only there was a way to make Facial Stuff not override the resizing of C&P like it used to. Naturally, it's something on that mod's end, but not expecting any fixes since the author has since gone silent again and probably won't come back any time soon...)

Edit - Forgot to answer the first question: I always do clean installs with mods, so yes, I did make sure to back up & delete the old data from the folder before updating to the new one.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: birdthany on June 18, 2020, 06:42:00 PM
QuoteFor androids, was this on a new save with a clean install of cnp? Androids should no longer qualify "living" races anymore, and shouldn't be eligible for any CNP features outside of maybe the childcare job. Is it a young android? Which tier is it?
For Adults being babied, when you say hungry baby, do you mean a crib-bound infant? Or any toddler? Having trouble replicating this one, so any additional information or a save file that demonstrates it will be helpful.

It is a new save with a clean install. I don't remember the details of the androids, because I don't actually have the android pawns, I witnessed it with a guest caravan from an android faction. It seemed to be a variety of tiers.

For adults being babied, it's happened with both infants and toddlers. It's not super common, fortunately. None of the bugs I discussed are game-breaking, they're all harmless to mildly irritating. 

QuoteWe force babies and toddlers to wake up at 15% minimum rest if they are "unhappy." So if they are wounded, hungry, or need social. I'll replicate and see if there's anything we can do to mitigate the problem. It should probably handle similar to social needs of a bed ridden pawn, i think.

I've been experiencing the babies and toddlers constantly drifting in and out of sleep at 15% rest regardless of their needs, and this message makes me think that it might be an additional conflict with Bad Hygiene. The other pawns seem to be washing the baby fine, and I don't have Thirst enabled, but since it's a mod that messes with needs it seems possible that it's the culprit? Is it possible that maybe the babies are waking up whenever their Hygiene bar isn't 100% full or something like that?

Thank you for fixing the clothes and for your answer about Psychology :) I understand and agree with most of what you're saying about the children being supposed to be a hindrance, but I do still think a Too Smart type default for kids would be cool, even just as a toggleable option. It doesn't have to be enough for the kids to be worth it but it would add some realism and flavor. Like, kids having an extra knack for picking stuff up but also being very prone to throw tantrums or try to fight people is pretty true-to-life :P 
Title: Re: [1.1] Children and Pregnancy - v3.0.4
Post by: GhostData on June 18, 2020, 10:10:27 PM
Quote from: lbmaian on June 18, 2020, 02:35:09 PM
To get soft dependencies to work, you must be aware of .NET type lazy loading works.

When a method that directly references a type - regardless of runtime checks (like only conditionally patching) - the .NET runtime will attempt to load that type. Obviously, if that type is in another assembly and that assembly doesn't exist at runtime, a TypeLoadException is thrown. (This also matters for whether the static constructor is run.)

You have two alternative ways of accessing another type while respecting runtime conditions within a method:

1) Use only reflection. Never directly reference a type in the other assembly in the method.

2) Wrap all access to types in the other assembly in its own type (and methods), even as a nested type (loading a type does NOT automatically load types nested within that type), and conditionally use that type (and call its methods).

2a) One very convenient trick is to wrap all access to those types in a lambda like this:
((Action)(() =>
{
    // all code that access types in other assembly goes here
}))();

This takes advantage of the fact that lambdas are compiled into an internal class (i.e. another type) which the calling method then uses.
Very useful advice. I figured out that types aren't loaded until referenced while sorting out the harmony patching, but didn't know I could wrap a dependency class or use anonymous classes like that. Thanks for the pointers!

3.0.4 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.4
I managed to identify and fix the issue with baby pawns only sleeping to 15% even when not "unhappy." I don't fully understand how the boolean expression evaluated to true since one component was very clearly false. Either way, it should be fixed now.

It seems in C#, the null coalesce operator takes precedence over conditional operators. If the case I ran into holds true, then the expression
if (null ?? true && false)
will actually evaluate to true. Now that I think on it, it makes a kind-of sense. The operator might short circuit the rest of the expression assuming that the null reference should evaluate the full expression as true. What's interesting is that the coalescing expression should not have evaluated to the fall back option at all, so even though the expression p.TryGetComp<LifecycleComp>()?.CurrentLifestage?.wakeOnUnhappy ?? false evaluated to true, it still seems to have short circuited. Interesting problem.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: TangyPango on June 19, 2020, 10:10:46 AM
Hello, I was told to come here from Steam to report any bugs. Not sure if these were already reported but here are some I found:

1. Babies used to be headless adults but after the most recent update, they are now pink squares. At least they are easier to find now (still appear as headless adults on the colonist bar).

2. All colonists (regardless of age) are considered children and are taken to beds to be fed by those assigned to childcare, even if they are already eating. Since pawns move very slowly when carrying adults, this takes up a lot of time when they could be doing more resourceful activities.

3. Some corpses that were wearing normal clothes when they died are now wearing smaller clothes. So they just look like naked corpses that had a child-sized outfit thrown on top of them.

Most of these aren't really game-breaking, just minor inconveniences (especially the second one).
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: [email protected] on June 22, 2020, 12:58:42 PM
anyone have issues with this interacting with android tiers?
apparently since my androids at 1-10 years old, their graphics seem to have gotta overwritten somehow, now they are pink blocks!
this happened after i added children and pregnancy to an existing game
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Canute on June 22, 2020, 02:52:01 PM
Android babies ? Did you broke the android printer ?
Some races need to be excluded !!
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: amato.stano on June 24, 2020, 02:50:54 AM
Hi,
I really love this mod.
My first playthough in B18, I think, I got the children to 15 years old.
I'm trying to do the same in 1.1 now but after 150 days and 2 married couples from the start no pregnancies.
I was planning on accelarating the aging so the game would factor in generations better, but with no babies it is pointless.

It may be a mod incompatibility, what do you think ?
Here is the list, please could you point out the ones you don't know, don't use or think they might be a problem...

Harmony
Core
JecsTools
Edb Prepare Carefully
Children and Pregnancy
[1.1] Psychology (unofficial)
Hospitality
Character Editor
Colony Manager
Vanilla Fishing
Work Tab
[KV] Change Dresser - 1.1
Death rattle unofficial
Dubs Break mod
ED-EnhancedOptions
Faster Aging
Fluffy Breakdowns
Mass cooking
Medical Tab
Pick up and Haul Unofficial
Quarry 1.1
Rah's Bionic and Surgery Expansion
Realistic Rooms
Research Tree
[KV] RimFridge - 1.1
RimHUD
Rimsenal - Rimhair
RimTaser Reloaded
Tech Advancing
Vanilla Furniture Expanded - Power
Vanilla Texture Expanded
Rercipe Icons

Thanks for any input.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 24, 2020, 02:26:13 PM
Quote from: amato.stano on June 24, 2020, 02:50:54 AM
Hi,
I really love this mod.
My first playthough in B18, I think, I got the children to 15 years old.
I'm trying to do the same in 1.1 now but after 150 days and 2 married couples from the start no pregnancies.
I was planning on accelarating the aging so the game would factor in generations better, but with no babies it is pointless.

It may be a mod incompatibility, what do you think ?
Here is the list, please could you point out the ones you don't know, don't use or think they might be a problem...

Harmony
Core
JecsTools
Edb Prepare Carefully
Children and Pregnancy
[1.1] Psychology (unofficial)
Hospitality
Character Editor
Colony Manager
Vanilla Fishing
Work Tab
[KV] Change Dresser - 1.1
Death rattle unofficial
Dubs Break mod
ED-EnhancedOptions
Faster Aging
Fluffy Breakdowns
Mass cooking
Medical Tab
Pick up and Haul Unofficial
Quarry 1.1
Rah's Bionic and Surgery Expansion
Realistic Rooms
Research Tree
[KV] RimFridge - 1.1
RimHUD
Rimsenal - Rimhair
RimTaser Reloaded
Tech Advancing
Vanilla Furniture Expanded - Power
Vanilla Texture Expanded
Rercipe Icons

Thanks for any input.
Turn on dev logging in the CNP settings and check the logs with `. There will be a print out of the % chance of success for pregnancy attempts between two pawns. Certain factors such as age may cause that chance to be 0.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: amato.stano on June 24, 2020, 05:05:55 PM
Found this error in debug during Lovin' with a new game with only Harmony, Core, HubsLib, Edb Prepare Carefully and Children and Pregnancy.

Exception in JobDriver tick for pawn Jinx driver=JobDriver_Lovin (toilIndex=4) driver.job=(Lovin (Job_20983) A=Thing_Human914 B=Thing_RoyalBed37906)
System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at RimWorldChildren.Hediff_Pregnancy+<>c.<get_HediffOfClass>b__7_0 (System.Reflection.Assembly a) [0x00000] in <f1be4809cdb24fa1b4d128854812276f>:0
  at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x00051] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at RimWorldChildren.Hediff_Pregnancy.get_HediffOfClass () [0x00081] in <f1be4809cdb24fa1b4d128854812276f>:0
  at RimWorldChildren.Hediff_Pregnancy.Create[T] (Verse.Pawn mother, Verse.Pawn father) [0x00035] in <f1be4809cdb24fa1b4d128854812276f>:0
  at RimWorldChildren.Lovin_Override.TryToImpregnate (Verse.Pawn initiator, Verse.Pawn partner) [0x00281] in <f1be4809cdb24fa1b4d128854812276f>:0
  at RimWorldChildren.Lovin_Override.JobDriver_Lovin_Patch (Verse.AI.JobDriver __instance, Verse.AI.JobCondition condition) [0x0003f] in <f1be4809cdb24fa1b4d128854812276f>:0
  at (wrapper dynamic-method) Verse.AI.JobDriver.DMD<DMD<Cleanup_Patch1>?-1752607872::Cleanup_Patch1>(Verse.AI.JobDriver,Verse.AI.JobCondition)
  at Verse.AI.Pawn_JobTracker.CleanupCurrentJob (Verse.AI.JobCondition condition, System.Boolean releaseReservations, System.Boolean cancelBusyStancesSoft, System.Boolean canReturnToPool) [0x00085] in <642567a9bd804f26a9090d82e2c3673d>:0
  at Verse.AI.Pawn_JobTracker.EndCurrentJob (Verse.AI.JobCondition condition, System.Boolean startNewJob, System.Boolean canReturnToPool) [0x000e1] in <642567a9bd804f26a9090d82e2c3673d>:0
  at Verse.AI.JobDriver.EndJobWith (Verse.AI.JobCondition condition) [0x00028] in <642567a9bd804f26a9090d82e2c3673d>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x000ee] in <642567a9bd804f26a9090d82e2c3673d>:0
  at Verse.AI.JobDriver.ReadyForNextToil () [0x00007] in <642567a9bd804f26a9090d82e2c3673d>:0
  at RimWorld.JobDriver_Lovin.<MakeNewToils>b__11_3 () [0x00017] in <642567a9bd804f26a9090d82e2c3673d>:0
  at Verse.AI.JobDriver.DriverTick () [0x00156] in <642567a9bd804f26a9090d82e2c3673d>:0
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Capitolio on June 25, 2020, 07:57:51 AM
I know this has probably already been discussed, but is there any chance that this mod will be compatible with Facial Stuff?

The author has made it clear that he will no longer work on compatibility issues. He says both mods are no longer compatible because of a patch introduced by C&P, which cancels certain Facial Stuff checks. Whether this is true or not I don't know.

Also, in case this is useful, it is no longer the age but the size of the pawn that determines if Facial Stuff should render the head or not.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Tenshi~Akari on June 25, 2020, 09:04:10 AM
Quote from: Capitolio on June 25, 2020, 07:57:51 AM
I know this has probably already been discussed, but is there any chance that this mod will be compatible with Facial Stuff?

The author has made it clear that he will no longer work on compatibility issues. He says both mods are no longer compatible because of a patch introduced by C&P, which cancels certain Facial Stuff checks. Whether this is true or not I don't know.

Also, in case this is useful, it is no longer the age but the size of the pawn that determines if Facial Stuff should render the head or not.

I was wondering about this issue as well. While I admit it would be cool if the animations fit child pawns as an option, at current, all I'm seeing are child pawns spawning with hands & feet that don't animate, and naturally eyes & mouths that don't fit the head positioning. (Originally, all of that was disabled by the checks mentioned. Funny enough, before this mod got updated to 3.0, those animations were working with child pawns a bit, but the clothes were being drawn in the adult bodytype sizes. And, of course, the toddler and newborn rendering issues of having floating feet/hair/hands...)

I completely understand giving up on compatibility, though, both Facial Stuff and Children and Pregnancy are huge mods in their own rights... but one can dream somebody would be daring enough to patch that in someday.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on June 25, 2020, 09:37:32 PM
Quote from: amato.stano on June 24, 2020, 05:05:55 PM
Found this error in debug during Lovin' with a new game with only Harmony, Core, HubsLib, Edb Prepare Carefully and Children and Pregnancy.

Exception in JobDriver tick for pawn Jinx driver=JobDriver_Lovin (toilIndex=4) driver.job=(Lovin (Job_20983) A=Thing_Human914 B=Thing_RoyalBed37906)
Mmmm, maybe an issue with Alien Races not being installed? Several other reports from vanilla code trying to load types using reflection, but I'm not really sure what's going on with that yet. Not sure if it's a HAR class I am referencing somehow being loaded, or something else. I'll try to replicate.

Quote from: Capitolio on June 25, 2020, 07:57:51 AM
I know this has probably already been discussed, but is there any chance that this mod will be compatible with Facial Stuff?

The author has made it clear that he will no longer work on compatibility issues. He says both mods are no longer compatible because of a patch introduced by C&P, which cancels certain Facial Stuff checks. Whether this is true or not I don't know.

Also, in case this is useful, it is no longer the age but the size of the pawn that determines if Facial Stuff should render the head or not.
I'll look into it when I have time. If it's just something we're patching that's causing it not to work, I'll see what I can do to fix that. It is a difficult line to draw as to which mod should support the other. Both add a new feature that reduces the functionality of the other if not patched, so it could technically make sense for either mod to provide that support. I am being careful to follow a general policy of "If it could work with CNP without patches, don't break it further" and so will fix any errors I cause to that end. I don't want to fall into the trap of providing CNP-side support for every mod out there.
HAR is a notable exception because I personally feel that alien race support is vital to a mod like CNP. It might not be perfect at the moment, but I do think it's important for the core purpose of CNP. Facial animations - not so much. And for babies and toddlers, there may not even be enough space on the pawn to display faces. In all cases, I have no plans to make "baby appropriate" graphics for body addons and similar.

Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: amato.stano on June 26, 2020, 02:14:55 PM
Quote from: Tragix on June 25, 2020, 09:37:32 PM
Mmmm, maybe an issue with Alien Races not being installed? Several other reports from vanilla code trying to load types using reflection, but I'm not really sure what's going on with that yet. Not sure if it's a HAR class I am referencing somehow being loaded, or something else. I'll try to replicate.

Indeed, adding Humanoid Alien Races got rid of the error and managed to have pregnancies and babies.

Thanks
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Hilvon1984 on June 28, 2020, 06:58:15 AM
Ok. Still having issues with game stutter in some conditions, but managed to isolate it a little further.
The absolute worse stutter occures when several conditions are met simultaneously:
1) A Child is in disstress (crying).
2) Child is outdoors.
3) The space the child is in is rather enclosed (in my case it is a 3-tile wide street between 2 buildings).

I tried monitoring the situation with DubsPerformance mod, and the stutters appear on the performance graphs as a 200ms load on PawnTick.JobTrackerTick.

Also another kind of annoying thing is the babies were actually having a nap, while being on mental break. This made it so they did not collapse from exhaustion ending the mental break prematurely, and were roaming for the whole duration. (including wandering into the LagStreet which is normally out of allowed area to avoid this issue).

And the problem with "Childcarers" grabbing any hungry pawn to feed, rather than just babies.

Anyway, maybe you can make it so that a baby that is crying will become downed automatically?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Kori on June 28, 2020, 12:44:29 PM
Hello! Thank you very much for maintaining this great mod and all the improvements you already made, I really could not enjoy Rimworld without it! :)

Since the 3.0 update I noticed that when I play the game for a longer period of time it sometimes starts to lag. Also when I try to quit the game it takes a very long time to finally close, and sometimes it just crashes after some waiting time. It happens after playtimes of 1+ hours.
Some people on the Steam workshop also reported that with the new version there seems to be a memory leak issue which causes that.
Are you already aware of that?
Thank you in advance! :)
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: notfood on July 01, 2020, 12:22:16 AM
Recent update broke Pawnmorpher, it used to work fine.

(https://i.imgur.com/txYBtJW.png)
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Geese man on July 01, 2020, 02:37:30 PM
Could it be made that infants can wear a beanie and onesie as the onesie description says: "A simple garment worn by an infant",
I know you normally cannot dress downed pawns but with the "dress patients" mod you can.

Also trauma savant toddlers have 50% manipulation perhaps patch that?

children with night owl trait are still scared of the dark.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 02, 2020, 03:11:58 PM
Quote from: Kori on June 28, 2020, 12:44:29 PM
Hello! Thank you very much for maintaining this great mod and all the improvements you already made, I really could not enjoy Rimworld without it! :)

Since the 3.0 update I noticed that when I play the game for a longer period of time it sometimes starts to lag. Also when I try to quit the game it takes a very long time to finally close, and sometimes it just crashes after some waiting time. It happens after playtimes of 1+ hours.
Some people on the Steam workshop also reported that with the new version there seems to be a memory leak issue which causes that.
Are you already aware of that?
Thank you in advance! :)
Yeah, the memory leak has been reported and I have confirmed it for v3.x.x. I have some theories on where it is, but I have not had the time to actually address it.

Quote from: notfood on July 01, 2020, 12:22:16 AM
Recent update broke Pawnmorpher, it used to work fine.

(https://i.imgur.com/txYBtJW.png)
Never heard of Pawnmorpher. If HAR offsets are messed up, it's most likely a patch conflict between the two. If it's opensource, I will take a look and see what I can do to resolve a conflict - Post the mod link and I'll look.

Quote from: Geese man on July 01, 2020, 02:37:30 PM
Could it be made that infants can wear a beanie and onesie as the onesie description says: "A simple garment worn by an infant",
I know you normally cannot dress downed pawns but with the "dress patients" mod you can.

Also trauma savant toddlers have 50% manipulation perhaps patch that?

children with night owl trait are still scared of the dark.
Baby clothing has not been revisited yet - I have created a git issue to do so. I will not explicitly support Dress Patients (another new one for me) but if there is a qualification reason an infant cannot wear infant clothing, I will check and resolve it.

Will look into the trait issues.

3.0.5 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.5
A couple of shot in the dark fixes and conflict resolution for Bad Hygiene and Combat Extended. Possibly still some issues with those mods, as my testing is not extensive.
Several fixes courtesy of Hilvon1984.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Hilvon1984 on July 02, 2020, 03:52:42 PM
QuoteI will not explicitly support Dress Patients (another new one for me)
I have Dress Patients in my playthrough. And I can confirm that it works for babies. At least with 3.0.5 you linked below. Please see screenshot below. Ignore the head - it is an incompatibility with FacialStuff objecting to not rendering any head. This is infact a crib baby, not even a toddler.
The missing texture square is probably an issue with baby clothing... I had the baby dressed in a beanie (which is why there is an option to strip) and this happened.

The "Baby crying outside" lagfest also seems to have been resolved now. Checked a different save that was in the middle of experiencing a lagfest, and it seems to work smoothly.

The "Feeding abductions" I can't test straight away, because it is a spontaneous behaviour of pawns, but I will keep an eye and hopefully it is now resolved as well.

I am now very happy with this mod.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: notfood on July 03, 2020, 06:08:15 AM
Quote from: Tragix on July 02, 2020, 03:11:58 PM
Never heard of Pawnmorpher. If HAR offsets are messed up, it's most likely a patch conflict between the two. If it's opensource, I will take a look and see what I can do to resolve a conflict - Post the mod link and I'll look.

https://github.com/Tachyonite/Pawnmorpher
https://steamcommunity.com/sharedfiles/filedetails/?id=1786466855

They're a team and they're open to PRs.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 03, 2020, 12:00:58 PM
Quote from: notfood on July 03, 2020, 06:08:15 AM
Quote from: Tragix on July 02, 2020, 03:11:58 PM
Never heard of Pawnmorpher. If HAR offsets are messed up, it's most likely a patch conflict between the two. If it's opensource, I will take a look and see what I can do to resolve a conflict - Post the mod link and I'll look.

https://github.com/Tachyonite/Pawnmorpher
https://steamcommunity.com/sharedfiles/filedetails/?id=1786466855

They're a team and they're open to PRs.
Looks like they extend HAR by creating subclasses of BodyAddon, and add new body addons at runtime. Further, I might be wrong since I didn't have a lot of time to look at it and it's pretty dense code, but it looks like it actually generates new races at run time for each "morph" type. In theory, it might be possible to support these addons without context to the race, but not with the way I've implemented HAR support right now. Patching PawnMorpher right now would probably be fairly complicated.

Based on the short look I took, I think if we changed HAR support to always reference another bodytype for scaling, and have the patch override be a % scale, we could probably get a better "native" or unpatched resizing for alien races, which would in theory also apply to the implicit races used in Morpher. I'm also considering defaulting to the alien race head graphic instead of using our own, as there are many alien races that use custom head graphics. This would probably make children for these races look more like shrunken versions of adults, but I think it's better than having them look like oddly colored human children.

Truth is, to get a good looking child race, it needs to be hand made in all cases. Since I'm not artist and really have no interest in providing those graphics as part of this mod, we'll have to settle for "almost OK" looking.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Mox on July 05, 2020, 08:18:46 PM
+1 on adding compatibility with Facial Stuff. I use both, and I'd love the kids to not look deformed af. Plus, it used to work in the past, so yeah.

Also, bug report, I'm having toons assigned to Childcare take Adults to their beds to feed them? >_>
I've attached my Player.log. I have 3 kids on the colony, and I haven't noticed this happening before they got born. If you need anymore info let me know.
(https://i.imgur.com/BicNhZ4.png)


Also, I imagine being incapable of Social should also disable Childcare, just like it does Warden. Backgrounds such as Reclusive Child, etc. At the moment it doesn't.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Hilvon1984 on July 06, 2020, 04:11:21 AM
Quote from: Mox on July 05, 2020, 08:18:46 PM
+1 on adding compatibility with Facial Stuff. I use both, and I'd love the kids to not look deformed af. Plus, it used to work in the past, so yeah.

Facial Stuff is open source, so I will try to look what is causing those extra heads being rendered.

Quote from: Mox on July 05, 2020, 08:18:46 PM
Also, bug report, I'm having toons assigned to Childcare take Adults to their beds to feed them? >_>
Is this with the version linked in the post?
Quote3.0.5 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.5

This is one of the problems a potential fix for which was attempted there. Can you confirm the issue still stands?

Quote from: Mox on July 05, 2020, 08:18:46 PM
Also, I imagine being incapable of Social should also disable Childcare, just like it does Warden. Backgrounds such as Reclusive Child, etc. At the moment it doesn't.
I believe Childcare is disabled by "Incapable of Caring".
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Mox on July 07, 2020, 04:56:22 PM
Quote from: Hilvon1984 on July 06, 2020, 04:11:21 AM
Quote from: Mox on July 05, 2020, 08:18:46 PM
Also, bug report, I'm having toons assigned to Childcare take Adults to their beds to feed them? >_>
Is this with the version linked in the post?
Quote3.0.5 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.5

This is one of the problems a potential fix for which was attempted there. Can you confirm the issue still stands?

Ah, 3.0.4 is the last version on the Steam Workshop, 3.0.5 hasn't been pushed there yet.

I've downloaded 3.0.5, and I'm not having the issue anymore. Cheers! Probably should be pushed to Steam :)
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: IskeAhi on July 10, 2020, 04:29:13 PM
Is anyone else still getting pink box errors when kids wear adult clothes or is it just me? I thought I was running the latest version
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Russhell on July 10, 2020, 08:42:42 PM
Hello can I have some help with this error during playing with a newborn child?. I stripped all mods except HugsLib and CnP. this is the error from the debug menu.

Exception in JobDriver tick for pawn Sarah driver=JobDriver_PlayWithBaby (toilIndex=3) driver.job=(error)
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.JobDriver_PlayWithBaby.<MakeNewToils>b__7_1 () [0x000c3] in <9a38165400d44f088bd0ced2104c60e8>:0
  at Verse.AI.JobDriver.DriverTick () [0x001a2] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Thanks in advance :3
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: sidfu on July 11, 2020, 05:00:16 AM
can never version u pput in support for milkable colonisst or a way to input hedriffs to use for breastfeeding?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 12, 2020, 05:30:20 PM
Quote from: IskeAhi on July 10, 2020, 04:29:13 PM
Is anyone else still getting pink box errors when kids wear adult clothes or is it just me? I thought I was running the latest version
This will always occur when a child wears an article of clothing that cannot be resized. The way we handle resizing at the moment is to take the "thin" graphics of the adult clothing and scale them down to fit. If a clothing item doesnt have a thin graphic, it will fail to resolve. I suppose there might be a way to detect and prevent these items from being equipped in the first place. From a gameplay perspective, allowing kids to wear adult clothing and assume it magically resizes is easier for both players and developers. From an RP perspective, perhaps adding in "small" versions of clothing would be preferable. This ofcourse would reduce base compatibility with mods that add clothing. I'll have to think on it.

Quote from: Russhell on July 10, 2020, 08:42:42 PM
Hello can I have some help with this error during playing with a newborn child?. I stripped all mods except HugsLib and CnP. this is the error from the debug menu.

Exception in JobDriver tick for pawn Sarah driver=JobDriver_PlayWithBaby (toilIndex=3) driver.job=(error)
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.JobDriver_PlayWithBaby.<MakeNewToils>b__7_1 () [0x000c3] in <9a38165400d44f088bd0ced2104c60e8>:0
  at Verse.AI.JobDriver.DriverTick () [0x001a2] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Thanks in advance :3
Based on the code, I think the only way for this error to occur if the baby is null, the pawn is null, or the job instance is null. I haven't taken an extensive look, but none of those three scenarios ought to be possible. Stripping mods in an active save file is not advised, as it contaminates your environment with undefined factors - I can never reproduce the environment that occurs from a save with mods removed, even if that save were loaded in my environment. If I can replicate, I'll patch it in the next release.

Quote from: Mox on July 07, 2020, 04:56:22 PM

Ah, 3.0.4 is the last version on the Steam Workshop, 3.0.5 hasn't been pushed there yet.

I've downloaded 3.0.5, and I'm not having the issue anymore. Cheers! Probably should be pushed to Steam :)
Perhaps I should not have authorized the upload to steam workshop. This will no doubt make bug reports less viable if the versions do not match up. To be clear, I do not and will not maintain the steam release. Glad the latest version worked, however. Thank Hilvon for suggesting the changes.

Quote from: sidfu on July 11, 2020, 05:00:16 AM
can never version u pput in support for milkable colonisst or a way to input hedriffs to use for breastfeeding?
I have not revisited lactation or breast feeding yet, but it's on the ever growing list. As babies can be fed by any food item and colonist, there isn't much incentive to "store" breast milk for future feedings or anything like that. Were I to implement a feature like this, I believe the player justification for doing so would either need to be efficiency (lactation is basically free baby food, vs eating from colony stockpiles) or RP reasons. I'll consider this when it comes time to revisit breast feeding.
I'll also need to make sure that non-mammalian races have some support as well, so the code that handles lactation will need to account for races that do not lactate.
Right now custom races will need to provide a custom class for their pregnancy rules, but this could be handled by a def defining how a race's pregnancy should be handled.

In other news: I have narrowed down the memory leak in version 2.x.x and 3.x.x and am working to identify the specific cause. Memory leaks in a garbage collected system are new territory for me, so the actual fix may take a while longer - especially since Sunday is already drawing to a close. Hooray.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Geese man on July 13, 2020, 09:48:22 AM
I have an issue with alien race infants not advancing life stages on their own, currently orassan, ratkin, crystalloids. (Crystalloids have a natural 0% pregnancy chance but their infants have the same issues) human babies on the other hand work as intended and will growup automatically.
if you force birthday them they do grow up using the age pill from genetic rim also does the job.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 13, 2020, 10:38:51 AM
Quote from: Geese man on July 13, 2020, 09:48:22 AM
I have an issue with alien race infants not advancing life stages on their own, currently orassan, ratkin, crystalloids. (Crystalloids have a natural 0% pregnancy chance but their infants have the same issues) human babies on the other hand work as intended and will growup automatically.
if you force birthday them they do grow up using the age pill from genetic rim also does the job.
Keep in mind that growth stages are driven primarily by the race's lifestage index. We have a patch for humans that reduces the age range for the baby/toddler/child lifestages, so babies become toddlers at .5 years old, and toddlers become children at 3 years old. Without a similar patch, other races will use whatever the author configured them with - probably 1.2 years for baby -> toddler and 4 years for toddler -> child.
This isn't something I plan to change, as I do not want to override the lifestages of a modded race.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Geese man on July 13, 2020, 12:16:55 PM
Quote from: Tragix on July 13, 2020, 10:38:51 AM
Quote from: Geese man on July 13, 2020, 09:48:22 AM
I have an issue with alien race infants not advancing life stages on their own, currently orassan, ratkin, crystalloids. (Crystalloids have a natural 0% pregnancy chance but their infants have the same issues) human babies on the other hand work as intended and will growup automatically.
if you force birthday them they do grow up using the age pill from genetic rim also does the job.
Keep in mind that growth stages are driven primarily by the race's lifestage index. We have a patch for humans that reduces the age range for the baby/toddler/child lifestages, so babies become toddlers at .5 years old, and toddlers become children at 3 years old. Without a similar patch, other races will use whatever the author configured them with - probably 1.2 years for baby -> toddler and 4 years for toddler -> child.
This isn't something I plan to change, as I do not want to override the lifestages of a modded race.
I should clarify if I age a infant to 1 year old with force birthday it will grow to the second toddler (standing toddler) state as it should.
aging them to 3 with the force birthday also turns them into a child as it should.
(age pills from genetic rim do the same)
their lifestagecapinjection of whatever that hediff is called simply does not update if they age "naturally".
I do understand the growth mechanics which will work based on their life expectancy but then why do they grow like humans if you force their age up?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 13, 2020, 03:41:51 PM
Quote from: Geese man on July 13, 2020, 12:16:55 PM
Quote from: Tragix on July 13, 2020, 10:38:51 AM
Quote from: Geese man on July 13, 2020, 09:48:22 AM
I have an issue with alien race infants not advancing life stages on their own, currently orassan, ratkin, crystalloids. (Crystalloids have a natural 0% pregnancy chance but their infants have the same issues) human babies on the other hand work as intended and will growup automatically.
if you force birthday them they do grow up using the age pill from genetic rim also does the job.
Keep in mind that growth stages are driven primarily by the race's lifestage index. We have a patch for humans that reduces the age range for the baby/toddler/child lifestages, so babies become toddlers at .5 years old, and toddlers become children at 3 years old. Without a similar patch, other races will use whatever the author configured them with - probably 1.2 years for baby -> toddler and 4 years for toddler -> child.
This isn't something I plan to change, as I do not want to override the lifestages of a modded race.
I should clarify if I age a infant to 1 year old with force birthday it will grow to the second toddler (standing toddler) state as it should.
aging them to 3 with the force birthday also turns them into a child as it should.
(age pills from genetic rim do the same)
their lifestagecapinjection of whatever that hediff is called simply does not update if they age "naturally".
I do understand the growth mechanics which will work based on their life expectancy but then why do they grow like humans if you force their age up?
lifestagecapinjection is used to modify pawn capacities at runtime in lieu of a better way to add capacity modifiers. I should probably look into patching the capacity calculation method to inject these modifiers directly instead of creating runtime hediffs.

I setup an infant orassan in a basic colony and ran it for while with 12x growth acceleration for babies. I saw the orassan baby transition from infant to crawling to standing toddler. Granted this happens much slower than the human babies due to Orassan's lifestage range. If yours is not growing even after 2 years of age, there may be something else preventing the change. This process is handled by the lifecycle component, so if lifecycles are not enabled for Orassan, that would probably do it.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 14, 2020, 07:37:29 PM
Version 3.0.7 released.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.7

This change addresses some performance issues and memory leaks, but otherwise no new functionality. Thanks to those who reported memory issues with the mod.
There may be similar issues still present, but I believe the identified leak has been resolved. Note that CNP does modify materials and graphics in order to change how pawns are rendered, so the over all memory usage with the mod will most likely still be higher than without the mod.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Fluyd-19 on July 16, 2020, 05:35:36 PM
Sup. Hello. Bonjour. Sup. Could you maybe entertain an idea of configuring the backstory of rimworld born children (Rimchild) so it function the same way as tribe child (vanila one) does? They are basically the same narrative wise and i really would want to use that anima tree with the kids without manually editing their backgrounds each time. If not that maybe you could tell me what line i need to copy paste into the backstories.xml so rimchild would have that natural type of meditation?
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 16, 2020, 05:47:01 PM
Quote from: Fluyd-19 on July 16, 2020, 05:35:36 PM
Sup. Hello. Bonjour. Sup. Could you maybe entertain an idea of configuring the backstory of rimworld born children (Rimchild) so it function the same way as tribe child (vanila one) does? They are basically the same narrative wise and i really would want to use that anima tree with the kids without manually editing their backgrounds each time. If not that maybe you could tell me what line i need to copy paste into the backstories.xml so rimchild would have that natural type of meditation?
Confession: I don't actually play Rimworld right now. I have no idea what any of that means. Got some wiki links or examples of the functionality you're referring to? Meditating, Anime trees, and tribe children are all new to me.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Fluyd-19 on July 16, 2020, 06:41:30 PM
Quote from: Tragix on July 16, 2020, 05:47:01 PM
Quote from: Fluyd-19 on July 16, 2020, 05:35:36 PM
Sup. Hello. Bonjour. Sup. Could you maybe entertain an idea of configuring the backstory of rimworld born children (Rimchild) so it function the same way as tribe child (vanila one) does? They are basically the same narrative wise and i really would want to use that anima tree with the kids without manually editing their backgrounds each time. If not that maybe you could tell me what line i need to copy paste into the backstories.xml so rimchild would have that natural type of meditation?
Confession: I don't actually play Rimworld right now. I have no idea what any of that means. Got some wiki links or examples of the functionality you're referring to? Meditating, Anime trees, and tribe children are all new to me.
Ok.
Here is the wiki https://www.rimworldwiki.com/wiki/Anima_tree
Here is the steamstore page with words https://store.steampowered.com/newshub/app/294100/view/2241050403490947258

Basically the game has this new mechanic, like jedi powers. Pawns have to recharge their wizard powers in a few different ways. One of these ways is avatarish one and is exlusive to tribal backstory (Natural type of meditation).

Here is the my issue ingame https://imgur.com/a/PqnqocH
Right now i have to use character editor so the kids would be able to do it. Would be really nice if it was automated by this mod.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: TheBadiator on July 17, 2020, 01:50:18 AM
https://gist.github.com/b741f2f190968949e1c14a7246781a11

As per 3.0.7, when a Toddler puts on a Onesie or a Beanie, they turn into a pink square.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 17, 2020, 12:00:38 PM
Quote from: Fluyd-19 on July 16, 2020, 06:41:30 PM

Ok.
Here is the wiki https://www.rimworldwiki.com/wiki/Anima_tree
Here is the steamstore page with words https://store.steampowered.com/newshub/app/294100/view/2241050403490947258

Basically the game has this new mechanic, like jedi powers. Pawns have to recharge their wizard powers in a few different ways. One of these ways is avatarish one and is exlusive to tribal backstory (Natural type of meditation).

Here is the my issue ingame https://imgur.com/a/PqnqocH
Right now i have to use character editor so the kids would be able to do it. Would be really nice if it was automated by this mod.
Interesting. This would be a perfect use case for something like Children School and Learning, where something like tribal knowledge is passed to a child rather than them being born with it. The mod would be better suited dropping the C and just sticking with School and Learning, as that is already an immensely deep topic to focus on without half-assing childhood.
This is a unique problem I think, as we use the Rimchild backstory to essentially say "this pawn was born in your colony, so their backstory is what you make it" and give them no bonuses to stats as such. Attaching something like the Anima Tree ability to a backstory was rather foolish in the first place, especially given how inflexible backstories are. I will add an issue on git to look into this. If there is a way to add the ability based on faction, whether the parents have it, or some other mechanism, that would be preferable to using backstories in this case.

It's a low priority change right now as it falls into the category of getting-up-to-speed-with-royalty.

Quote from: TheBadiator on July 17, 2020, 01:50:18 AM
https://gist.github.com/b741f2f190968949e1c14a7246781a11

As per 3.0.7, when a Toddler puts on a Onesie or a Beanie, they turn into a pink square.
So I just checked baby clothes for the first time and I see that it's actually being blocked for Toddlers. Mine can't even equip it. They also can't equip adult clothes, which probably means the whole half-baked system is broken.
I'll review the system soon and come up with a new solution.

The way it seems to work right now, is that Infants are supposed to be able to equip this new type of clothing. This makes little sense since infants can't equip anything to start with, which is fine since they're basically furniture. Toddlers need real clothing, and the ability to equip stuff like Parkas. Making an entire line of toddler-appropriate equipment is about a million miles out of scope, so that's not gonna happen.
I suspect what we will do at a minimum is make Toddlers able to equip resized adult clothing. Infants we may consider adjusting so adults will dress them on their own if appropriate clothing is available. Bonus points, we could consider disallowing some subset of clothing for toddlers and children. That depends mostly on how easy it is to identify categories of equipment. If I can quickly grab a collection of "All helmets" or "All metal armor" then I can blacklist equipment that doesn't make sense.

v3.0.8 released.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.0.8
A quick update that adds the capability for other mods to register hediffs that are retained when generating a new pawn.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: Geese man on July 18, 2020, 05:25:16 AM
I think the easiest solution to the meditation type problem is to create a background for every technology level to start with, to prevent complications (like having a tribal parent but also a industrial level parent) I suggest to keep it simple so a child belonging to a tribe will be a "tribal rim child" thus unlocking natural meditation, a child belonging to one of the modern outlander factions can be a "industrial rim child" and children from the empire (royalty dlc) are spacer rim children.  Do keep in mind traits affect meditation types as well, for instance: a psychopath tribal will not be able to use natural meditation but can use morbid meditation etc.
you might get royalty if you want to really understand the mechanics.
Title: Re: [1.1] Children and Pregnancy - v3.0.0
Post by: GhostData on July 20, 2020, 11:22:36 AM
3.1.0 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.1.0
Be sure to perform a clean install

This release fixes onesies and beanies, as well as makes some changes to the comp and defs that render these items. "Baby gear" should not resize like other equipment does, as it is assumed something made specifically for Toddlers will fit them without resizing. Hat offsets are now separate from the hair offset and may be adjusted independently.
Bugs that allowed toddlers to wear non-suitable equipment are resolved.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: GhostData on July 20, 2020, 09:47:07 PM
3.2.0 released.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.2.0

Quick release to add an adoption job for babies and toddlers in other factions. This job requires a childcare pawn to walk up to the baby, and immediately recruits them. This works for all toddlers and babies in non-player factions. Currently, non-downed enemy toddlers will still be shot to death.

If a babv belongs to a non-hostile faction, forcibly adopting the baby will incur the usual capture/arrest penalties if there are any other pawns from that faction. This allows it to be used to adopt discarded babies, but discourages kidnapping. Rescuing is still a possibility, as pawns will not yet recover their children before leaving the map.

This release is the first step towards proper faction support. In the future, pawns will attempt to manage their own babies when on the map, carrying them around and leaving the map with them.

--This should work for "wildman" babies as well, but I have not tested it yet.
Child pawns are not adoptable, they must be convinced to join like any other pawn.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: Geese man on July 22, 2020, 03:37:03 PM
Adopting ratkin babies will always anger the ratkin faction even when there is none left on the map, them being neutral or allies does not matter.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: Daruny on July 23, 2020, 11:28:39 PM
So hey, I was playing with the mod on and it turns out that if you make older your kids (and baby I assume) their body turns pink. If you strip them nude, their body shows but tiny, so as it turns out I went in some digging and found a solution to it and is really simple, you have to manually put the textures in children and pregnancy mod, for instance a duster:

RimWorld\Mods\children-and-pregnancy-collab-v3.2.0\Textures\Things\Pawn\Humanlike\Apparel

inside this folder you make a new folder named after the clothing you want, let's say the duster itself:

RimWorld\Mods\children-and-pregnancy-collab-v3.2.0\Textures\Things\Pawn\Humanlike\Apparel\Duster

inside the Duster folder you make/copy the textures you want for children/babies, so you will have

Duster_Child.png
Duster_Child_east.png
Duster_Child_north.png
Duster_Child_south.png

and done, the pink is gone. As for their bodies remaining baby like, I'd guess you would need to determine when they are kids and not(?) in which case I'd suggest that if you do re-program it, I'd make it so that after age 8 they are not humanlike child, and you save yourself the work of renaming and copying all the textures.

Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: GhostData on July 24, 2020, 09:45:51 AM
Quote from: Daruny on July 23, 2020, 11:28:39 PM
So hey, I was playing with the mod on and it turns out that if you make older your kids (and baby I assume) their body turns pink. If you strip them nude, their body shows but tiny, so as it turns out I went in some digging and found a solution to it and is really simple, you have to manually put the textures in children and pregnancy mod, for instance a duster:

RimWorld\Mods\children-and-pregnancy-collab-v3.2.0\Textures\Things\Pawn\Humanlike\Apparel

inside this folder you make a new folder named after the clothing you want, let's say the duster itself:

RimWorld\Mods\children-and-pregnancy-collab-v3.2.0\Textures\Things\Pawn\Humanlike\Apparel\Duster

inside the Duster folder you make/copy the textures you want for children/babies, so you will have

Duster_Child.png
Duster_Child_east.png
Duster_Child_north.png
Duster_Child_south.png

and done, the pink is gone. As for their bodies remaining baby like, I'd guess you would need to determine when they are kids and not(?) in which case I'd suggest that if you do re-program it, I'd make it so that after age 8 they are not humanlike child, and you save yourself the work of renaming and copying all the textures.
Clothing textures are handled automatically. If you're having to move the graphics yourself, there is something wrong with your pawn.
What age and race was the pawn? Did you use the force-birthday debug option? The component updates every 250 ticks, so if a pawn rapidly ages from 0 to 14 (for example) the component will not have time to update their body or other values between stages.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: lovecrazygaming on July 24, 2020, 12:01:34 PM
Can't get pregnant!

Since the new update, my pawns have not been able to get pregnant from Lovin' regularly. I started a new game to make sure and still nothing. Please fix. I have seen quite a few other comments on Steam Workshop saying it worked before and now it doesn't. They have the same issue.  :(
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: Daruny on July 24, 2020, 01:14:44 PM
Quote from: Tragix on July 24, 2020, 09:45:51 AM
Clothing textures are handled automatically. If you're having to move the graphics yourself, there is something wrong with your pawn.
What age and race was the pawn? Did you use the force-birthday debug option? The component updates every 250 ticks, so if a pawn rapidly ages from 0 to 14 (for example) the component will not have time to update their body or other values between stages.

Then yeah it might be just that, I honestly thought it was a common bug to lose textures on age progression, disregard what I said then. Cheers! Thanks for the response.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: GhostData on July 24, 2020, 01:25:47 PM
Quote from: Daruny on July 24, 2020, 01:14:44 PM
Quote from: Tragix on July 24, 2020, 09:45:51 AM
Clothing textures are handled automatically. If you're having to move the graphics yourself, there is something wrong with your pawn.
What age and race was the pawn? Did you use the force-birthday debug option? The component updates every 250 ticks, so if a pawn rapidly ages from 0 to 14 (for example) the component will not have time to update their body or other values between stages.

Then yeah it might be just that, I honestly thought it was a common bug to lose textures on age progression, disregard what I said then. Cheers! Thanks for the response.
Yeah, if you can replicate the bug without the debug tools, or by waiting ~5 seconds between birthdays, it's definitely something I can look into.
When I test age progression, I set the speed to fast and then perform one birthday about every 5 seconds. This gives the comp enough time to refresh and realize the baby has grown to a new lifestage.

3.2.1 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.2.1
This is a hotfix for the impregnation issue.
When I refactored the other day I seem to have removed the line that actually adds the pregnancy to the mother. I should probably start looking into unit testing frameworks for c#. There are a tremendous number of things to test, and doing so manually is highly prone to error.
Thanks for the reports.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: sidfu on July 24, 2020, 11:24:13 PM
getting this error on sstartup
did a clean install of mod and still get it what u think cause it?
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: GhostData on July 25, 2020, 09:17:49 AM
Quote from: sidfu on July 24, 2020, 11:24:13 PM
getting this error on sstartup
did a clean install of mod and still get it what u think cause it?
That occurs during a transpiler patch for apparel graphics. Most likely means that the IL that I was expecting is not the IL I am patching, which could mean there is another mod patching the same method in your load order. I'd need to know what that mod is in order to check for issues.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: sidfu on July 25, 2020, 05:24:37 PM
Quote from: Tragix on July 25, 2020, 09:17:49 AM
Quote from: sidfu on July 24, 2020, 11:24:13 PM
getting this error on sstartup
did a clean install of mod and still get it what u think cause it?
That occurs during a transpiler patch for apparel graphics. Most likely means that the IL that I was expecting is not the IL I am patching, which could mean there is another mod patching the same method in your load order. I'd need to know what that mod is in order to check for issues.

hmm looks like its somethingin hardcore sk causing it. funny thing its only on newewr versions 3.0.7 .
after some exvpermenting its fine up to v3.0.9 the fix for the beanies is what broke comp with hardcore sk.
Title: Re: [1.1] Children and Pregnancy - v3.1.0
Post by: GhostData on July 25, 2020, 06:46:55 PM
Quote from: sidfu on July 25, 2020, 05:24:37 PM
Quote from: Tragix on July 25, 2020, 09:17:49 AM
Quote from: sidfu on July 24, 2020, 11:24:13 PM
getting this error on sstartup
did a clean install of mod and still get it what u think cause it?
That occurs during a transpiler patch for apparel graphics. Most likely means that the IL that I was expecting is not the IL I am patching, which could mean there is another mod patching the same method in your load order. I'd need to know what that mod is in order to check for issues.

hmm looks like its somethingin hardcore sk causing it. funny thing its only on newewr versions 3.0.7 .
after some exvpermenting its fine up to v3.0.9 the fix for the beanies is what broke comp with hardcore sk.
Abraxas has reported a number of issues when running along side Hardcore SK. Given the size of the modpack, I won't be looking into issues with integration there for the time being. The clothing update modified the def files and a number of patches. Without logs I can't even speculate. For reference, his issue almost appears as if none of the harmony patches of CNP are applied, as every single basic feature of CNP appears to be broken.

3.3.0 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v3.3.0
This adds the first iteration of a carry feature. This is still a rough implementation, but the intent is that this feature will allow players more tactical options when it comes to dealing with baby pawns who have difficulty moving quickly.
As it is now, a drafted pawn may pick up and carry an undrafted toddler/baby, suffering a 50% manipulation penalty as a result. While carrying the baby, the baby will not be able to move about on their own, and will essentially be glued to the adult. The baby will be occupied with a "Carried" job, so I believe that they cannot interrupt this with other jobs - might be wrong there though.
If either pawn is downed or killed, if the adult is undrafted, or if the child is drafted, the carry relationship will end and the baby will be dropped.

In its current form, the only use cases for this feature are more or less manually rescuing or evacuating babies. In the future, this may be updated such that an adult pawn will automatically pick up and carry a baby under certain scenarios. Feedback is requested for this, as I currently haven't identified any worthwhile use cases.
In order to automate carrying, we must define when a pawn should carry a baby, when they should stop carrying, and where they should set down the baby. In most cases I can think of, we can handle the scenario without this feature - such as taking a child and leaving the map.
Automatically carrying a child when danger is nearby might be an option, but it will have to be carefully configured to avoid pathfinding costs or other taxing operations.

There is a new component with this version, but it should be added on load, so no save issues that I am aware of. As always, backup your save and be cautious.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: sidfu on July 25, 2020, 09:23:43 PM
the issue might be cause we need a older version  of HAR. once we get ours updated ill report on if it works gain.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Chromia. on July 27, 2020, 05:31:27 AM
Hey there! So whenever my colonist tries to play with their baby, the job doesn't seem to be happening at all, and i checked my logs and see this error continuously. Do you know what may be causing it?


Gorilla started 10 jobs in 10 ticks. List: none curDriver=JobDriver_PlayWithBaby (toilIndex=3) curJob=(PlayWithBaby (Job_5230134) A=Thing_Human715452)
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

here's the full output log just in case
https://gist.github.com/HugsLibRecordKeeper/38d4bc2636d23ef27b34b58b66238862
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Capitolio on July 27, 2020, 06:45:54 AM
First of all I want to thank you Tragix for the incredible job you're doing updating this mod, especially if you don't even play Rimworld anymore, it shows an incredible commitment to the project.

Also, I don't want to be a pain in the ass because I've mentioned this before.

I just wanted to know if there is a Facial Stuff fix on the horizon, otherwise I have to prepare to get rid of that mod. Human offspring is too important to me not to have it in the game.

Thanks again.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Fredini on July 29, 2020, 11:53:02 PM
The mod seems broken for me.

Nothing works properly, the additional body types do not function (instead I get pink squares), pregnancy and birth do not work either.

I did a clean install of the game as well as all my mods, and have done test runs in debug mode.

https://gist.github.com/73d852e2d700692716f685aada937913
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Canute on July 30, 2020, 02:31:19 AM
Fredini,
you have serveral weired errors at the rimworld startup.
I suggest at first, that you delete these mods manual from the mods folder and reinstall them.
Be sure you use the right version of that mods.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Tenshi~Akari on July 31, 2020, 07:07:16 AM
Quote from: Fredini on July 29, 2020, 11:53:02 PM
The mod seems broken for me.

Nothing works properly, the additional body types do not function (instead I get pink squares), pregnancy and birth do not work either.

I did a clean install of the game as well as all my mods, and have done test runs in debug mode.

https://gist.github.com/73d852e2d700692716f685aada937913

From the looks of it, you're using an updated version of Harmony? Would you also happen to be running the beta 1.2 build of the game as well? That could very well be a possibility why stuff just isn't working.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Fredini on August 01, 2020, 01:20:15 PM
Seems like I'm not the only one who has this issue.
It seems to be a bug where the mod can't find proper textures for children's bodies' clothes.
When a pawn is naked, it shows properly but when you add clothes to the mix, it bugs out and becomes a pink square.
As for versions, I am using the most recent version of Harmony and the latest build of the game.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: GhostData on August 02, 2020, 07:49:21 PM
Quote from: Fredini on August 01, 2020, 01:20:15 PM
Seems like I'm not the only one who has this issue.
It seems to be a bug where the mod can't find proper textures for children's bodies' clothes.
When a pawn is naked, it shows properly but when you add clothes to the mix, it bugs out and becomes a pink square.
As for versions, I am using the most recent version of Harmony and the latest build of the game.
The issues you're seeing are probably due to patches either being broken or not being used at all. I've seen a case here and there where Harmony patches aren't applied.

For reference, I compile against
Rimworld 1.1.2654
Harmony 2.0.0.8
Hugslib 7.1.0
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: 2Foldri on August 04, 2020, 06:51:12 PM
Is having O21 Races (and similar) not working a permanent (and known) issue for the foreseeable future? Is it something that just can't be fixed on CnP's end? I love O21 because it adds a lot more diversity to my game.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: GhostData on August 05, 2020, 11:08:17 AM
Quote from: 2Foldri on August 04, 2020, 06:51:12 PM
Is having O21 Races (and similar) not working a permanent (and known) issue for the foreseeable future? Is it something that just can't be fixed on CnP's end? I love O21 because it adds a lot more diversity to my game.
No plans to support every race on my side. I am still loosely looking for a way to have native support without an explicit patch, but so far I haven't come up with a good solution.
The only sure fire way to get 100% scaling accuracy with body addons so far is to simply shrink adults down. When we shrink body addons down, they shrink relative to their original graphic, so with a custom head (or no head in toddler's case) additional offsets are required. These additional offsets vary per race, which is why we currently need a custom patch for each race.

I would suggest for interested mod authors to prepare their own patch for their races, but to probably wait until CNP has reached a higher level of maturity.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: 2Foldri on August 05, 2020, 01:24:20 PM
Quote from: Tragix on August 05, 2020, 11:08:17 AM
Quote from: 2Foldri on August 04, 2020, 06:51:12 PM
Is having O21 Races (and similar) not working a permanent (and known) issue for the foreseeable future? Is it something that just can't be fixed on CnP's end? I love O21 because it adds a lot more diversity to my game.
No plans to support every race on my side. I am still loosely looking for a way to have native support without an explicit patch, but so far I haven't come up with a good solution.
The only sure fire way to get 100% scaling accuracy with body addons so far is to simply shrink adults down. When we shrink body addons down, they shrink relative to their original graphic, so with a custom head (or no head in toddler's case) additional offsets are required. These additional offsets vary per race, which is why we currently need a custom patch for each race.

I would suggest for interested mod authors to prepare their own patch for their races, but to probably wait until CNP has reached a higher level of maturity.

Ahh well, I feel like from what I gathered the O21 mod author probably won't add support. At the very least they were (I think) VERY adamant against adding support for facial stuff in 1.0 (though to be fair facial stuff is kind of a disaster, so I've stopped using it anyways).
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: platipuss on August 07, 2020, 05:39:17 AM
hello

if its only me or someone has the same problem I dont know but when I act'vate this mod game starts lagging and it lags really bad
does anyone knows the reason?
my game is heavly modded but when I make the mod inactive everything becomes smooth again...
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: sidfu on August 08, 2020, 04:09:08 PM
Quote from: platipuss on August 07, 2020, 05:39:17 AM
hello

if its only me or someone has the same problem I dont know but when I act'vate this mod game starts lagging and it lags really bad
does anyone knows the reason?
my game is heavly modded but when I make the mod inactive everything becomes smooth again...

its not this mod. that means this mod makes u go over the edge for ticks used and lags game. get rid of bad mods like ones that auto clean areas or automate simple things will help
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Huntsman on August 10, 2020, 12:03:19 AM
Seems like the latest release of this is incompatible with the latest CE release.

Child colonists will have their bodies replaced with pink squares while wearing any form of body covering apparel. Tested with only CE and CnP active in all permutations of load order, and with the current and previous Harmony releases.

Harmony exception on startup: https://pastebin.pl/view/4d4d32cf
Exception caused by child equipping clothes: https://pastebin.pl/view/9c1a7792
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: BlueTressym on August 10, 2020, 11:20:27 PM
Quote from: platipuss on August 07, 2020, 05:39:17 AM
hello

if its only me or someone has the same problem I dont know but when I act'vate this mod game starts lagging and it lags really bad
does anyone knows the reason?
my game is heavly modded but when I make the mod inactive everything becomes smooth again...

Try testing a new colony with just this mod (plus any prereqs) and see if it still happens.  You can copy your ModsConfig (if not using Fluffy's Mod Manager, which lets you save mod lists) so you can avoid losing your current mod setup. 
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: BlueTressym on August 10, 2020, 11:22:18 PM
Do we know if this is getting a 1.2 update?  I have actually just discovered it and it looks like just what I've been looking for, so I'm hoping so. 

Pretty please, Tragix!
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: rozyn on August 11, 2020, 04:03:12 AM
Quote from: BlueTressym on August 10, 2020, 11:22:18 PM
Do we know if this is getting a 1.2 update?  I have actually just discovered it and it looks like just what I've been looking for, so I'm hoping so. 

Pretty please, Tragix!

Give it time, the patch only fully released today. I don't imagine it would take much longer then a week or so. I usually take a break from rimworld for about 2 weeks between patches, that's about the time it takes for the majority of them to get updated.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Alundra on August 13, 2020, 09:31:56 AM
Hoping some errors can assist you with updating, love this mod :D.

Exception getting types in assembly RimWorldChildren, Version=1.0.7511.31595, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
RimWorld.Planet.World:FillComponents()
RimWorld.Planet.World:ExposeComponents()
RimWorld.Planet.World:ExposeData()
Verse.Scribe_Deep:Look(World&, Boolean, String, Object[])
Verse.Scribe_Deep:Look(World&, String, Object[])
Verse.Game:ExposeData()
Verse.Scribe_Deep:Look(Game&, Boolean, String, Object[])
Verse.Scribe_Deep:Look(Game&, String, Object[])
Verse.<>c:<SaveGame>b__13_0()
Verse.SafeSaver:DoSave(String, String, Action)
Verse.SafeSaver:Save(String, String, Action, Boolean)
Verse.GameDataSaveLoader:SaveGame(String)
RimWorld.Autosaver:DoAutosave()
Verse.LongEventHandler:UpdateCurrentSynchronousEvent(Boolean&)
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Verse.Root.Update_Patch1(Root)
Verse.Root_Play:Update()


Exception getting types in assembly RimWorldChildren, Version=1.0.7511.31595, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
Verse.Game:Verse.Game.FillComponents_Patch1(Game)
Verse.Game:.ctor()
Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1(String)
Verse.<>c:<Start>b__1_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()


Exception getting types in assembly RimWorldChildren, Version=1.0.7511.31595, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
Verse.Map:FillComponents()
Verse.Map:Verse.Map.ConstructComponents_Patch1(Map)
Verse.Map:ExposeData()
Verse.ScribeExtractor:SaveableFromNode(XmlNode, Object[])
Verse.Scribe_Collections:Look(List`1&, Boolean, String, LookMode, Object[])
Verse.Scribe_Collections:Look(List`1&, String, LookMode, Object[])
Verse.Game:Verse.Game.LoadGame_Patch2(Game)
Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1(String)
Verse.<>c:<Start>b__1_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()


Hope they help point the way to any issues :).
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: kitchenarm on August 13, 2020, 04:32:44 PM
I'm confused, I started a new game with the latest github release and everything is working fine, but my colonist isn't getting pregnant. She's 33 and healthy and there have been many 'opportunities' for it. I looked in the mod options to see if I could up the chance of pregnancy, but there's no more slider to configure it like before! Is it a bug or has something changed?
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Geese man on August 14, 2020, 09:49:55 AM
Could miscarriages get reworked?, That when 1 should happen you get a warning and you get 3 in game hours to patch up/feed the female with a way to artificially induce contractions if you cant help fast enough at the most likely cost of birth defects if the baby has not been carried long enough.

Could we also have artificial baby growing so that gay couples can have kids of their own (artificial impregnation is most likely harder to implement)

And perhaps a stop system to prevent social fights with pregnant females (middle stage+) like with children.

Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Meester on August 14, 2020, 10:47:40 PM
Quote from: Huntsman on August 10, 2020, 12:03:19 AM
Child colonists will have their bodies replaced with pink squares while wearing any form of body covering apparel. Tested with only CE and CnP active in all permutations of load order, and with the current and previous Harmony releases.

Same except I don't have CE. Might be something to do with Humanoid Alien Races 2.0.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: sidfu on August 17, 2020, 12:55:02 PM
Quote from: Geese man on August 14, 2020, 09:49:55 AM
Could miscarriages get reworked?, That when 1 should happen you get a warning and you get 3 in game hours to patch up/feed the female with a way to artificially induce contractions if you cant help fast enough at the most likely cost of birth defects if the baby has not been carried long enough.

Could we also have artificial baby growing so that gay couples can have kids of their own (artificial impregnation is most likely harder to implement)

And perhaps a stop system to prevent social fights with pregnant females (middle stage+) like with children.

or better yet u can like not have them starve in first place. its not hard unless u use seeds plz u can literaly plant the whole map with potatoes from day 1
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Alundra on August 17, 2020, 10:46:16 PM
Quote from: kitchenarm on August 13, 2020, 04:32:44 PM
I'm confused, I started a new game with the latest github release and everything is working fine, but my colonist isn't getting pregnant. She's 33 and healthy and there have been many 'opportunities' for it. I looked in the mod options to see if I could up the chance of pregnancy, but there's no more slider to configure it like before! Is it a bug or has something changed?

It's because of the errors I posted above your post. The game can't make the pawns pregnant.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: GhostData on August 18, 2020, 11:19:39 AM
Haven't been active lately as I am working on other things at the moment. Development will continue after the hiatus.

Quote from: Huntsman on August 10, 2020, 12:03:19 AM
Seems like the latest release of this is incompatible with the latest CE release.

Child colonists will have their bodies replaced with pink squares while wearing any form of body covering apparel. Tested with only CE and CnP active in all permutations of load order, and with the current and previous Harmony releases.

Harmony exception on startup: https://pastebin.pl/view/4d4d32cf
Exception caused by child equipping clothes: https://pastebin.pl/view/9c1a7792
Apparel is a difficult thing to patch, apparently. We have patches that "spoof" the body type when equipping adult clothing, which works in vanilla cases. Previous iterations actually used the thin body type which probably improved base compatibility with mods that reference body type or patch graphics. At some point I will need to revisit this and see about improving compatibility without patching other mods. My guess is that CE is doing something with body types and graphics which causes a failure to resolve the graphics for the correctly spoofed body type.  Or it could be patching the same methods CNP does.

Quote from: BlueTressym on August 10, 2020, 11:22:18 PM
Do we know if this is getting a 1.2 update?  I have actually just discovered it and it looks like just what I've been looking for, so I'm hoping so. 

Pretty please, Tragix!
Didn't realize there was an update. I'll take a first look later today if nothing comes up. Hopefully it's just a recompile.

Quote from: Meester on August 14, 2020, 10:47:40 PM
Quote from: Huntsman on August 10, 2020, 12:03:19 AM
Child colonists will have their bodies replaced with pink squares while wearing any form of body covering apparel. Tested with only CE and CnP active in all permutations of load order, and with the current and previous Harmony releases.

Same except I don't have CE. Might be something to do with Humanoid Alien Races 2.0.
These are issues I can only fix if I can replicate them. Things that might help me replicate:
Race and Age of the pawn having problems
Exact piece of equipment that causes the problem
Mod (preferably linked) that adds the equipment

I imagine some mods are directly conflicting when it comes to patches or rendering, so each case will have to be looked at independently.

Quote from: Geese man on August 14, 2020, 09:49:55 AM
Could miscarriages get reworked?, That when 1 should happen you get a warning and you get 3 in game hours to patch up/feed the female with a way to artificially induce contractions if you cant help fast enough at the most likely cost of birth defects if the baby has not been carried long enough.

Could we also have artificial baby growing so that gay couples can have kids of their own (artificial impregnation is most likely harder to implement)

And perhaps a stop system to prevent social fights with pregnant females (middle stage+) like with children.
Miscarriages and abortion will probably be developed on more in the future as I would like to make them more configurable per the pregnancy components. Miscarriage in reality is often unpreventable and unforeseeable. Modern medicine + regular checkups during the pregnancy have reduced the likelihood, but traumatic injuries, poisoning, etc often prove quickly fatal to unborn children.
Not sure if I want to try to simulate premie birth in detail, but we might be able to do something with light simulation. Maybe a hediff that lasts a few seasons and reduces lung and heart function and increased risk of sickness and infection.
My goal is to be believable rather than realistic. I'll add it to the white board, but it will most likely be a post-stabilization feature.

Artificial baby growth is out of scope for this mod. Someone is welcome to make an extension that utilizes this mod as a base, but test tube babies don't fall within the parameters of pregnancy to me. Funnily enough, artificial impregnation falls more into scope than growth vats do.
I will need to consider the scope of pregnancy going forward. Right now the impregnation part of CNP is very primitive - a roll of the dice with minimal factors at play. Other mods currently do this part better, so I am debating whether it should be expanded or just give other mods the levers they need to trigger a CNP pregnancy. I want this mod to do a few things well and leave the rest to mods with larger scopes.
CNP (under my view) is very much a child hood and pregnancy simulation project. I'm not as concerned with the "getting pregnant" aspect. That might change though.

Lastly, I don't want to add anything that holds a players hand. The player should protect their children and pregnant women. If you have free range babies, expect some to get eaten by wolves. If pregnant women have chemical fascination and easy access to the booze stockpile, expect deformed or lost babies. I don't want to remove any consequences for player decisions, even if that decision is doing nothing.
Social fights are interesting because they're largely out of the players control if they occur. The only player solution I can think of is to have someone else break up the fight or intervene. I'd rather not prevent social fights. What I could do instead is refine what counts as a severe injury. I reckon it's believable to have a miscarriage if you lose a ton of blood, but probably not as likely from a cracked femur or a ton of bruises. I'll have to test some to figure out what that threshold is. Guess I'll be beating up pregnant women for science soon.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Alundra on August 19, 2020, 02:14:13 AM
Do you have an estimate on when hiatus will end? :)
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: MrGrumblier on August 19, 2020, 10:42:26 AM
Love this mod but I'm having an issue with crying animals all over the map. This is giving my pawns the crying baby debuff. Is it just me or are others having this issue? I've forced the mod to read as 1.2 compatible.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: sidfu on August 19, 2020, 02:05:28 PM
Quote from: MrGrumblier on August 19, 2020, 10:42:26 AM
Love this mod but I'm having an issue with crying animals all over the map. This is giving my pawns the crying baby debuff. Is it just me or are others having this issue? I've forced the mod to read as 1.2 compatible.

so u using a 1.1 mod thats super complicatrd code on 1.2 and u here complaing its not working and expect him to fix a bug on a mod he hasnt updated yet?

dont give bad bug reports if u using the mod wrong. u just waste the mod authors time
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: MrGrumblier on August 19, 2020, 04:47:11 PM
Quote from: sidfu on August 19, 2020, 02:05:28 PM

so u using a 1.1 mod thats super complicatrd code on 1.2 and u here complaing its not working and expect him to fix a bug on a mod he hasnt updated yet?

dont give bad bug reports if u using the mod wrong. u just waste the mod authors time

How am I using the mod wrong? I merely added 1.2 to the about so the game wouldn't give an error report. I think that it is up to the author to determine if I am wasting his time. Since the 1.2 update had very little impact on the majority of existing 1.1 mods, it might actually be useful information for when the author works on his 1.2 update. Your objection adds nothing to the discussion.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: sidfu on August 19, 2020, 08:05:47 PM
Quote from: MrGrumblier on August 19, 2020, 04:47:11 PM
Quote from: sidfu on August 19, 2020, 02:05:28 PM

so u using a 1.1 mod thats super complicatrd code on 1.2 and u here complaing its not working and expect him to fix a bug on a mod he hasnt updated yet?

dont give bad bug reports if u using the mod wrong. u just waste the mod authors time

How am I using the mod wrong? I merely added 1.2 to the about so the game wouldn't give an error report. I think that it is up to the author to determine if I am wasting his time. Since the 1.2 update had very little impact on the majority of existing 1.1 mods, it might actually be useful information for when the author works on his 1.2 update. Your objection adds nothing to the discussion.

u dont keep track of the mod scene i see. only some mods didnt have major changes. some  had to do major work to get working. but thats not the issue
the issue here is that your asking the mod author to fix a bug on a currently unsupported version that he has said he dont have time right now to update to. if u where recompiling it then adding the 1.2 to help him that's different.

u shouldn't be asking a mod author to fix a bug that you are causing by not using it on supported version. its that simple.but ill stop here no reason to talk about it anymore
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Meester on August 19, 2020, 08:48:23 PM
Quote from: Tragix on August 18, 2020, 11:19:39 AM
These are issues I can only fix if I can replicate them. Things that might help me replicate:
Race and Age of the pawn having problems
Exact piece of equipment that causes the problem
Mod (preferably linked) that adds the equipment

I imagine some mods are directly conflicting when it comes to patches or rendering, so each case will have to be looked at independently

Well the pawn [8 years] was probably carrying a shield from Combat Shields [which also has a sci-fi add-on] and was possibly Dual Wielding with the Dual Wield mod. But yes after all the apparel was gone their body appeared again as normal. Might have had underwear from the UnderWhere mod and an ammo pack from Ammunition [which has now been replaced by Attrition]. Ill have to wait until the next child soldier comes along to avoid making speculation.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Meester on August 21, 2020, 05:56:51 PM
It seems to me after testing that Dye Vat - https://steamcommunity.com/sharedfiles/filedetails/?id=740002420, which adds different coloured clothes both to make and to npcs makes the pink squares appear on children as well as UnderWhere - https://steamcommunity.com/sharedfiles/filedetails/?id=1870010563&searchtext=underwhere.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Canute on August 23, 2020, 03:33:15 AM
Tragix,
just a notify for you
Quote from: sumghai on August 23, 2020, 12:07:04 AM

Quote from: RibDibbington on August 22, 2020, 04:43:03 PMit's not compatible with "Children and Pregnancy." Specifically, anyone actively giving birth who is put into a MedPod will have the pod spontaneously erase the pregnancy entirely! For as long as it takes in game (IRL equivalent time), that's... a problem. Anyway, I know it's not your fault, but it's something to consider when using this mod with others that cause novel health conditions for pawns. The MedPod is GOING to erase those conditions.
If those hediffs are not diseases, injuries or other "bad" conditions, it's up to the mod author to correctly tag their hediffs with vanilla RimWorld's <isBad>false</isBad>.

Perhaps I should write some tutorials on the GitHub wiki.
https://ludeon.com/forums/index.php?topic=52644.msg482378#msg482378
The Medipod from that mod treat pregnant as a wurm-parasit (like it basicly are refering to Dr.House) and remove it ! :-)
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: RibDibbington on August 24, 2020, 08:36:31 AM
Thanks, Canute. I was just about to reply here with that information. Already lost one kid and was thinking of manually editing the hediffs myself before my other pregnant colonists hopped into MedPods, too.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: hades7600 on August 28, 2020, 08:11:43 AM
Is it currently not compatiable at all with 1.2? I miss this mod so much. Though I hope Tragix is doing well :)
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: malistaticy on August 29, 2020, 05:30:52 AM
Quote from: hades7600 on August 28, 2020, 08:11:43 AM
Is it currently not compatiable at all with 1.2? I miss this mod so much. Though I hope Tragix is doing well :)
this version of Babies & Children (https://steamcommunity.com/sharedfiles/filedetails/?id=2156451266) works mostly - the only issue is that child prisoners dont seem to get fed automatically, so you'll have to manually drop a meal in there every now and then. Oh, and it relies on you having a seperate mod for pregnancy, so thats something to be aware of
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: GhostData on August 29, 2020, 11:40:03 AM
3.3.1 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.3.1

This is just a recompile for 1.2. As far as I can tell at a glance, there weren't any breaking changes in 1.2, but I didn't have time to do thorough testing for each feature. If anything isn't working as expected, let me know and drop a log and I can look into it.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: malistaticy on August 29, 2020, 11:50:12 AM
hurray!
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Ashilstraza on August 30, 2020, 09:55:30 AM
I'm getting an error related to Harmony patching on loading into the game with 3.3.1 and Rimworld 1.2. This seems to be happening with just the minimum required mods.

It looks like the exception is happening at ILs.InsertRange(list4[0] + 1, list5); because list4 is empty. I went ran 3.3.1 with 1.1 and it did not have the exception and list4 was populated.

dnSpy stack at exception:
mscorlib.dll!System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument argument = index, System.ExceptionResource resource = ArgumentOutOfRange_Index) (IL=0x0029)
mscorlib.dll!System.ThrowHelper.ThrowArgumentOutOfRangeException() (IL≈0x0004)
mscorlib.dll!System.Collections.Generic.List<int>.this[int].get(int index = 0x00000000) (IL≈0x0009)
> data-000000001B1AF190!RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch.RenderPawnInternal_Transpiler(System.Collections.Generic.IEnumerable<HarmonyLib.CodeInstruction> instructions = {RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch.<RenderPawnInternal_Transpiler>d__4}, System.Reflection.Emit.ILGenerator ILgen) (IL≈0x07C5)
mscorlib.dll!System.Collections.Generic.List<HarmonyLib.CodeInstruction>.List(System.Collections.Generic.IEnumerable<HarmonyLib.CodeInstruction> collection = {RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch.<RenderPawnInternal_Transpiler>d__4}) (IL≈0x0078)
System.Core.dll!System.Linq.Enumerable.ToList<HarmonyLib.CodeInstruction>(System.Collections.Generic.IEnumerable<HarmonyLib.CodeInstruction> source = {RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch.<RenderPawnInternal_Transpiler>d__4}) (IL≈0x0019)
data-000000001AFF6950!HarmonyLib.CodeTranspiler.GetResult(System.Reflection.Emit.ILGenerator generator = {MonoMod.Utils.Cil.ILGeneratorProxy<MonoMod.Utils.Cil.CecilILGenerator>}, System.Reflection.MethodBase method = {System.Reflection.MonoMethod}) (IL≈0x0051)
data-000000001AFF6950!HarmonyLib.MethodBodyReader.FinalizeILCodes(HarmonyLib.Emitter emitter = {HarmonyLib.Emitter}, System.Collections.Generic.List<System.Reflection.MethodInfo> transpilers = {System.Collections.Generic.List<System.Reflection.MethodInfo>}, System.Collections.Generic.List<System.Reflection.Emit.Label> endLabels = {System.Collections.Generic.List<System.Reflection.Emit.Label>}, out bool hasReturnCode = false) (IL≈0x015C)
data-000000001AFF6950!HarmonyLib.MethodCopier.Finalize(HarmonyLib.Emitter emitter = {HarmonyLib.Emitter}, System.Collections.Generic.List<System.Reflection.Emit.Label> endLabels = {System.Collections.Generic.List<System.Reflection.Emit.Label>}, out bool hasReturnCode = false) (IL≈0x000F)
data-000000001AFF6950!HarmonyLib.MethodPatcher.CreateReplacement(out System.Collections.Generic.Dictionary<int, HarmonyLib.CodeInstruction> finalInstructions = null) (IL≈0x021A)
data-000000001AFF6950!HarmonyLib.PatchFunctions.UpdateWrapper(System.Reflection.MethodBase original = {System.Reflection.MonoMethod}, HarmonyLib.PatchInfo patchInfo = {HarmonyLib.PatchInfo}) (IL≈0x0059)
data-000000001AFF6950!HarmonyLib.PatchClassProcessor.ProcessPatchJob(HarmonyLib.PatchJobs<System.Reflection.MethodInfo>.Job job = {HarmonyLib.PatchJobs<System.Reflection.MethodInfo>.Job}) (IL≈0x0165)
data-000000001AFF6950!HarmonyLib.PatchClassProcessor.PatchWithAttributes(ref System.Reflection.MethodBase lastOriginal = {System.Reflection.MonoMethod}) (IL≈0x009D)
data-000000001AFF6950!HarmonyLib.PatchClassProcessor.Patch() (IL≈0x005A)
data-000000001AFF6950!HarmonyLib.Harmony.<PatchAll>b__10_0(System.Type type = {System.RuntimeType}) (IL≈0x0007)
data-000000001AFF6950!HarmonyLib.CollectionExtensions.Do<System.Type>(System.Collections.Generic.IEnumerable<System.Type> sequence = {System.RuntimeType[0x000000BF]}, System.Action<System.Type> action = {System.Action<System.Type>}) (IL≈0x0014)
data-000000001AFF6950!HarmonyLib.Harmony.PatchAll(System.Reflection.Assembly assembly = {System.Reflection.MonoAssembly}) (IL≈0x0012)
data-000000001AFF6950!HarmonyLib.Harmony.PatchAll() (IL≈0x001D)
data-000000001B1AF190!RimWorldChildren.HarmonyPatcher.HarmonyPatcher() (IL≈0x000C)
mscorlib.dll!System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(System.IntPtr type) (IL=???)
mscorlib.dll!System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(System.RuntimeTypeHandle type = {System.RuntimeTypeHandle}) (IL≈0x002A)
Assembly-CSharp.dll!Verse.StaticConstructorOnStartupUtility.CallAll() (IL≈0x001A)
Assembly-CSharp.dll!Verse.PlayDataLoader.<>c.<DoPlayLoad>b__4_2() (IL≈0x000A)
Assembly-CSharp.dll!Verse.LongEventHandler.ExecuteToExecuteWhenFinished() (IL≈0x007D)
Assembly-CSharp.dll!Verse.LongEventHandler.UpdateCurrentAsynchronousEvent() (IL≈0x009E)
Assembly-CSharp.dll!Verse.LongEventHandler.LongEventsUpdate(out bool sceneChanged = false) (IL≈0x0029)
Assembly-CSharp.dll!???
Assembly-CSharp.dll!Verse.Root_Entry.Update() (IL≈0x0001)


Error Log: (https://pastebin.com/vZyHTeNv (https://pastebin.com/vZyHTeNv))
Log uploaded on Sunday, August 30, 2020, 7:48:19 AM
Loaded mods:
Harmony(brrainz.harmony)[mv:1.0.4.0]: 0Harmony(2.0.2), HarmonyMod(1.0.4)
Core(Ludeon.RimWorld): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:8.0.1]: 0Harmony(av:2.0.2,fv:1.2.0.1), HugsLib(av:1.0.0,fv:8.0.1)
Children and Pregnancy(children.and.pregnancy): 0Harmony(av:2.0.2,fv:2.0.1), RimWorldChildren(1.0.7546.19081)

Active Harmony patches:
Alert_ColonistsIdle.get_IdleColonists: post: RimWorldChildren.Alert_ColonistsIdle_IdleColonists_Patch.IdleColonists_Getter_Patch
ApparelGraphicRecordGetter.TryGetGraphicApparel: TRANS: RimWorldChildren.ApparelGraphicRecordGetter_TryGetGraphicApparel_Patch.TryGetGraphicApparel_Transpiler
DebugWindowsOpener.DevToolStarterOnGUI: TRANS: HugsLib.Patches.DevToolStarterOnGUI_Patch.ExtendButtonsWindow
DebugWindowsOpener.DrawButtons: TRANS: HugsLib.Patches.DebugWindowsOpener_Patch.DrawAdditionalButtons
Dialog_Options.DoWindowContents: TRANS: HugsLib.Patches.Dialog_Options_Patch.ReplaceModOptionsButton
EditWindow_Log.DoMessagesListing: PRE: HugsLib.Patches.EditWindow_Log_Patch.ExtraLogWindowButtons
Game.DeinitAndRemoveMap: post: HugsLib.Patches.Game_DeinitAndRemoveMap_Patch.MapRemovalHook
Game.FillComponents: PRE: HugsLib.Patches.Game_FillComponents_Patch.GameInitializationHook
Game.FinalizeInit: post: HugsLib.Patches.Game_FinalizeInit_Patch.WorldLoadedHook
HealthAIUtility.ShouldSeekMedicalRestUrgent: PRE: RimWorldChildren.ShouldSeekMedicalRestUrgent_Patch.ShouldSeekMedicalRestUrgent_Prefix
JobDriver_Wear.MakeNewToils: PRE: RimWorldChildren.Wear_Override.JobDriver_Wear_Patch
JobGiver_PackFood.TryGiveJob: post: RimWorldChildren.PackFood_Override.TryGiveJob_Postfix
JobGiver_SocialFighting.TryGiveJob: post: RimWorldChildren.JobGiver_SocialFighting_TryGiveJob_Patch.TryGiveJob_Postfix
LanguageDatabase.SelectLanguage: PRE: HugsLib.Patches.LanguageDatabase_Patch.ForceRestartAfterLangChange
Map.ConstructComponents: post: HugsLib.Patches.Map_ConstructComponents_Patch.MapComponentsInitHook
Map.FinalizeInit: post: HugsLib.Patches.Map_FinalizeInit_Patch.MapLoadedHook
MapComponentUtility.MapGenerated: post: HugsLib.Patches.MapComponentUtility_MapGenerated_Patch.MapGeneratedHook
ModsConfig.RestartFromChangedMods: PRE: HugsLib.Patches.ModsConfig_RestartFromChangedMods_Patch.QuickRestartInDevMode
PawnGraphicSet.ResolveAllGraphics: post: RimWorldChildren.PawnGraphicSet_ResolveAllGraphics_Patch.ResolveAllGraphics_Patch
PawnGraphicSet.ResolveApparelGraphics: TRANS: RimWorldChildren.PawnGraphicSet_ResolveApparelGraphics_Patch.ResolveApparelGraphics_Transpiler
PlayDataLoader.DoPlayLoad: post: HugsLib.Patches.PlayDataLoader_Patch.InitModsHook
Root.OnGUI: post: HugsLib.Patches.Root_OnGUI_Patch.OnGUIHookUnfiltered
Root.Update: post: HugsLib.Patches.Root_Patch.UpdateHook
Root_Play.SetupForQuickTestPlay: TRANS: HugsLib.Patches.RootPlay_TestPlay_Patch.InjectCustomQuickstartSettings
ThoughtUtility.CanGetThought: post: RimWorldChildren.ThoughtUtility_CanGetThought_Patch.CanGetThought_Patch
UIRoot.UIRootOnGUI: post: HugsLib.Patches.UIRoot_OnGUI_Patch.OnGUIHook
VersionControl.DrawInfoInCorner: post: HarmonyMod.VersionControl_DrawInfoInCorner_Patch.Postfix
Harmony versions present: 2.0.2.0: net.pardeike.rimworld.lib.harmony; 2.0.1.0: children.and.pregnancy; 2.0.0.8: UnlimitedHugs.HugsLib

Platform information: (hidden, use publishing options to include)

Log file contents:
Mono path[0] = '[Rimworld_dir]/RimWorldWin64_Data/Managed'
Mono config path = '[Rimworld_dir]/MonoBleedingEdge/etc'
PlayerConnection [PlayerConnect information redacted]
Initialize engine version: 2019.2.17f1 (8e603399ca02)
[XR] Discovering subsystems at path [Rimworld_dir]/RimWorldWin64_Data/UnitySubsystems
GfxDevice: [Renderer information redacted]
Begin MonoManager ReloadAssembly
Command line arguments: -popupwindow
RimWorld 1.2.2723 rev661
Mod [1.1]Lost Forest dependency (RimWorldsoudanzyo.ResourcePackCore) needs to have <downloadUrl> and/or <steamWorkshopUrl> specified.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Verse.Log:Warning(String, Boolean)
Verse.ModMetaDataInternal:ValidateDependencies_NewTmp(Boolean)
Verse.ModMetaData:Init()
Verse.ModMetaData:.ctor(WorkshopItem)
Verse.ModLister:RebuildModList()
Verse.ModLister:.cctor()
Verse.ModsConfig:.cctor()
Verse.LoadedModManager:InitializeMods()
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[HugsLib] version 8.0.1
Possible typo: BodyTypeDef. Using def type name not preceded by "Of"
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Verse.Log:Warning(String, Boolean)
RimWorld.DefOfHelper:EnsureInitializedInCtor(Type)
RimWorldChildren.ChildBodyTypeDefOf:.cctor()
System.Reflection.MonoField:SetValueInternal(FieldInfo, Object, Object)
System.Reflection.MonoField:SetValue(Object, Object, BindingFlags, Binder, CultureInfo)
System.Reflection.FieldInfo:SetValue(Object, Object)
RimWorld.DefOfHelper:BindDefsFor(Type)
RimWorld.DefOfHelper:RebindAllDefOfs(Boolean)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Key binding conflict: Dev_ChangeSelectedDebugAction and MainTab_Architect are both bound to Tab.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Verse.Log:Warning(String, Boolean)
Verse.KeyPrefsData:ErrorCheckOn(KeyBindingDef, BindingSlot)
Verse.KeyPrefsData:ErrorCheck()
Verse.KeyPrefs:Init()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Error in static constructor of RimWorldChildren.HarmonyPatcher: System.TypeInitializationException: The type initializer for 'RimWorldChildren.HarmonyPatcher' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.PawnRenderer::RenderPawnInternal(UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.Rot4 headFacing, Verse.RotDrawMode bodyDrawType, System.Boolean portrait, System.Boolean headStump, System.Boolean invisible) ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <567df3e0919241ba98db88bec4c6696f>:0
  at RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch+<RenderPawnInternal_Transpiler>d__4.MoveNext () [0x007bc] in <8cff16add85e486db02b71b0f09f7b99>:0
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00051] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0020e] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] in <20181e2d55204880a56a9120ef04a53d>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.PatchAll () [0x0001b] in <20181e2d55204880a56a9120ef04a53d>:0
  at RimWorldChildren.HarmonyPatcher..cctor () [0x0000b] in <8cff16add85e486db02b71b0f09f7b99>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <567df3e0919241ba98db88bec4c6696f>:0
  at Verse.StaticConstructorOnStartupUtility.CallAll () [0x0001a] in <7b345446a85d4ed599f9c604ae61854b>:0
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Verse.Log:Error(String, Boolean)
Verse.StaticConstructorOnStartupUtility:CallAll()
Verse.<>c:<DoPlayLoad>b__4_2()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Verse.Root.Update_Patch1(Root)
Verse.Root_Entry:Update()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[HugsLib][ERR] Quickstart aborted: errors detected in log
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Verse.Log:Error(String, Boolean)
HugsLib.Utils.ModLogger:Error(String, Object[])
HugsLib.Quickstart.QuickstartController:InitiateQuickstart()
Verse.LongEventHandler:UpdateCurrentSynchronousEvent(Boolean&)
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Verse.Root.Update_Patch1(Root)
Verse.Root_Entry:Update()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Eyrmia on August 30, 2020, 04:25:29 PM
I'd like to add that I'm seeing the same error as Ashilstraza. I should also mention that I don't see the crib anywhere in the Architect tab. It's been awhile since I played Rimworld, and even longer since I used this mod, so I can't remember if maybe the crib only shows up once a baby is born or something.

Additionally, I noted that after I started using this mod, I lost the ability in my save to merge stacks of medicine (may or may not have happened to other items as well, but medicine I know for sure). Not sure if it's related at all, though. I removed all my mods and still didn't have the option to merge my medicine so no idea why that happened. I do have Pick Up and Haul, Stack XXL, and Smarter Medicine, but I'd been using those for a week before this one so I'm not sure if they're the culprits.

Thank you for your work on this mod! It really is great and I wish babies would be added to the game.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: GhostData on August 30, 2020, 04:43:41 PM
Oops. Compiled and tested against different versions of Rimworld. I have a quick fix release below to fix the patching problem.
v3.3.2 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/V3.3.2

I see a lot of unfamiliar code in the PawnRenderer, so there is a good chance there are edge case bugs that will crop up due to unpatched rendering code. I haven't seen any yet, but it won't be a surprise.

Quote from: Eyrmia on August 30, 2020, 04:25:29 PM
I'd like to add that I'm seeing the same error as Ashilstraza. I should also mention that I don't see the crib anywhere in the Architect tab. It's been awhile since I played Rimworld, and even longer since I used this mod, so I can't remember if maybe the crib only shows up once a baby is born or something.

Additionally, I noted that after I started using this mod, I lost the ability in my save to merge stacks of medicine (may or may not have happened to other items as well, but medicine I know for sure). Not sure if it's related at all, though. I removed all my mods and still didn't have the option to merge my medicine so no idea why that happened. I do have Pick Up and Haul, Stack XXL, and Smarter Medicine, but I'd been using those for a week before this one so I'm not sure if they're the culprits.

Thank you for your work on this mod! It really is great and I wish babies would be added to the game.
With a basic install, I still see the crib in the Furniture tab, so maybe there is a mod conflict? It should be present without any additional research.
Is stack merging a vanilla feature or added by a mod? It's been so long since I've actually played the game I can't recall. If it's a mod, can you confirm if the mod has been updated for 1.2?
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: platipuss on August 31, 2020, 05:18:12 AM
Hello

There is a small conflict I want to report between "dubs bad hygiene" and "chidren & pregnancy" mod.

I use the bad hygiene mod with its experimental feature with the need of "thirst"
babys and children is showing the need of water to drink and the have a bottle in their inventory and drinking the water all the time but their need is never decreasing. They keep crying (very annoying). after the deficiency of the need reaches %85 they collapse and need a rescue (if it reaches to %100 they die). some colonist tend them and give a drink and only that time need is satisfied but again it keep increasing and baby needs another rescue in couple minutes. goes like this forever.
can it be fixed?
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Eyrmia on August 31, 2020, 06:21:00 PM
Quote from: Tragix on August 30, 2020, 04:43:41 PM
Oops. Compiled and tested against different versions of Rimworld. I have a quick fix release below to fix the patching problem.
v3.3.2 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/V3.3.2

I see a lot of unfamiliar code in the PawnRenderer, so there is a good chance there are edge case bugs that will crop up due to unpatched rendering code. I haven't seen any yet, but it won't be a surprise.

Quote from: Eyrmia on August 30, 2020, 04:25:29 PM
I'd like to add that I'm seeing the same error as Ashilstraza. I should also mention that I don't see the crib anywhere in the Architect tab. It's been awhile since I played Rimworld, and even longer since I used this mod, so I can't remember if maybe the crib only shows up once a baby is born or something.

Additionally, I noted that after I started using this mod, I lost the ability in my save to merge stacks of medicine (may or may not have happened to other items as well, but medicine I know for sure). Not sure if it's related at all, though. I removed all my mods and still didn't have the option to merge my medicine so no idea why that happened. I do have Pick Up and Haul, Stack XXL, and Smarter Medicine, but I'd been using those for a week before this one so I'm not sure if they're the culprits.

Thank you for your work on this mod! It really is great and I wish babies would be added to the game.
With a basic install, I still see the crib in the Furniture tab, so maybe there is a mod conflict? It should be present without any additional research.
Is stack merging a vanilla feature or added by a mod? It's been so long since I've actually played the game I can't recall. If it's a mod, can you confirm if the mod has been updated for 1.2?

Stack merging is a vanilla feature. What's odd is that when I ran the game with no mods, I still couldn't merge my medicine. I guess maybe the save was corrupted or something? I'm not very savvy with this kind of thing. My old save from before I ran C+P still has the option to merge stacks, though, and that's with all my other mods plus C+P running. It could just be a coincidence, though, because I didn't notice the issue with merging stacks until hours after installing C+P.

It's only manual merging that seems to be affected. I've been getting around it by designating only one shelf for my medicine, which forces the pawns to merge it. I haven't had the chance to see if other items are also affected by this or if it's just medicine, but from what I've seen, my pawns will automatically merge other items without my intervention (meals, leather, etc.), but not medicine unless I do what I mentioned by designating shelves/stockpiles.
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Belgrath on September 01, 2020, 06:47:50 AM
Hello People.

Has anyone had the problem with babies having adult heads on them?
(https://www.dropbox.com/s/h166g7uvxbtrj4u/BigHeads.png?dl=0)
This only started when updated to rimWorld 1.2
Here is the list of mods I'm using


<modNames>
<li>Harmony</li>
<li>Core</li>
<li>HugsLib</li>
<li>Mod Manager</li>
<li>EdB Prepare Carefully</li>
<li>RimJobWorld</li>
<li>RimHUD</li>
<li>Allow Tool</li>
<li>Floor Lights</li>
<li>Expanded Prosthetics and Organ Engineering</li>
<li>Humanoid Alien Races 2.0</li>
<li>MinifyEverything</li>
<li>[KV] RimFridge</li>
<li>Utility Columns</li>
<li>MendAndRecycle</li>
<li>Dubs Bad Hygiene</li>
<li>In-wall coolers and vents</li>
<li>Pick Up And Haul</li>
<li>Replace Stuff</li>
<li>[1.1] Tranquilizer guns</li>
<li>Animal Food Restrictions</li>
<li>Work Tab</li>
<li>Vault</li>
<li>[KV] Trading Spot</li>
<li>Tilled Soil</li>
<li>[SYR] Coffee and Tea</li>
<li>Electric Stonecutting Table</li>
<li>Beautiful Outdoors</li>
<li>[SYR] Universal Fermenter</li>
<li>[SYR] Blueberries</li>
<li>Hospitality</li>
<li>CatsAreCleverToo</li>
<li>[SYR] Doormats</li>
<li>Apothecary</li>
<li>Xenohumans - Gen-spliced Xenos on the Rim</li>
<li>Medical Tab</li>
<li>Mad Skills</li>
<li>[SYR] Naga</li>
<li>[1.2][1.1][1.0] NoDivorce</li>
<li>Pharmacist</li>
<li>Oats!</li>
<li>[SYR] Prosthetic Table</li>
<li>Relations Tab</li>
<li>Genetic Rim</li>
<li>Animal Tab</li>
<li>[SYR] Metallic Batteries</li>
<li>Stabilize</li>
<li>Reinforced Walls</li>
<li>Interaction Bubbles</li>
<li>Milkable Colonists (Mali)</li>
<li>Share The Load</li>
<li>Children and Pregnancy</li>
</modNames>


Hope someone can help
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: malistaticy on September 04, 2020, 12:10:56 AM
Quote from: Belgrath on September 01, 2020, 06:47:50 AM
Hello People.
your load order is MONDO f*cked.
run through this https://rwom.fandom.com/wiki/Mod_Order_Guide
and then try again
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: malistaticy on September 04, 2020, 12:17:35 AM
hmm, seems like something broke between combat extended and C&P, the game spits out errors and pink squares if a child equips clothing if both are loaded at the same time, seems related to not having apparel for the child bodytype
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: kitchenarm on September 05, 2020, 01:14:50 AM
I'm still having the 'can't get colonists pregnant' problem, and whenever I use devmode to spawn a baby it also has the adult head. I tried a new game without any other mods (other than harmony) for testing so I don't think it's an issue with incompatible mods. Also, whenever I use devmode on a colonist to 'give birth' the baby that appears (with an adult head) can walk around and can even be drafted.

Edit: nvm, fixed it!
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: HohenHeizen on September 05, 2020, 12:29:33 PM
Having a way to disable baby-games per race would be helpful. It's odd having androids play tickle while lined up drafted.
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: kitchenarm on September 06, 2020, 06:11:22 PM
It'd also be cool if you could add the pregnancy chance back in the config
Title: Re: [1.1] Children and Pregnancy - v3.3.0
Post by: Third_Of_Five on September 07, 2020, 11:04:14 PM
Quote from: Belgrath on September 01, 2020, 06:47:50 AM
Hello People.

Has anyone had the problem with babies having adult heads on them?
(https://www.dropbox.com/s/h166g7uvxbtrj4u/BigHeads.png?dl=0)
This only started when updated to rimWorld 1.2
Here is the list of mods I'm using


<modNames>
<li>Harmony</li>
<li>Core</li>
<li>HugsLib</li>
<li>Mod Manager</li>
<li>EdB Prepare Carefully</li>
<li>RimJobWorld</li>
<li>RimHUD</li>
<li>Allow Tool</li>
<li>Floor Lights</li>
<li>Expanded Prosthetics and Organ Engineering</li>
<li>Humanoid Alien Races 2.0</li>
<li>MinifyEverything</li>
<li>[KV] RimFridge</li>
<li>Utility Columns</li>
<li>MendAndRecycle</li>
<li>Dubs Bad Hygiene</li>
<li>In-wall coolers and vents</li>
<li>Pick Up And Haul</li>
<li>Replace Stuff</li>
<li>[1.1] Tranquilizer guns</li>
<li>Animal Food Restrictions</li>
<li>Work Tab</li>
<li>Vault</li>
<li>[KV] Trading Spot</li>
<li>Tilled Soil</li>
<li>[SYR] Coffee and Tea</li>
<li>Electric Stonecutting Table</li>
<li>Beautiful Outdoors</li>
<li>[SYR] Universal Fermenter</li>
<li>[SYR] Blueberries</li>
<li>Hospitality</li>
<li>CatsAreCleverToo</li>
<li>[SYR] Doormats</li>
<li>Apothecary</li>
<li>Xenohumans - Gen-spliced Xenos on the Rim</li>
<li>Medical Tab</li>
<li>Mad Skills</li>
<li>[SYR] Naga</li>
<li>[1.2][1.1][1.0] NoDivorce</li>
<li>Pharmacist</li>
<li>Oats!</li>
<li>[SYR] Prosthetic Table</li>
<li>Relations Tab</li>
<li>Genetic Rim</li>
<li>Animal Tab</li>
<li>[SYR] Metallic Batteries</li>
<li>Stabilize</li>
<li>Reinforced Walls</li>
<li>Interaction Bubbles</li>
<li>Milkable Colonists (Mali)</li>
<li>Share The Load</li>
<li>Children and Pregnancy</li>
</modNames>


Hope someone can help

I think I might have found the cause of this.
The harmony patch for RenderPawnInternal is throwing an ArgumentOutOfRange Exception.

Error in static constructor of RimWorldChildren.HarmonyPatcher: System.TypeInitializationException: The type initializer for 'RimWorldChildren.HarmonyPatcher' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.PawnRenderer::RenderPawnInternal(UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.Rot4 headFacing, Verse.RotDrawMode bodyDrawType, System.Boolean portrait, System.Boolean headStump, System.Boolean invisible) ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at RimWorldChildren.PawnRenderer_RenderPawnInternal_Patch+<RenderPawnInternal_Transpiler>d__4.MoveNext () [0x007bc] in <4c6b0f48dad648c2b7308e4b5bfbb509>:0
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00051] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0020e] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] in <20181e2d55204880a56a9120ef04a53d>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.PatchAll () [0x0001b] in <20181e2d55204880a56a9120ef04a53d>:0
  at RimWorldChildren.HarmonyPatcher..cctor () [0x0000b] in <4c6b0f48dad648c2b7308e4b5bfbb509>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <567df3e0919241ba98db88bec4c6696f>:0
  at Verse.StaticConstructorOnStartupUtility.CallAll () [0x0001a] in <7b345446a85d4ed599f9c604ae61854b>:0
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: sidfu on September 09, 2020, 06:14:01 PM
right now im thinking he might have to dsiable the clothing thing till a beter way comes. its being incomp with to many things.
the last working version without incomp was 3.0.9 everything past that has a harmoy pass errors and incomps with any mods messing with pawn render
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: GhostData on September 10, 2020, 06:10:16 PM
Quote from: kitchenarm on September 06, 2020, 06:11:22 PM
It'd also be cool if you could add the pregnancy chance back in the config
This probably won't happen. It is the discretion of a race's author to decide how their race becomes pregnant. The conception portion of CNP is fairly weak and is due for a revisit, so there will probably be additional levers exposed to the player in the future.
Quote from: platipuss on August 31, 2020, 05:18:12 AM
Hello

There is a small conflict I want to report between "dubs bad hygiene" and "chidren & pregnancy" mod.

I use the bad hygiene mod with its experimental feature with the need of "thirst"
babys and children is showing the need of water to drink and the have a bottle in their inventory and drinking the water all the time but their need is never decreasing. They keep crying (very annoying). after the deficiency of the need reaches %85 they collapse and need a rescue (if it reaches to %100 they die). some colonist tend them and give a drink and only that time need is satisfied but again it keep increasing and baby needs another rescue in couple minutes. goes like this forever.
can it be fixed?
I believe this was addressed in a previous patch, but 1.2 may have broken that. I will review this along with the other patches soon.

Quote from: HohenHeizen on September 05, 2020, 12:29:33 PM
Having a way to disable baby-games per race would be helpful. It's odd having androids play tickle while lined up drafted.
Getting real sick of this bug. It should be literally impossible without a busted config.
We now check the player config for the lifeCycleEnabled flag, which should be off for androids by default. If it's off for any race, there should be no way for this job to trigger.

Quote from: sidfu on September 09, 2020, 06:14:01 PM
right now im thinking he might have to dsiable the clothing thing till a beter way comes. its being incomp with to many things.
the last working version without incomp was 3.0.9 everything past that has a harmoy pass errors and incomps with any mods messing with pawn render

Since Rimworld doesn't provide an API to access the body type, my thinking is to either revert back to the braindead spoof that was being performed before, or to try to universally patch references to bodyType. Fairly certain I've seen HAR perform a wildcard patch, but I'd have to look into it.
Turning a simple access into a conditional universally might suck for performance, but I don't believe bodyType is accessed all that frequently.
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: Third_Of_Five on September 10, 2020, 06:29:37 PM
Quote from: Tragix on September 10, 2020, 06:10:16 PM
Quote from: kitchenarm on September 06, 2020, 06:11:22 PM
It'd also be cool if you could add the pregnancy chance back in the config
This probably won't happen. It is the discretion of a race's author to decide how their race becomes pregnant. The conception portion of CNP is fairly weak and is due for a revisit, so there will probably be additional levers exposed to the player in the future.

Maybe we could add a default pregnancy chance which is used if HAN isn't installed and/or no pregnancy chance is specified?
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: LiteEmUp on September 11, 2020, 03:54:23 AM
so i only have the 1.0 version of this mod a year ago, and i'm wondering if there are any additional features from thirite's last known changes or your own version is simply bug fixing an maintenance on being updated to latest game version??
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: GhostData on September 11, 2020, 09:05:15 AM
Quote from: LiteEmUp on September 11, 2020, 03:54:23 AM
so i only have the 1.0 version of this mod a year ago, and i'm wondering if there are any additional features from thirite's last known changes or your own version is simply bug fixing an maintenance on being updated to latest game version??
Primary focus is maintenance, but part of that includes refactoring existing code to be more maintainable and extensible. I don't have a compiled change log, but you can look through the releases to get a summarized version: https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases?page=2

In unrelated news, I've found some pretty major rendering bugs related to the 1.2 release. No solution yet, but will work on them as I have time.
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: HohenHeizen on September 12, 2020, 02:29:29 PM
Quote from: Tragix on September 10, 2020, 06:10:16 PM

Quote from: HohenHeizen on September 05, 2020, 12:29:33 PM
Having a way to disable baby-games per race would be helpful. It's odd having androids play tickle while lined up drafted.
Getting real sick of this bug. It should be literally impossible without a busted config.
We now check the player config for the lifeCycleEnabled flag, which should be off for androids by default. If it's off for any race, there should be no way for this job to trigger.


Thanks for the response! Sorry that it seems to be a nuisance. I went in myself and edited files and messed with lifecycles to try and resolve this myself before and after writing that post. From patches to direct edits but nothing. Now, I don't have a solid idea on what I'm doing but I know nothing worked. Also baby-games seems to be the only interaction that this happens with. I don't know if it's something on Android tier's side but I ended up just commenting out that interaction until the colony has babies to play games with.

Thanks for your time!
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: BlueTressym on September 12, 2020, 11:35:41 PM
Hi.  I've got an error coming up upon map gen related to clothing textures or something?  (I only know a small amount about how mods work). 

https://gist.github.com/5145406e4a2249968d6912dbcbc23b7d

I'm using the GitHub 1.2 version.  I haven't used this mod before; I'm compiling a mod list for a new run-through and wanted to try it out. 
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: Tenshi~Akari on September 13, 2020, 09:40:20 AM
Quote from: BlueTressym on September 12, 2020, 11:35:41 PM
Hi.  I've got an error coming up upon map gen related to clothing textures or something?  (I only know a small amount about how mods work). 

https://gist.github.com/5145406e4a2249968d6912dbcbc23b7d

I'm using the GitHub 1.2 version.  I haven't used this mod before; I'm compiling a mod list for a new run-through and wanted to try it out.

I see you also have Faction Colors installed. I ran across this issue of the error with it and C&P active, and it seems that Faction Colors is literally looking for any worn apparel items for children to show up as "(Apparel Name)_Child", which causes a pink box issue. Disabling Faction Colors removes the issue and C&P will render the clothing per its normal.

Hoping there would be an easier workaround to this issue, as I find both essential somehow for the sake of advanced apparel masking and of course more fleshed out life stages in game at the same time... the only literal workaround was to actually make a related "_Child" texture for all apparel items that require a body type name to them. (That, and there was a mod a few versions back that was an Apparel type resolver of sorts that would allow you to choose alternative body shapes to draw in place of missing textures... I'm not sure if that had been updated to 1.2 or not.)
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: GhostData on September 13, 2020, 09:07:32 PM
Quote from: Tenshi~Akari on September 13, 2020, 09:40:20 AM
Quote from: BlueTressym on September 12, 2020, 11:35:41 PM
Hi.  I've got an error coming up upon map gen related to clothing textures or something?  (I only know a small amount about how mods work). 

https://gist.github.com/5145406e4a2249968d6912dbcbc23b7d

I'm using the GitHub 1.2 version.  I haven't used this mod before; I'm compiling a mod list for a new run-through and wanted to try it out.

I see you also have Faction Colors installed. I ran across this issue of the error with it and C&P active, and it seems that Faction Colors is literally looking for any worn apparel items for children to show up as "(Apparel Name)_Child", which causes a pink box issue. Disabling Faction Colors removes the issue and C&P will render the clothing per its normal.

Hoping there would be an easier workaround to this issue, as I find both essential somehow for the sake of advanced apparel masking and of course more fleshed out life stages in game at the same time... the only literal workaround was to actually make a related "_Child" texture for all apparel items that require a body type name to them. (That, and there was a mod a few versions back that was an Apparel type resolver of sorts that would allow you to choose alternative body shapes to draw in place of missing textures... I'm not sure if that had been updated to 1.2 or not.)

I've actually considered doing this at runtime to get around mod-added clothing. Writing files to a variety of file systems with varying permissions would be practically impossible, though. I will probably have to implement some form of in-memory store for scaled graphics, as the fix for the memory leak is now causing clothing to be scaled for the thin body type as well, since we're effectively modifying a reference to it. I don't think an inmemory solution would work for other mods though, as I think the graphics database pulls from the filesystem rather than memory, so there probably isn't a way to register any generated graphics.

Starting to think I'm in over my head with this hot mess.
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: andythehero on September 14, 2020, 02:50:34 PM
I'm pretty sure that Combat Extended also causes pink boxes to appear on the children, but I'm not sure if you guys have already addressed that Combat Extended messes with the mod.
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: GhostData on September 15, 2020, 05:06:10 PM
Quote from: andythehero on September 14, 2020, 02:50:34 PM
I'm pretty sure that Combat Extended also causes pink boxes to appear on the children, but I'm not sure if you guys have already addressed that Combat Extended messes with the mod.
I don't know how you folks  are even running CE side by side with CNP. When I try, I get harmony patching errors. There should be a hard break when running the two due to conflicting transpiler patches.

Got a giggle out of this one while testing CE:
(https://puu.sh/Gt24s/337662ef15.png)
Title: Re: [1.2] Children and Pregnancy - v3.3.0
Post by: GhostData on September 15, 2020, 11:43:54 PM
Glad to finally have something worth releasing.

V3.4.0 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.4.0

To summarize the changes all the way from 3.3.0:
- Added the ability for caretaker pawns to pick up and carry a toddler or baby pawn when drafted
- Added logic to prevent wholesale slaughter of unarmed toddlers by idle draftees - This does not affect turrets, which will gun down unarmed enemy pawns as usual, even if they're toddlers.
- Increase max age scaling from 12 to 60 - mostly for testing.
- More 1.2 patch fixes, probably more to come as detected
- Fixed adult pawn hair alignment issues
- Fixed adult clothing resizing when the same apparel was equipped by a child pawn
- Preload apparel graphics in-memory before rendering
- Add one integration point with Combat Extended

While trouble shooting some rendering issues, I learned that graphics and materials are all cached, which gave me a more efficient way to handle graphics scaling for pawns. Previously, we would make changes to the size and offset of a material every tick, just before it was rendered. Now, we only perform a check when new apparel is equipped, and if this apparel's graphics are not loaded yet, we will apply and cache those new materials before we start rendering. This means that I was able to remove two patches from the render method entirely, which should help a bit with performance. There are still a ton of patches there, some of which could take advantage of this method as well.
This has an additional effect: Any mod-added apparel that doesn't perform any rendering tricks (like Combat Extended does by defining new layers and rendering rules) will also be preloaded when equipped. This means some mods with custom apparel will now be able to render their graphics properly when used on children. I'm not willing to say all, but in theory most mods should work with this setup.

In addition, I used Combat Extended as a test case for this change. As a result, there is now an integration point for CE - we check for the IsHeadWear config to allow CE headwear to properly render on children. I have tested this with helmets and gas masks. There are probably still some cases that are not supported - I will investigate as they are discovered.

I haven't had time to perform any regression testing, so there may be some other oddities introduced with rendering. Off the top of my head, I suspect it may be possible for hats to be double-resized. More to come.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: HohenHeizen on September 18, 2020, 01:47:57 AM
Exception in JobDriver tick for pawn Kaori driver=JobDriver_Goto (toilIndex=0) driver.job=(Goto (Job_5758590) A=(221, 0, 299))
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.API.ChildrenUtility.RaceUsesChildren (Verse.Pawn pawn) [0x00000] in <5dd325a319c041d69189747967fd962c>:0
  at RimWorldChildren.CombatPatches+AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch.ShouldShootToddlers (Verse.Thing t) [0x00007] in <5dd325a319c041d69189747967fd962c>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__1 (Verse.AI.IAttackTarget t) [0x000e4] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__2 (Verse.AI.IAttackTarget x) [0x00026] in <d72310b4d8f64d25aee502792b58549f>:0
  at System.Collections.Generic.List`1[T].RemoveAll (System.Predicate`1[T] match) [0x0004c] in <567df3e0919241ba98db88bec4c6696f>:0
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestAttackTarget_Patch0(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single,Verse.IntVec3,single,bool,bool)
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestShootTargetFromCurrentPosition_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single)
  at RunAndGun.Harmony.JobDriver_SetupToils.checkForAutoAttack (Verse.AI.JobDriver_Goto __instance) [0x000f2] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at RunAndGun.Harmony.JobDriver_SetupToils+<>c__DisplayClass0_0.<Postfix>b__0 () [0x00073] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch1(Verse.AI.JobDriver)
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch1(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)


All my pawns are locking up, unable to fire/move, while recruited even while being gored to death. So far it's only happened during mechanist or insectoid raids so I'm assuming it's to do with some of them being days if not just hours old.

Also Android Tiers Androids still babytalk.

EDIT: Rebuilt without the edits in CombatPatches, the targeting ones, and everything works fine.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: GhostData on September 18, 2020, 11:14:18 AM
Quote from: HohenHeizen on September 18, 2020, 01:47:57 AM
Exception in JobDriver tick for pawn Kaori driver=JobDriver_Goto (toilIndex=0) driver.job=(Goto (Job_5758590) A=(221, 0, 299))
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.API.ChildrenUtility.RaceUsesChildren (Verse.Pawn pawn) [0x00000] in <5dd325a319c041d69189747967fd962c>:0
  at RimWorldChildren.CombatPatches+AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch.ShouldShootToddlers (Verse.Thing t) [0x00007] in <5dd325a319c041d69189747967fd962c>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__1 (Verse.AI.IAttackTarget t) [0x000e4] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__2 (Verse.AI.IAttackTarget x) [0x00026] in <d72310b4d8f64d25aee502792b58549f>:0
  at System.Collections.Generic.List`1[T].RemoveAll (System.Predicate`1[T] match) [0x0004c] in <567df3e0919241ba98db88bec4c6696f>:0
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestAttackTarget_Patch0(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single,Verse.IntVec3,single,bool,bool)
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestShootTargetFromCurrentPosition_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single)
  at RunAndGun.Harmony.JobDriver_SetupToils.checkForAutoAttack (Verse.AI.JobDriver_Goto __instance) [0x000f2] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at RunAndGun.Harmony.JobDriver_SetupToils+<>c__DisplayClass0_0.<Postfix>b__0 () [0x00073] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch1(Verse.AI.JobDriver)
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch1(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)


All my pawns are locking up, unable to fire/move, while recruited even while being gored to death. So far it's only happened during mechanist or insectoid raids so I'm assuming it's to do with some of them being days if not just hours old.

Also Android Tiers Androids still babytalk.

EDIT: Rebuilt without the edits in CombatPatches, the targeting ones, and everything works fine.
I'm not sure I follow that last line. You were running the mod with additional modifications on top?
I assume the android problem is still present?
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: HohenHeizen on September 18, 2020, 10:26:56 PM
After I had the issue stated and it nearly cost my colony twice I went in and rebuilt the assembly without the combatpatches pertaining to targeting and it the pawn lock up went away instantly. I like this mod, but I wasn't about to be eaten because of it.

I barely understand coding so I can't really help fixing it or resolving things, only making my own game work. However, I only made the modifications after I initially noticed the problem and made the post. Like I said, I don't know what I'm doing and after reading the error logs a few times something clicked and I knew how to go about fixing it so my game could be played.


Yes, the androids from Android Tiers still actively babytalk. Excessively so. I'm unsure of the ones from the Androids mod.

I only have under the hood knowledge of AT and that's just from dabbling. All the androids lifeStageAges are HumanlikeAdult at minAge 0. So they should all read as adults. I'll offer any help I can and will gladly test all releases as I see them.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: GhostData on September 19, 2020, 10:21:11 PM
v3.5.1 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.5.1

This is a first pass for prison babies. Prisoners may now become pregnant and give birth. You will get a special notification when this happens.
Babies, toddlers, and children may all be prisoners as well. Babies and toddlers may be adopted to immediately force them into the colony. This is the preferred method to recruit them, and I do not intend to patch the actual prisoner recruitment feature.
There is a new memory when a child or younger is executed. Currently we don't make any special considerations on the type of execution.

I've also tweak the "child died" memory. There is already a ton of vanilla memories for when a pawns family dies, I don't believe we need a high powered general debuff every time a child is killed. I've reduced it from 20 to 10.
I've tweaked the crying children memory as well, and may reduce it further in the future. Reduced from a max debuff of 25 to 15.
Modders have a tendency to over value the impact of their memories, and often even stack them on top of existing memories that ultimately cause an unreasonable shift in mood.
Consider that a pawn's child dying is a -20 impact. If we also throw in the original child death memory CNP adds, the net debuff is -40, with the entire colony taking a -20 for 15 days. This is an absurdly high debuff when you compare it to other memories.
I suspect before the final release, a complete rebalance of memories will be in order.

More changes coming to handle faction babies.

Quote from: HohenHeizen on September 18, 2020, 10:26:56 PM
After I had the issue stated and it nearly cost my colony twice I went in and rebuilt the assembly without the combatpatches pertaining to targeting and it the pawn lock up went away instantly. I like this mod, but I wasn't about to be eaten because of it.

I barely understand coding so I can't really help fixing it or resolving things, only making my own game work. However, I only made the modifications after I initially noticed the problem and made the post. Like I said, I don't know what I'm doing and after reading the error logs a few times something clicked and I knew how to go about fixing it so my game could be played.


Yes, the androids from Android Tiers still actively babytalk. Excessively so. I'm unsure of the ones from the Androids mod.

I only have under the hood knowledge of AT and that's just from dabbling. All the androids lifeStageAges are HumanlikeAdult at minAge 0. So they should all read as adults. I'll offer any help I can and will gladly test all releases as I see them.
I tried replicating with Android Tiers T1 and T3 androids at age 0 with 0 recreation. I couldn't get any pawns trying to play with the androids.
If you're experiencing this error with the latest dll as downloaded - unmodified - from by git repo, post your modlist and maybe I can replicate with some of the other mods you're using.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: HohenHeizen on September 20, 2020, 12:51:55 AM
https://imgur.com/a/m0b1X5H

https://gist.github.com/HugsLibRecordKeeper/5691ebbefc616225cb71a52d7e1157cf

Android tiers - HD Androids(HH.ATHDAndroids) is literally just a texture replacement that has an empire relations patch, I just forgot to remove it after I loaded the modlist.  I went ahead and attached a link to a screenshot as well just to make sure we're referencing the same thing. This is a hugslib quickstart android start.

I even cleared configs and redownloaded the mods from the workshop, besides this one which I downloaded from github.

Next Day Edit: https://gist.github.com/7097ef4c358fb65cc14a08043d6a494d

Is a log after I was attacked by a group of insects. Same targeting issue.
Just want to reiterate my thanks for you workings on this. Will help wherever possible.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: Kopp on September 20, 2020, 06:18:05 AM
Hello Tragix,

I think I have the same problem as HohenHeizen and just wanted to report it.
https://gist.github.com/HugsLibRecordKeeper/0c5136b5322d6730ba99afb0f390d5dc
A raider should fire at some insects but refuses to and the error pops up.
*Using 3.5.1 or 3.4.0

I tried using a old version (3.3.2) and the problem does not occur.

Thanks for your wonderful mod :)
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: GhostData on September 20, 2020, 12:09:04 PM
Quote from: Kopp on September 20, 2020, 06:18:05 AM
Hello Tragix,

I think I have the same problem as HohenHeizen and just wanted to report it.
https://gist.github.com/HugsLibRecordKeeper/0c5136b5322d6730ba99afb0f390d5dc
A raider should fire at some insects but refuses to and the error pops up.
*Using 3.5.1 or 3.4.0

I tried using a old version (3.3.2) and the problem does not occur.

Thanks for your wonderful mod :)
Neat. The reason its failing is because we're checking to see if the pawn's race has lifecycles enabled, but something is coming up null. The list we're checking is loaded on launch, so it should always contain every race in your load order, but somehow it's coming up null in your case. I'll try to replicate, but I suspect the error will be specific to your install, as it involves mod configs saved to your PC. I can add some additional null checking as well for a blind fix.

Quote from: HohenHeizen on September 20, 2020, 12:51:55 AM
https://imgur.com/a/m0b1X5H

https://gist.github.com/HugsLibRecordKeeper/5691ebbefc616225cb71a52d7e1157cf

Android tiers - HD Androids(HH.ATHDAndroids) is literally just a texture replacement that has an empire relations patch, I just forgot to remove it after I loaded the modlist.  I went ahead and attached a link to a screenshot as well just to make sure we're referencing the same thing. This is a hugslib quickstart android start.

I even cleared configs and redownloaded the mods from the workshop, besides this one which I downloaded from github.

Next Day Edit: https://gist.github.com/7097ef4c358fb65cc14a08043d6a494d

Is a log after I was attacked by a group of insects. Same targeting issue.
Just want to reiterate my thanks for you workings on this. Will help wherever possible.
Replicated the baby games issue. I'll look into it today and see if I can get a fix.
Edit: Patched. Will drop it with the next release since it's a minor issue.

Wait, The pawns triggering the error are name "Fisher," "tailor," and other strange names. Are those your pawns, or insects?
What mod are the insects from?

I've tried replicating the CE error. I added Vanilla Expanded Factions insectoid module and triggered a large raid with the faction, then spawned pirates. The pirates target the insects just fine. I did notice some insectoids triggered a melee exception, but it came from CE itself.
I equipped colonists with firearms and drafted them, they chose targets and shot without incident.

The cause of the error in the log is pretty simple, but it should also never occur. The fact that your racial settings are missing an entry for a pawn's race indicates a pretty serious config issue.
We reinitialize the racial settings on load, so even adding a new race to an existing save should generate the appropriate record. I'll add a null check to the method that is failing - this will fix the specific issue in your logs. However, since the config is clearly borked, it's highly probable that you will run into additional errors.

I'll drop the fix for this with the next release as well.
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: HohenHeizen on September 20, 2020, 03:09:57 PM
Quote from: Tragix on September 20, 2020, 12:09:04 PM

Replicated the baby games issue. I'll look into it today and see if I can get a fix.
Edit: Patched. Will drop it with the next release since it's a minor issue.

Wait, The pawns triggering the error are name "Fisher," "tailor," and other strange names. Are those your pawns, or insects?
What mod are the insects from?

I've tried replicating the CE error. I added Vanilla Expanded Factions insectoid module and triggered a large raid with the faction, then spawned pirates. The pirates target the insects just fine. I did notice some insectoids triggered a melee exception, but it came from CE itself.
I equipped colonists with firearms and drafted them, they chose targets and shot without incident.

The cause of the error in the log is pretty simple, but it should also never occur. The fact that your racial settings are missing an entry for a pawn's race indicates a pretty serious config issue.
We reinitialize the racial settings on load, so even adding a new race to an existing save should generate the appropriate record. I'll add a null check to the method that is failing - this will fix the specific issue in your logs. However, since the config is clearly borked, it's highly probable that you will run into additional errors.

I'll drop the fix for this with the next release as well.

All the job named pawns are just androids named after their duties.  I believe all the insects are just from Vanilla Expanded Insectoids, I don't think I have any others that add wild insects.

I also don't have combat extended so I don't know what you mean there. When drafted pawns refused to move when in close range, sometimes will melee, and won't shoot no matter the range. This was from an infestation of mostly vanilla insects.

EDIT: https://youtu.be/PXUWG9c0CYM
Title: Re: [1.2] Children and Pregnancy - v3.4.0
Post by: GhostData on September 21, 2020, 08:45:56 PM
Yeah, I guess I just put CE in that sentence myself. I tested again without it and still was not able to replicate. That said, I've added code that should address the underlying cause of the error message. The scenario your save seems to be in indicates something is broken, but I believe this patch will correct that, albeit forcefully.

3.5.2 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.5.2
This release fixes disabled work types not refreshing when aging up, adds some lessons to certain events, allows other factions to (if on the map at birth) to rescue and leave with children and new mothers, and adds some fixes to baby games and some race checks.
I've also validated caravan functionality and tested that a baby, toddler, and child can leave the map in caravans and be loaded into pawns. I confirmed that a birth in a caravan correctly adds the new baby pawn to the caravan. In my testing, this slowed the caravan to a crawl. I have no intention to fix this, players should know better than to send a 9 month pregnant woman hiking across a mountain. If it forces you to make the decision to abandon the mother and child or risk starving to death, all the better!

This release is an important one, as it marks the completion of the core mod features. Everything I have set out to add or test in the mod has been completed, and no new features are currently planned for CNP. Remaining are bug fixes, general polish to existing features, potential refactoring and handling existing features better, limited mod support, and documentation.
This doesn't mean new features will not come to CNP, just that I am not planning any myself. I believe there is still a lot to do with CNP, but I think as far as new features are concerned, the more ambitious ones should be in a separate mod.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: HohenHeizen on September 22, 2020, 08:58:00 AM
Been testing the newest release. From what I can tell babygames seems to be resolved. I'm still getting the same combat issues however.

They briefly had freedom of movement but then continued to repeat the same actions of freezing in place like in the video.

I closed the game, removed the following code in CombatPatches.cs, rebuilt it, and run into no issue with the save that was mid combat.

   [HarmonyPatch(typeof(AttackTargetFinder), "BestShootTargetFromCurrentPosition")]
        public static class AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch {
            [HarmonyPrefix]
            public static bool BestShootTargetFromCurrentPosition_Prefix(ref Predicate<Thing> validator) {
                if (validator == null) {
                    validator = new Predicate<Thing>(ShouldShootToddlers);
                }

                return true;
            }

            /// <summary>
            /// Predicate to decide whether a pawn is a valid target, specifically to filter toddlers
            /// </summary>
            /// <param name="t">A pawn, possibly humanlike</param>
            /// <returns>True if if the pawn is not a toddler or younger</returns>
            private static bool ShouldShootToddlers(Thing t) {
                Pawn pawn = t as Pawn;
                return !ChildrenUtility.RaceUsesChildren(pawn) || (ChildrenUtility.GetLifestageType(pawn) != null && ChildrenUtility.GetLifestageType(pawn) > LifestageType.Toddler);
            }
        }


Hope it helps. I'll log any future errors. Thanks again for the updates and working with me.

Sidenote Question, is there any way to adopt kids besides typical prison recruitment?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on September 22, 2020, 09:40:37 AM
Quote from: HohenHeizen on September 22, 2020, 08:58:00 AM
Been testing the newest release. From what I can tell babygames seems to be resolved. I'm still getting the same combat issues however.

They briefly had freedom of movement but then continued to repeat the same actions of freezing in place like in the video.

I closed the game, removed the following code in CombatPatches.cs, rebuilt it, and run into no issue with the save that was mid combat.

   [HarmonyPatch(typeof(AttackTargetFinder), "BestShootTargetFromCurrentPosition")]
        public static class AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch {
            [HarmonyPrefix]
            public static bool BestShootTargetFromCurrentPosition_Prefix(ref Predicate<Thing> validator) {
                if (validator == null) {
                    validator = new Predicate<Thing>(ShouldShootToddlers);
                }

                return true;
            }

            /// <summary>
            /// Predicate to decide whether a pawn is a valid target, specifically to filter toddlers
            /// </summary>
            /// <param name="t">A pawn, possibly humanlike</param>
            /// <returns>True if if the pawn is not a toddler or younger</returns>
            private static bool ShouldShootToddlers(Thing t) {
                Pawn pawn = t as Pawn;
                return !ChildrenUtility.RaceUsesChildren(pawn) || (ChildrenUtility.GetLifestageType(pawn) != null && ChildrenUtility.GetLifestageType(pawn) > LifestageType.Toddler);
            }
        }


Hope it helps. I'll log any future errors. Thanks again for the updates and working with me.

Sidenote Question, is there any way to adopt kids besides typical prison recruitment?
Children - no, they are old enough to need to be persuaded. Babies and toddlers may be forcibly adopted by right clicking with a Caretaker pawn.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: HohenHeizen on September 24, 2020, 12:02:02 AM
I apologize if you're getting tired of me at this point, haha. There seems to be an incompatibility with Pawnmorpher. The mutations won't render causing an endless stream of errors.

I hadn't noticed this as Facial Stuff cancels them out. With Facial Stuff running Pawnmorpher works fine just without mutation renders.

This is with my full modlist with the exception of Facial Stuff, however, it looks similar when running just C&P and Pawnmorpher with their respective dependencies. https://gist.github.com/91a4d35632980ff54df7c7f4c15d50d2

Sidenote again. I keep wanting to try figure out how and add an orphan ship, with like adoption fees or the similar. Give a non violet way to adopt. Sells meals, clothes, etc. But damn. It just feels weird haha.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on September 24, 2020, 09:47:30 AM
Quote from: HohenHeizen on September 24, 2020, 12:02:02 AM
I apologize if you're getting tired of me at this point, haha. There seems to be an incompatibility with Pawnmorpher. The mutations won't render causing an endless stream of errors.

I hadn't noticed this as Facial Stuff cancels them out. With Facial Stuff running Pawnmorpher works fine just without mutation renders.

This is with my full modlist with the exception of Facial Stuff, however, it looks similar when running just C&P and Pawnmorpher with their respective dependencies. https://gist.github.com/91a4d35632980ff54df7c7f4c15d50d2

Sidenote again. I keep wanting to try figure out how and add an orphan ship, with like adoption fees or the similar. Give a non violet way to adopt. Sells meals, clothes, etc. But damn. It just feels weird haha.
Violent adoption? Out of curiosity, have you noticed toddlers and children entering the map with raiders? I've not tested to see if that's possible yet.

Pawnmorpher is incompatible with CNP. Last time I looked into it, I recall that they create their morphs by generating new races at runtime, which will probably never work with CNP since we're expecting all races to exist at startup based on RaceDefs. I should probably add this one to the incompatibility list on the OP. As usual with other mod support, I won't say I'll never patch it on this side, but mod support is probably my lowest priority project right now.

Highest priority of those however, is Alien Races, since for the most part it seems to be ubiquitous among modded saves. If I could figure out a way to enable "native" support for alien races - that is, working scaling without a patch - then most errors like this would probably be auto resolved, since we wouldn't need explicit racial references to handle rendering. Some issues would still occur with PawnMorpher since we DO still require a RaceDef for enabling and disabling race features.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Hallif on September 25, 2020, 08:11:11 AM
Hello. Since 3.0.0 I'm having the same issue: when I press the "generate" button, nothing happens. It just brings me back to the planet settings screen. And when I'm trying to load save, there's no pawns on the map. I have a lot of mods, but if I put C&P version 2.1.2, everything works just fine. That is the problem.
Edit: I just did a quick analysis and It doesn't work with JecsTools any longer for some reason. (srry for my eng.)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Hallif on September 26, 2020, 09:47:58 AM
Another problem. I get this message in huge numbers when I launch a game with a multiplayer mod. Exception getting types in assembly RimWorldChildren, Version=1.0.7567.39485, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
Verse.Map:FillComponents()
Verse.Map:Verse.Map.ConstructComponents_Patch1(Map)
Verse.MapGenerator:Verse.MapGenerator.GenerateMap_Patch3(IntVec3, MapParent, MapGeneratorDef, IEnumerable`1, Action`1)
Verse.Game:Verse.Game.InitNewGame_Patch2(Game)
Verse.<>c:<Start>b__1_2()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: TheBadiator on September 27, 2020, 01:11:41 AM
I keep getting this bug when I try to prioritize hunting on downed animals.

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.WorkGiver_TakeBabyToCrib.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x0001e] in <983a3154892047e8894820e6d4b4bdbe>:0
  at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders_NewTmp (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x0019d] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00084] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.ChoicesAtFor (UnityEngine.Vector3 clickPos, Verse.Pawn pawn) [0x0009c] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x00056] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.Selector.HandleMapClicks () [0x000af] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.Selector.SelectorOnGUI () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.UIRoot_Play.UIRootOnGUI () [0x000d3] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
Verse.Log:Error(String, Boolean)
Verse.Root:Verse.Root.OnGUI_Patch1(Root)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: TheBadiator on September 27, 2020, 03:46:56 PM
Quote from: TheBadiator on September 27, 2020, 01:11:41 AM
I keep getting this bug when I try to prioritize hunting on downed animals.

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.WorkGiver_TakeBabyToCrib.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x0001e] in <983a3154892047e8894820e6d4b4bdbe>:0
  at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders_NewTmp (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x0019d] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00084] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.ChoicesAtFor (UnityEngine.Vector3 clickPos, Verse.Pawn pawn) [0x0009c] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x00056] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.Selector.HandleMapClicks () [0x000af] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.Selector.SelectorOnGUI () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.UIRoot_Play.UIRootOnGUI () [0x000d3] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
Verse.Log:Error(String, Boolean)
Verse.Root:Verse.Root.OnGUI_Patch1(Root)


My pawns will not react violently to infestation when drafted, right now.

Logs:
https://gist.github.com/4080d79505db24e4a072f908e2eb9bcf

EDIT: If it's relevant, this only started happening after I installed the Wild Reproduction Mod (https://steamcommunity.com/sharedfiles/filedetails/?id=2236146674). I have since uninstalled it, and the bugs I have persisted on the save.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on September 30, 2020, 06:15:44 PM
Hello, I'm having an issue with the current version of the mod (I made sure to install the latest release from github).
From what I can tell, it's a similar problem to something that I read about on steam at the end of July (https://steamcommunity.com/workshop/filedetails/discussion/2077704445/2793872381194894815/). Colonists can't seem to get pregnant no matter how much lovin' they do, and even if I force a pawn to become pregnant through dev mode she just finishes the pregnancy and no baby is spawned.

For some reason my game is also telling me that the mod version is outdated, even though it is the 1.2 verson.

Honestly, thanks for all the work you do. This mod is potentially one of the most essential ones.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on September 30, 2020, 09:55:34 PM
Quote from: Hallif on September 26, 2020, 09:47:58 AM
Another problem. I get this message in huge numbers when I launch a game with a multiplayer mod. Exception getting types in assembly RimWorldChildren, Version=1.0.7567.39485, Culture=neutral, PublicKeyToken=null
Verse.Log:Error(String, Boolean)
Verse.<get_AllTypes>d__4:MoveNext()
System.Linq.WhereEnumerableIterator`1:MoveNext()
Verse.Map:FillComponents()
Verse.Map:Verse.Map.ConstructComponents_Patch1(Map)
Verse.MapGenerator:Verse.MapGenerator.GenerateMap_Patch3(IntVec3, MapParent, MapGeneratorDef, IEnumerable`1, Action`1)
Verse.Game:Verse.Game.InitNewGame_Patch2(Game)
Verse.<>c:<Start>b__1_2()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Multiplayer hasn't been reviewed yet. I've been told it's broken, but until I review it, I have no idea what the requirements are.
Quote from: Jackdawson on September 30, 2020, 06:15:44 PM
Hello, I'm having an issue with the current version of the mod (I made sure to install the latest release from github).
From what I can tell, it's a similar problem to something that I read about on steam at the end of July (https://steamcommunity.com/workshop/filedetails/discussion/2077704445/2793872381194894815/). Colonists can't seem to get pregnant no matter how much lovin' they do, and even if I force a pawn to become pregnant through dev mode she just finishes the pregnancy and no baby is spawned.

For some reason my game is also telling me that the mod version is outdated, even though it is the 1.2 verson.

Honestly, thanks for all the work you do. This mod is potentially one of the most essential ones.
If you installed manually, be sure to perform a clean install by deleting the entire CNP mod folder and extracting the latest version from git.
Allowing the steam version was a bit of a mistake, looking back. There are 12000 players installing outdated version of the mod and then being directed here for support. One of the main reasons I didn't want to deal with steam is that players never know what version they are using, which only exacerbates the fact that the vast majority have no idea how to make a bug report.

Post a hugslib mod list, there are a number of mods that could interfere with impregnation. There are also a number of invisible factors that determine if a pawn gets pregnant or not. If you turn on dev logging in the CNP settings, you will see a log message showing the % chance of success after two pawn finish lovin'. Impregnation is probably the least fleshed out part of CNP so far. It's probably due for a revisit, but I'm not sure if I care to deal with making it anymore complex.

3.5.3 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.5.3

This is a fix for the insectoid targeting bug. For some reason, vanilla insectoids are passed as null to the race check code, which causes some problems. Combat Extended somehow resolves this problem.
I've added additional checks and confirmed the replicated problem was resolved.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on October 01, 2020, 04:01:08 AM
Quote from: Tragix on September 30, 2020, 09:55:34 PM
If you installed manually, be sure to perform a clean install by deleting the entire CNP mod folder and extracting the latest version from git.
Allowing the steam version was a bit of a mistake, looking back. There are 12000 players installing outdated version of the mod and then being directed here for support. One of the main reasons I didn't want to deal with steam is that players never know what version they are using, which only exacerbates the fact that the vast majority have no idea how to make a bug report.

I deleted it completely and installed the new version you just posted. No more incompatibility logging in debug on startup, and had a successful pregnancy. You the man!
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: sidfu on October 01, 2020, 10:54:33 PM
right now with latest to use ti with harecore sk mod pack it needs to be above the custom CE  and core sk that we use.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on October 02, 2020, 09:38:44 AM
Question: at what point in the pregnancy is the hediff supposed to become visible with no devmode?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 02, 2020, 11:43:14 AM
Quote from: Jackdawson on October 02, 2020, 09:38:44 AM
Question: at what point in the pregnancy is the hediff supposed to become visible with no devmode?
37-50% depending on body type.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jkelley2 on October 10, 2020, 01:24:22 PM
so im having an issue between this and Android Tiers with humans giving birth to Androids
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 10, 2020, 05:52:36 PM
Quote from: jkelley2 on October 10, 2020, 01:24:22 PM
so im having an issue between this and Android Tiers with humans giving birth to Androids
Oooookay.
I don't suppose you found a way to force androids and human to get-it-on did you? I guess there's nothing in the code that specifically outlines a race that is incapable of breeding. CNP doesnt have a very complex virility/fertility system, so race isn't really accounted for yet. I'll have to take a look when my schedule frees up again.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: sidfu on October 11, 2020, 03:09:16 PM
Quote from: jkelley2 on October 10, 2020, 01:24:22 PM
so im having an issue between this and Android Tiers with humans giving birth to Androids

this is caused by prepare carefully.  if you even hit the prepare carefully button it will mess up factions. its a well known bug that the prepare careful mod author blames on everyone else's mod.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jkelley2 on October 11, 2020, 03:38:06 PM
Quote from: Tragix on October 10, 2020, 05:52:36 PM
Quote from: jkelley2 on October 10, 2020, 01:24:22 PM
so im having an issue between this and Android Tiers with humans giving birth to Androids
Oooookay.
I don't suppose you found a way to force androids and human to get-it-on did you? I guess there's nothing in the code that specifically outlines a race that is incapable of breeding. CNP doesnt have a very complex virility/fertility system, so race isn't really accounted for yet. I'll have to take a look when my schedule frees up again.

no i didnt and ive been using Prepare Carefully and its worked just fine this only become an issue once i updated from 1.1 to 1.2 and started a new colony both parents are human and its only this couple my other couple that had a kid had a normal human kid
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on October 12, 2020, 08:06:29 AM
is there any way to fulfill recreation of Toddlers, other than TV?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 12, 2020, 12:06:19 PM
Quote from: Jackdawson on October 12, 2020, 08:06:29 AM
is there any way to fulfill recreation of Toddlers, other than TV?
I guess since toddlers still have no manipulation they can't use most recreation items. Probably need to give them a minimal manipulation.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on October 12, 2020, 03:15:32 PM
Quote from: Tragix on October 12, 2020, 12:06:19 PM
Quote from: Jackdawson on October 12, 2020, 08:06:29 AM
is there any way to fulfill recreation of Toddlers, other than TV?
I guess since toddlers still have no manipulation they can't use most recreation items. Probably need to give them a minimal manipulation.
Is there a reason why pawns assigned to childcare can't play with them anymore at that stage?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jkelley2 on October 12, 2020, 06:05:32 PM
just curious would it be possible to make kids born to a tribal start have a tribal backstory so they can use Natural Focus? would make sense
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DemonLunar on October 18, 2020, 02:48:35 PM
So I don't know if this is from my load order but it seems like the update of this mod breaks some of the alien race. Example are Ratkin had lost their ear and tail, and Arachne lose their spider body. I don't know if this mod or my load order. Would like to see if someone else can confirm it.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Canute on October 18, 2020, 03:55:28 PM
DemonLunar,
just deactivate CnP, use quickstart to create fast a test colony (hugslib feature), use dev tools to spawn these pawn and check if something changed.
So you can be sure if that mod or your modlist doing bad things.

Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 18, 2020, 04:49:22 PM
Quote from: DemonLunar on October 18, 2020, 02:48:35 PM
So I don't know if this is from my load order but it seems like the update of this mod breaks some of the alien race. Example are Ratkin had lost their ear and tail, and Arachne lose their spider body. I don't know if this mod or my load order. Would like to see if someone else can confirm it.
Probably this mod, as we patch HAR's methods to allow us to tweak offsets for specific pawns - children. If I had to take a wild guess, you're probably ignoring log spam errors that indicate the "drawBodyAddon" method is failing - which would cause body addons for all races to disappear.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DemonLunar on October 18, 2020, 06:21:03 PM
Quote from: Canute on October 18, 2020, 03:55:28 PM
DemonLunar,
just deactivate CnP, use quickstart to create fast a test colony (hugslib feature), use dev tools to spawn these pawn and check if something changed.
So you can be sure if that mod or your modlist doing bad things.

I did deactivated it and did some test runs to figure out the problems. That's how I came up with that guess. It does suck to know that it was causing the problem. I was hoping it was something else. I should learn to try to understand these error codes. Only problem is I wouldn't know what mod does the error in the log.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 18, 2020, 07:18:53 PM
Quote from: DemonLunar on October 18, 2020, 06:21:03 PM
Quote from: Canute on October 18, 2020, 03:55:28 PM
DemonLunar,
just deactivate CnP, use quickstart to create fast a test colony (hugslib feature), use dev tools to spawn these pawn and check if something changed.
So you can be sure if that mod or your modlist doing bad things.

I did deactivated it and did some test runs to figure out the problems. That's how I came up with that guess. It does suck to know that it was causing the problem. I was hoping it was something else. I should learn to try to understand these error codes. Only problem is I wouldn't know what mod does the error in the log.
Upload the log.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DemonLunar on October 18, 2020, 11:48:20 PM
BodyDef Arachne_body has BodyPartRecord of Torso whose children have more or equal coverage than 100% (143.60%)
Verse.Log:Warning(String, Boolean)
Verse.<ConfigErrors>d__12:MoveNext()
Verse.DefDatabase`1:ErrorCheckAllDefs()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
Verse.GenGeneric:InvokeStaticMethodOnGenericType(Type, Type, String)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()


BodyDef ROMA_SpiderBody has BodyPartRecord of ROMA_Cephalothorax whose children have more or equal coverage than 100% (100.00%)
Verse.Log:Warning(String, Boolean)
Verse.<ConfigErrors>d__12:MoveNext()
Verse.DefDatabase`1:ErrorCheckAllDefs()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
Verse.GenGeneric:InvokeStaticMethodOnGenericType(Type, Type, String)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

These are the specific problems I see. But here's a player.log if that help. (p.s. first time doing this so i'm bound to mess up on something. lol)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Canute on October 19, 2020, 04:23:21 AM
I got these error's too (i use Arachne and ROM_Arachnophobia) and i don't use CnP.
https://gist.github.com/HugsLibRecordKeeper/0d1d324673513efea562ea4d09f479ba

These children arn't babies, it is the bodyparts like fingers are the child of the hand, which is the child of arm/shoulder.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Meester on October 20, 2020, 10:15:03 PM
I am getting a particular problem with C&P, when a carer puts the Baby/Toddler into the cradle they both disappear for a second, the carer reappears but then the UI starts to disappear when I zoom in and out. This has happened several times, I have a lot of mods, but for an example of two UI mods I have RimUI and Awesome Inventory as well as some that add new tabs like WikiRim.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DemonLunar on October 21, 2020, 11:59:49 AM
So something with the v3.5.3 is causing it. I went back to the v3.5.2 and everything works fine.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on October 21, 2020, 12:17:03 PM
Quote from: DemonLunar on October 21, 2020, 11:59:49 AM
So something with the v3.5.3 is causing it. I went back to the v3.5.2 and everything works fine.
Probably not CNP then, since the only line that changed between these versions is a null check. I see nothing of interest in your logs. Maybe post the hugslib log if you encounter the problem again.
Quote from: Meester on October 20, 2020, 10:15:03 PM
I am getting a particular problem with C&P, when a carer puts the Baby/Toddler into the cradle they both disappear for a second, the carer reappears but then the UI starts to disappear when I zoom in and out. This has happened several times, I have a lot of mods, but for an example of two UI mods I have RimUI and Awesome Inventory as well as some that add new tabs like WikiRim.
Post your hugslib log, as it contains a list of your mods.
I once saw similar flickering years ago, but it was related to my video settings. If you're not getting any errors in the logs, it probably isnt an issue with rendering.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DemonLunar on October 21, 2020, 04:18:04 PM
QuoteProbably not CNP then, since the only line that changed between these versions is a null check. I see nothing of interest in your logs. Maybe post the hugslib log if you encounter the problem again.

I'm just going to have to check thinks through to see what's causing the problem. I do have a good amount of race mods that could cause it. I only wonder because the alien children patch was consider obsolete in the 1.2 and i didn't know if that would effect this mod too.

(edit: heres a more detailed log this is with just race and no other addon.)
Here's the log:
https://gist.github.com/0d4d40f142f59f681cc302040e5618a5
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Meester on October 23, 2020, 10:54:28 PM
Quote from: Tragix on October 21, 2020, 12:17:03 PM
Post your hugslib log, as it contains a list of your mods.I once saw similar flickering years ago, but it was related to my video settings. If you're not getting any errors in the logs, it probably isnt an issue with rendering.

Seems to be intermittent, baby put in cradle at the place ui still showed, then shortly afterwards toddler baby is back in cradle the ui now only appears when zoomed in except when the camera is centered/moves into view on the [invisible] child in the cradle.

Here is my log - https://gist.github.com/4aa8792c9af4382f97e60f9bbc3ba7a7

Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: MozartF on October 26, 2020, 10:53:00 AM
For the author;
Would be awesome if you could fix the problem with the MOD Facial Stuff, in my save the babies and toddlers show a bug, their faces are out of place and become weird.

Since now, TY.  :)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GalacticToast on October 30, 2020, 01:05:44 AM
Hey, this could just be a problem on my end but I recently installed this mod along with Age Matters, and after about an in-game week of testing my colonists for pregnancy 2-3 times, suddenly the Determine Pregnancy operation isnt available anymore?? My colony has 8 couples so i know im bound to get a baby at some point, but for some reason the operation to determine it has just. Disappeared
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DarkSlayerEX on October 31, 2020, 01:42:59 AM
Quote from: Tragix on October 18, 2020, 04:49:22 PM
Quote from: DemonLunar on October 18, 2020, 02:48:35 PM
So I don't know if this is from my load order but it seems like the update of this mod breaks some of the alien race. Example are Ratkin had lost their ear and tail, and Arachne lose their spider body. I don't know if this mod or my load order. Would like to see if someone else can confirm it.
Probably this mod, as we patch HAR's methods to allow us to tweak offsets for specific pawns - children. If I had to take a wild guess, you're probably ignoring log spam errors that indicate the "drawBodyAddon" method is failing - which would cause body addons for all races to disappear.

I can confirm the same issue is happening to me, though I'm currently running 430+ mods. Orassans, Arachne, and other races are breaking with the same error type. I tried with 3.5.2 and 3.5.3.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: TheBadiator on November 02, 2020, 12:45:53 AM
I am currently having a bug that prevents me from prioritizing to hunt on downed animals, which is a pain for when I get manhunter packs. I don't know if this is a bug with Harmony or if it's a bug with CnP, but those are the two names I recognize in the Debug, so I'm gonna place my logs here and do a clean install of Harmony and hope for the best.

https://gist.github.com/80ef530f29a818cc9bb00f565c686b05

Cheers!
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: HapticRecall on November 02, 2020, 08:59:51 PM
How do people set up a starting colonist as a child using this? I tried Character Editor but giving a pawn the child body type and appropriate age rendered them incapable of wearing clothes, apparel would read as being equipped but the model is naked and the pawn complains of unhappy nudity.

For reference, my modlist is:

Harmony
Core
Royalty
HugsLib
Children and Pregnancy
Character Editor

... and nothing else.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Raea on November 04, 2020, 12:23:49 AM
Long time haven't played, game was working fine afaik. Updated every mod i could find / deleted those not updated but now i can't even start a new game. Tried every mod on and off alone and CnP gives me an error ( Error while generating a map). No mods or using others alone works, was also getting a bug where there is no pods at the start of a game but i can't say this is from CnP. I also uninstalled/reinstalled to make sure.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Canute on November 04, 2020, 02:40:08 AM
Raea,
at first you should check if plain Rimworld works. Deactivate all mods and check to create a new colony.
- When you get errors here, the rimworld installation itself got problem, delete the installation so nothing is left and reinstall. So no old files are left that could cause problems. Maybe the same with the Config at the Saved data folder.
Be sure you allways have the old mod folder deleted before you update/install the new version, so no old mod files are left that could cause problems.

Add Harmony and Hugslib (to have a comfortable way to share modlist and logfile) and then CnP.
If it still don't work use the hugslib feature Share log button or press CTRL-F12 after you tried to create a colony and post the link.

Uninstall function is a bit tricky sometimes, it only remove the current version files, but not old version files. But Rimworld browser through all files.
So it is nessesary that you manual delete the the installation sometimes.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jager666 on November 05, 2020, 05:14:39 PM
Hi,

For some reason, WakeTreshold_Patch is ticking a lot, even at the start of the game, which might lead to serious slowdowns later.

(https://i.ibb.co/K0wx3V3/aaaaaaaa.jpg)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on November 06, 2020, 01:43:30 PM
Quote from: GalacticToast on October 30, 2020, 01:05:44 AM
Hey, this could just be a problem on my end but I recently installed this mod along with Age Matters, and after about an in-game week of testing my colonists for pregnancy 2-3 times, suddenly the Determine Pregnancy operation isnt available anymore?? My colony has 8 couples so i know im bound to get a baby at some point, but for some reason the operation to determine it has just. Disappeared
AgeMatters is incompatible with CNP as they both implement similar features. The discoverPregnancy procedure checks if the pawn is female, if the pawn's race allows for children (configured in settings,) and if the pawn is an adolescent or older. IIRC, that would be 12-16 years old for humans?
Then we check the Torso part for the pregnancy hediff. If I recall, the only way the option shouldn't be available is if the above criteria are not met. So a pregnancy female human would not have the option if they were younger than adolescent.

The impregnation and pregnancy portions of the mod are definitely due for a revisit, when I have time.

Quote from: TheBadiator on November 02, 2020, 12:45:53 AM
I am currently having a bug that prevents me from prioritizing to hunt on downed animals, which is a pain for when I get manhunter packs. I don't know if this is a bug with Harmony or if it's a bug with CnP, but those are the two names I recognize in the Debug, so I'm gonna place my logs here and do a clean install of Harmony and hope for the best.

https://gist.github.com/80ef530f29a818cc9bb00f565c686b05

Cheers!
Looks like the context menu for the hunted animal is causing an error when writing the potential prioritizable jobs. I'll add it to the list to fix.
Quote from: HapticRecall on November 02, 2020, 08:59:51 PM
How do people set up a starting colonist as a child using this? I tried Character Editor but giving a pawn the child body type and appropriate age rendered them incapable of wearing clothes, apparel would read as being equipped but the model is naked and the pawn complains of unhappy nudity.

For reference, my modlist is:

Harmony
Core
Royalty
HugsLib
Children and Pregnancy
Character Editor

... and nothing else.

Donno. I almost always just spawn children when testing myself. I have rarely used Prepare Carefully, but I hear it causes problems.
The proper answer is, it depends on how the creation mod works. CNP works by letting a pawn generate naturally at any age, and then after spawning we record some information (such as the body they spawned with) and then make some changes at startup, such as changing the body type to the appropriate age. Some changes occur real time, such as rendering changes, while others only happen once per birthday.
If you wanted to create a child, my best bet would be to set them with the body you want them to have as an adult, then start your game. If the editor is allowing CNP to run first, they will spawn with an adult body. If it holds CNP until the map loads (probably) then CNP will make its changes post load.
For foolproof support, the editor would probably need some integration with CNP, or at a minimum I would need to make changes on CNPs side to accommodate the editor.

Quote from: Raea on November 04, 2020, 12:23:49 AM
Long time haven't played, game was working fine afaik. Updated every mod i could find / deleted those not updated but now i can't even start a new game. Tried every mod on and off alone and CnP gives me an error ( Error while generating a map). No mods or using others alone works, was also getting a bug where there is no pods at the start of a game but i can't say this is from CnP. I also uninstalled/reinstalled to make sure.
Sounds like a pretty heavily broken install. I'd suggest you nuke your config folder and the game folder and start fresh. Maybe even delete the workshop items so they get clean installs too. My ability to fix a problem is directly correlated to my ability to replicate the problem on my side.

Quote from: jager666 on November 05, 2020, 05:14:39 PM
Hi,

For some reason, WakeTreshold_Patch is ticking a lot, even at the start of the game, which might lead to serious slowdowns later.

<snip>
Thanks, I'll take a look.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Raea on November 07, 2020, 03:04:44 PM
Thanks Tragix and Canute, wasn't sure as it was working fine the day before but i uninstalled / deleted game folder and config-saves and its working now. I just found out about breastfeed, how do you get the mother to do so? Always feeding meals and if i select no food in the baby's tab they would starve.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jmpatag1 on November 08, 2020, 02:05:04 AM
hello i just want to ask if this error is harmful or can i just ignore it?

https://gist.github.com/HugsLibRecordKeeper/b5d9859b20cf602298b95acf39e14a7d (https://gist.github.com/HugsLibRecordKeeper/b5d9859b20cf602298b95acf39e14a7d)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jackdawson on November 09, 2020, 05:58:33 AM
Hey, the baby crib started getting insta-built in just 1 work for some reason. could that be an incompatibility issue? I think it started happening after I installed RJW, but I'm trying the mod on its own and it keeps happening
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: sumghai on November 10, 2020, 05:21:07 PM
Hi Tragix, I've opened an issue and pull request for adding compatibility with my MedPod mod. Could you please review them?:

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/issues/41

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/merge_requests/44
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: SergeshD123 on November 18, 2020, 03:41:03 PM
How to fix headless children bug? This happens to some children, but not others.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Meester on November 24, 2020, 08:50:39 PM
Im getting for example, for all pawns.

QuoteException drawing French: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.AlienRaces_DrawAddons_Patch.ModifyScale (Verse.Graphic graphic, Verse.Pawn pawn, Verse.Rot4 rotation, System.Object addon) [0x0002c] in <983a3154892047e8894820e6d4b4bdbe>:0
  at (wrapper dynamic-method) AlienRace.HarmonyPatches.AlienRace.HarmonyPatches.DrawAddons_Patch0(bool,UnityEngine.Vector3,Verse.Pawn,UnityEngine.Quaternion,Verse.Rot4,bool)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch6(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool,bool)
  at Verse.PawnRenderer.RenderPawnInternal (UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.RotDrawMode draw, System.Boolean headStump, System.Boolean invisible) [0x0001a] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch4(Verse.PawnRenderer,UnityEngine.Vector3,Verse.RotDrawMode,bool,bool)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch1(Verse.PawnRenderer,UnityEngine.Vector3)
  at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.Thing.Draw () [0x00007] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.ThingWithComps.Verse.ThingWithComps.Draw_Patch1(Verse.ThingWithComps)
  at (wrapper dynamic-method) Verse.DynamicDrawManager.Verse.DynamicDrawManager.DrawDynamicThings_Patch1(Verse.DynamicDrawManager)
Verse.Log:Error(String, Boolean)
Verse.DynamicDrawManager:Verse.DynamicDrawManager.DrawDynamicThings_Patch1(DynamicDrawManager)
Verse.Map:Verse.Map.MapUpdate_Patch3(Map)
Verse.Game:Verse.Game.UpdatePlay_Patch2(Game)
Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: sou on December 05, 2020, 08:22:40 PM
Hi, is there a list of supported alien races?
I really like this mod and its options but I am finding that races that have extra parts (horns, tails, etc.  e.g., Revia, Thrumkin) do not get rendered correctly when life stage for that race is turned on, even when the mod list is at a bare minimum (tons of Exception drawing System.NullReferenceException type errors get spit out in the background).
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Luneflyte on December 10, 2020, 05:45:26 AM
Hello! Thank you for working on this mod, I've been enjoying it so far.

Unfortunately I'm having a bit of a weird behavior with raiders. They seem to get partway into my killbox loop before becoming stuck, twitching in place.

Exception in JobDriver tick for pawn Yuki driver=JobDriver_Goto (toilIndex=0) driver.job=(Goto (Job_15040243) A=(75, 0, 123))
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.API.ChildrenUtility.RaceUsesChildren (Verse.Pawn pawn) [0x00011] in <983a3154892047e8894820e6d4b4bdbe>:0
  at RimWorldChildren.CombatPatches+AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch.ShouldShootToddlers (Verse.Thing t) [0x00007] in <983a3154892047e8894820e6d4b4bdbe>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__1 (Verse.AI.IAttackTarget t) [0x000e4] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestAttackTarget_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single,Verse.IntVec3,single,bool,bool)
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestShootTargetFromCurrentPosition_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single)
  at RunAndGun.Harmony.JobDriver_SetupToils.checkForAutoAttack (Verse.AI.JobDriver_Goto __instance) [0x000f2] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at RunAndGun.Harmony.JobDriver_SetupToils+<>c__DisplayClass0_0.<Postfix>b__0 () [0x00073] in <b794371ac9ff4775865fbf8a3b981e2c>:0
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch1(Verse.AI.JobDriver)
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch1(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


One of those shows up for each stuck raider.

And here is the hugslib link: https://gist.github.com/bd03321e0f81bf536167fc4bce850fd1

I'm pretty sure I just have another mod that doesn't want to play nice, but I'm pretty new to Rimworld and don't know how to figure out which one it is.

Thank you for your time~

Edit: In a startling moment of Possessing Reading Comprehension, I saw 'Run and Gun' on the error, and in an equally unlikely moment of Trying To Fix Things Myself, disabled Run and Gun to see what would happen. Turns out what happens is the errors goes away and the raiders proceed to raid. Who would have guessed?

RIP Run and Gun, I'll miss you, but the challenge of kids is far more fun.

Edit Redux: The raiders do proceed to raid, but there is a new and exciting error.

JobDriver threw exception in initAction for pawn Tatyana driver=JobDriver_Wait (toilIndex=0) driver.job=(Wait_Combat (Job_16150142))
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.API.ChildrenUtility.RaceUsesChildren (Verse.Pawn pawn) [0x00011] in <983a3154892047e8894820e6d4b4bdbe>:0
  at RimWorldChildren.CombatPatches+AttackTargetFinder_BestShootTargetFromCurrentPosition_Patch.ShouldShootToddlers (Verse.Thing t) [0x00007] in <983a3154892047e8894820e6d4b4bdbe>:0
  at Verse.AI.AttackTargetFinder+<>c__DisplayClass5_0.<BestAttackTarget>b__1 (Verse.AI.IAttackTarget t) [0x000e4] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestAttackTarget_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single,Verse.IntVec3,single,bool,bool)
  at (wrapper dynamic-method) Verse.AI.AttackTargetFinder.Verse.AI.AttackTargetFinder.BestShootTargetFromCurrentPosition_Patch1(Verse.AI.IAttackTargetSearcher,Verse.AI.TargetScanFlags,System.Predicate`1<Verse.Thing>,single,single)
  at (wrapper dynamic-method) Verse.AI.JobDriver_Wait.Verse.AI.JobDriver_Wait.CheckForAutoAttack_Patch1(Verse.AI.JobDriver_Wait)
  at Verse.AI.JobDriver_Wait.<MakeNewToils>b__3_0 () [0x00037] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x001df] in <d72310b4d8f64d25aee502792b58549f>:0
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:Verse.AI.JobDriver.ReadyForNextToil_Patch1(JobDriver)
Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.StartJob_Patch3(Pawn_JobTracker, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:CheckForJobOverride()
Verse.AI.Pawn_JobTracker:Notify_DamageTaken(DamageInfo)
Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.PreApplyDamage_Patch2(Pawn_HealthTracker, DamageInfo, Boolean&)
Verse.Pawn:Verse.Pawn.PreApplyDamage_Patch1(Pawn, DamageInfo&, Boolean&)
Verse.Thing:Verse.Thing.TakeDamage_Patch1(Thing, DamageInfo)
Verse.HealthUtility:DamageUntilDead(Pawn)
Verse.DebugToolsPawns:DamageToDeath(Pawn)
Verse.<>c__DisplayClass8_0:<DebugToolMapForPawns_NewTmp>b__0()
Verse.DebugTool:DebugToolOnGUI()
Verse.DebugTools:DebugToolsOnGUI()
RimWorld.UIRoot_Play:UIRootOnGUI()
Verse.Root:Verse.Root.OnGUI_Patch1(Root)


Hugslib: https://gist.github.com/5719d11034c957fcb47b95a2a59fdff3
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Hadley on December 29, 2020, 11:31:49 AM
I can't even get humanoid raids to spawn with this Mod.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Mistrornge on December 31, 2020, 03:23:10 PM
Super amazing mod.  Loving it.
Question... is there a way to adjust a race's pregnancy length and lifespan?  Not sure if this is the right mod to ask about this.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on January 01, 2021, 10:36:05 PM
So I have a problem with the toddlers not being able to play when outside of the crib.  It is extremely hard to get them in the crib to play with them once they start crawling around.  plus, once you do get them in bed they fall asleep before you can get a pawn to play with them. I think it is due to this bit in Driver_PlayWithBaby.cs on line 80:

        protected override IEnumerable<Toil> MakeNewToils() {
            this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
            this.FailOn(() => !Baby.InBed() || !Baby.Awake());
            if (Chair != null) {
                this.FailOnDespawnedNullOrForbidden(TargetIndex.B);
            }


I have very limited abilities in C#.  Does anyone know how to make it so toddlers do not have to be in the crib to play with them?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on January 05, 2021, 07:37:59 PM
Okay,

I am getting this error in the debugger:

Exception in JobDriver tick for pawn Marjot driver=JobDriver_PlayWithBaby (toilIndex=3) driver.job=(error)
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.JobDriver_PlayWithBaby.<MakeNewToils>b__7_1 () [0x000c3] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at (wrapper dynamic-method) Verse.AI.JobDriver.Verse.AI.JobDriver.DriverTick_Patch1(Verse.AI.JobDriver)
Verse.Log:Warning(String, Boolean)
Verse.AI.JobUtility:Verse.AI.JobUtility.TryStartErrorRecoverJob_Patch0(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch1(JobDriver)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


And this:

Isabel threw exception in WorkGiver TakeBabyToCrib: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.WorkGiver_TakeBabyToCrib.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x0001e] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at RimWorld.JobGiver_Work+<>c__DisplayClass3_1.<TryIssueJobPackage>b__0 (Verse.Thing t) [0x00013] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.GenClosest+<>c__DisplayClass2_0.<ClosestThingReachable>b__0 (Verse.Thing t) [0x00034] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.GenClosest.<ClosestThing_Global>g__Process|5_0 (Verse.Thing t, Verse.GenClosest+<>c__DisplayClass5_0& ) [0x00047] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.GenClosest.ClosestThing_Global (Verse.IntVec3 center, System.Collections.IEnumerable searchSet, System.Single maxDistance, System.Predicate`1[T] validator, System.Func`2[T,TResult] priorityGetter) [0x0008d] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.GenClosest.ClosestThingReachable (Verse.IntVec3 root, Verse.Map map, Verse.ThingRequest thingReq, Verse.AI.PathEndMode peMode, Verse.TraverseParms traverseParams, System.Single maxDistance, System.Predicate`1[T] validator, System.Collections.Generic.IEnumerable`1[T] customGlobalSearchSet, System.Int32 searchRegionsMin, System.Int32 searchRegionsMax, System.Boolean forceAllowGlobalSearch, Verse.RegionType traversableRegionTypes, System.Boolean ignoreEntirelyForbiddenRegions) [0x0014e] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) RimWorld.JobGiver_Work.RimWorld.JobGiver_Work.TryIssueJobPackage_Patch1(RimWorld.JobGiver_Work,Verse.Pawn,Verse.AI.JobIssueParams)
Verse.Log:Error(String, Boolean)
RimWorld.JobGiver_Work:RimWorld.JobGiver_Work.TryIssueJobPackage_Patch1(JobGiver_Work, Pawn, JobIssueParams)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.EndCurrentJob_Patch2(Pawn_JobTracker, JobCondition, Boolean, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Verse.Pawn.Tick_Patch1(Pawn)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jager666 on January 08, 2021, 04:23:53 PM
Looks like the mod is dead in the water again.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on January 10, 2021, 03:54:48 PM
Quote from: jager666 on January 08, 2021, 04:23:53 PM
Looks like the mod is dead in the water again.

I mean the mod works, there are just some 'bugs'.  Also quite a few improvements that could be made.

Some of the things I thought were major bugs previously were not actually bugs just not really implimented.  There are a bunch of error messages in the logger, but most of these seem pretty harmless and meaningless.

The actual bugs (which do need to be fixed at top priority) I have found so far are:


Here is a list of features I think really need to be implemented:

Here is a list of features I would like to see to have better compatibility with Dub's Hygiene mod, which I use.  Implementing these features will likely require work on both mods:

Finally, at some point, I think it would be interesting to implement something along the lines of the old Children and School mod, but I don't think this ought to be a priority.  I have some C# knowledge, but I have been having trouble compiling my code so I really think someone with more advanced knowledge would need to help me make some of these fixes and changes.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Geese man on January 10, 2021, 11:14:28 PM
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMInfants (immobile stage) try to mediate and this takes them out of the crib and requires rescue.
Not CNP's fault and fixed if you use rimworld v1.2.2753.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMIf the designated crib is outside the child's allowed zone then any time the child is outside of crib, an adult will take them to a random bed upon rescue (even if that bed is outside the allowed zone).
If pawn A needs rescue pawn B will first try to get them to the nearest medical bed or unowned bed if there is no medical bed available regardless of the allowed zone of pawn A, but your story lacks context and there have been bed assigning problems before (babies would be fed on random beds not in their assigned cribs) perhaps clarify the exact conditions.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMRandom adults, including men and pawns assigned to a no-drugs policy, will randomly take contraceptive.  This does not seem related to 'chemical fascination', it seems that just any adult will randomly take the contraceptive.
Should very much be related to chemical interest and fascination traits, both traits cause pawns to ignore drug policies "Will ignore drug policies for recreational drugs (i.e. all drugs except for penoxycyline and luciferium) regardless of chemical need. NOTE: The colonist will still respect allowed areas and will not use forbidden stacks of any drug regardless of chemical need"
and contraceptives have a minuscule (0.01) chemical value causing chemical cunts to take them. So unless non chemical traits pawns take them on their own its working as intended.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMUpon leaving the toddler stage at age 3 (they become a short pawn), the children can be assigned tasks (but cannot use weapons 'safely' (all weapons as far as I know)).  Unfortunately the new short child pawns do not display any skill levels.  I have to close out of the game and then load back in to the game again to see the traits in the bio.  Clearly this is a bug.
For the weapon part children (age <12) can safely use pistols or melee weapons. The no skill display is caused by the fact that the child gains a new backstory at the age of 3 which removes all the "incapable of" from baby and toddler stage backstories but rimworld was not made to handle changing backstories as without mods it shouldn't happen at all thus you will have to live with reloading upon children reaching the age of 3. this could be solved by instead of changing their backstory to giving the newborn children a hediff that dissappears after 3 years (10800000 ticks) and gets less severe over time (so it would incapacitate them until they reach 2 quadrums or crawling toddler stage whilst still keeping them from having any manipulation etc.)


Quote from: PlatanusO on January 10, 2021, 03:54:48 PMPawns capable of breastfeeding and assigned to childcare should prioritize breastfeeding immobile babies and not feed them regular food
Yes agreed + toddlers can still be breastfed so not just infants. This can for now be done by setting them to no food or drugs as ambrosia has nutrition value, this will cause lactating childcare and doctors to breastfeed them.


Quote from: PlatanusO on January 10, 2021, 03:54:48 PMToddlers in crawling stage should not be able to pick up food and feed themselves. This should require a 'take to bed and feed' from a pawn assigned to childcare
It was already patched that they would take meals to their inventory, but why wouldn't they be able to eat for themselves last time I looked they would simply eat the meal of the ground which is not outside a crawling toddler capabilities.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMAlthough toddlers can feed themselves, if an adult pawn with childcare abilities chooses to feed a walking stage toddler, they should be fed at a table and chair if possible, if not, they should be fed anywhere. Toddlers in walking stage should not be required to be taken to bed for an adult to feed them.
the only reason they are taken to their crib or bed for feeding is cause the feeding system is based on the feed patient system from rimworld itself.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMToddlers in crawling stage should not be able to clothe themselves, an adult pawn should need to clothe them in appropriate toddler clothes (the onesie and beanie).
there is no dressing mechanic in rimworld (there is a mod tho) and its not like toddlers being able to put on a beanie and onesie themselves should be a issue.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMAdult pawns with childcare assignments should be able to play with toddlers in either crawling or walking stage outside of the crib/bed.  I know that toddler pawns in both stages can play with each other or can relax socially if they have access to a chair and table with the 'gathering spot' option enabled, but the 'play with baby' should not require a crib at the toddler stage.  If this is implemented, I would remove the ability for the toddler pawn to relax socially from the crawling stage, as it is unrealistic that a crawling 6 to 18 month old would be able to converse in any meaningful way with adults.  I think relaxing socially is still acceptable for walking stage toddlers.
Same as with the feeding requires a bed CNP bases alot of its interactions on the feeding patients system and tragix meant to fix this eventually but he first wanted to make CNP play better with alien races first. Removing the socially relaxing from crawling toddlers would mean you either need to have a television for them to use or have your pawn play constantly with them and for my experience this is less then ideally working as they will only play with them until just above the recreation deprived limit causing childcare pawns to constantly run back and forth to play with them and why shouldn't a crawling toddler be able to "socialize" with other toddlers.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMWe need more descriptive help lists.  It is not clear what happens at what stage or how high a young child can train their skills to.
the skills part is based on their parents so if both parents had a 20 medical skill with burning passion at the time of the impregnation (the baby gets created at the moment of the impregnation) the chances of the baby having a burning passion in medical with level 10+ is very likely, there does need to be a list for traits they can still receive after their birth but even tragix did not knew this exactly saw him saying something about if they killed 50 animals before they hit 13 they would gain the psychopath trait at 13.

Quote from: PlatanusO on January 10, 2021, 03:54:48 PMThere should be an option to turn off children under a certain age appearing in raids and caravans.  I know on a rimworld, tribal cultures may encourage young children to fight, but this is too upsetting to some people and should be able to be turned off.
If somebody can't handle children fighting then perhaps dont use a mod that adds them to rimworld. There is a patch that makes pirate raids never spawn children can be found in the "Patches" folder you could replicate it for other factions as well I suppose.

I don't use the hygiene mod so cant really comment on that.
For now lets just hope tragix didn't die from corona or something.



Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on January 11, 2021, 12:43:52 AM
I am not going to respond to all points, but here are some key point responses:

QuoteShould very much be related to chemical interest and fascination traits, both traits cause pawns to ignore drug policies "Will ignore drug policies for recreational drugs (i.e. all drugs except for penoxycyline and luciferium) regardless of chemical need. NOTE: The colonist will still respect allowed areas and will not use forbidden stacks of any drug regardless of chemical need"
I literally have no pawns in my colony with these traits (lucky!).  I do have a 'stoner' trait pawn from the Vanilla Traits Expanded mod which may cause use (although it is technically supposed to be limited only to smokeleaf, but that could be a bug with that mod, not CNP), but I have seen pawns with no chemical related traits what-so-ever using the contraceptive on occasion (based on their health status).  I will take a screenshot next time I see a pawn with this inappropriate health status.

Quotebut why wouldn't they be able to eat for themselves last time I looked they would simply eat the meal of the ground which is not outside a crawling toddler capabilities.
I use rimfridge so crawling children are reaching into the fridge.  I guess it could makes sense in the vanilla 'eat off the floor' scenario if we assume that prepaired meals really have no kind of packaging...  However,  rim fridge is one of the most popular mods so there must be some way to stop them manipulating the refrigerator.  Additionally, I don't think a 6 month old could open a packaged survival meal on their own or a canned meal (again this would be from a mod).  I think you may overestimate the strength and dexterity of six month old babies just starting to crawl.

Quote
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMInfants (immobile stage) try to mediate and this takes them out of the crib and requires rescue.
Not CNP's fault and fixed if you use rimworld v1.2.2753.
I do use 1.2.2753 and I have still had this issue... I am just reporting the bugs that I have.  As for 'fault', obviously this isn't a CNP feature (the meditation that is), but, a patch could still be included in the CNP download.  Again, I will take screenshots if I see this again.

Quote
Quote from: Geese man on January 10, 2021, 11:14:28 PM
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMIf the designated crib is outside the child's allowed zone then any time the child is outside of crib, an adult will take them to a random bed upon rescue (even if that bed is outside the allowed zone).
Not CNP's fault and fixed if you use rimworld v1.2.2753.
In all cases, this bed reassignment came after being the baby started meditating and needed to be rescued, that is when it became reassigned to a new bed.  Additionally, the crib could not be immediately reassigned.  The incorrect bed first had to be unassigned from the baby before the crib could be assigned again. Clearly 'buggy' behavior and I suppose it must relate specifically to the meditation issue. Perhaps it is a relation to being in a crib outside of the baby's allowed zone, as I have only had this problem (both the meditation and bed reassignment issues) when the baby is in a crib outside of the allowed zone.

Quote
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMAlthough toddlers can feed themselves, if an adult pawn with childcare abilities chooses to feed a walking stage toddler, they should be fed at a table and chair if possible, if not, they should be fed anywhere. Toddlers in walking stage should not be required to be taken to bed for an adult to feed them.
the only reason they are taken to their crib or bed for feeding is cause the feeding system is based on the feed patient system from rimworld itself.
This is fine.  It may just be too difficult to change this in the code.  This is one of my lower tier gripes and I am fine leaving that feature 'as-is'.


Quote
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMUpon leaving the toddler stage at age 3 (they become a short pawn), the children can be assigned tasks (but cannot use weapons 'safely' (all weapons as far as I know)).  Unfortunately the new short child pawns do not display any skill levels.  I have to close out of the game and then load back in to the game again to see the traits in the bio.  Clearly this is a bug.
For the weapon part children (age <12) can safely use pistols or melee weapons. The no skill display is caused by the fact that the child gains a new backstory at the age of 3 which removes all the "incapable of" from baby and toddler stage backstories but rimworld was not made to handle changing backstories as without mods it shouldn't happen at all thus you will have to live with reloading upon children reaching the age of 3. this could be solved by instead of changing their backstory to giving the newborn children a hediff that dissappears after 3 years (10800000 ticks) and gets less severe over time (so it would incapacitate them until they reach 2 quadrums or crawling toddler stage whilst still keeping them from having any manipulation etc.)
I suspected this would be a difficult bug to tackle. There must be a work-around somehow and someone willing to work with me on this.

Quote
Quote from: PlatanusO on January 10, 2021, 03:54:48 PMToddlers in crawling stage should not be able to clothe themselves, an adult pawn should need to clothe them in appropriate toddler clothes (the onesie and beanie).
there is no dressing mechanic in rimworld (there is a mod tho) and its not like toddlers being able to put on a beanie and onesie themselves should be a issue.
I don't mean to be insulting here at all, but it is clear that you don't have or have not worked with children much.  The crawling stage in the game starts at 2 quadrums, equivalent to half a year or 6 months IRL.  This is realistic (at least for some children, crawling can start a bit latter but 6-8 months is typical).  Children IRL are typically not fully capable of dressing themselves until around the age of two or three.  There is no way on God's green earth a crawling 6 to 8 month old baby is going to be able to dress themselves, especially in a onsie.  It is utterly unrealistic.  Not saying this is something that would be easy to code, but it is something that is worth taking a shot at.  Maybe this won't be possible after all though.

Quote
For the weapon part children (age <12) can safely use pistols or melee weapons.
Being a proper gun-owning American I can assure you that a lot of 7 year olds can handle a rifle of small to moderate caliber just fine.  A handgun is actually much harder to control and most children cannot safely use a handgun.  Conversely, I can't imagine a 7 year old could effectively wield a steel mace (or a halberd if you are using other weapon mods like Vanilla weapons expanded), but a 7 year old should be able to wield a short bow (of lower draw weight) or use throwing rocks (again, Vanilla weapons expanded).  I am not sure the best way to go about this.  I will think on it.

Quote
If somebody can't handle children fighting then perhaps dont use a mod that adds them to rimworld. There is a patch that makes pirate raids never spawn children can be found in the "Patches" folder you could replicate it for other factions as well I suppose.
I personally don't care.  I fully would expect a privative tribe to use children in battle.  I just thought it would be a good feature to add if possible, however, you may have a very good point about just not adding children if someone doesn't like the idea of children fighting.  Therefore I rescind this suggestion.  Let us slaughter the child soldiers!

Quote
The no skill display is caused by the fact that the child gains a new backstory at the age of 3 which removes all the "incapable of" from baby and toddler stage backstories but rimworld was not made to handle changing backstories as without mods it shouldn't happen at all thus you will have to live with reloading upon children reaching the age of 3
This is a very inconvenient bug.  I really do think it would be worth the effort to try and find a work-around.  I think your hediff idea was much better.  Plus, this would make it easier to get compatibility with other mods like Dub's hygiene in which various hygiene features can be disabled based on particular pawn hediffs.  All in all, the hediff idea seems to be the right direction.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Geese man on January 11, 2021, 02:26:21 AM
Quote from: PlatanusO on January 11, 2021, 12:43:52 AMBeing a proper gun-owning American I can assure you that a lot of 7 year olds can handle a rifle of small to moderate caliber just fine.  A handgun is actually much harder to control and most children cannot safely use a handgun.  Conversely, I can't imagine a 7 year old could effectively wield a steel mace (or a halberd if you are using other weapon mods like Vanilla weapons expanded), but a 7 year old should be able to wield a short bow (of lower draw weight) or use throwing rocks (again, Vanilla weapons expanded).  I am not sure the best way to go about this.  I will think on it.
Quote from: PlatanusO on January 11, 2021, 12:43:52 AMI don't mean to be insulting here at all, but it is clear that you don't have or have not worked with children much.  The crawling stage in the game starts at 2 quadrums, equivalent to half a year or 6 months IRL.  This is realistic (at least for some children, crawling can start a bit latter but 6-8 months is typical).  Children IRL are typically not fully capable of dressing themselves until around the age of two or three.  There is no way on God's green earth a crawling 6 to 8 month old baby is going to be able to dress themselves, especially in a onsie.  It is utterly unrealistic.  Not saying this is something that would be easy to code, but it is something that is worth taking a shot at.  Maybe this won't be possible after all though.
Quote from: PlatanusO on January 11, 2021, 12:43:52 AMI use rimfridge so crawling children are reaching into the fridge.  I guess it could makes sense in the vanilla 'eat off the floor' scenario if we assume that prepaired meals really have no kind of packaging...  However,  rim fridge is one of the most popular mods so there must be some way to stop them manipulating the refrigerator.  Additionally, I don't think a 6 month old could open a packaged survival meal on their own or a canned meal (again this would be from a mod).  I think you may overestimate the strength and dexterity of six month old babies just starting to crawl.
First off you want realism tragix did not want too much of it
Quote from: Tragix on August 18, 2020, 11:19:39 AMMy goal is to be believable rather than realistic.
As for the guns what ever was used to make rifles "unsafe to use" could be extended to much more but mod weapons would need to be a separate patch (could potentially also be used for the packaged meals and canned food for that matter)

Non taken, as I said before tragix didn't want too much realism, It should be possible to code but there have been issues before of toddlers trying to put on adult clothing themselves resulting in a "clothing is too big for X" message spam and the toddler freezing in place until the clothes are picked up/hauled away.

So trying to prevent them from using fridges might result in some really fucky interactions as the rimfridge mod had to make prisoners be able to use fridges, which means the toddler might get counted as prisoner and even if they cant "reach in the fridge" they will still be able to eat something inside from the floor and trying to prevent that sounds pretty complicated.

Quote from: PlatanusO on January 11, 2021, 12:43:52 AMI do use 1.2.2753 and I have still had this issue... I am just reporting the bugs that I have.  As for 'fault', obviously this isn't a CNP feature (the meditation that is), but, a patch could still be included in the CNP download.  Again, I will take screenshots if I see this again.
Very strange I never had it happen after that update anymore not even with several pawn behavior influencing mods.

Quote from: PlatanusO on January 11, 2021, 12:43:52 AMIn all cases, this bed reassignment came after being the baby started meditating and needed to be rescued, that is when it became reassigned to a new bed.  Additionally, the crib could not be immediately reassigned.  The incorrect bed first had to be unassigned from the baby before the crib could be assigned again. Clearly 'buggy' behavior and I suppose it must relate specifically to the meditation issue. Perhaps it is a relation to being in a crib outside of the baby's allowed zone, as I have only had this problem (both the meditation and bed reassignment issues) when the baby is in a crib outside of the allowed zone.
I also think the issue might be in the fact that the current children backstory doesn't give any meditation type(s), tragix didn't have royalty as far as I know hence he couldn't have known.

Anyway if you want help with thinking of solutions just DM me I don't have any coding skills but I do understand the logic behind most of rimworld and this mod.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Katinka on January 11, 2021, 08:34:33 AM
HI

I am doing a German translation for the mod, can I send you the language folder or should I upload it as a translation mod?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jager666 on January 11, 2021, 01:01:57 PM
Quote from: PlatanusO on January 10, 2021, 03:54:48 PM
Quote from: jager666 on January 08, 2021, 04:23:53 PM
Looks like the mod is dead in the water again.

I mean the mod works, there are just some 'bugs'.  Also quite a few improvements that could be made.

Some of the things I thought were major bugs previously were not actually bugs just not really implimented.  There are a bunch of error messages in the logger, but most of these seem pretty harmless and meaningless.

The actual bugs (which do need to be fixed at top priority) I have found so far are:


  • Infants (immobile stage) try to mediate and this takes them out of the crib and requires rescue.
  • If the designated crib is outside the child's allowed zone then any time the child is outside of crib, an adult will take them to a random bed upon rescue (even if that bed is outside the allowed zone).
  • Random adults, including men and pawns assigned to a no-drugs policy, will randomly take contraceptive.  This does not seem related to 'chemical fascination', it seems that just any adult will randomly take the contraceptive.
  • Upon leaving the toddler stage at age 3 (they become a short pawn), the children can be assigned tasks (but cannot use weapons 'safely' (all weapons as far as I know)).  Unfortunately the new short child pawns do not display any skill levels.  I have to close out of the game and then load back in to the game again to see the traits in the bio.  Clearly this is a bug.

Here is a list of features I think really need to be implemented:

  • Pawns capable of breastfeeding and assigned to childcare should prioritize breastfeeding immobile babies and not feed them regular food
  • Toddlers in crawling stage should not be able to pick up food and feed themselves. This should require a 'take to bed and feed' from a pawn assigned to childcare
  • Although toddlers can feed themselves, if an adult pawn with childcare abilities chooses to feed a walking stage toddler, they should be fed at a table and chair if possible, if not, they should be fed anywhere. Toddlers in walking stage should not be required to be taken to bed for an adult to feed them.
  • Toddlers in crawling stage should not be able to clothe themselves, an adult pawn should need to clothe them in appropriate toddler clothes (the onesie and beanie).
  • Adult pawns with childcare assignments should be able to play with toddlers in either crawling or walking stage outside of the crib/bed.  I know that toddler pawns in both stages can play with each other or can relax socially if they have access to a chair and table with the 'gathering spot' option enabled, but the 'play with baby' should not require a crib at the toddler stage.  If this is implemented, I would remove the ability for the toddler pawn to relax socially from the crawling stage, as it is unrealistic that a crawling 6 to 18 month old would be able to converse in any meaningful way with adults.  I think relaxing socially is still acceptable for walking stage toddlers.
  • We need more descriptive help lists.  It is not clear what happens at what stage or how high a young child can train their skills to.
  • There should be an option to turn off children under a certain age appearing in raids and caravans.  I know on a rimworld, tribal cultures may encourage young children to fight, but this is too upsetting to some people and should be able to be turned off.

Here is a list of features I would like to see to have better compatibility with Dub's Hygiene mod, which I use.  Implementing these features will likely require work on both mods:

  • Immobile babies should not create bedpans.
  • Pawns assigned to childcare should be able to wash babies, it should not require doctoring to be assigned.
  • Crawling toddlers should not be able wash themselves.  I think it is okay for toddlers in walking stage to wash themselves, but crawling toddlers should create a childcare work driver for 'take to bed and wash', which must be done by an adult pawn assigned to childcare.
  • All baby stages, from immobile through walking toddler, should not use toilets.  Adult pawns assigned to childcare should have a 'take to bed and change diaper' Workdef.  Once a child reaches the age of three, they should start using toilets (I think doing a potty training thing would be way outside of the scope of the game so no need for that level of minutia)

Finally, at some point, I think it would be interesting to implement something along the lines of the old Children and School mod, but I don't think this ought to be a priority.  I have some C# knowledge, but I have been having trouble compiling my code so I really think someone with more advanced knowledge would need to help me make some of these fixes and changes.

I do agree that the mod works fine and it's perfectly playable, my main gripe is that there is some performance problems in the mod, adding up as the game goes, so besides the bugs You listed it would be nice to get fixed.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Waras on January 13, 2021, 09:41:38 AM
Ok, I asked this before and will ask this again, PLEASE BALANCE THIS MOD, I love this mod, I love women get pregnant, I love couples getting some results after got som' lovin' , this gives alternative ways of reproducing, not just recruiting prisoners or from events, I made customization to faster growth, just like animals do, just a little bit longer.

All I want is either reduce spawn rate of childs in Raids, Events, Caravans, Starting Randomizer, Etc, or give us more options in customizing all that. It really disbalance gameplay especially when playing hard modes, enemies come in with all children and get squashed like paper. thats no fun.

Oh and also please give us the option to remove cribs from game, a born child going strait into toddler is totally fine for me, less annoying, just like animals do, this is a game after all, not a real life, I don't have hundreds of years for this game.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on January 14, 2021, 08:54:45 PM
Now I am getting a pink square (no pixel art) for one of my children after shutting my computer down and loading the save again.  The hair also does not show up in the pawn picture at top of the screen for this child.  These are the log details:
Exception drawing Kiyoshi: System.ArgumentNullException: Value cannot be null.
Parameter name: source
  at (wrapper managed-to-native) UnityEngine.Material.CreateWithMaterial(UnityEngine.Material,UnityEngine.Material)
  at UnityEngine.Material..ctor (UnityEngine.Material source) [0x00007] in <5e1dfb686eb345078a588df96401afcc>:0
  at RimWorldChildren.GraphicsPreloader.AdjustMaterial (UnityEngine.Material mat, RimWorldChildren.LifecycleComp comp, Verse.Rot4 rot) [0x00000] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at RimWorldChildren.GraphicsPreloader.PreloadApparelGraphic (RimWorld.Apparel apparel, Verse.Pawn pawn) [0x0020a] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at RimWorldChildren.Children_Drawing.InitializeApparelDatabase (RimWorld.Apparel apparel, Verse.Pawn pawn) [0x0000f] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveApparelGraphics_Patch0(Verse.PawnGraphicSet)
  at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveAllGraphics_Patch3(Verse.PawnGraphicSet)
  at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc, Verse.RotDrawMode bodyDrawType, System.Boolean headStump, System.Boolean invisible) [0x0000d] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc) [0x0002b] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.Thing.Draw () [0x00007] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.ThingWithComps.Draw () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <d72310b4d8f64d25aee502792b58549f>:0
Verse.Log:Error(String, Boolean)
Verse.DynamicDrawManager:DrawDynamicThings()
Verse.Map:Verse.Map.MapUpdate_Patch1(Map)
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


A picture is attached.  I have tried re-loading the game session, restarts etc.  redownloading the mod etc.  Still won't load.  The pixel art of the other 3 children in my colony are all just fine and are at the same life stage.  No clue why it is just this one child.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jenivi7 on January 15, 2021, 12:49:17 AM
If it's just the one, he might be wearing something that's refusing to scale down.  Don't know why the game would suddenly refuse after reloading but it does that to me sometimes too!  Could be that an apparel mod updated.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Spa1ner on January 16, 2021, 09:42:49 AM
Hello

I was installing this mod, but I'm afraid with

QuoteAll I want is either reduce spawn rate of childs in Raids, Events, Caravans, Starting Randomizer, Etc, or give us more options in customizing all that. It really disbalance gameplay especially when playing hard modes, enemies come in with all children and get squashed like paper. thats no fun.

Is it fixed? Also I have prepare children and school, in that mod you can disable birth a preganant mode I dont want lost school funcionallity Can I play both mods? (I read the first post, but it's been a long time and I don't know the current state of compatibility)

Regards
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Canute on January 16, 2021, 10:25:23 AM
Hi,
maybe you should read the first page again !
QuoteChildren, School and Learning - Overrides pawn generation methods, breaking CNP birth. Hard incompatibility until patched.

Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Spa1ner on January 17, 2021, 08:10:15 PM
Yeah I know, for that reason I want to ask again, maybe it's not updated cause children and shool has the settings to disable all pregnancy system and birth. I think I was not an obvius question.

About the raids with many childs, is it frequental?

Thanks
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Katinka on January 22, 2021, 03:40:01 PM
There are a few children with every raid. From 10 raiders there are 1-2 children.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: greatorder on January 24, 2021, 12:27:16 PM
I've only got one problem with this, which is that the audio for the baby crying is way too long. It keeps crying some 8 seconds (I actually counted, I was wondering how long it lasted) after the issue's fixed, and with the cries being so frequent when they need something you wind up with multiple crying audios overlapping each other. I've had to turn them all the way down because it was beginning to irritate me.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on January 29, 2021, 02:17:39 PM
Quote from: Mistrornge on December 31, 2020, 03:23:10 PM
Super amazing mod.  Loving it.
Question... is there a way to adjust a race's pregnancy length and lifespan?  Not sure if this is the right mod to ask about this.
Lifespan is defined by the race def which is a vanilla feature. Pregnancy length IIRC is part of the lifecycle def added by this mod, and is configurable per race.

Quote from: jager666 on January 08, 2021, 04:23:53 PM
Looks like the mod is dead in the water again.
Yup. My free time bucket finally drained, and I do not have the time to work on this at the moment. Tends to come in cycles, so I expect to be back to development in a few months.

replies in red
Quote from: PlatanusO on January 10, 2021, 03:54:48 PM

I mean the mod works, there are just some 'bugs'.  Also quite a few improvements that could be made.

Some of the things I thought were major bugs previously were not actually bugs just not really implimented.  There are a bunch of error messages in the logger, but most of these seem pretty harmless and meaningless.

The actual bugs (which do need to be fixed at top priority) I have found so far are:


  • Infants (immobile stage) try to mediate and this takes them out of the crib and requires rescue.
  • If the designated crib is outside the child's allowed zone then any time the child is outside of crib, an adult will take them to a random bed upon rescue (even if that bed is outside the allowed zone). This actually isn't a bug - it's how all pawns are carried to bed. If a crib cant be found in the allowed zone, it will fall back to the next "best" bed.
  • Random adults, including men and pawns assigned to a no-drugs policy, will randomly take contraceptive.  This does not seem related to 'chemical fascination', it seems that just any adult will randomly take the contraceptive. I haven't revisited contraceptives yet. If I had to guess, there is a difference between "medicine" and recreational drugs, so they are probably taking it as if it were a beer.
  • Upon leaving the toddler stage at age 3 (they become a short pawn), the children can be assigned tasks (but cannot use weapons 'safely' (all weapons as far as I know)).  Unfortunately the new short child pawns do not display any skill levels.  I have to close out of the game and then load back in to the game again to see the traits in the bio.  Clearly this is a bug. It is a bug, and will probably never be fixed. The skill list is blank because as a toddler those skills are disabled, and disabled work types are calculated on game start. I have some theories on how to work around this, but they most involve patching startup methods that probably won't work well.  

Here is a list of features I think really need to be implemented:

  • Pawns capable of breastfeeding and assigned to childcare should prioritize breastfeeding immobile babies and not feed them regular food. True. I haven't looked at breast feeding much either, but I imagine it has a low priority. That and if a pawn isnt a caretaker, they probably wont do it at all.
  • Toddlers in crawling stage should not be able to pick up food and feed themselves. This should require a 'take to bed and feed' from a pawn assigned to childcare I don't understand the justification for this one. Every toddler I've ever met has been very eager to eat anything lying on the ground, and it's one of the first abilities humans develop.
  • Although toddlers can feed themselves, if an adult pawn with childcare abilities chooses to feed a walking stage toddler, they should be fed at a table and chair if possible, if not, they should be fed anywhere. Toddlers in walking stage should not be required to be taken to bed for an adult to feed them.
  • Toddlers in crawling stage should not be able to clothe themselves, an adult pawn should need to clothe them in appropriate toddler clothes (the onesie and beanie).
  • Adult pawns with childcare assignments should be able to play with toddlers in either crawling or walking stage outside of the crib/bed.  I know that toddler pawns in both stages can play with each other or can relax socially if they have access to a chair and table with the 'gathering spot' option enabled, but the 'play with baby' should not require a crib at the toddler stage.  If this is implemented, I would remove the ability for the toddler pawn to relax socially from the crawling stage, as it is unrealistic that a crawling 6 to 18 month old would be able to converse in any meaningful way with adults.  I think relaxing socially is still acceptable for walking stage toddlers.
  • We need more descriptive help lists.  It is not clear what happens at what stage or how high a young child can train their skills to.
  • There should be an option to turn off children under a certain age appearing in raids and caravans.  I know on a rimworld, tribal cultures may encourage young children to fight, but this is too upsetting to some people and should be able to be turned off.

Here is a list of features I would like to see to have better compatibility with Dub's Hygiene mod, which I use.  Implementing these features will likely require work on both mods:

  • Immobile babies should not create bedpans.
  • Pawns assigned to childcare should be able to wash babies, it should not require doctoring to be assigned.
  • Crawling toddlers should not be able wash themselves.  I think it is okay for toddlers in walking stage to wash themselves, but crawling toddlers should create a childcare work driver for 'take to bed and wash', which must be done by an adult pawn assigned to childcare.
  • All baby stages, from immobile through walking toddler, should not use toilets.  Adult pawns assigned to childcare should have a 'take to bed and change diaper' Workdef.  Once a child reaches the age of three, they should start using toilets (I think doing a potty training thing would be way outside of the scope of the game so no need for that level of minutia)
At this point, there is no integration of that level planned with Bad Hygiene. The most I could speculate is that CNP will eventually attempt to accomodate the features of BH up to the point that BH features should work for any generic pawn. Meaning, as long as babies and toddlers can drink, relieve themselves, and bathe (whether via doctoring or on their own) I will consider it sufficient. The code is open source per the license agreement, so I will leave it to future modders to worry about mod integration.

Finally, at some point, I think it would be interesting to implement something along the lines of the old Children and School mod, but I don't think this ought to be a priority.  I have some C# knowledge, but I have been having trouble compiling my code so I really think someone with more advanced knowledge would need to help me make some of these fixes and changes.
This was loosely planned as a spin off mod separate from CNP. Basically allowing mentorships, children following their parents or mentors, hierarchies of skill activation, school. This is just a messy page in my notebook because CNP itself (in its current iteration) still has too many complex problems for me to deal with.
Er, now that I see Geese Man's reply, pretty much spot on.
Regarding children in raids - I would like to adjust this some. I'm, not sure if there is an easy way to differentiate between a group of visitors and a group of raiders. My view of Rimworld might be a bit more brutalistic than others. At a minimum, I would say that anyone who cannot handle the idea of a virtual child dying or being murdered should not use this mod at all. I can see myself adding some levers for things like raiders (pawns will already now avoid targetting a hostile toddler) but I'll never put in any code that makes children immune to the woes of Rimworld.
One of my favorite stories to tell is how the toddler of one of my colonists got wasted on a bottle of whiskey, attacked his mom and got a pickaxe through the chest. It's not quite intended, but it's gonna happen - it's Rimworld.

Quote from: Geese man on January 10, 2021, 11:14:28 PM

For now lets just hope tragix didn't die from corona or something.
Not yet, sadly. Working on my day job, other hobbies, and a side project or two. Financial woes are the cherry on top.

Quote from: PlatanusO on January 11, 2021, 12:43:52 AM
I am not going to respond to all points, but here are some key point responses:

<snip>
This post was a maze of embedded quotes, so to summarize:
CNPs ages shouldn't be thought of as a direct interpretation of actual age ranges. At best, they are a compromise between playability and believability. It is realistic that a baby would be a toddler for 12-16 quadrums. It is believable that a pawn is a toddler for some part of their life (at all.) But the actual age ranges are really only loose, so I wouldn't think about it too hard.
A lot of your suggested tweaks seem to fall into the "immersion" category, which I'm not at all against. I bit off way more than I could chew when I took up this mod, and have mostly set my tenets as:
Believable, but not realistic
Functional and stable, but not ambitious

So while I agree with you on most of the suggested features, I simply can't afford to direct my time to them while the "functional and stable" part is a disaster.

For weapons, Rimworld does not provide a lot of foot holds to make restrictions on a broad category. I believe we use the weapon's weight or size to determine if they can use it or not. We have to try to make a restriction based on something other than a full whitelist or blacklist, which doesn't leave a lot of options.

Quote from: Katinka on January 11, 2021, 08:34:33 AM
HI

I am doing a German translation for the mod, can I send you the language folder or should I upload it as a translation mod?
Please upload all translation files as a separate mod. The language files in CNP are a mess right now, and I expect that they will simply be removed in the future. Rimworld has features such that a language patch only modifies the language files, so the actual assembly does not need to be packaged with it.

Quote from: Waras on January 13, 2021, 09:41:38 AM
Ok, I asked this before and will ask this again, PLEASE BALANCE THIS MOD, I love this mod, I love women get pregnant, I love couples getting some results after got som' lovin' , this gives alternative ways of reproducing, not just recruiting prisoners or from events, I made customization to faster growth, just like animals do, just a little bit longer.

All I want is either reduce spawn rate of childs in Raids, Events, Caravans, Starting Randomizer, Etc, or give us more options in customizing all that. It really disbalance gameplay especially when playing hard modes, enemies come in with all children and get squashed like paper. thats no fun.

Oh and also please give us the option to remove cribs from game, a born child going strait into toddler is totally fine for me, less annoying, just like animals do, this is a game after all, not a real life, I don't have hundreds of years for this game.
How many children are showing up in your raids? My testing only ever showed 2-3 per 100 visitors. Child ages are subject to the race though, so if you had a race with a 100 year long child stage, they would be very abundant.
You can set lifecycle speed per stage, so I would suggest setting the baby stage to max. At this time, there is no plan to allow skipped stages.

Quote from: PlatanusO on January 14, 2021, 08:54:45 PM
Now I am getting a pink square (no pixel art) for one of my children after shutting my computer down and loading the save again.  The hair also does not show up in the pawn picture at top of the screen for this child.  These are the log details:
A picture is attached.  I have tried re-loading the game session, restarts etc.  redownloading the mod etc.  Still won't load.  The pixel art of the other 3 children in my colony are all just fine and are at the same life stage.  No clue why it is just this one child.
This is the largest outstanding bug, and I have had difficulty in tracking down every cause. We attempt to scale graphics according to the scaling rules when a toddler or child wears it. With Rimworld's recent overhaul to rendering, that logic has become increasingly convoluted, with rendering for every possible  piece of clothing, hair, body, and face all being piled into one big plate of conditionals.
I'll need to know the race and age of your kid, the exact piece of equipment (preferably the defname) and the mods that the race and equipment came from. No promises on timeline, due to aforementioned time constraints.

Quote from: Spa1ner on January 16, 2021, 09:42:49 AM
Hello

I was installing this mod, but I'm afraid with

QuoteAll I want is either reduce spawn rate of childs in Raids, Events, Caravans, Starting Randomizer, Etc, or give us more options in customizing all that. It really disbalance gameplay especially when playing hard modes, enemies come in with all children and get squashed like paper. thats no fun.

Is it fixed? Also I have prepare children and school, in that mod you can disable birth a preganant mode I dont want lost school funcionallity Can I play both mods? (I read the first post, but it's been a long time and I don't know the current state of compatibility)

Regards

Children and Pregnancy is not compatible with other mods that add children or override lifecycle and aging. The current list of hard incompatibilities is on the OP. No support will ever be provided for these mods.


Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: PlatanusO on February 09, 2021, 11:20:50 AM
Good response.  The pink square issue I had was due to one of the children aging up from toddler to child stage, but for whatever reason this pawn did not take the toddler clothes off which seemed to trigger the pink square.  Other pawns in the past had automatically taken the toddler clothes off at that stage transition (even when the onesie and beanie were forced wear).  I think I may have saved the game at the precise moment of the pawn changing from toddler to child and that may have triggered the issue?

Anyway.  I do get the whole balance of playability and realism aspect.  I think after playing with the mod more I am okay with some of the silly bits of slightly unrealistic abilities at a given age.  I also totally appreciate the difficulties of the weapons interactions (I have been doing some small personal mods for myself since and have realized some of this stuff is pretty hard to plug into).

I think the main area that could really be improved would be switching the child stage limitations over to a hediff.  That way there would be no need to reload a session when a pawn transitions from crawling toddler to a short child pawn.  Additionally, hediffs are much easier to get to interact with other mods, likes Dub's hygiene which already can have settings that can be adjusted by hediff.  For instance, you could turn off hygiene and bathroom needs based on an 'infant' or 'toddler' hediff so toddlers wouldn't keep trying to shower or take a bath by themselves.  Then it would be easy for someone (me) to make a replacement 'take to bed and change diaper' and 'take to bed and wash' action in CNP for realism/difficulty/complexity in that aspect if I wanted.

I may make an attempt at the hediff myself at some point.  I too am very busy though so it might be a bit.

Edit: There is also a bug I came across where sometimes a toddler can be breastfed and sometimes in can only be fed normal meals.  I am not sure if breastfeeding is supposed to be an option for the crawling toddler stage or not, but the inconsistency seems like a possible bug.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: eadras on February 09, 2021, 12:44:36 PM
I also encountered the pink square graphic bug. I couldn't fix it in dev mode, so I opened the save file and found the pawn. Turns out a beanie was stuck on the child, but not showing up in game. Removing it in the save file fixed the bug.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: peppybojagger on February 14, 2021, 05:19:08 PM
The pink square bug seems to affect different clothing (shirts and top layer, pants aren't affected) randomly upon load. For example, all the children with muffalo wool clothing will have the pink square. On another load, it's children with alpaca and sheep wool clothes. Seems to be random every time.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: jkelley2 on February 18, 2021, 01:40:19 PM
ok im having a bit of log spam and cant tell what its from but i "think" its from this this just gets endlessly spammed in my log till the message cap is reached Exception drawing Lerbai: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.AlienRaces_DrawAddons_Patch.ModifyScale (Verse.Graphic graphic, Verse.Pawn pawn, Verse.Rot4 rotation, System.Object addon) [0x0002c] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at (wrapper dynamic-method) AlienRace.HarmonyPatches.AlienRace.HarmonyPatches.DrawAddons_Patch0(bool,UnityEngine.Vector3,Verse.Pawn,UnityEngine.Quaternion,Verse.Rot4,bool)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch5(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.Rot4,Verse.RotDrawMode,bool,bool,bool)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch4(Verse.PawnRenderer,UnityEngine.Vector3,Verse.RotDrawMode,bool,bool)
  at Verse.PawnRenderer.RenderPawnAt (UnityEngine.Vector3 drawLoc) [0x0002b] in <c36f9493c9844ddaa7fb5c788416098f>:0
  at Verse.Pawn_DrawTracker.DrawAt (UnityEngine.Vector3 loc) [0x00000] in <c36f9493c9844ddaa7fb5c788416098f>:0
  at Verse.Pawn.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x00006] in <c36f9493c9844ddaa7fb5c788416098f>:0
  at Verse.Thing.Draw () [0x00007] in <c36f9493c9844ddaa7fb5c788416098f>:0
  at Verse.ThingWithComps.Draw () [0x00000] in <c36f9493c9844ddaa7fb5c788416098f>:0
  at (wrapper dynamic-method) Verse.DynamicDrawManager.Verse.DynamicDrawManager.DrawDynamicThings_Patch1(Verse.DynamicDrawManager)
Verse.Log:Verse.Log.Error_Patch1(String, Boolean)
Verse.DynamicDrawManager:Verse.DynamicDrawManager.DrawDynamicThings_Patch1(DynamicDrawManager)
Verse.Map:Verse.Map.MapUpdate_Patch2(Map)
Verse.Game:UpdatePlay()
Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)


the RimworldChildren makes me think its from this but i could be wrong, ive already made sure the race mods i have installed are updated as is Humanoid Alien Races as is this CnP

Edit: after talking with some more knowledge able people they say its an issue between CnP and Thrumboian Race mod and that your only reducing the body size not the size of the addons like Horn and Tail
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Zylle on February 21, 2021, 01:05:03 PM
Quote from: Tragix on January 29, 2021, 02:17:39 PM
This is the largest outstanding bug, and I have had difficulty in tracking down every cause. We attempt to scale graphics according to the scaling rules when a toddler or child wears it. With Rimworld's recent overhaul to rendering, that logic has become increasingly convoluted, with rendering for every possible  piece of clothing, hair, body, and face all being piled into one big plate of conditionals.
I'll need to know the race and age of your kid, the exact piece of equipment (preferably the defname) and the mods that the race and equipment came from. No promises on timeline, due to aforementioned time constraints.

Pink square bug report, if it helps you track it down: A 14 year old human visited my colony (Hospitality), purchased a onesie and equipped it, resulting in a pink square.

Last error looks like the only relevant one: https://pastebin.com/1yRTrrEu
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jovzin on March 09, 2021, 05:58:06 AM
For me that pink bug is OK.  I am living with it since version 1.0 and it will get away once the baby gets to next stage.
But somehow I do not know what happened but for me now the baby is born and looks like an adult not as small baby as it was when I was playing my 1.1.2654 game version.
I am now on new game with new version 1.2.2753  and somehow the baby is born as adult with 0 age... 
Below is my mods files in attachment.

EDIT: 
Can maybe this be part of my  issue ? This I found in log :
Possible typo: BodyTypeDef. Using def type name not preceded by "Of"
Verse.Log:Warning(String, Boolean)
RimWorld.DefOfHelper:EnsureInitializedInCtor(Type)
RimWorldChildren.ChildBodyTypeDefOf:.cctor()
System.Reflection.MonoField:SetValueInternal(FieldInfo, Object, Object)
System.Reflection.MonoField:SetValue(Object, Object, BindingFlags, Binder, CultureInfo)
System.Reflection.FieldInfo:SetValue(Object, Object)
RimWorld.DefOfHelper:BindDefsFor(Type)
RimWorld.DefOfHelper:RebindAllDefOfs(Boolean)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()



EDIT2 :  So I read through last 15 pages. Looks like the Facial Stuff is doing this and putting the body of an adult above the baby body from CnP mod ?   That some patches checks are no longer working ?  Bcs in my 1.1 version of game I remember all was working well.     Crap hope there will be some patch or something that will make it work again. I remember from that 1.1 version of game, that the baby and toddler bodies did not have the hands and feet, even the teenager body was without those but it was working and they were not looking like an adult when born...
And what about the Facial Animation does this work with CnL ?   

EDIT3:  I just tested via dev menu option. I tried to do give birth and yeah I saw a baby body with a head of a adult body on it together with hands and feet. And as somebody already mentioned (a few pages back) the baby was trying to move but the hands and feet was not moving at all.  So looks like it is really Facial Stuff rendering the adult body over the baby body from CnL :(   hope there will be some fix please.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Jovzin on March 10, 2021, 04:10:37 AM
Ok another edit after some testing and other stuff.
So it is interesting and I do not know why the author of Facial Stuff  did what he did.  He removed a few lines of code ( but added support for CSL ) that was working with Children and Pregnancy mod.   
I see he removed a line that one guy mentioned on Steam page for Facial stuff mod.  But on top of that he removed a few more lines of code that were working for kids.   I was lucky enough that I had some older version of Facial stuff mod before he removed those lines of code. I decompile both of those version of dll ( the latest one and the one I had from beggining of 2020 ) and compare them in WinMerge program.     
Now I added the lines that he removed back and edited them a bit so it should work with the latest dll but somehow the Visual Studio 2019 will not compile the dll due to like 1000 errors in the code. I must say I do not know how he did it that he was able to compile the dll with so much errors.

Anyway in the game if I replace the assemblies folder with the Assemblies folder from previous version of his mod the kids are working fine and they do not have the big adult heads and hands and feet.   
So this is a bit strange. Like somebody mentioned on Steam Facial  stuff page , looks like the author of the Facial stuff mod got fed up with mods that are handling the Children and pregnancy ???   Well than why he added the CSL mod support to his code but removed the CNP support ? 

Anyway right now the old dll is working for me and I have a normal kids with normal heads like it was working in 1.1.2654 game version. 
I am trying to somehow compile the dll  in Visual Studio 2019 community version but somehow it is not working due to a lot of errors that looks like were already there before I decompile the dll and edited it. 


PS: I am not a programmer guy. I am just a humble Network Engineer guy with a bit of knowledge of python due to working with Autodesk Maya a lot :)  ( hobby is 3d modelling of some static objects ) 
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Wolkeo on March 30, 2021, 08:18:11 AM
Hi i have trouble with the mod what the hack i think this two mods are incompatible i have this error in the log i try to pick up a mech and it not work and the error come i turn out the children and pregnacy mod it works and i can pick up the mech somone have a selution ?

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.WorkGiver_TakeBabyToCrib.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x0001e] in <1f5f58e363274a8aa94d1c13877805a5>:0
  at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders_NewTmp (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x0019d] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00084] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.ChoicesAtFor_Patch2(UnityEngine.Vector3,Verse.Pawn)
  at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x00056] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) RimWorld.Selector.RimWorld.Selector.HandleMapClicks_Patch1(RimWorld.Selector)
  at RimWorld.Selector.SelectorOnGUI () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <d72310b4d8f64d25aee502792b58549f>:0
  at RimWorld.UIRoot_Play.UIRootOnGUI () [0x000d3] in <d72310b4d8f64d25aee502792b58549f>:0
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
Verse.Log:Error(String, Boolean)
Verse.Root:Verse.Root.OnGUI_Patch1(Root)
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Canute on March 30, 2021, 08:24:31 AM
WorkGiver_TakeBabyToCrib,
does the pawn want to take the mech to the crib ? :-)

The first try should be to move CnP around at the modlist.
At first at the end of the list and if that don't change anything, nearly on top.

But beside that, the error don't give any hint about another mod (or i don't see any).
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Wolkeo on March 30, 2021, 09:03:59 AM
i have try to move the mod or the other mod it not working
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Makedar on April 01, 2021, 10:28:01 AM
Hello, who can help me with it. Looks strange, because I`ve download this mod in acrhive from GitHub
Logs - https://gist.github.com/e49ea5d0752642636b44a78a85d5e2fe
Screenshots -chttps://ibb.co/1bzBVJL https://ibb.co/YfhymPk

and pawns dont do the Lovin' action in one bed
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: TheLlamacorn on April 04, 2021, 11:18:52 AM
Hi! I recently downloaded this mod along with a few others and started a new save. After a few weeks in-game, two of my colonists (male and female) became a couple, so I made a double bedroll for them to sleep in. They make love like 2 times a night almost every night and have been doing so for ~7 in-game days now, yet the girl still hasn't gotten pregnant (I checked in developer mode). The girl is 23 and the guy is 20, neither is taking contraceptives, and I don't have any other mods that would interfere with this one. I feel like she should've gotten pregnant by this point, but she hasn't, what could I be doing wrong? FYI I'm pretty new to rimworld and using mods in rimworld, but I read carefully about every mod I add to make sure I don't do anything wrong. Hopefully, someone can help me with this, thanks in advance! :)

Edit: I think I found the problem! If the couple is sleeping in the same room as other people, it seems like the girl won't get pregnant. When they're in a separate room it works though. I assume this is unintended, but qt least now I know how to make I work.

Edit 2: Nevermind, that only seemed to be the case when I tested it in a new save file, the couple in my main save still can't get pregnant, even when I give them a separate room... I really have no idea what it could be at this point, it seems to only be an issue with these two colonists.

Edit 3: I suspect it has something to do with the custom scenario I made, it seems like it works fine if I use another scenario. I did disable a lot of events in the scenario I made, but nothing that I would imagine would prevent pregnancy. I will have to test a bit more to see what is stopping them from getting pregnant.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: KozmoD on April 09, 2021, 05:23:40 PM
So Ive been off Rimworld for a while. Im back at playing the game and CnP is essential IMO. I would like to ask, how is this mod going? Is it buggy?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Waras on April 24, 2021, 03:28:46 AM
Quote from: Tragix on January 29, 2021, 02:17:39 PM
How many children are showing up in your raids? My testing only ever showed 2-3 per 100 visitors. Child ages are subject to the race though, so if you had a race with a 100 year long child stage, they would be very abundant.
You can set lifecycle speed per stage, so I would suggest setting the baby stage to max. At this time, there is no plan to allow skipped stages.
Thank you for replying to everyone xD, I have had around 20 ppl raids and like 8 of them there children, you know how Rngesus likes to toy with u, they carry melee weapons or none at all and rush in to their death like meatshield then the rest of the raid is ranged, but yea its not always some other playthroughs I had 2-3 children per raid. Still at least option to configure that would be nice.

Anyways this is totally playable mod with few bugs, but I dont mind them, like too loud crying or pink squares, compatibility with other mods are pretty good, there are some errors with spawning don't remember where exactly, but nothing gamebreaking, obviously incompatible with other children mods.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: DDTShallong on May 04, 2021, 11:10:49 AM
sorry about my poor English
i met a question when i dress the baby with lightleather onesie, and there's a purple square shown on the baby.

here's the log:
Failed to find any textures at Things/Apparel/Onesie_Newborn while constructing Multi(initPath=Things/Apparel/Onesie_Newborn, color=RGBA(0.545, 0.329, 0.137, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))

and i can't find any onesie_newborn file in texture/things/apparel folder, there's only beanie_toddler and onesie_toddler files.
installed v3.5.3 donwloaded on gitlab
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: Fester803 on May 11, 2021, 10:04:39 PM
I'm having issues with v3.5.2.  My pawns are getting pregnant but are not birthing any newborns.  The pawn that gave birth still has the "new mother" mood buff and lactating. I uninstalled all mods and reinstalled the game and have run it with only Core, Royalty, Harmony, Hugslib, Children and Pregnancy, and Character Editor being used.
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: RibDibbington on May 30, 2021, 06:28:02 PM
Does C&P forcibly prevent new pregnancies above a certain colony size? I haven't had any children in at least three in-game years. Bugs with MedPods notwithstanding (it considers all children to be a disease and erases them if the mother hops in one, so I have to constantly watch my pregnant women because they'll jump in for JUST their pregnancy), and there've been a few updates to Rimworld and C&P since I started playing... But only my existing children, from long enough ago that I don't remember what changed or when. Marriages still happen (five recently), and they still have sex (I think), but zero children. Can't explain it, and I don't know where to start. Thanks.

EDIT: Just remembered; I've always had population size set to zero, so it shouldn't be artificially restricting from the user options. Could another mod be interfering with that setting (seems like it would be a custom variable that only C&P can see) and thereby preventing new pregnancies?
Title: Re: [1.2] Children and Pregnancy - v3.5.2
Post by: GhostData on June 22, 2021, 10:54:13 PM
Quote from: Zylle on February 21, 2021, 01:05:03 PM
Pink square bug report, if it helps you track it down: A 14 year old human visited my colony (Hospitality), purchased a onesie and equipped it, resulting in a pink square.

Last error looks like the only relevant one: https://pastebin.com/1yRTrrEu
That will be a compatibility issue on Hospitality's side, as it determines who buys what. It would need logic to respect CNP's component age restrictions. Possible there may be another check I need to patch as well.

Quote from: Jovzin on March 09, 2021, 05:58:06 AM
*snip* So looks like it is really Facial Stuff rendering the adult body over the baby body from CnL :(   hope there will be some fix please.
No plans at the moment to work on compatibility with Facial Stuff. Both mods require extensive rendering changes, and these core mods like Alien Races and Facial Stuff do not provide any API to integrate with their code, making "compatibility patching" an exercise in insanity trying to patch their patches with reflection. I make an exception for Alien Races because i consider it one of the few mods that are essential core mods for any load order. These mods would make it infinitely easier to integrate my simply exposing some levers (such as an additionalOffset field for AlienRace body addons.)

Quote from: TheLlamacorn on April 04, 2021, 11:18:52 AM
Hi! I recently downloaded this mod along with a few others and started a new save. After a few weeks in-game, two of my colonists (male and female) became a couple, so I made a double bedroll for them to sleep in. They make love like 2 times a night almost every night and have been doing so for ~7 in-game days now, yet the girl still hasn't gotten pregnant (I checked in developer mode). The girl is 23 and the guy is 20, neither is taking contraceptives, and I don't have any other mods that would interfere with this one. I feel like she should've gotten pregnant by this point, but she hasn't, what could I be doing wrong? FYI I'm pretty new to rimworld and using mods in rimworld, but I read carefully about every mod I add to make sure I don't do anything wrong. Hopefully, someone can help me with this, thanks in advance! :)

Edit: I think I found the problem! If the couple is sleeping in the same room as other people, it seems like the girl won't get pregnant. When they're in a separate room it works though. I assume this is unintended, but qt least now I know how to make I work.

Edit 2: Nevermind, that only seemed to be the case when I tested it in a new save file, the couple in my main save still can't get pregnant, even when I give them a separate room... I really have no idea what it could be at this point, it seems to only be an issue with these two colonists.

Edit 3: I suspect it has something to do with the custom scenario I made, it seems like it works fine if I use another scenario. I did disable a lot of events in the scenario I made, but nothing that I would imagine would prevent pregnancy. I will have to test a bit more to see what is stopping them from getting pregnant.
There are a few factors that go in to determining if a pregnancy happens. It's pretty primitive right now, IIRC. Most important is age - 25 and below is generally 100%, 50 and above is 0. There is a baby cap in the settings - this includes all colonists. If either pawn is sterile or on contraceptives, they can't have baby. If the mother is of a race that has pregnancy disabled, she can't make baby.
Hard to say what is preventing baby in your save. There are also some other mods that explicitly target CNP's baby making code and snip it so it doesn't work.

Quote from: KozmoD on April 09, 2021, 05:23:40 PM
So Ive been off Rimworld for a while. Im back at playing the game and CnP is essential IMO. I would like to ask, how is this mod going? Is it buggy?
Development is stagnant and there are still functional bugs here and there.

Quote from: DDTShallong on May 04, 2021, 11:10:49 AM
sorry about my poor English
i met a question when i dress the baby with lightleather onesie, and there's a purple square shown on the baby.

here's the log:
Failed to find any textures at Things/Apparel/Onesie_Newborn while constructing Multi(initPath=Things/Apparel/Onesie_Newborn, color=RGBA(0.545, 0.329, 0.137, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))

and i can't find any onesie_newborn file in texture/things/apparel folder, there's only beanie_toddler and onesie_toddler files.
installed v3.5.3 donwloaded on gitlab
Onesies and baby beanies are toddler clothes. Infant's have no clothing at the moment. Not sure how you equipped the item to be honest.

Quote from: RibDibbington on May 30, 2021, 06:28:02 PM
Does C&P forcibly prevent new pregnancies above a certain colony size? I haven't had any children in at least three in-game years. Bugs with MedPods notwithstanding (it considers all children to be a disease and erases them if the mother hops in one, so I have to constantly watch my pregnant women because they'll jump in for JUST their pregnancy), and there've been a few updates to Rimworld and C&P since I started playing... But only my existing children, from long enough ago that I don't remember what changed or when. Marriages still happen (five recently), and they still have sex (I think), but zero children. Can't explain it, and I don't know where to start. Thanks.

EDIT: Just remembered; I've always had population size set to zero, so it shouldn't be artificially restricting from the user options. Could another mod be interfering with that setting (seems like it would be a custom variable that only C&P can see) and thereby preventing new pregnancies?
There's a setting, but if it's zero it doesn't apply.There may be checks in Rimworld itself that prevents new pawns from being created, or another mod may be blocking the pregnancy code.
As for med pods, I tested this with the latest branch. With only pregnancy, my pawns did not hop in. If they had another reason (carcinoma) to hop in, the med pod removes the pregnancy as well. I consider this a defect with the med pod mod, as we are using the isBad tag to flag the hediff properly.

3.5.4 released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v3.5.4

This removes all translation files, as they aren't even being properly maintained in the first place. As recent Rimworld updates have made it easier, it's now expected that individuals who want to maintain a translation for CNP will do so in their own addon mod. Anyone interested in using the questionable language files that were deleted may find them in the git history.
Toddlers aging to children will now drop their toddler-only gear to prevent render issues. This will also trigger an optimization pass for gear, so they should seek out new equipment.
Upon aging up to a life stage that does not disable work types, the newly enabled work types will now be enabled in the work priority manager without having to save and reload.
The patches for Alien Races have been updated for the most recent release.
Title: Re: [1.2] Children and Pregnancy - v3.5.4
Post by: GhostData on June 27, 2021, 12:33:30 AM
4.0.0 - Experimental - Released
4.0.0 should be save compatible - be sure to take a back up and delete the entire 3.x.x folder when installing. Def changes will require changes to any custom patches people are using.
This release adds a new alternative rendering scheme for unsupported races that do not have their own def files. This works by bypassing the normal CNP rendering changes in favor of a simple scaling scheme instead. I believe some similar mods handle races this way as well. Babies will still look like little burritos, but toddlers and children will look like scaled-down adults instead.
Presently, this will disable the beanie and onesie for those races due to not being able to provide graphics.
This has only been tested with a handful of random races.
This is an experimental release - I don't know exactly how stable it is with other races. If you're not comfortable testing a half-baked caffeine fueled mess, maybe give this release a pass until reports come in.

I also want to go on record by saying that 20 minutes of coding in HAR to add a "additionalOffsets" parameter and API would have saved like 10 hours head bashing trying to patch internal anonymous methods in the DrawAddons method.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: WalkingProblem on June 27, 2021, 10:31:56 AM
Hihi~

Quick question. Does this mod introduce pregnancy for humans only, or also for races from the alien humanoid framework?
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: GhostData on June 27, 2021, 06:07:35 PM
Quote from: WalkingProblem on June 27, 2021, 10:31:56 AM
Hihi~

Quick question. Does this mod introduce pregnancy for humans only, or also for races from the alien humanoid framework?
Both. Alien races may have to be turned on in the settings if they don't have a settings file. Better support requires a custom made definition that tells cnp how to render the race.

v4.0.1 released - just a quick bug fix for playwithbaby work giver
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.0.1


v4.0.2 released - Hotfix for alignment issue
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.0.2
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: lexal4 on July 15, 2021, 07:31:35 PM
obligatory "will-it-be-updated-to-1.3" post
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: GhostData on July 15, 2021, 08:59:34 PM
Quote from: lexal4 on July 15, 2021, 07:31:35 PM
obligatory "will-it-be-updated-to-1.3" post
Soon, maybe. I heard this update changes up rendering heavily and may not be done with development. I'll give it a bit to stabilize and then update my patches.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: SVarenga on July 17, 2021, 04:20:11 PM
tragix, i don't know if this help you, but ludeon posted this https://store.steampowered.com/news/app/294100/view/5512953038607155444
it's about updating mods for 1.3
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: vandal on July 20, 2021, 03:08:52 PM
how stable is it now? i seem to recall c n p mod being a patchwork before
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: Hausi on July 21, 2021, 05:10:53 AM
I hope it will be updated to 1.3 soon! While you're at it updating the mod, can you also please fix Buildings_Crib.xml? The crib gets built instantly, because instead of <WorkToMake> Tag, it requires <WorkToBuild>. I usually adjust this by myself, but it could quickly be fixed for everyone else.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: Natakate on July 26, 2021, 05:15:18 PM
Really looking forward to the update!
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: vandal on August 03, 2021, 04:21:22 AM
Maybe children can lower your colony wealth, with it increasing as they age to balance the temporary useless additions firepower wise? Not sure if thats possible.

I generally prefer letting them age naturally over using something that ages them artificially. Does anyone know of a mod that lets you put a faction base on 'freeze' (so that you dont have to play as it and be subjected to raids, upkeep etc but with time passage continuing? I say this so that I can play a secondary colony while the colony with kids just focuses on growing.

I believe Faction Control mod have something like this, and let you load the colony back when you wanted to play as them but unfortunately that didn't age them while they were unloaded. Also not sure if this is possible either
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: ChopChopMachine on August 07, 2021, 07:42:06 PM
Bug!
I updated my Rimworld game as well as getting Ideology and it, unfortunately, caused a bug in the game. Whenever I select a pawn and try and make them interact with another (i.e. trade, strip, rescue), the menu doesn't show up for those interaction options. I checked every other mod and it's only the Children and Pregnancy mod interacting with either the base game or possibly Ideology.
Mod list (not in exact order but what I'm using): Harmony, Core, Royalty, Ideology, Hugslib, Temp Edb Prepare carefully, bulk stonecutting, all the vanilla expansion packs for animals and plants, Hospitality, Realistic rooms rewritten, and ancient demolition.
Hopefully, this bug can be smashed pretty fast because I love this mod and it makes the whole game so much better.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: Canute on August 08, 2021, 04:31:48 AM
ChopChopMachine,
sorry but the bug is at your side.
Where do you got a version of this mod that is made for 1.3 ?
The mod author didn't made one so far.
Don't use mods that arn't made for your current RW version.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: GhostData on August 08, 2021, 08:00:24 PM
Quote from: ChopChopMachine on August 07, 2021, 07:42:06 PM
Bug!
I updated my Rimworld game as well as getting Ideology and it, unfortunately, caused a bug in the game. Whenever I select a pawn and try and make them interact with another (i.e. trade, strip, rescue), the menu doesn't show up for those interaction options. I checked every other mod and it's only the Children and Pregnancy mod interacting with either the base game or possibly Ideology.
Mod list (not in exact order but what I'm using): Harmony, Core, Royalty, Ideology, Hugslib, Temp Edb Prepare carefully, bulk stonecutting, all the vanilla expansion packs for animals and plants, Hospitality, Realistic rooms rewritten, and ancient demolition.
Hopefully, this bug can be smashed pretty fast because I love this mod and it makes the whole game so much better.

As Canute said, this mod isn't up to date for 1.3 yet. I am hoping to get to that within the next two weeks, as I am currently building a new rig for development and home use.
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: ChopChopMachine on August 08, 2021, 08:01:39 PM
I'm just using the 4.0.2 release. Just something that it seems the 1.3 update or Ideology may have caused since it's only happening when I have that mod enabled (regardless if I have others enabled as well).
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: ChopChopMachine on August 08, 2021, 08:05:34 PM
Quote from: Tragix on August 08, 2021, 08:00:24 PM

As Canute said, this mod isn't up to date for 1.3 yet. I am hoping to get to that within the next two weeks, as I am currently building a new rig for development and home use.

No worries. I was taking a chance playing with a version not made for 1.3 or Ideology. Remarkably that UI bug is the only issue I've run into, the core mechanics are working just fine which tells me this is a very well-made mod. Thank you for keeping it going for us!
Title: Re: [1.2] Children and Pregnancy - v4.0.0
Post by: GhostData on August 29, 2021, 06:24:47 PM
Still working on 1.3. Rendering changed quite a bit, so I have taken the opportunity to redo some of the rendering patches to be more consistent and utilize more vanilla code. Part of this will be ditching the old logic of hiding baby heads and using graphic overwrites for a single graphic - unless I get to that and realize it is impossibly complex. I will have to hack apart the baby graphics to separate the head from the body, which will probably add additional time as I know nothing about art or the programs used to deal with it. If anyone wants to contribute art expertise, feel free to reach out.
I have also started up a discord server to allow more direct communication with users. Future announcements will be cross posted there, but the ultimate source of truth for CNP will remain here.
https://discord.gg/qGAPs2fj7a
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on September 03, 2021, 09:13:50 PM
V4.1.0 Released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.0
Updated patches for 1.3, HAR, and new compatibility with Rimworld ShowHair
As always, back up your saves before installing a new mod. Delete the entire mod folder when installing on top of an existing CNP install. This should technically be backwards compatible as the save format and general feature set has not changed, but I would not tempt fate. There are a ton of new graphics that are rendered as part of 1.3, and the rendering code increased in complexity significantly. Report any obvious rendering issues in the usual format and I will attempt to resolve them as soon as possible.
Known Bugs
- Newly generated pawns may be bald despite having hair assigned. This is an unidentified bug that does not seem to pertain to the actual rendering code but instead occurs with the presence of many Harmony patches. The graphics may be refreshed by saving and loading, entering the style menu, or whenever the cache refreshes on its own.
- Wound alignment may be whacky. Report with the pawn race and age, along with a screen shot of the problem if you find a bionic eye installed on a belly or something like that.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: laffin on September 05, 2021, 03:13:04 PM
Many thanks for updating this mod!
I'm starting a new game and will let you know if I come across anything odd.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Mistrornge on September 06, 2021, 11:51:14 AM
3 cheers!!!
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: spongebob on September 06, 2021, 05:39:30 PM
There seems to be bug involving raids with the mod. I cant get any human raids after the early game.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on September 08, 2021, 10:29:40 AM
Quote from: spongebob on September 06, 2021, 05:39:30 PM
There seems to be bug involving raids with the mod. I cant get any human raids after the early game.
What's "the early game" and how are you distinguishing it?
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Canute on September 08, 2021, 12:34:26 PM
The first 2 or 3 raids are scripted.
When the lonely raider and then 2 more raiders arrive, with high chances to down them.
Later raids are calculated with points.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: bspawnz on September 13, 2021, 01:07:55 AM
Yes i am getting bugs with the latest release. Tried 4.1.0 as well and then copied Bodies def file from 3.54 but still getting same errors. Errors happen when Textures are loaded in Prepare carefully, or when Raid happens. Error is def due to this mod, maybe interaction with something else like HAR. I removed Real Faction guest and still got these errors.

Below is the log. I had removed most of my mods and was adding them one by one to check which ones causing errors.
https://gist.github.com/1660219cfdfddd5b4a919a37030195c6

Failed to find any textures at Things/Pawn/Humanlike/Bodies/Naked_ while constructing Multi(initPath=Things/Pawn/Humanlike/Bodies/Naked_, color=RGBA(0.945, 0.776, 0.545, 1.000), colorTwo=RGBA(0.945, 0.776, 0.545, 1.000))
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Graphic_Multi:Init (Verse.GraphicRequest)
Verse.GraphicDatabase:GetInner<Verse.Graphic_Multi> (Verse.GraphicRequest)
Verse.GraphicDatabase:Get (System.Type,string,UnityEngine.Shader,UnityEngine.Vector2,UnityEngine.Color,UnityEngine.Color,Verse.GraphicData,System.Collections.Generic.List`1<Verse.ShaderParameter>,string)
AlienRace.AlienPartGenerator:GetNakedGraphic (RimWorld.BodyTypeDef,UnityEngine.Shader,UnityEngine.Color,UnityEngine.Color,string,string)
AlienRace.HarmonyPatches:ResolveAllGraphicsPrefix (Verse.PawnGraphicSet)
(wrapper dynamic-method) Verse.PawnGraphicSet:Verse.PawnGraphicSet.ResolveAllGraphics_Patch3 (Verse.PawnGraphicSet)
RimWorldChildren.LifecycleComp/<>c__DisplayClass35_0:<ForceRefreshBodyType>b__0 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:ExecuteWhenFinished (System.Action)
RimWorldChildren.LifecycleComp:ForceRefreshBodyType (bool)
RimWorldChildren.LifecycleComp:GrowToStage (int)
RimWorldChildren.LifecycleComp:Initialize (bool)
RimWorldChildren.LifecycleComp:get_CurrentLifestage ()
RimWorldChildren.Patches.PawnCapacityUtilityPatches/CalculateCapacityLevel_Patch:CalculateCapacityLevel_Postfix (Verse.HediffSet,Verse.PawnCapacityDef,single&)
(wrapper dynamic-method) Verse.PawnCapacityUtility:Verse.PawnCapacityUtility.CalculateCapacityLevel_Patch1 (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>,bool)
Verse.PawnCapacitiesHandler:GetLevel (Verse.PawnCapacityDef)
Verse.PawnCapacityWorker:CalculateCapacityAndRecord (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
RimWorld.PawnCapacityWorker_Consciousness:CalculateCapacityLevel (Verse.HediffSet,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
(wrapper dynamic-method) Verse.PawnCapacityUtility:Verse.PawnCapacityUtility.CalculateCapacityLevel_Patch1 (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>,bool)
Verse.PawnCapacitiesHandler:GetLevel (Verse.PawnCapacityDef)
Verse.PawnCapacitiesHandler:CapableOf (Verse.PawnCapacityDef)
Verse.Pawn_HealthTracker:ShouldBeDeadFromRequiredCapacity ()
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.ShouldBeDead_Patch0 (Verse.Pawn_HealthTracker)
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.CheckForStateChange_Patch3 (Verse.Pawn_HealthTracker,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff)
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.AddHediff_Patch1 (Verse.Pawn_HealthTracker,Verse.Hediff,Verse.BodyPartRecord,System.Nullable`1<Verse.DamageInfo>,Verse.DamageWorker/DamageResult)
VanillaTraitsExpanded.SpawnSetup_Patch:AddPawn (Verse.Pawn)
VanillaTraitsExpanded.GainTrait_Patch:Postfix (Verse.Pawn)
(wrapper dynamic-method) RimWorld.TraitSet:RimWorld.TraitSet.GainTrait_Patch2 (RimWorld.TraitSet,RimWorld.Trait)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GenerateTraits_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.TryGenerateNewPawnInternal_Patch0 (Verse.PawnGenerationRequest&,string&,bool,bool)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GenerateNewPawnInternal_Patch1 (Verse.PawnGenerationRequest&)
Verse.PawnGenerator:GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GeneratePawn_Patch2 (Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.StartingPawnUtility:Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch0 ()
RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns:PostIdeoChosen ()
RimWorld.Scenario:PostIdeoChosen ()
RimWorld.Page_ChooseIdeoPreset:DoClassic ()
RimWorld.Page_ChooseIdeoPreset:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)


Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.GenDraw.DrawMeshNowOrLater (UnityEngine.Mesh mesh, UnityEngine.Vector3 loc, UnityEngine.Quaternion quat, UnityEngine.Material mat, System.Boolean drawNow) [0x00004] in <b64badbf3c3d41018b3ca5d3e8c77771>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawPawnBody_Patch0(Verse.PawnRenderer,UnityEngine.Vector3,single,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags,UnityEngine.Mesh&)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
  at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <b64badbf3c3d41018b3ca5d3e8c77771>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PawnCacheRenderer:OnPostRender ()
(wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch1 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PortraitsCache:RenderPortrait (Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,Verse.Rot4,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PortraitsCache:Get (Verse.Pawn,UnityEngine.Vector2,Verse.Rot4,UnityEngine.Vector3,single,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.Page_ConfigureStartingPawns:DrawPawnList (UnityEngine.Rect)
(wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns:RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (RimWorld.Page_ConfigureStartingPawns,UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

Could not execute post-long-event action. Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at AlienRace.HarmonyPatches.ResolveAllGraphicsPrefix (Verse.PawnGraphicSet __instance) [0x00338] in <7a7300e6015848b5bccd02355978078b>:0
  at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveAllGraphics_Patch3(Verse.PawnGraphicSet)
  at RimWorldChildren.LifecycleComp+<>c__DisplayClass35_0.<ForceRefreshBodyType>b__0 () [0x0000c] in <604b1e7039684fc9bb9cb77b4d3ccf7e>:0
  at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x0007c] in <b64badbf3c3d41018b3ca5d3e8c77771>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:ExecuteWhenFinished (System.Action)
RimWorldChildren.LifecycleComp:ForceRefreshBodyType (bool)
RimWorldChildren.LifecycleComp:GrowToStage (int)
RimWorldChildren.LifecycleComp:Initialize (bool)
RimWorldChildren.LifecycleComp:get_CurrentLifestage ()
RimWorldChildren.Patches.PawnCapacityUtilityPatches/CalculateCapacityLevel_Patch:CalculateCapacityLevel_Postfix (Verse.HediffSet,Verse.PawnCapacityDef,single&)
(wrapper dynamic-method) Verse.PawnCapacityUtility:Verse.PawnCapacityUtility.CalculateCapacityLevel_Patch1 (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>,bool)
Verse.PawnCapacitiesHandler:GetLevel (Verse.PawnCapacityDef)
Verse.PawnCapacityWorker:CalculateCapacityAndRecord (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
RimWorld.PawnCapacityWorker_Consciousness:CalculateCapacityLevel (Verse.HediffSet,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
(wrapper dynamic-method) Verse.PawnCapacityUtility:Verse.PawnCapacityUtility.CalculateCapacityLevel_Patch1 (Verse.HediffSet,Verse.PawnCapacityDef,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>,bool)
Verse.PawnCapacitiesHandler:GetLevel (Verse.PawnCapacityDef)
Verse.PawnCapacitiesHandler:CapableOf (Verse.PawnCapacityDef)
Verse.Pawn_HealthTracker:ShouldBeDeadFromRequiredCapacity ()
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.ShouldBeDead_Patch0 (Verse.Pawn_HealthTracker)
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.CheckForStateChange_Patch3 (Verse.Pawn_HealthTracker,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff)
(wrapper dynamic-method) Verse.Pawn_HealthTracker:Verse.Pawn_HealthTracker.AddHediff_Patch1 (Verse.Pawn_HealthTracker,Verse.Hediff,Verse.BodyPartRecord,System.Nullable`1<Verse.DamageInfo>,Verse.DamageWorker/DamageResult)
VanillaTraitsExpanded.SpawnSetup_Patch:AddPawn (Verse.Pawn)
VanillaTraitsExpanded.GainTrait_Patch:Postfix (Verse.Pawn)
(wrapper dynamic-method) RimWorld.TraitSet:RimWorld.TraitSet.GainTrait_Patch2 (RimWorld.TraitSet,RimWorld.Trait)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GenerateTraits_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.TryGenerateNewPawnInternal_Patch0 (Verse.PawnGenerationRequest&,string&,bool,bool)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GenerateNewPawnInternal_Patch1 (Verse.PawnGenerationRequest&)
Verse.PawnGenerator:GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.PawnGenerator:Verse.PawnGenerator.GeneratePawn_Patch2 (Verse.PawnGenerationRequest)
(wrapper dynamic-method) Verse.StartingPawnUtility:Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch0 ()
RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns:PostIdeoChosen ()
RimWorld.Scenario:PostIdeoChosen ()
RimWorld.Page_ChooseIdeoPreset:DoClassic ()
RimWorld.Page_ChooseIdeoPreset:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on September 13, 2021, 08:23:57 AM
I honestly don't know what you expect mixing and matching files from incompatible versions. If I have time today I will test how CNP interacts with Prepare Carefully, but the report itself is useless as it is using an undefined set of parameters that I cannot replicate and that would fail no matter what modlist you run.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: bspawnz on September 13, 2021, 12:05:25 PM
The crash log is from the latest version of the mod. I was mixing files after to test  and try to fix the issue after the crash (with my absolute lack of knowledge in modding). Anyways spent 4 hours last night fixing my mod list and order. Will spend some more time today to try to isolate which mod interaction with this mod is causing the issue.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on September 13, 2021, 12:35:15 PM
What is the age and race of the pawn you were having troubles with? Looks like something CNP is expecting to be initialized is missing.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: bspawnz on September 13, 2021, 01:36:50 PM
I didnt check the age/race. Race is humans as i dont have any race mods.

The issue appears to happen when pawns are being loaded/dawn in character selection screen, or if you load a raid with Tribals.

I did the following two mod-list and didnt get same error. Got a different error with one of vanilla expanded clothing not found.
https://gist.github.com/2ce25a50cd2a27369495cca72da9b893
Cloth Load error
https://gist.github.com/bf57f5a154cadbdd692f49b38dbbe632
Cloth Load error


Then i tried to recreate original error and below 3 mod lists all caused it. The mod lists are ordered by more mods to less mods as i was whittling them down.

https://gist.github.com/fa43c054968bf932a752d32a4600095e
Yes ERROR

https://gist.github.com/c31bede0598da824d13e31b529075012
YEs ERROR

https://gist.github.com/1c88ce0a3deaedde985b16afd4709821
YES Error

After the last attempt, i thought it would be one of the trait mods, so i removed vanilla expanded traits and Vanilla expanded framework and that didnt cause the same error. Dont have the error log as GitHub isnt letting me upload.

So i thought it would be vanilla expanded traits (since mod list with Vanilla Expanded Frame work and Vanilla Factions expanded Settlers hadnt thrown this errors), so went to my original mod list and removed just that (leaving all other vanilla expanded mods in) but i am still getting error. So it could be the vanilla expanded mods on how they interact with texture loading/C&P?

Below are the two mod lists to compare with minimal mods;
Didnt throw this error: https://gist.github.com/bf57f5a154cadbdd692f49b38dbbe632
This one had error: https://gist.github.com/1c88ce0a3deaedde985b16afd4709821

I have finished my full mod list without C&P and its stable. Log below. But as soon as i add C&P it has errors with pawn generation/textures. I could actually live with missing textures/invisible pawns on raids, but when raid happens with C&P and all my other mods, when i zoom into/close enough to raid for textures to load the entire game crashes immediately. Would appreciate you fixing this as i consider C&P an essential mod in my playthroughs as it adds significant difficulty with pregnancy and managing children and offsets the easiness of lategame.
https://gist.github.com/2b36fef6e9c3c53fb5a5b645a24e4da6

Thanks,
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on September 13, 2021, 04:56:33 PM
I am able to replicate readily with the following order:

HAR
Vanilla Expanded Framework
Vanilla Expanded Traits
CNP

The result is that upon loading the character creation menu, a NPE occurs in HAR's code, most likely as part of CNP's own patching. The error is replicable without HAR installed as well, but obviously manifests differently. The result is not replicable without CNP.
The error is caused by the pawn.story.bodyType being set to null prior to entering CNP's code. The very first thing we do on pawn generation is initialize the CNP comp and print the body type - at this point it is already null. The best I can suspect is that one of the VEF components is interacting with the bodytype in such a way that it no longer exists by the time we enter CNP's code, which is correctly assuming the bodytype will exist after pawn generation.

The only problem with that theory is that I don't really see anything obvious that could cause the bodytype alone to be null at this point in the processing. MFVC does something I can't identify regarding the scale of graphics and references bodytype as well, but even there it doesn't appear as though this would cause the bodytype to be null.

As an additional test, I disabled each patch until I narrowed it down to a single patch.
CalculateCapacityLevel is a patch wherein we disabled or modify pawn capacities based on the def. With this patch disabled, the body is no longer null on pawn generation.
With the majority of the logic of this method stripped, I can still replicate the error, which makes me suspect this is more of a timing issue than anything, as there is absolutely nothing in this stack path that could possibly set bodyType to null.

I will update again when I have another chance to look into it.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: bspawnz on September 13, 2021, 05:06:11 PM
Thanks! Really appreciate you looking into this. Have a good one!
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on September 13, 2021, 09:05:14 PM
4.1.2 released

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.2

The bug discussed above is utterly incomprehensible. I have no idea how it's possible or where it's coming from. Somehow the interactions between CNP and Vanilla Expanded cause the bodytype of a pawn to be set to null, despite neither mod explicitly doing so. Delaying the first call to CNP's code fixed 75% of such cases, but caused more problems than it solved.
This is not a root cause fix, it's a bandaid that will regenerate the body type if CNP ever starts initialization and finds that the body type is null.
This seems to fix the exact issue, but will almost certainly introduce more. I'm going to consider Vanilla Expanded to be a soft incompatibility from here on, at least until I or someone else can identify the root cause of the init issue. It will probably work, but use both mods at your own risk.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: bspawnz on September 13, 2021, 10:12:12 PM
Hey Thanks for updating but it didn't solve the issue for me, as the game still crashes with raids when you zoom in and textures load (same crash doesn't happen with all other mods). Attached is the crash log if it helps. But at this point i am going to try to find alternative mods to bring the difficulty this mod brings.

Player-Prev.log is log with C&P with crash
Player.log is log without C&P, the only red lines were a Disease headif error from Disease+ and Horse draw error from giddyup which didnt cause any actual issues/crash.

Thanks,
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Anri442 on October 03, 2021, 06:05:07 AM
For some reason the option to sterilize animals disappears when I`m using C&P. It reappears when I disable the mod.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Alundra on October 10, 2021, 01:37:14 PM
So my kids don't have heads. These are the errors in the logs :)

Failed to find any textures at Things/Pawn/Humanlike/Apparel/Robe/Robe_Newborn while constructing Multi(initPath=Things/Pawn/Humanlike/Apparel/Robe/Robe_Newborn, color=RGBA(0.102, 0.102, 0.102, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
Verse.Graphic_Multi:Init (Verse.GraphicRequest)
Verse.GraphicDatabase:GetInner<Verse.Graphic_Multi> (Verse.GraphicRequest)
Verse.GraphicDatabase:Get<Verse.Graphic_Multi> (string,UnityEngine.Shader,UnityEngine.Vector2,UnityEngine.Color)
(wrapper dynamic-method) RimWorld.ApparelGraphicRecordGetter:RimWorld.ApparelGraphicRecordGetter.TryGetGraphicApparel_Patch0 (RimWorld.Apparel,RimWorld.BodyTypeDef,RimWorld.ApparelGraphicRecord&)
(wrapper dynamic-method) Verse.PawnGraphicSet:Verse.PawnGraphicSet.ResolveApparelGraphics_Patch0 (Verse.PawnGraphicSet)
(wrapper dynamic-method) Verse.PawnGraphicSet:Verse.PawnGraphicSet.ResolveAllGraphics_Patch2 (Verse.PawnGraphicSet)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.RenderPawnAt_Patch1 (Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool)
Verse.Pawn_DrawTracker:DrawAt (UnityEngine.Vector3)
Verse.Pawn:DrawAt (UnityEngine.Vector3,bool)
Verse.Thing:Draw ()
Verse.ThingWithComps:Draw ()
Verse.DynamicDrawManager:DrawDynamicThings ()
(wrapper dynamic-method) Verse.Map:Verse.Map.MapUpdate_Patch1 (Verse.Map)
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()


Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Patches.PawnRenderer_DrawBodyApparel_Patch.ModifyClothingMaterial (UnityEngine.Material original, Verse.Pawn pawn, Verse.Rot4 facing) [0x0007d] in <009bca27e7d74cfcb251aa8279941a04>:0
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.DrawBodyApparel_Patch0(Verse.PawnRenderer,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Mesh,single,Verse.Rot4,Verse.PawnRenderFlags)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch1(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
  at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <b64badbf3c3d41018b3ca5d3e8c77771>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PawnCacheRenderer:OnPostRender ()
(wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch1 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.GetBlitMeshUpdatedFrame_Patch1 (Verse.PawnRenderer,Verse.PawnTextureAtlasFrameSet,Verse.Rot4,Verse.PawnDrawMode)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.RenderPawnAt_Patch1 (Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool)
Verse.Pawn_DrawTracker:DrawAt (UnityEngine.Vector3)
Verse.Pawn:DrawAt (UnityEngine.Vector3,bool)
Verse.Thing:Draw ()
Verse.ThingWithComps:Draw ()
Verse.DynamicDrawManager:DrawDynamicThings ()
(wrapper dynamic-method) Verse.Map:Verse.Map.MapUpdate_Patch1 (Verse.Map)
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()


Failed to find any textures at Things/Pawn/Humanlike/Apparel/Robe/Robe_ToddlerUpright while constructing Multi(initPath=Things/Pawn/Humanlike/Apparel/Robe/Robe_ToddlerUpright, color=RGBA(0.102, 0.102, 0.102, 1.000), colorTwo=RGBA(1.000, 1.000, 1.000, 1.000))
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
Verse.Graphic_Multi:Init (Verse.GraphicRequest)
Verse.GraphicDatabase:GetInner<Verse.Graphic_Multi> (Verse.GraphicRequest)
Verse.GraphicDatabase:Get<Verse.Graphic_Multi> (string,UnityEngine.Shader,UnityEngine.Vector2,UnityEngine.Color)
(wrapper dynamic-method) RimWorld.ApparelGraphicRecordGetter:RimWorld.ApparelGraphicRecordGetter.TryGetGraphicApparel_Patch0 (RimWorld.Apparel,RimWorld.BodyTypeDef,RimWorld.ApparelGraphicRecord&)
(wrapper dynamic-method) Verse.PawnGraphicSet:Verse.PawnGraphicSet.ResolveApparelGraphics_Patch0 (Verse.PawnGraphicSet)
(wrapper dynamic-method) Verse.PawnGraphicSet:Verse.PawnGraphicSet.ResolveAllGraphics_Patch2 (Verse.PawnGraphicSet)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.RenderPawnInternal_Patch1 (Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PawnCacheRenderer:OnPostRender ()
(wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch1 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PortraitsCache:RenderPortrait (Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,Verse.Rot4,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PortraitsCache:Get (Verse.Pawn,UnityEngine.Vector2,Verse.Rot4,UnityEngine.Vector3,single,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
ColoredMoodBar13.MoodPatch:DrawColonist (object,UnityEngine.Rect&,Verse.Pawn&,Verse.Map&,bool&,bool&,System.Collections.Generic.Dictionary`2<int, ColoredMoodBar13.MoodCache>)
ColoredMoodBar13.VanillaDrawColonist:Prefix (RimWorld.ColonistBarColonistDrawer,UnityEngine.Rect&,Verse.Pawn&,Verse.Map&,bool&,bool&)
(wrapper dynamic-method) RimWorld.ColonistBarColonistDrawer:RimWorld.ColonistBarColonistDrawer.DrawColonist_Patch1 (RimWorld.ColonistBarColonistDrawer,UnityEngine.Rect,Verse.Pawn,Verse.Map,bool,bool)
RimWorld.ColonistBar:ColonistBarOnGUI ()
(wrapper dynamic-method) RimWorld.MapInterface:RimWorld.MapInterface.MapInterfaceOnGUI_BeforeMainTabs_Patch1 (RimWorld.MapInterface)
RimWorld.UIRoot_Play:UIRootOnGUI ()
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)


There are a lot of these in the log :).
Log: https://gist.github.com/e35088ae0a4b216c2125e9376ea08f9f

May I also request a way to set human pregnancy length? I am playing with a mod that accelerates aging and I'd like pregnancies to be slightly faster to fit with that :). If not able to get a setting can someone tell me if I can edit something in the files to get a shorter timeframe? :)
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: NamingIsHard on October 18, 2021, 09:50:51 AM
I'm kind of confused about trait inheritence of this mod. Are children's traits inherited randomly or depends on traits of parents? Does the "max number of traits" in mod setting determine the exact number of traits of children?
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Wolpeti on November 19, 2021, 08:34:49 PM
Could you just please make it that children are exempt from most pawn spawns?
Having 8 year old raiders is nonsense, having an imperial squad ment to assist me being made up of seven year old flake addicts who drop their biocoded weaponry when fired is useless.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on November 20, 2021, 12:37:11 AM
Quote from: Wolpeti on November 19, 2021, 08:34:49 PM
Having 8 year old raiders is nonsense
I love that, actually. It makes me feel terrible to have to shoot them. It also makes a lot of sense with many of the settlement types. Sure, the more civilized industrial raiders shouldn't technically use kids, but cannibals? Flagellators? Unga bungas? Perfect sense.
Quotehaving an imperial squad
There's that, though. It doesn't make much sense there. But a kid being the focus of a quest which also sends a squad to help protect him is good.
Quoteseven year old flake addicts who drop their biocoded weaponry
This is cool, too. Some societies aren't worth saving. You'll be doing them a kindness to see them die.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Wolpeti on November 20, 2021, 02:28:14 AM
Quote from: RibDibbington on November 20, 2021, 12:37:11 AM
cope - the post
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on November 20, 2021, 12:06:09 PM
Quote from: Wolpeti on November 20, 2021, 02:28:14 AM
[clinically defined insanity]
So you're mentally ill, then. Got it. Heaven forbid anyone have any opinions or preferences that differ from yours. Fuck off, kid.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ramsis on November 20, 2021, 03:45:18 PM
Both of you can chill thanks.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Daruny on November 22, 2021, 12:46:27 PM
Mod is having issues with Rim of Madness - Vampires.
Maybe race problem?
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Awrawra on November 25, 2021, 05:44:47 PM
Greetings everyone.

After a long time without play RimWorld, I came back to play some weeks ago. Since then, I started to have issues and random crashes, specially when a trade caravan, visitors or even raids arrives to my colony. When I get my screen to see who just came, I got instantly crash with unity crash error or sometimes runtime error. These crashes were annoying me that today I had the decision to remove all mods and add gradually back, 20 mods each time and see which one was causing the crashes.

I play rimworld heavy modded, so it took several hours to finally come to realize that was Children and Pregnancy that is causing these annoying crashes. When I removed CnP, immediatly stop the crashes, and I really don't know why is CnP causing them. I use this mod for a long time, since almost the beggining, and never had these crashes before.

Anyone have any idea what I have to do to still playing with CnP and dont get these crashes anymore? I'm using the lastest version, 4.1.2.

Here is the in game log I generated with HugsLib: https://gist.github.com/HugsLibRecordKeeper/91aab091bc029553d71e06b65a37d4a4

Any tips will really be welcome.

Thanks in advance.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: laffin on November 26, 2021, 03:28:53 PM
Quote from: Awrawra on November 25, 2021, 05:44:47 PM
Greetings everyone.

After a long time without play RimWorld, I came back to play some weeks ago. Since then, I started to have issues and random crashes, specially when a trade caravan, visitors or even raids arrives to my colony. When I get my screen to see who just came, I got instantly crash with unity crash error or sometimes runtime error. These crashes were annoying me that today I had the decision to remove all mods and add gradually back, 20 mods each time and see which one was causing the crashes.

I play rimworld heavy modded, so it took several hours to finally come to realize that was Children and Pregnancy that is causing these annoying crashes. When I removed CnP, immediatly stop the crashes, and I really don't know why is CnP causing them. I use this mod for a long time, since almost the beggining, and never had these crashes before.

Anyone have any idea what I have to do to still playing with CnP and dont get these crashes anymore? I'm using the lastest version, 4.1.2.

Here is the in game log I generated with HugsLib: https://gist.github.com/HugsLibRecordKeeper/91aab091bc029553d71e06b65a37d4a4

Any tips will really be welcome.

Thanks in advance.

I'm using this mod with a bunch of others too but do not get any errors or crashes. Sorry I cant help much but it makes me wonder if one of your other mods to conflicting somehow. Can you trace which mods went through recent updates and keep testing just incase its a conflict.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Tenshi~Akari on November 27, 2021, 07:08:27 PM
Quote from: Awrawra on November 25, 2021, 05:44:47 PM
Greetings everyone.

After a long time without play RimWorld, I came back to play some weeks ago. Since then, I started to have issues and random crashes, specially when a trade caravan, visitors or even raids arrives to my colony. When I get my screen to see who just came, I got instantly crash with unity crash error or sometimes runtime error. These crashes were annoying me that today I had the decision to remove all mods and add gradually back, 20 mods each time and see which one was causing the crashes.

I play rimworld heavy modded, so it took several hours to finally come to realize that was Children and Pregnancy that is causing these annoying crashes. When I removed CnP, immediatly stop the crashes, and I really don't know why is CnP causing them. I use this mod for a long time, since almost the beggining, and never had these crashes before.

Anyone have any idea what I have to do to still playing with CnP and dont get these crashes anymore? I'm using the lastest version, 4.1.2.

Here is the in game log I generated with HugsLib: https://gist.github.com/HugsLibRecordKeeper/91aab091bc029553d71e06b65a37d4a4

Any tips will really be welcome.

Thanks in advance.

Haven't had too many notable issues in my first playthrough since the updates, but can definitely say that I as well haven't experienced this, either.

Hazarding a guess, though, based on taking a glance at your HugsLib file:

Quote from: Tragix on March 22, 2020, 04:32:51 PM
RimJobWorld  - Intentionally breaks CNP pregnancy in favor of its own. Childhood features of CNP may still work. Use at own risk until integration is performed.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Awrawra on November 28, 2021, 02:05:50 PM
Quote from: laffin on November 26, 2021, 03:28:53 PM
I'm using this mod with a bunch of others too but do not get any errors or crashes. Sorry I cant help much but it makes me wonder if one of your other mods to conflicting somehow. Can you trace which mods went through recent updates and keep testing just incase its a conflict.

Yes indeed, it is for sure a incompatibility with another mod, but I don't know why it is crashing the game, doesn't make any sense to me. The fact is the crashes stopped when I removed CnP. Now I can play without a problem. I even added some mods for children like Babies and Children and Children, School and Learning, but isn't the same thing like CnP, because my children are spawning with 14 years old already, working and even with good skills already. I know it's kinda boring have a useless pawn for 4 years, but at least it is immersive and I like it.

Quote from: Tenshi~Akari on November 27, 2021, 07:08:27 PM
Haven't had too many notable issues in my first playthrough since the updates, but can definitely say that I as well haven't experienced this, either.

Hazarding a guess, though, based on taking a glance at your HugsLib file:

Quote from: Tragix on March 22, 2020, 04:32:51 PM
RimJobWorld  - Intentionally breaks CNP pregnancy in favor of its own. Childhood features of CNP may still work. Use at own risk until integration is performed.

I understand what you said, but I already played with both mods before, and never had this issue. The incompatibilities they can have, it's all about broken funcionality, but what I'm having right now is game crash with unity error or runtime error. Like I said, it doesn't make any sense that this is happening just with this mod.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Mox on December 10, 2021, 07:47:33 PM
How long does pregnancy take? I'd like it to take 3 seasons, and presumably as a hediff it's configurable? But I can't find a setting for it. Presuming I'm understanding this correctly.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Pactrick Willis on December 23, 2021, 11:34:16 PM
Having the same issue as one of the posters above, ctd whenever a trade caravan approaches.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on January 09, 2022, 07:29:06 PM
Quote from: Mox on December 10, 2021, 07:47:33 PM
How long does pregnancy take? I'd like it to take 3 seasons, and presumably as a hediff it's configurable? But I can't find a setting for it. Presuming I'm understanding this correctly.
It is configured by def files now, as one-size-fits all configurations did not fit the mod's direction to be extensible. Each race, should they choose to implement CNP for their race, can define those characteristics themselves. I could probably come up with a way for clients to modify these settings in-game as well.

V4.1.3 Released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.3
This fixes an alignment issue with Combat Extended backpacks and a crash when any pawn wears Combat Extended tac vests. This is the most likely cause of a few CTDs I see in the recent-ish posts.

v4.1.4 Released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.4
- Fix animal sterilization conflict
- Condensed 3 feed baby workgivers into 1
- Babies will now be fed by lactating pawns first, then by caretakers, then by doctors depending on availability and child hunger.
- Lactating pawns now have increased hunger rate.


I am not regularly checking the forums right now, so feel free to join the discord in the OP to post reports. I don't have a ton of time to spend on this right now, but I will be prioritizing reports on discord over the forums for the time being.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: laffin on January 10, 2022, 05:17:45 PM
Tragix - Thank you so much for keeping this mod going!

Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Chipmunk216 on January 16, 2022, 06:27:15 PM
Has anyone else noticed an issue where all pawns are spawning with no hair or beards, both in the pre-game loadout and the game itself?

I do run pretty heavily modded, so it's likely a conflict, but I haven't found where yet.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Wolpeti on January 28, 2022, 12:54:00 AM
Quote from: Tragix on January 09, 2022, 07:29:06 PM
v4.1.4 Released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.4
- Fix animal sterilization conflict
- Condensed 3 feed baby workgivers into 1
- Babies will now be fed by lactating pawns first, then by caretakers, then by doctors depending on availability and child hunger.
- Lactating pawns now have increased hunger rate.

can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on January 30, 2022, 04:48:00 PM
Quote from: Wolpeti on January 28, 2022, 12:54:00 AM
can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.

v4.1.6 v4.1.7 Released
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.7
Removes children from Royalty and Ideology faction spawn lists. Fixes a patching error with the latest version of Humanoid Alien Races.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Mistrornge on February 21, 2022, 10:22:04 AM
Woot.  Thanks Tragix
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on February 27, 2022, 01:43:09 PM
v4.1.8 Released
This release fixes a long standing bug where pawns will spawn with invisible hair. It did require me to poke parts of the code that I don't fully understand, so let me know if you see any new oddities - especially if children grow to a new stage (1 year, 3 years, 13 years) and don't get their new graphics on their birthday.
This release also adds a new tribal backstory that will be inherited if a child is born to a tribal mother with a tribal childhood. This will allow tribe children (at child lifestage, age 3) to use natural psyfoci and link with anima trees.
I've added a backlog item to Life Lessons to allow this knowledge to be passed down by tribals rather than inherited based on their backstory.

https://gitlab.com/Tragix/children-and-pregnancy-collab/-/releases/v4.1.8
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on February 28, 2022, 09:47:43 AM
Quote from: GhostData on February 27, 2022, 01:43:09 PM
a new stage (...3 years...)

Aha! I THOUGHT that was the cutoff! I had been gaslighting myself for years in-game, because my 3 year olds have kept their (headless) baby sprites (not even toddler; it's the crib baby walking around). I'll see if this new version fixes that (or goes back to purple square errors).

EDIT: Nope, killed all my children. This happens every time I update your mod, though. They're still there, but they either have no sprite at all (and are still incapped, even if I manually edit their age) or have an adult sprite (as a baby, toddler, or child) and are incapped.

Do you recommend only ever updating the mod when starting a new colony?
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on March 01, 2022, 09:06:25 AM
Quote from: RibDibbington on February 28, 2022, 09:47:43 AM
Quote from: GhostData on February 27, 2022, 01:43:09 PM
a new stage (...3 years...)

Aha! I THOUGHT that was the cutoff! I had been gaslighting myself for years in-game, because my 3 year olds have kept their (headless) baby sprites (not even toddler; it's the crib baby walking around). I'll see if this new version fixes that (or goes back to purple square errors).

EDIT: Nope, killed all my children. This happens every time I update your mod, though. They're still there, but they either have no sprite at all (and are still incapped, even if I manually edit their age) or have an adult sprite (as a baby, toddler, or child) and are incapped.

Do you recommend only ever updating the mod when starting a new colony?
I use semantic versioning, so the only colony/save breaking version upgrades are ones where the first number changes, ie 4.1.0 -> 5.0.0
I don't usually test what happens when you load a save from an older version, so I can't speculate why it kills your kids. Considering they don't seem to change backstories or graphics, it's probably the case that the component isn't working or isn't being applied at all. The component tracks the baby's age and abilities, updates their work-types and capacities, and updates their graphics when they age up.
If you want to post a hugslib log with your mod list and provide the below info, I can look into it:
Race of parents
Race of child
Age of child
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on March 01, 2022, 08:35:56 PM
Quote from: GhostData on March 01, 2022, 09:06:25 AM
I use semantic versioning, so the only colony/save breaking version upgrades are ones where the first number changes, ie 4.1.0 -> 5.0.0
Hey, that's super useful to know. Thanks!
QuoteIf you want to post a hugslib log with your mod list and provide the below info, I can look into it:
You know, I'm gonna guess it's not your fault. I'll probably still troubleshoot later. I have a fair few mods. I did notice when I updated that the mod wasn't recognized as being the same mod that I had installed previously. I had to reactivate it, and I tried to put it back in the exact same position in my modlist, but hey. If I got it wrong, that might have been part of the problem.

I remember that only because it's weird that it wouldn't think it's the same mod. Other manual mod updates always have before. I've only ever downloaded it from your thread here, too.

Thanks for all your work! This is something that Ludeon needs to buy from you and put in the base game, honestly.

EDIT: Oh, something else. Babies are being "rescued" from their cribs to MedPods, which cycle in perpetuity (and make that annoying alert repeat) because nothing is wrong with them. I'm not sure if this is a change with C&P updates or MedPod updates, because they've both been updated recently.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: TurtleShroom on March 14, 2022, 04:45:27 PM
Let's say that I want to create custom Sprites for a given Race. (I don't like my Onis being born as baby humans.)

How would I do this? What is neccesary to implement this and make it show up?
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Canute on March 15, 2022, 01:46:34 AM
Hi,
i don't have any idea. But a good start would be to look at the Readme.
https://gitlab.com/Tragix/children-and-pregnancy-collab/-/blob/master/README.md
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ronewird on March 30, 2022, 08:33:27 PM
Sorry do dinsturb, i have no will to send a report, is to complicate for me. Just want to comunicate the actual release of this mod conflict with the mod performance optimizer. Is true i have a mod list about an houndred, but i remove this mod and now finally the woman get pregnant. I still have some error on my log related to sterilise or something like that. But i have run the game also with just this mod installed and still get the same error on the log.

Any way if some one have the patience to investigate further with this mod, and in case he find the issue as i have reported, maybe he can use the proper form to provide the error to the staff.

Sorry again for the intrusion, and compliment for the mod.

P.s.

I really miss the steam workshop version , hope one day it will back!
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Canute on March 31, 2022, 03:45:00 AM
QuoteBut i have run the game also with just this mod installed and still get the same error on the log.
The question is, did you start a new colony or did you just disable mods and keep the save, then the error is allready at the savegame or the conflict is with other mods you still got active.

Quotethis mod conflict with the mod performance optimizer.
But overall, when you don't got that problem without optimizer, you should report it the the optimizer author/crew.
He can investigate it further where the problem are and contact the modauthor of the other mod.

Quotemaybe he can use the proper form to provide the error to the staff.
You NEED to add the logfile or at last the error msg. to such reports.
Mosttimes you got hugslib installed too, then just use the green button "Share logs" at the log window and post the link, which include the modlist,patchlist and logfile.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ronewird on March 31, 2022, 05:23:10 PM
Quote from: Canute on March 31, 2022, 03:45:00 AM
QuoteBut i have run the game also with just this mod installed and still get the same error on the log.
The question is, did you start a new colony or did you just disable mods and keep the save, then the error is allready at the savegame or the conflict is with other mods you still got active.

Quotethis mod conflict with the mod performance optimizer.
But overall, when you don't got that problem without optimizer, you should report it the the optimizer author/crew.
He can investigate it further where the problem are and contact the modauthor of the other mod.

Quotemaybe he can use the proper form to provide the error to the staff.
You NEED to add the logfile or at last the error msg. to such reports.
Mosttimes you got hugslib installed too, then just use the green button "Share logs" at the log window and post the link, which include the modlist,patchlist and logfile.

Hey canute, thank for the answer. I have deselect all the mode except children and pregnancy, and i have start a new game, With a set of colonist for testing ( 2 woman around 20 and one man around  20 ). I have some error in console about sterile but the woman get pregnant. I have now the whole list of mod on my normal game with out performance mod and work properly. Just i have some problem with the texture becouse i have vanilla expanded. But i have deselect the option to for the texture on the vanilla expanded setting and also that problem is now fixed.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on April 01, 2022, 02:23:38 PM
Quote from: Ronewird on March 31, 2022, 05:23:10 PM
Quote from: Canute on March 31, 2022, 03:45:00 AM
QuoteBut i have run the game also with just this mod installed and still get the same error on the log.
The question is, did you start a new colony or did you just disable mods and keep the save, then the error is allready at the savegame or the conflict is with other mods you still got active.

Quotethis mod conflict with the mod performance optimizer.
But overall, when you don't got that problem without optimizer, you should report it the the optimizer author/crew.
He can investigate it further where the problem are and contact the modauthor of the other mod.

Quotemaybe he can use the proper form to provide the error to the staff.
You NEED to add the logfile or at last the error msg. to such reports.
Mosttimes you got hugslib installed too, then just use the green button "Share logs" at the log window and post the link, which include the modlist,patchlist and logfile.

Hey canute, thank for the answer. I have deselect all the mode except children and pregnancy, and i have start a new game, With a set of colonist for testing ( 2 woman around 20 and one man around  20 ). I have some error in console about sterile but the woman get pregnant. I have now the whole list of mod on my normal game with out performance mod and work properly. Just i have some problem with the texture becouse i have vanilla expanded. But i have deselect the option to for the texture on the vanilla expanded setting and also that problem is now fixed.
Error reports that do not include the actual log files are worse than useless - they're misleading.
My best guess with the report provided is that you did not perform a clean install - deleting the entire CNP mod folder from your system and reinstalling it when updating. There was a recentish patch that fixed the sterilization operation since the base game includes one for animals now. Without actual log files, this is purely speculation.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Wolpeti on April 04, 2022, 02:54:53 PM
Quote from: GhostData on January 30, 2022, 04:48:00 PM
can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.
Removes children from Royalty and Ideology faction spawn lists.[/quote]
Thank you, finaly, but does that mean they are still inculded in the outlander, tribal and space pirates lists?
Do they all use the same spawn lists for caravans and visitors as for raiding parties?

By the way i never figured the "adopt" part out just "arresting" a random child that walks by.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on April 18, 2022, 09:26:43 AM
Quote from: Wolpeti on April 04, 2022, 02:54:53 PM
Quote from: GhostData on January 30, 2022, 04:48:00 PM
can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.
Thank you, finaly, but does that mean they are still inculded in the outlander, tribal and space pirates lists?
Do they all use the same spawn lists for caravans and visitors as for raiding parties?

By the way i never figured the "adopt" part out just "arresting" a random child that walks by.
No, they're removed from all visiting factions for the time being. It should be the case that the only children you will see are children born in the colony.

The Adoption feature is essentially a way to capture another faction's abandoned child without suffering reputation penalties. If you use it while that faction has adults on the map, it will be treated the same as an arrest and will make them hostile. If they leave without the child for whatever reason - mostly because Rimworld doesn't do a good job of simulating pawn compassion for down pawns, or children being born on your map - you can use this to easily take the child in, for those who have qualms with leaving them to starve to death.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ruisuki on April 22, 2022, 03:01:27 AM
Quote from: GhostData on April 18, 2022, 09:26:43 AM
Quote from: Wolpeti on April 04, 2022, 02:54:53 PM
Quote from: GhostData on January 30, 2022, 04:48:00 PM
can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.
Thank you, finaly, but does that mean they are still inculded in the outlander, tribal and space pirates lists?
Do they all use the same spawn lists for caravans and visitors as for raiding parties?

By the way i never figured the "adopt" part out just "arresting" a random child that walks by.
No, they're removed from all visiting factions for the time being. It should be the case that the only children you will see are children born in the colony.

The Adoption feature is essentially a way to capture another faction's abandoned child without suffering reputation penalties. If you use it while that faction has adults on the map, it will be treated the same as an arrest and will make them hostile. If they leave without the child for whatever reason - mostly because Rimworld doesn't do a good job of simulating pawn compassion for down pawns, or children being born on your map - you can use this to easily take the child in, for those who have qualms with leaving them to starve to death.
theres a chance for pregnant pawns to pass through your base and give birth? I cant think of another situation where that specific scenario would happen
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on April 22, 2022, 08:05:36 AM
Quote from: Ruisuki on April 22, 2022, 03:01:27 AM
Quote from: GhostData on April 18, 2022, 09:26:43 AM
Quote from: Wolpeti on April 04, 2022, 02:54:53 PM
Quote from: GhostData on January 30, 2022, 04:48:00 PM
can you finaly please fix the pawn spawn age relation of faction PawnKindDefs since the shattered empire did just send me another batch of 10 year old Janissaries.
Thank you, finaly, but does that mean they are still inculded in the outlander, tribal and space pirates lists?
Do they all use the same spawn lists for caravans and visitors as for raiding parties?

By the way i never figured the "adopt" part out just "arresting" a random child that walks by.
No, they're removed from all visiting factions for the time being. It should be the case that the only children you will see are children born in the colony.

The Adoption feature is essentially a way to capture another faction's abandoned child without suffering reputation penalties. If you use it while that faction has adults on the map, it will be treated the same as an arrest and will make them hostile. If they leave without the child for whatever reason - mostly because Rimworld doesn't do a good job of simulating pawn compassion for down pawns, or children being born on your map - you can use this to easily take the child in, for those who have qualms with leaving them to starve to death.
theres a chance for pregnant pawns to pass through your base and give birth? I cant think of another situation where that specific scenario would happen

In theory, yes. Prisoners are the scenario I had in mind at first, but there is nothing stopping guests from becoming pregnant on your map during a visit and giving birth during another visit. In there rare case that a non-player-faction baby or toddler found its way onto the map, I wanted to give the player a better option than using it for target practice.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Wolfguard21 on April 23, 2022, 07:38:54 AM
Hello, Just bought Rimworld last week and played it in vanilla to get the ropes.
Now I downloaded some mods including this, however.
It has been over 1 year in-game time. yet my partner did not get pregnant.
I only have a few mods.
EdB prep carefully
Show hair with hats
Dynamic Population
Humanoid Alien Races
Warhammer Zhthy'hl
Packs are not belts
Hugslib
Harmony
Children and Pregnancy

Thats about it. So Im not sure if my characters are sterile or the mod is not working.
The crib is there as well as the contraceptives. But nothing is happening.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on April 23, 2022, 11:57:08 AM
Make sure that the Children & Pregnancy settings allow for either an arbitrary number of colonists (I believe it tells you to set it to 0) or that you're not already at your set colony maximum.

I have this problem myself, despite it being set to zero. I use a custom storyteller that removes the population cap (so that I keep seeing quests and events that give me more colonists), but C&P still operates on its own behavior and refuses to let anyone get pregnant above a certain number of colonists...
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ruisuki on April 23, 2022, 08:18:24 PM
Hey so do i need to do anything special to get pawns pregnant? its been a year in game and theyve done lovin' but nothing so far. no contraception used either
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Makedar on April 27, 2022, 01:33:19 PM
Can someone help how to fix it? Pawns have no textures if I`m adding lifecycle in settings.

Error rendering pawn portrait: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldChildren.Patches.AlienRaces_DrawAddons_Patch.ModifyScale (Verse.Graphic graphic, Verse.Pawn pawn, Verse.Rot4 rotation, System.Object addon) [0x00024] in <223b849f1b0f476cab5816064045ffb8>:0
  at (wrapper dynamic-method) AlienRace.HarmonyPatches.AlienRace.HarmonyPatches.DrawAddons_Patch0(Verse.PawnRenderFlags,UnityEngine.Vector3,UnityEngine.Vector3,Verse.Pawn,UnityEngine.Quaternion,Verse.Rot4)
  at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnInternal_Patch3(Verse.PawnRenderer,UnityEngine.Vector3,single,bool,Verse.Rot4,Verse.RotDrawMode,Verse.PawnRenderFlags)
  at Verse.PawnRenderer.RenderCache (Verse.Rot4 rotation, System.Single angle, UnityEngine.Vector3 positionOffset, System.Boolean renderHead, System.Boolean renderBody, System.Boolean portrait, System.Boolean renderHeadgear, System.Boolean renderClothes, System.Collections.Generic.Dictionary`2[TKey,TValue] overrideApparelColor, System.Nullable`1[T] overrideHairColor, System.Boolean stylingStation) [0x00138] in <99518a644a3e4a7ea3fde566568df84a>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.PawnRenderer:RenderCache (Verse.Rot4,single,UnityEngine.Vector3,bool,bool,bool,bool,bool,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
RimWorld.PawnCacheRenderer:OnPostRender ()
(wrapper dynamic-method) RimWorld.PawnCacheRenderer:RimWorld.PawnCacheRenderer.RenderPawn_Patch2 (RimWorld.PawnCacheRenderer,Verse.Pawn,UnityEngine.RenderTexture,UnityEngine.Vector3,single,single,Verse.Rot4,bool,bool,bool,bool,bool,UnityEngine.Vector3,System.Collections.Generic.Dictionary`2<RimWorld.Apparel, UnityEngine.Color>,System.Nullable`1<UnityEngine.Color>,bool)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.GetBlitMeshUpdatedFrame_Patch1 (Verse.PawnRenderer,Verse.PawnTextureAtlasFrameSet,Verse.Rot4,Verse.PawnDrawMode)
(wrapper dynamic-method) Verse.PawnRenderer:Verse.PawnRenderer.RenderPawnAt_Patch2 (Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool)
Verse.Pawn_DrawTracker:DrawAt (UnityEngine.Vector3)
(wrapper dynamic-method) Verse.Pawn:Verse.Pawn.DrawAt_Patch1 (Verse.Pawn,UnityEngine.Vector3,bool)
Verse.Thing:Draw ()
Verse.ThingWithComps:Draw ()
Verse.DynamicDrawManager:DrawDynamicThings ()
(wrapper dynamic-method) Verse.Map:Verse.Map.MapUpdate_Patch2 (Verse.Map)
(wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Canute on April 27, 2022, 02:10:28 PM
Please allways add the whole logfile to the errormsg.
When you use hugslib too, just use the "Share logs" button and post the link, that include the modlist too.

At which position do you have C&P ? Before or after the race mod ? If it is before just move it at the end of the modlist maybe that allready help.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ruisuki on April 27, 2022, 06:49:26 PM
Quote from: Ruisuki on April 23, 2022, 08:18:24 PM
Hey so do i need to do anything special to get pawns pregnant? its been a year in game and theyve done lovin' but nothing so far. no contraception used either
I dont think its error related but posting just in case https://gist.github.com/585ffdcfb036326476ddf7d6bc7746de

I didnt touch the settings, pawn limit is set to 0 etc. I have seen kids, teenagers in game so the mod is active
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Makedar on April 30, 2022, 05:08:45 AM
Quote from: Canute on April 27, 2022, 02:10:28 PM
Please allways add the whole logfile to the errormsg.
When you use hugslib too, just use the "Share logs" button and post the link, that include the modlist too.

At which position do you have C&P ? Before or after the race mod ? If it is before just move it at the end of the modlist maybe that allready help.

Do you mean that?
https://gist.github.com/a531937dd3b28239d4b37278e2ec6d91
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ruisuki on May 01, 2022, 11:41:21 PM
Quote from: Ruisuki on April 27, 2022, 06:49:26 PM
Quote from: Ruisuki on April 23, 2022, 08:18:24 PM
Hey so do i need to do anything special to get pawns pregnant? its been a year in game and theyve done lovin' but nothing so far. no contraception used either
I dont think its error related but posting just in case https://gist.github.com/585ffdcfb036326476ddf7d6bc7746de

I didnt touch the settings, pawn limit is set to 0 etc. I have seen kids, teenagers in game so the mod is active
i have this mod auto sorted with rimpy so that shouldnt be an issue at least

Error in static constructor of RimWorldChildren.HarmonyPatcher: System.TypeInitializationException: The type initializer for 'RimWorldChildren.HarmonyPatcher' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.PawnRenderer::RenderPawnInternal(UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.RotDrawMode bodyDrawType, Verse.PawnRenderFlags flags) ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00012] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at RimWorldChildren.Patches.PawnRenderer_RenderPawnInternal_Patch+<Transpiler>d__4.MoveNext () [0x00269] in <223b849f1b0f476cab5816064045ffb8>:0
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00051] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x00286] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000bb] in <212c5fc0752a439c852373c986c00088>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <212c5fc0752a439c852373c986c00088>:0
  at HarmonyLib.Harmony.PatchAll () [0x0001b] in <212c5fc0752a439c852373c986c00088>:0
  at RimWorldChildren.HarmonyPatcher..cctor () [0x0000c] in <223b849f1b0f476cab5816064045ffb8>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at (wrapper dynamic-method) System.Runtime.CompilerServices.RuntimeHelpers.System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor_Patch1(System.RuntimeTypeHandle)
  at (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.Verse.StaticConstructorOnStartupUtility.CallAll_Patch4()
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility:Verse.StaticConstructorOnStartupUtility.CallAll_Patch4 ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_3 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
(wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Entry:Update ()
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: LiteEmUp on July 13, 2022, 01:09:52 AM
the babies and children mod on steam has alien babies, but no pregnancy at all lol).. so does this mod has alien babies now, coz i like that this mod has pregnancy(so that i don't have to download a separate pregnancy mod lol)???
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: S K S on July 24, 2022, 01:06:44 PM
Hi! Love the mod!


Is the strange placement of beanies on crawling infants and newborns in cribs a bug with the mod? As far as I know I am using the most updated version, 4.1.9. I know it could also be a conflict with other mods I have, just was wondering if it was a bug with this mod before I go down the rabbit hole of trying to figure out which other mod could be causing the problem.

Thank you :)

Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Mox on September 18, 2022, 11:02:29 AM
I'm getting a bunch of errors when I start up, but I'm able to start a game and play seemingly fine?
The conflicts seem to be between CE and C&P basically, if I disable CE then it starts up without whining.
Is this anything to worry about?

https://gist.github.com/ce63c376782e4899a8bd331619a68355
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: RibDibbington on October 05, 2022, 11:14:55 PM
Well, this might be the end of the line for one of the best mods for this game. How unfortunate.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Tenshi~Akari on October 06, 2022, 02:18:16 AM
Coming back after a long absence post-news drop. It's been a wonderful run and I definitely thank everybody involved with having kept this mod alive through all the version updates, especially GhostData for heading the helm on most recent maintenance & updates for it. This mod has definitely made my game experience much more interesting over the years it has existed. Never thought I'd see the day a proper life cycle system would be introduced to human pawns officially, but here we are.

That said, it doesn't necessarily mean "the end" altogether. It could mean a slight evolution of mods like this, especially if features we're used to seeing in C&P aren't fully present in Biotech... but we all won't know for sure until more info is introduced about the inner workings of it all. It will definitely take responsibility of maintaining the whole system off the modders, though.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: Ruisuki on October 23, 2022, 09:39:53 PM
cheers
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: GhostData on October 24, 2022, 03:39:00 PM
Howdy Folks.

To say that I am surprised children have been added to the core game in any capacity is an understatement. I've used this mod and it's iterations more or less since I started playing Rimworld, so the feature in some form or another has always been a core part of my experience for long play. I have been planning a successor mod for CNP for a while now, with the intent to solve many of the largest pain points of the mod - seamless mod integration and more features to fully integrate children as a concept to the core game. Naturally, with the release of Biotech, the core functionality - and the most difficult part to maintain - of this mod is no longer necessary. I'll be ending support for the mod and closing down the discussion thread. The source will remain available for the time being.

Being the first large scale mod I have ever worked on, the past releases have been bumpy to say the least. That said, thanks to everyone who provided feedback and tested the mod even in it's roughest state, as the feedback and project have helped develop my abilities as a modder for future projects.
I can still be reached via my development discord if you have suggestions and the like.
Title: Re: [1.3] Children and Pregnancy - v4.1.0
Post by: harpo99999 on October 24, 2022, 06:43:34 PM
like you I have been using a children mod since they showed up in the modding forum, thank you for your efforts