[1.3] Children and Pregnancy - v4.1.0

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

Previous topic - Next topic

Eyrmia

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.

Belgrath

#346
Hello People.

Has anyone had the problem with babies having adult heads on them?

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 love testing things and watching them break   :P
Sure I'll test it for you!
"Are you a Wizard^^ Belgrath?"
"maybe..."

malistaticy


malistaticy

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

kitchenarm

#349
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!

HohenHeizen

Having a way to disable baby-games per race would be helpful. It's odd having androids play tickle while lined up drafted.

kitchenarm

It'd also be cool if you could add the pregnancy chance back in the config

Third_Of_Five

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?

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

sidfu

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

GhostData

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.

Third_Of_Five

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?

LiteEmUp

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??

GhostData

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.

HohenHeizen

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!

BlueTressym

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.