[1.3] Children and Pregnancy - v4.1.0

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

Previous topic - Next topic

GhostData

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

HohenHeizen

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.

GhostData

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.

Hallif

#378
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.)

Hallif

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

TheBadiator

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)

TheBadiator

#381
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. I have since uninstalled it, and the bugs I have persisted on the save.

Jackdawson

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

GhostData

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.

Jackdawson

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!

sidfu

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.

Jackdawson

Question: at what point in the pregnancy is the hediff supposed to become visible with no devmode?

GhostData

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.

jkelley2

so im having an issue between this and Android Tiers with humans giving birth to Androids

GhostData

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.