Jump to content

[1.5 Soon!] RJW Animation Framework


Recommended Posts

@c0ffeeeee Might I make a request for a.. patch or addition to the RJW animation framework?

There are a few mods that let you turn colonists into animals and animals into colonists. I was wondering if some.. compatibility patches could be established?

https://steamcommunity.com/sharedfiles/filedetails/?id=2946864774&searchtext=Shapeshift

Take this one for example. It's very simple, just a button press and boom you have a colonist that is an animal and another button press and back to being a "Human" (Or xeno) 

If anything could ya maybe make a patch for this? Just tried it out to see if it worked but even converted to appearing like an animal, still use the human animations, which is fair tbh, didn't actually think it would register the pawns for animal anims just because of a model change lol.

Link to comment

This mod is causing a huge lag spike every minute, which is unfortunate because its one of my favorite mod groups. 

Will list every type of animation followed by 'does not match required gender' 'does not match required count'

Definitely a HAR incompatibility.

Link to comment
  • 2 weeks later...

@Bingusasdf: FWIW: I do not get this error with HAR pulled from its repository master on 2023-03-02 and 1.3.3 of the animation framework (and 5.3.4 of RJW itself). Works mostly fine, does not cause lag spikes.

 

My only issue with this mod is currently this one , but it does not have any notable performance impact - the affected pawn(s) just turn invisible until the broken animation is over (and it bricks developer mode's "pause on error" feature - have to turn it off, wait the errors out, turn it on again).

Edited by Zsar
Link to comment
4 hours ago, NikitaRGX said:

I'm getting an issue with pawn bodies facing the wrong way during animations. Not certain what's causing it, no errors in the log.

There may be some conflicts with other mods that add animations, like if you use those combat animation mods

Link to comment
5 hours ago, c0ffeeeee said:

There may be some conflicts with other mods that add animations, like if you use those combat animation mods

 

Wouldn't happen to know if Melee Animation is perhaps a culprit then? I was having a different issue with it earlier, and if it's one that seems to conflict often then I might just drop it. I can't imagine it's Yayo's since that's run perfectly before.

 

EDIT: Sadly it can't be that, the issue still happens even after taking off both that and Yayo's Animation. I don't have any other mods that change/add animations that I'm aware of.

 

EDIT 2: It also doesn't seem to affect 1 to 1 animations, only the threesome animations.

Edited by NikitaRGX
Link to comment

Hi there,

I'm not sure if the following errors are related to the animations mod specifically (it needs more testing, I'm suspecting RimJobWorld is causing the issue), but since the developer here is nicer and answers questions calmly I decided to post under this topic.

 

So, my problem is that while horses are being unloaded an Unexpected error is thrown related to the job of Lovin' and there's also a reference to the pawn who's is doing an unload job while the animal in question is doing " Lovin' ".

 

