[1.3] Children and Pregnancy - v4.1.0

Started by GhostData, March 22, 2020, 04:32:51 PM

Previous topic - Next topic

GhostData

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.


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.

Hilvon1984

#271
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.

notfood

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.

GhostData

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.

Mox

#274
+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.



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.

Hilvon1984

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".

Mox

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 :)

IskeAhi

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

Russhell

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

sidfu

can never version u pput in support for milkable colonisst or a way to input hedriffs to use for breastfeeding?

GhostData

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.

Geese man

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.

GhostData

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.

Geese man

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?

GhostData

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.