[1.3] Children and Pregnancy - v4.1.0

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

Previous topic - Next topic

GhostData

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

Fluyd-19

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?

GhostData

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.

Fluyd-19

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.

TheBadiator

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.

GhostData

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

Geese man

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.

GhostData

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.

GhostData

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.

Geese man

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.

Daruny

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.


GhostData

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.

lovecrazygaming

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.  :(

Daruny

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.

GhostData

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.