Could not reserve Thing_Horse366720 (layer: null) for Horse68828 for job GettinLoved (Job_3114338) A=Thing_Horse366720 (now doing job GettinLoved (Job_3114338) A=Thing_Horse366720(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Blanca doing job UnloadInventory (Job_3113950) A=Thing_Horse366720 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

 

Another problem is with the Boomalopes getting milked while doing the job: "Lovin' ".

 

Variant 1:
Could not reserve Thing_Boomalope96427 (layer: null) for Boomalope160228 for job GettinLoved (Job_1843969) A=Thing_Boomalope96427 (now doing job GettinLoved (Job_1843969) A=Thing_Boomalope96427(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Brío doing job Milk (Job_1843315) A=Thing_Boomalope96427 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
  
 Variant2:
  Could not reserve Thing_Boomalope82072 (layer: null) for Boomalope82067 for job GettinLoved (Job_1862573) A=Thing_Boomalope82072 (now doing job GettinLoved (Job_1862573) A=Thing_Boomalope82072(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Stormy doing job Milk (Job_1861466) A=Thing_Boomalope82072 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

 

Here's another variant of the same error:

My pawn Olga decided to milk a boomalope that was resting in a pen, when this error came up:

Exception in JobDriver tick for pawn Boomalope56760 driver=JobDriver_Mating (toilIndex=2) driver.job=(RJW_Mate (Job_1846171) A=Thing_Boomalope82067)
System.NullReferenceException: Object reference not set to an instance of an object
  at RJW_Menstruation.HediffComp_Menstruation.CumIn (Verse.Pawn pawn, System.Single volume, System.Single fertility, System.Boolean precum) [0x00160] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at RJW_Menstruation.DoImpregnate_Patch.Prefix (Verse.Pawn pawn, Verse.Pawn partner) [0x0009c] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at (wrapper dynamic-method) rjw.PregnancyHelper.rjw.PregnancyHelper.DoImpregnate_Patch1(Verse.Pawn,Verse.Pawn)
  at RJW_Menstruation.Impregnate_Patch.Prefix (rjw.SexProps props) [0x0008d] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at (wrapper dynamic-method) rjw.PregnancyHelper.rjw.PregnancyHelper.impregnate_Patch2(rjw.SexProps)
  at rjw.JobDriver_Sex.Orgasm () [0x00083] in <93c23f6462104f8da6473c6b6f550857>:0 
  at (wrapper dynamic-method) rjw.JobDriver_Sex.rjw.JobDriver_Sex.SexTick_Patch2(rjw.JobDriver_Sex,Verse.Pawn,Verse.Thing,bool,bool)
  at rjw.JobDriver_Mating+<>c__DisplayClass1_0.<MakeNewToils>b__5 () [0x00069] in <93c23f6462104f8da6473c6b6f550857>:0 
  at Verse.AI.JobDriver.DriverTick () [0x00163] in <446267b72ea8432286db63aecc70cf59>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.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 ()

 

Another possibility is that the load order of my mods is acting up. Here's my current load order:

image.thumb.png.cadce9db14f9ba692d298150ed0b7aae.png

Edited by Grojcig
Link to comment

Not sure if this was already mentioned before, but I believe this mod has issues with displaying Roo's HD long hairs in the character UI in-menu. Is there a fix for this? The hair itself displays in front of the face of pawns, when front facing. 

Edited by X0darklord0X
Link to comment
On 4/21/2023 at 7:19 AM, Grojcig said:

Hi there,

I'm not sure if the following errors are related to the animations mod specifically (it needs more testing, I'm suspecting RimJobWorld is causing the issue), but since the developer here is nicer and answers questions calmly I decided to post under this topic.

 

So, my problem is that while horses are being unloaded an Unexpected error is thrown related to the job of Lovin' and there's also a reference to the pawn who's is doing an unload job while the animal in question is doing " Lovin' ".

 

[I will post the related thrown error log entry as soon as I see it again.]

 

Another problem is with the Boomalopes getting milked while doing the job: "Lovin' ".

 

Variant 1:
Could not reserve Thing_Boomalope96427 (layer: null) for Boomalope160228 for job GettinLoved (Job_1843969) A=Thing_Boomalope96427 (now doing job GettinLoved (Job_1843969) A=Thing_Boomalope96427(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Brío doing job Milk (Job_1843315) A=Thing_Boomalope96427 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
  
 Variant2:
  Could not reserve Thing_Boomalope82072 (layer: null) for Boomalope82067 for job GettinLoved (Job_1862573) A=Thing_Boomalope82072 (now doing job GettinLoved (Job_1862573) A=Thing_Boomalope82072(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Stormy doing job Milk (Job_1861466) A=Thing_Boomalope82072 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

 

Here's another variant of the same error:

My pawn Olga decided to milk a boomalope that was resting in a pen, when this error came up:

Exception in JobDriver tick for pawn Boomalope56760 driver=JobDriver_Mating (toilIndex=2) driver.job=(RJW_Mate (Job_1846171) A=Thing_Boomalope82067)
System.NullReferenceException: Object reference not set to an instance of an object
  at RJW_Menstruation.HediffComp_Menstruation.CumIn (Verse.Pawn pawn, System.Single volume, System.Single fertility, System.Boolean precum) [0x00160] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at RJW_Menstruation.DoImpregnate_Patch.Prefix (Verse.Pawn pawn, Verse.Pawn partner) [0x0009c] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at (wrapper dynamic-method) rjw.PregnancyHelper.rjw.PregnancyHelper.DoImpregnate_Patch1(Verse.Pawn,Verse.Pawn)
  at RJW_Menstruation.Impregnate_Patch.Prefix (rjw.SexProps props) [0x0008d] in <530b4b8fb00d4057bfc21aab4b4e6554>:0 
  at (wrapper dynamic-method) rjw.PregnancyHelper.rjw.PregnancyHelper.impregnate_Patch2(rjw.SexProps)
  at rjw.JobDriver_Sex.Orgasm () [0x00083] in <93c23f6462104f8da6473c6b6f550857>:0 
  at (wrapper dynamic-method) rjw.JobDriver_Sex.rjw.JobDriver_Sex.SexTick_Patch2(rjw.JobDriver_Sex,Verse.Pawn,Verse.Thing,bool,bool)
  at rjw.JobDriver_Mating+<>c__DisplayClass1_0.<MakeNewToils>b__5 () [0x00069] in <93c23f6462104f8da6473c6b6f550857>:0 
  at Verse.AI.JobDriver.DriverTick () [0x00163] in <446267b72ea8432286db63aecc70cf59>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.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 ()

 

Another possibility is that the load order of my mods is acting up. Here's my current load order:

image.thumb.png.cadce9db14f9ba692d298150ed0b7aae.png

DIIIIIIIIE!!!!!!!!!!11111

No jk, I think this error might be because the rjw mc mod doesn't check for reserved pawns, you might have to bug Ed about this, person who devs rjw-mc. Also check to make sure every mod is fully updated, consider checking out the lazy installer. Sorry your experience on the rjw thread isn't great, people there get cranky being asked the same questions over and over lol

Link to comment

Can confirm variant 1 happens in nothing-but-RJW. Unfortunately to not-Rimworld-modder me it looks like an issue with the game itself:

 

In JobDriver_Mating we have the function

public override bool TryMakePreToilReservations(bool errorOnFailed)
{
    return pawn.Reserve(Target, job, BreederHelper.max_animals_at_once, 0, null, errorOnFailed);
}

which exists in all JobDrivers of all mods (I have looked at) and basically always looks the same as well. After this function succeeds, unloading, etc. should not be able to reserve our target.

 

The error happens in function MakeNewToils, which starts like this:

protected override IEnumerable<Toil> MakeNewToils()
{
    setup_ticks();
    var partnerJob = xxx.gettin_loved;

    //--Log.Message("JobDriver_Mating::MakeNewToils() - setting fail conditions");
    this.FailOnDespawnedNullOrForbidden(iTarget);
    this.FailOn(() => !pawn.CanReserve(Partner, BreederHelper.max_animals_at_once, 0)); // Fail if someone else reserves the target before the animal arrives.
    this.FailOn(() => !pawn.CanReach(Partner, PathEndMode.Touch, Danger.Some)); // Fail if animal cannot reach target.
    this.FailOn(() => pawn.Drafted);
[...]

As you can see, there is an abort condition covering that we could not reserve our target.

 

But the exception does not occur here. So reserving the target must have been successful.

According to the stack trace we fail at Partner.jobs.StartJob , which happens only after this check.

 

So it looks to me as if the unloading job does not respect existing job reservations.

 

Looking at the disassembly of my local JobDriver_UnloadInventory, it would seem that I might be correct: That JobDriver (unlike RJW's) does not fail if its reservation fails.

protected override IEnumerable<Toil> MakeNewToils()
{	
	this.FailOnDespawnedOrNull(TargetIndex.A);
	yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch);
	yield return Toils_General.Wait(10);
	Toil toil = ToilMaker.MakeToil("MakeNewToils");
	toil.initAction = [...]
	yield return toil;
[...]

So the Right Thing(TM) would be (to my poor understanding) to patch that driver, not anything belonging to RJW.

 

Does that look correct? The comment "// Fail if someone else reserves the target before the animal arrives." indicates that (the writer thought) we should repeat the FailOn after every yield . Would that be more reasonable / expected?

Edited by Zsar
better source, wording
Link to comment
3 hours ago, Zsar said:

Can confirm variant 1 happens in nothing-but-RJW. Unfortunately to not-Rimworld-modder me it looks like an issue with the game itself:

 

In JobDriver_Mating we have the function

public override bool TryMakePreToilReservations(bool errorOnFailed)
{
    return pawn.Reserve(Target, job, BreederHelper.max_animals_at_once, 0, null, errorOnFailed);
}

which exists in all JobDrivers of all mods (I have looked at) and basically always looks the same as well. After this function succeeds, unloading, etc. should not be able to reserve our target.

 

The error happens in function MakeNewToils, which starts like this:

protected override IEnumerable<Toil> MakeNewToils()
{
    setup_ticks();
    var partnerJob = xxx.gettin_loved;

    //--Log.Message("JobDriver_Mating::MakeNewToils() - setting fail conditions");
    this.FailOnDespawnedNullOrForbidden(iTarget);
    this.FailOn(() => !pawn.CanReserve(Partner, BreederHelper.max_animals_at_once, 0)); // Fail if someone else reserves the target before the animal arrives.
    this.FailOn(() => !pawn.CanReach(Partner, PathEndMode.Touch, Danger.Some)); // Fail if animal cannot reach target.
    this.FailOn(() => pawn.Drafted);
[...]

As you can see, there is an abort condition covering that we could not reserve our target.

 

But the exception does not occur here. So reserving the target must have been successful.

According to the stack trace we fail at Partner.jobs.StartJob , which happens only after this check.

 

So it looks to me as if the unloading job does not respect existing job reservations.

 

Looking at the disassembly of my local JobDriver_UnloadInventory, it would seem that I might be correct: That JobDriver (unlike RJW's) does not fail if its reservation fails.

protected override IEnumerable<Toil> MakeNewToils()
{	
	this.FailOnDespawnedOrNull(TargetIndex.A);
	yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch);
	yield return Toils_General.Wait(10);
	Toil toil = ToilMaker.MakeToil("MakeNewToils");
	toil.initAction = [...]
	yield return toil;
[...]

So the Right Thing(TM) would be (to my poor understanding) to patch that driver, not anything belonging to RJW.

 

Does that look correct? The comment "// Fail if someone else reserves the target before the animal arrives." indicates that (the writer thought) we should repeat the FailOn after every yield . Would that be more reasonable / expected?

MakeNewToils shouldn't run if trymakepretoilreservations fails

Link to comment

Hey, I've got two things which are completely unrelated, so I'm going to post the second one as a second post just so it's easier to reply separately if desired.

First off, I'm getting a NullRefException on the LINQ query for participants.OrderBy inside AnimationUtility.tryFindAnimation. Based on the stack trace I'm getting, it looks like it's failing on the second call to "Pawn p", which doesn't make any sense at all. It might be worth a null check though?

JobDriver threw exception in toil unnamed's initAction for pawn Sister driver=JobDriver_OrgySex (toilIndex=3) driver.job=(OrgySex (Job_105805) A=Thing_Human8603)
System.NullReferenceException: Object reference not set to an instance of an object
  at Rimworld_Animations.AnimationUtility+<>c.<tryFindAnimation>b__0_0 (Verse.Pawn p) [0x00012] in <de07720d77f543af915afeac53a94831>:0
  at System.Linq.EnumerableSorter`2[TElement,TKey].ComputeKeys (TElement[] elements, System.Int32 count) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.EnumerableSorter`1[TElement].ComputeMap (TElement[] elements, System.Int32 count) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.EnumerableSorter`1[TElement].Sort (TElement[] elements, System.Int32 count) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.OrderedEnumerable`1[TElement].SortedMap (System.Linq.Buffer`1[TElement] buffer) [0x00006] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.OrderedEnumerable`1[TElement].ToArray () [0x00025] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Buffer`1[TElement]..ctor (System.Collections.Generic.IEnumerable`1[T] source) [0x0000a] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.OrderedEnumerable`1[TElement].ToList () [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Rimworld_Animations.AnimationUtility.tryFindAnimation (System.Collections.Generic.List`1[Verse.Pawn]& participants, rjw.xxx+rjwSextype sexType, rjw.SexProps sexProps) [0x00071] in <de07720d77f543af915afeac53a94831>:0
  at Rimworld_Animations.HarmonyPatch_JobDriver_SexBaseInitiator_Start.RerollAnimations (Verse.Pawn pawn, System.Int32& AnimationTimeTicks, Verse.Thing bed, rjw.xxx+rjwSextype sexType, System.Boolean fastAnimForQuickie, rjw.SexProps sexProps) [0x00107] in <de07720d77f543af915afeac53a94831>:0
  at Rimworld_Animations.HarmonyPatch_JobDriver_SexBaseInitiator_Start.Postfix (rjw.JobDriver_SexBaseInitiator& __instance) [0x000de] in <de07720d77f543af915afeac53a94831>:0
  at (wrapper dynamic-method) rjw.JobDriver_SexBaseInitiator.rjw.JobDriver_SexBaseInitiator.Start_Patch3(rjw.JobDriver_SexBaseInitiator)
  at RJW_Events.JobDriver_OrgySex+<>c__DisplayClass1_0.<MakeNewToils>b__7 () [0x00032] in <ffdbeb25b8154555a3719b5dfa3d6a69>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x001b0] in <95de19971c5d40878d8742747904cdcd>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
RJW_Events.JobDriver_OrgySex/<>c__DisplayClass1_0:<MakeNewToils>b__11 ()
(wrapper dynamic-method) Verse.AI.JobDriver:Verse.AI.JobDriver.DriverTick_Patch0 (Verse.AI.JobDriver)
(wrapper dynamic-method) Verse.AI.Pawn_JobTracker:Verse.AI.Pawn_JobTracker.JobTrackerTick_Patch0 (Verse.AI.Pawn_JobTracker)
(wrapper dynamic-method) Verse.Pawn:Verse.Pawn.Tick_Patch3 (Verse.Pawn)
Verse.TickList:Tick ()
(wrapper dynamic-method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch7 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
Verse.Root_Play:Update ()

 

 

My mod list is fairly extensive, but the only methods in this stack are RJW and RJW Animations. This was a randomly started RJW Orgy and it threw the exception when the first participant was there waiting for others. It may have something to do with that Orgy job being a sex job with no partners or something?

Edited by callavico
I found the code tag
Link to comment

Second issue, as I said, completely unrelated:

Animation pawns are frequently swapped when the pawns interacting are futa+female or male+trap. By that, I mean I'll frequently see something like "Female gave a blowjob to Futa" as the action, but the animation is Futa's face at Female's crotch. It has happened with pretty much every sex type, though I haven't done thorough testing to see if there's one type or another that doesn't exhibit the issue.

 

It isn't completely consistent either, sometimes the animations will be fine, though I have yet to find any rhyme or reason behind why it works sometimes and doesn't work others.

 

I see a comment at the top of tryFindAnimation that has an order that pawns should be in (female human, female animal, male human, male animal), which makes me think that that's what's causing this issue, but I don't actually see where this order is being enforced. I could easily see an ordering like this with not enough checks picking a gender=Female pawn who has a dick to be the "receiver" before it advances further and finds the gender=Female pawn that is *actually* the receiver.

 

This one is a lot weirder than the last one, so if there's any direct testing that might help identifying the issue, I'd be happy to help.

Link to comment
On 4/28/2023 at 4:50 AM, callavico said:

Second issue, as I said, completely unrelated:

Animation pawns are frequently swapped when the pawns interacting are futa+female or male+trap. By that, I mean I'll frequently see something like "Female gave a blowjob to Futa" as the action, but the animation is Futa's face at Female's crotch. It has happened with pretty much every sex type, though I haven't done thorough testing to see if there's one type or another that doesn't exhibit the issue.

 

It isn't completely consistent either, sometimes the animations will be fine, though I have yet to find any rhyme or reason behind why it works sometimes and doesn't work others.

 

I see a comment at the top of tryFindAnimation that has an order that pawns should be in (female human, female animal, male human, male animal), which makes me think that that's what's causing this issue, but I don't actually see where this order is being enforced. I could easily see an ordering like this with not enough checks picking a gender=Female pawn who has a dick to be the "receiver" before it advances further and finds the gender=Female pawn that is *actually* the receiver.

 

This one is a lot weirder than the last one, so if there's any direct testing that might help identifying the issue, I'd be happy to help.

 

Yep i have this too.

 

Another problem I found, is when breastfeeding or teaching children and a Lovin' job is about to start. I still need to parse the error for that.

 

Update, here's the log for it:

Could not reserve Thing_DiningChair745355 (layer: null) for Chase for job Lessongiving (Job_3164253) A=Thing_SchoolDesk680544 B=Thing_Human95104 (now doing job Lessongiving (Job_3164253) A=Thing_SchoolDesk680544 B=Thing_Human95104(curToil=-1)) for maxPawns 1 and stackCount -1. Existing reserver: Dubs doing job Breastfeed (Job_3164082) A=Thing_Human541662 (toilIndex=6)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:ReserveSittableOrSpot (Verse.Pawn,Verse.IntVec3,Verse.AI.Job,bool)
RimWorld.JobDriver_Lessongiving:TryMakePreToilReservations (bool)
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob ()
Verse.AI.Pawn_JobTracker:EndCurrentJob (Verse.AI.JobCondition,bool,bool)
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
  
  and then
  
TryMakePreToilReservations() returned false for a non-queued job right after StartJob(). This should have been checked before. curJob=Lessongiving (Job_3164253) A=Thing_SchoolDesk680544 B=Thing_Human95104
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob ()
Verse.AI.Pawn_JobTracker:EndCurrentJob (Verse.AI.JobCondition,bool,bool)
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

 

Edited by Grojcig
Link to comment
3 hours ago, Grojcig said:

 

Yep i have this too.

 

Another problem I found, is when breastfeeding or teaching children and a Lovin' job is about to start. I still need to parse the error for that.

 

Yeah I've had a lot of errors like that, but they stack like 5 or 6 mods in the call stack so I'm not sure which of them is misbehaving yet, so I wasn't going to report it.

Edited by callavico
typo
Link to comment

So I guess this hasn't been patched to work with the newest HAR version? I am trying to use a Vaporeon NSFW mod with needs a Vaporeon mod that requires HAR, using the old version that works with these animations breaks them to have no eyes hair tails etc, but using the newest HAR restores it. Same thing happens with the other mods by the same author like the Sylveon and Zoroark mods.

Link to comment
On 4/24/2023 at 3:35 AM, c0ffeeeee said:

"might be because the rjw mc mod doesn't check for reserved pawns"

- oh... oh I tihnk I'm starting to undestand what you meant by "mc" (sorry, but acronyms don't work for me in professions and topics that I'm new to.)

So you are saying that the Main Character (picked by the player when RJW hero mode is active) causes this. It basically disregards busy pawns. Yes?

Edited by Grojcig
Link to comment
6 hours ago, Grojcig said:

- oh... oh I tihnk I'm starting to undestand what you meant by "mc" (sorry, but acronyms don't work for me in professions and topics that I'm new to.)

So you are saying that the Main Character (picked by the player when RJW hero mode is active) causes this. It basically disregards busy pawns. Yes?

By MC i believe c0ffee is referring to rjw Milkable Colonists.
1. It's unknown if you are even using that mod

2. I dont think that mod is affecting jobs of milking animals

3. Nothing in the stack traces mention milkable colonists, one of them however did mention menstruation 

 

I think mainly the issue here is the game is erroring when trying to do lovin/mating jobs for busy pawns. Its likely that rjw doesnt check if a pawn is busy for the job so the game errors when it trys and fails. Most jobs can be easily interrupted, the ones that error seem to be ones that lock the pawns down like milking/unloading an animal.

Link to comment
On 5/5/2023 at 11:32 PM, Tory187 said:

By MC i believe c0ffee is referring to rjw Milkable Colonists.
1. It's unknown if you are even using that mod

2. I dont think that mod is affecting jobs of milking animals

3. Nothing in the stack traces mention milkable colonists, one of them however did mention menstruation 


I think mainly the issue here is the game is erroring when trying to do lovin/mating jobs for busy pawns. Its likely that rjw doesnt check if a pawn is busy for the job so the game errors when it trys and fails. Most jobs can be easily interrupted, the ones that error seem to be ones that lock the pawns down like milking/unloading an animal.

Thank you so much for answering!

 

1. I don't have Milkable Colonists installed.

2. No idea, never used it.

3. Yes, I have Menstruation installed!

 

In fact here's my load order and list of mods installed:

 

 

image.thumb.png.cadce9db14f9ba692d298150ed0b7aae.png

 

I think we are thinking the same thing here when it comes to jobs that lock pawns. There are more jobs like these such as breastfeeding or teaching children.

 

I will now try and disable menstruation and start a new colony. Just to see if it affects milking animals and raising/teaching children.  I believe in my first couple of playthroughs I never used this mod and things were relatively fine.

 

I'm also going to disable RJW Extensions as I'm suspecting that it affects a quest where items made from Human Skin are not loaded (butplugs, dildos, etc.).

 

Here's my new load order:

 

image.thumb.png.92b3a31ff397571d43fad7a8a369ec74.png

 

 

Update: After some testing I ran into this "job while doing Lovin' " bug again and I also found a new variant which this time also interrupts ingest. Here are the new logs.

 

 

 

Edited by Grojcig
Link to comment
  Old bug for interacting with animals:

Could not reserve Thing_Bison244491 (layer: null) for Bison288831 for job GettinLoved (Job_3314545) A=Thing_Bison244491 (now doing job GettinLoved (Job_3314545) A=Thing_Bison244491(curToil=0)) for maxPawns 1 and stackCount 0. Existing reserver: Ash doing job Shear (Job_3313700) A=Thing_Bison244491 (toilIndex=0)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.Toils_Reserve/<>c__DisplayClass1_0:<Reserve>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Pawn_JobTracker:StartJob (Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool,bool,System.Nullable`1<bool>,bool,bool)
rjw.JobDriver_Mating/<>c__DisplayClass1_0:<MakeNewToils>b__3 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

New bug at ingesting food or smoking smokeleaf:
  Could not reserve Thing_Autodoor207904 (layer: null) for Ash for job Ingest (Job_3173170) A=Thing_MealFine330341 (now doing job Ingest (Job_3173170) A=Thing_MealFine330341(curToil=6)) for maxPawns 1 and stackCount -1. Existing reserver: Valentina doing job Ingest (Job_3172907) A=Thing_MealFine330333 (toilIndex=8)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:ReserveSittableOrSpot (Verse.Pawn,Verse.IntVec3,Verse.AI.Job,bool)
RimWorld.Toils_Ingest/<>c__DisplayClass3_0:<CarryIngestibleToChewSpot>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

  
  Could not reserve Thing_Autodoor264105 (layer: null) for Ash for job Ingest (Job_3110189) A=Thing_SmokeleafJoint327190 C=Thing_SmokeleafJoint288435 (now doing job Ingest (Job_3110189) A=Thing_SmokeleafJoint327190 C=Thing_SmokeleafJoint288435(curToil=11)) for maxPawns 1 and stackCount -1. Existing reserver: Dubs doing job Ingest (Job_3110697) A=Thing_SmokeleafJoint323030 C=Thing_SmokeleafJoint288435 (toilIndex=8)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.ReservationManager:LogCouldNotReserveError (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef)
Verse.AI.ReservationManager:Reserve (Verse.Pawn,Verse.AI.Job,Verse.LocalTargetInfo,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:Reserve (Verse.Pawn,Verse.LocalTargetInfo,Verse.AI.Job,int,int,Verse.ReservationLayerDef,bool)
Verse.AI.ReservationUtility:ReserveSittableOrSpot (Verse.Pawn,Verse.IntVec3,Verse.AI.Job,bool)
RimWorld.Toils_Ingest/<>c__DisplayClass3_0:<CarryIngestibleToChewSpot>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:StartPath (Verse.LocalTargetInfo,Verse.AI.PathEndMode)
Verse.AI.Toils_Goto/<>c__DisplayClass1_0:<GotoThing>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:JumpToToil (Verse.AI.Toil)
RimWorld.JobDriver_Ingest/<>c__DisplayClass21_0:<TakeExtraIngestibles>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:JumpToToil (Verse.AI.Toil)
Verse.AI.Toils_Jump/<>c__DisplayClass0_0:<Jump>b__0 ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell ()
Verse.AI.Pawn_PathFollower:PatherTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

 

I guess this means Menstruation is not the cause here. As I have that and RJW-extensions disabled.

Edited by Grojcig
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use