[1.3] Children and Pregnancy - v4.1.0

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

Previous topic - Next topic

GhostData

#165
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:


2Foldri

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.

jager666

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.

GhostData

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.

peppybojagger

#169
@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.

jager666

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.

Tenshi~Akari

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

GhostData

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

Sshodan

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

Third_Of_Five

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.

Tocato

Can't wait for alien kijin and Logan babies

Lazla

Anyone knows how this plays with RJW, or is children and education better compatible..

GhostData

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.

crowman

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.

Errant_Gunner

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.