RimWorld

RimWorld

Gulden Mod
Yoann 10 Nov, 2022 @ 12:01pm
I can't patch your mod - Baby Animals
Hi,
I updated my mod Baby Animals, and found that my patch doesn't work for your mod.
I don't understand why, it's the same patch who works with many others mods.

Can you look at it when you have time please? (no hurry)

I get this error (which teaches me nothing):
RimWorld 1.4.3542 rev627 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) RimWorld.VersionControl:LogVersionNumber () Verse.Root:CheckGlobalInit () Verse.Root:Start () Verse.Root_Entry:Start () [Baby Animals] Patch operation Verse.PatchOperationFindMod(Gulden Mod) failed file: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\2621722165\1.4\Patches\ThingDefs_RacesPatches\Races_GuldenModPatch.xml UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.PatchOperation:Complete (string) Verse.LoadedModManager:ClearCachedPatches () Verse.LoadedModManager:LoadAllActiveMods () Verse.PlayDataLoader:DoPlayLoad () Verse.PlayDataLoader:LoadAllPlayData (bool) Verse.Root/<>c:<Start>b__6_1 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_Context (object) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () [Biomes! Core v2.0.0-beta] Initialized UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) BiomesCore.BiomesCore:Log (string) BiomesCore.BiomesCore:.cctor () System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (System.RuntimeTypeHandle) Verse.StaticConstructorOnStartupUtility:CallAll () Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 () Verse.LongEventHandler:ExecuteToExecuteWhenFinished () Verse.LongEventHandler:UpdateCurrentAsynchronousEvent () Verse.LongEventHandler:LongEventsUpdate (bool&) Verse.Root:Update () Verse.Root_Entry:Update () Transpiler start: JobGiver_GetRest.GetPriority (2 matches) UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) NocturnalAnimals.Patch_JobGiver_GetRest/Patch_GetPriority/<Transpiler>d__0:MoveNext () System.Collections.Generic.List`1<HarmonyLib.CodeInstruction>:.ctor (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) System.Linq.Enumerable:ToList<HarmonyLib.CodeInstruction> (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) HarmonyLib.CodeTranspiler:GetResult (System.Reflection.Emit.ILGenerator,System.Reflection.MethodBase) HarmonyLib.MethodBodyReader:FinalizeILCodes (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.MethodInfo>,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodCopier:Finalize (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodPatcher:CreateReplacement (System.Collections.Generic.Dictionary`2<int, HarmonyLib.CodeInstruction>&) HarmonyLib.PatchFunctions:UpdateWrapper (System.Reflection.MethodBase,HarmonyLib.PatchInfo) HarmonyLib.PatchClassProcessor:ProcessPatchJob (HarmonyLib.PatchJobs`1/Job<System.Reflection.MethodInfo>) HarmonyLib.PatchClassProcessor:PatchWithAttributes (System.Reflection.MethodBase&) HarmonyLib.PatchClassProcessor:Patch () HarmonyLib.Harmony:<PatchAll>b__10_0 (System.Type) HarmonyLib.CollectionExtensions:Do<System.Type> (System.Collections.Generic.IEnumerable`1<System.Type>,System.Action`1<System.Type>) HarmonyLib.Harmony:PatchAll (System.Reflection.Assembly) NocturnalAnimals.NocturnalAnimals:.cctor () System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (System.RuntimeTypeHandle) Verse.StaticConstructorOnStartupUtility:CallAll () Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 () Verse.LongEventHandler:ExecuteToExecuteWhenFinished () Verse.LongEventHandler:UpdateCurrentAsynchronousEvent () Verse.LongEventHandler:LongEventsUpdate (bool&) Verse.Root:Update () Verse.Root_Entry:Update () JobGiver_GetRest.GetPriority match 1 of 2 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) NocturnalAnimals.Patch_JobGiver_GetRest/Patch_GetPriority/<Transpiler>d__0:MoveNext () System.Collections.Generic.List`1<HarmonyLib.CodeInstruction>:.ctor (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) System.Linq.Enumerable:ToList<HarmonyLib.CodeInstruction> (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) HarmonyLib.CodeTranspiler:GetResult (System.Reflection.Emit.ILGenerator,System.Reflection.MethodBase) HarmonyLib.MethodBodyReader:FinalizeILCodes (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.MethodInfo>,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodCopier:Finalize (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodPatcher:CreateReplacement (System.Collections.Generic.Dictionary`2<int, HarmonyLib.CodeInstruction>&) HarmonyLib.PatchFunctions:UpdateWrapper (System.Reflection.MethodBase,HarmonyLib.PatchInfo) HarmonyLib.PatchClassProcessor:ProcessPatchJob (HarmonyLib.PatchJobs`1/Job<System.Reflection.MethodInfo>) HarmonyLib.PatchClassProcessor:PatchWithAttributes (System.Reflection.MethodBase&) HarmonyLib.PatchClassProcessor:Patch () HarmonyLib.Harmony:<PatchAll>b__10_0 (System.Type) HarmonyLib.CollectionExtensions:Do<System.Type> (System.Collections.Generic.IEnumerable`1<System.Type>,System.Action`1<System.Type>) HarmonyLib.Harmony:PatchAll (System.Reflection.Assembly) NocturnalAnimals.NocturnalAnimals:.cctor () System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (System.RuntimeTypeHandle) Verse.StaticConstructorOnStartupUtility:CallAll () Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 () Verse.LongEventHandler:ExecuteToExecuteWhenFinished () Verse.LongEventHandler:UpdateCurrentAsynchronousEvent () Verse.LongEventHandler:LongEventsUpdate (bool&) Verse.Root:Update () Verse.Root_Entry:Update () JobGiver_GetRest.GetPriority match 2 of 2 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) NocturnalAnimals.Patch_JobGiver_GetRest/Patch_GetPriority/<Transpiler>d__0:MoveNext () System.Collections.Generic.List`1<HarmonyLib.CodeInstruction>:.ctor (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) System.Linq.Enumerable:ToList<HarmonyLib.CodeInstruction> (System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction>) HarmonyLib.CodeTranspiler:GetResult (System.Reflection.Emit.ILGenerator,System.Reflection.MethodBase) HarmonyLib.MethodBodyReader:FinalizeILCodes (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.MethodInfo>,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodCopier:Finalize (HarmonyLib.Emitter,System.Collections.Generic.List`1<System.Reflection.Emit.Label>,bool&) HarmonyLib.MethodPatcher:CreateReplacement (System.Collections.Generic.Dictionary`2<int, HarmonyLib.CodeInstruction>&) HarmonyLib.PatchFunctions:UpdateWrapper (System.Reflection.MethodBase,HarmonyLib.PatchInfo) HarmonyLib.PatchClassProcessor:ProcessPatchJob (HarmonyLib.PatchJobs`1/Job<System.Reflection.MethodInfo>) HarmonyLib.PatchClassProcessor:PatchWithAttributes (System.Reflection.MethodBase&) HarmonyLib.PatchClassProcessor:Patch () HarmonyLib.Harmony:<PatchAll>b__10_0 (System.Type) HarmonyLib.CollectionExtensions:Do<System.Type> (System.Collections.Generic.IEnumerable`1<System.Type>,System.Action`1<System.Type>) HarmonyLib.Harmony:PatchAll (System.Reflection.Assembly) NocturnalAnimals.NocturnalAnimals:.cctor () System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (System.RuntimeTypeHandle) Verse.StaticConstructorOnStartupUtility:CallAll () Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 () Verse.LongEventHandler:ExecuteToExecuteWhenFinished () Verse.LongEventHandler:UpdateCurrentAsynchronousEvent () Verse.LongEventHandler:LongEventsUpdate (bool&) Verse.Root:Update () Verse.Root_Entry:Update ()
< >
Showing 1-4 of 4 comments
SirMashedPotato 10 Nov, 2022 @ 9:44pm 
Could you please post the patch xml.
Last edited by SirMashedPotato; 10 Nov, 2022 @ 9:44pm
Yoann 11 Nov, 2022 @ 1:17am 
Here:
<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Gulden Mod</li> </mods> <match Class="PatchOperationSequence"> <success>Normal</success> <operations> <!-- Gulden_Animal_Capricorn 30 --> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "Gulden_Animal_Capricorn"]/race</xpath> <value> <ageGenerationCurve> <points> <li>(0,0)</li> <li>(0.001,100)</li> <li>(20.25,100)</li> <li>(22.5,30)</li> <li>(26.25,18)</li> <li>(30,10)</li> <li>(33.75,3)</li> <li>(37.5,0)</li> </points> </ageGenerationCurve> </value> </li> <!-- GuldenRabbitgaroo 8 --> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "GuldenRabbitgaroo"]/race</xpath> <value> <ageGenerationCurve> <points> <li>(0,0)</li> <li>(0.001,100)</li> <li>(5.4,100)</li> <li>(6.75,30)</li> <li>(7,18)</li> <li>(8,10)</li> <li>(9,3)</li> <li>(10,0)</li> </points> </ageGenerationCurve> </value> </li> <!-- GuldenSheep 12 --> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "GuldenSheep"]/race</xpath> <value> <ageGenerationCurve> <points> <li>(0,0)</li> <li>(0.001,100)</li> <li>(8.1,100)</li> <li>(9,30)</li> <li>(10.5,18)</li> <li>(12,10)</li> <li>(13.5,3)</li> <li>(15,0)</li> </points> </ageGenerationCurve> </value> </li> </operations> </match> </Operation> </Patch>
SirMashedPotato 11 Nov, 2022 @ 10:35am 
It's specifically the rabitgaroo patch causing it to fail.

The <race> node is not in the GuldenRabbitgaroo def, but is instead in the BaseRabbitgaroo abstract def. So you'll need to use @Name, and the Name instead.

<xpath>/Defs/ThingDef[@Name = "BaseRabbitgaroo"]/race</xpath>
Yoann 11 Nov, 2022 @ 11:11am 
Ooooh, it was only that, thank you!
It seems I made the patch too fast without checking last time ^^'
< >
Showing 1-4 of 4 comments
Per page: 1530 50