Jump to content

[1.4] RJW Animation Framework


Recommended Posts

On 5/3/2020 at 5:16 AM, epitaph78 said:

here you go..

 

Most Animals should be coverd, i did not tested all but it should be a start.  I coulnd find a list for the defNames of the animals so some could not work.

Animations.rar 1.98 kB · 78 downloads

The defNames should be in the the Rimworld\Mods\Core\Defs\ThingDefs_Races folder. The XML files in there tell you what the names are in the <defName>name</defName> sections.

 

You can literally just take those names and slap them in the animations file with the others in the list to get them to work. They may not work well... due to size and position, but they'll at least make the movements. Not speaking directly to you of course, but to others that are wondering how.

Link to comment
On 5/3/2020 at 8:16 AM, epitaph78 said:

here you go..

 

Most Animals should be coverd, i did not tested all but it should be a start.  I coulnd find a list for the defNames of the animals so some could not work.

Animations.rar 1.98 kB · 84 downloads

I edited your XML to fix some of the defnames and add the rest.

 

This should have all the animals (even fairly nonsensical ones like cobras). I tested it and there are positioning issues with some of the smaller ones like rats, but they're not terrible and most actually work okay.

 

Extract it to RimWorld\Mods\rimworld-animations\Defs\AnimationDefs and you're good to go.

Animations_Beast.rar

Link to comment
18 hours ago, ElLoboGaming said:

I edited your XML to fix some of the defnames and add the rest.

 

This should have all the animals (even fairly nonsensical ones like cobras). I tested it and there are positioning issues with some of the smaller ones like rats, but they're not terrible and most actually work okay.

 

Extract it to RimWorld\Mods\rimworld-animations\Defs\AnimationDefs and you're good to go.

Animations_Beast.rar 1.44 kB · 49 downloads

Thanks for doing this :)

Link to comment
20 hours ago, ElLoboGaming said:

I edited your XML to fix some of the defnames and add the rest.

 

This should have all the animals (even fairly nonsensical ones like cobras). I tested it and there are positioning issues with some of the smaller ones like rats, but they're not terrible and most actually work okay.

 

Extract it to RimWorld\Mods\rimworld-animations\Defs\AnimationDefs and you're good to go.

Animations_Beast.rar 1.44 kB · 50 downloads

I think "Megascarab" is misspelled in there, and the mechanoids "Mech_Lancer", "Mech_Scyther", and "Mech_Pikeman" are missing, but those aren't exactly common anyway. Either way, nice work!

 

For those that want it, here's a file for animals on animals that uses pretty much the same animation. I adjusted the angle for it to make a little more sense in a lot of cases, but naturally a lot of them are still going to look goofy. It at least overrides the default animation for something else if you're tired of seeing them bump into each other.

 

It can go with the "Animation_Beast" files that EILoboGaming or epitaph78 made, or you can use the one I'm adding as well. Same instructions that EILobo provided, just extract the file(s) to the RimWorld\Mods\rimworld-animations\Defs\AnimationDefs folder and you should be good!

 

Note: The BeastxBeast file only applies to animals on animals, it doesn't add the animation with animals on humans. That's what the other file is for.

 

Edit: in hindsight, the mech's were probably left off for a reason. Sex doesn't really make much sense with them, haha. Oh well, I can edit them out later if it's an issue.

 

Animations_BeastxBeast.zip

Link to comment

I've been getting the following error, and no animations run.

 

Error in static constructor of Rimworld_Animations.Harmony_PatchAll: System.TypeInitializationException: The type initializer for 'Rimworld_Animations.Harmony_PatchAll' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Boolean Rimworld_Animations.HarmonyPatch_SexTick::Prefix(Verse.Pawn& pawn, Verse.Pawn& partner, System.Boolean& enablerotation, System.Boolean& pawnnude, System.Boolean& partnernude)
  at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase& lastOriginal) [0x0004d] in <2161c8330234450b8141397c32c11571>:0 
  at HarmonyLib.PatchClassProcessor.Patch () [0x00057] in <2161c8330234450b8141397c32c11571>:0 
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00127] 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 Rimworld_Animations.Harmony_PatchAll..cctor () [0x00012] in <a0bc262edc8646d58c10b680f25f7bb5>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at (wrapper dynamic-method) System.Runtime.CompilerServices.RuntimeHelpers.DMD<DMD<RunClassConstructor_Patch1>?2051762560::RunClassConstructor_Patch1>(System.RuntimeTypeHandle)
  at (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.DMD<DMD<CallAll_Patch2>?196314880::CallAll_Patch2>()

Any ideas what this might be? I *think* I have all the up to date versions and the mod order seems correct.

Link to comment
11 minutes ago, kurikinton said:

I've been getting the following error, and no animations run.

 

-cut-
 

Any ideas what this might be? I *think* I have all the up to date versions and the mod order seems correct.

Harmony should be first, at the very top, and Animations should be basically at the bottom. It's possible that the RJW 4.1.4 version breaks something, I've only tried version 4.1.3.

Link to comment
20 hours ago, Ranot said:

Harmony should be first, at the very top, and Animations should be basically at the bottom. It's possible that the RJW 4.1.4 version breaks something, I've only tried version 4.1.3.

Should be compatible with rjw 4.1.

 

21 hours ago, kurikinton said:

I've been getting the following error, and no animations run.

 


Error in static constructor of Rimworld_Animations.Harmony_PatchAll: System.TypeInitializationException: The type initializer for 'Rimworld_Animations.Harmony_PatchAll' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Boolean Rimworld_Animations.HarmonyPatch_SexTick::Prefix(Verse.Pawn& pawn, Verse.Pawn& partner, System.Boolean& enablerotation, System.Boolean& pawnnude, System.Boolean& partnernude)
  at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase& lastOriginal) [0x0004d] in <2161c8330234450b8141397c32c11571>:0 
  at HarmonyLib.PatchClassProcessor.Patch () [0x00057] in <2161c8330234450b8141397c32c11571>:0 
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00127] 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 Rimworld_Animations.Harmony_PatchAll..cctor () [0x00012] in <a0bc262edc8646d58c10b680f25f7bb5>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
  at (wrapper dynamic-method) System.Runtime.CompilerServices.RuntimeHelpers.DMD<DMD<RunClassConstructor_Patch1>?2051762560::RunClassConstructor_Patch1>(System.RuntimeTypeHandle)
  at (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.DMD<DMD<CallAll_Patch2>?196314880::CallAll_Patch2>()

Any ideas what this might be? I *think* I have all the up to date versions and the mod order seems correct.

Make sure you're updated to the latest version of rjw, and that this mod is loaded after.

Link to comment

Just to be clear about the beast file. Do you add it to this mod, the framework. Or do it add it to  epitaph78 animation mod he posted? I thought it was to the base animation framework but not seeing any animals going at it lol Save the wolfs when they feel like it with out me making my pawn have sex.

Link to comment

So, there's something I'm working on to help out with the animation process, but there's a few things I'm wondering about that I haven't been able to find answers for.

 

Does anyone know what variable the game uses to resize the objects in game? And how it's used if you know what it is? I thought <baseBodySize> or <drawSize> could possibly be multipliers or the actual sizes, but they're inconsistent from animal to animal, so I have no idea how they're used if they're the correct variables. If you want to animate an animal, it makes it a little difficult since they don't scale the same as humans (Humans are the same size as their graphics in game, but animals tend to vary drastically. A Squirrel for example is basically the same size as it's graphic image, but a Wolf Timber is about 1.25 times it's image. Both of them use 128x128 sprites).

 

Also, is scaling going to be part of the RJW animations? It could help a bit with perspective, as well as other weird things. Being able to spawn in another graphic, like a dildo or... heck, hands even if you wanted could be a nice addition. It'd make things like handjobs or footjobs a bit more believable, lol.

 

Thanks if you have any answers!

 

45 minutes ago, ShodawCat13 said:

Just to be clear about the beast file. Do you add it to this mod, the framework. Or do it add it to  epitaph78 animation mod he posted? I thought it was to the base animation framework but not seeing any animals going at it lol Save the wolfs when they feel like it with out me making my pawn have sex.

You referring to my file? Both of the .xml files in the .zip I provided are animation files. They go in the same folder as all the other animation do, the

RimWorld\Mods\rimworld-animations\Defs\AnimationDefs folder. So yes, you add it to this mod. This isn't a seperate mod.

 

One file is the beastxbeast animation, which enables all the different animals. The other is basically the same as the file that epitaph78 posted. My file just fixes the "Megascarab" typo to make them functional, and I added the mechanoids onto the list.

 

You only use one Animations_Beast file. The one that epitaph78 provided, or the one that I included. They have the same name, so you can't use them both anyway.

 

Edit: At second glance, if your wolves are going at it, it means that it worked. If you want random various animals to breed, you 1: need to make sure that they're enabled in the RJW settings, and 2: Animals of different species only mate if you have them tamed, and you have them marked as "breeding", "breedable", or whatever. Wild animals will occasionally mate, but only with their own species.

 

Also, animals don't generally mate with humans unless they have the zoophile trait. If your human is lacking that trait, animals will likely avoid that human.

Link to comment

I figured it I added the files into Animation framework folder. I was just asking as when I tossed in Epitaph78's before it was treating his like a new mod, (animations for the framework I believe) so wondered if I needed that then overwrote their file with yours.

Link to comment
29 minutes ago, ShodawCat13 said:

I figured it I added the files into Animation framework folder. I was just asking as when I tossed in Epitaph78's before it was treating his like a new mod, (animations for the framework I believe) so wondered if I needed that then overwrote their file with yours.

Yeah, sorry. I misunderstood what you were asking a bit. I actually forgot that they structured their file like that. What Epitaph78's file/mod does is overwrite whatever Animations_Beast.xml file is currently in the main RJW_Animations folder. So I'd advise just removing it altogether.

 

EILoboGaming and I both provided updated versions of their file, we just didn't do it in mod format. If you leave Epitaph78's file installed and load it after the RJW_Animations mod, it'll actually overwrite ElboGaming's or my files if you added them. Not my beastxbeast animation, just the humanxbeast animation.

 

In other words, remove the folder/mod that Epitaph78 provided, and place my files into the RJW_Animations's AnimationDefs folder. It's fine to overwrite the Animations_Beast file that's already in there.

Link to comment
1 hour ago, Ranot said:

So, there's something I'm working on to help out with the animation process, but there's a few things I'm wondering about that I haven't been able to find answers for.

 

Does anyone know what variable the game uses to resize the objects in game? And how it's used if you know what it is? I thought <baseBodySize> or <drawSize> could possibly be multipliers or the actual sizes, but they're inconsistent from animal to animal, so I have no idea how they're used if they're the correct variables. If you want to animate an animal, it makes it a little difficult since they don't scale the same as humans (Humans are the same size as their graphics in game, but animals tend to vary drastically. A Squirrel for example is basically the same size as it's graphic image, but a Wolf Timber is about 1.25 times it's image. Both of them use 128x128 sprites).

 

Also, is scaling going to be part of the RJW animations? It could help a bit with perspective, as well as other weird things. Being able to spawn in another graphic, like a dildo or... heck, hands even if you wanted could be a nice addition. It'd make things like handjobs or footjobs a bit more believable, lol.

 

Thanks if you have any answers!

 

You referring to my file? Both of the .xml files in the .zip I provided are animation files. They go in the same folder as all the other animation do, the

RimWorld\Mods\rimworld-animations\Defs\AnimationDefs folder. So yes, you add it to this mod. This isn't a seperate mod.

 

One file is the beastxbeast animation, which enables all the different animals. The other is basically the same as the file that epitaph78 posted. My file just fixes the "Megascarab" typo to make them functional, and I added the mechanoids onto the list.

 

You only use one Animations_Beast file. The one that epitaph78 provided, or the one that I included. They have the same name, so you can't use them both anyway.

 

Edit: At second glance, if your wolves are going at it, it means that it worked. If you want random various animals to breed, you 1: need to make sure that they're enabled in the RJW settings, and 2: Animals of different species only mate if you have them tamed, and you have them marked as "breeding", "breedable", or whatever. Wild animals will occasionally mate, but only with their own species.

 

Also, animals don't generally mate with humans unless they have the zoophile trait. If your human is lacking that trait, animals will likely avoid that human.

Scaling looks doable. I'm looking at how CSL does scaling for their children, looks like they just apply the pawn/object material onto a scaled mesh.

Link to comment
1 hour ago, c0ffeeeee said:

Scaling looks doable. I'm looking at how CSL does scaling for their children, looks like they just apply the pawn/object material onto a scaled mesh.

Hmm, and if it's possible to adjust the scale of that mesh, then it should be fairly feasible. If you have to recreate a different sized mesh and apply a material each time... I guess that's doable, but definitely not preferred. I imagine that'd be pretty taxing.

 

So, I've been devising a way to create an animation using Flash/Animate, and have it automatically generate an xml animation file for it (with a little preparation work). I have most of it done, but I still need to calculate tickDuration, headbob distance, and find a way to make things more user friendly. I tried using Photoshop, but figured that Flash/Animate was better suited for animation stuff, so I moved things over and things just kind of happened from there. Turns out, Flash is pretty stupid, but it seems to be workable, lol.

 

Anyway, thanks for the response! I asked about in-game sizes since I figured it'd be convenient to have things already properly scaled in the library folder, but it seems like I may have to eyeball it and guess.

 

Edit: Whoops, almost forgot to ask! What's the stageIndex for? It seems to always be 0, unless I'm missing one somewhere. It'd be neat to have different possible stages, and have it advance to one randomly depending on it's index or something.

Link to comment

Right, I hate to be "that guy" but is there any possibility of having a 1.0 version? I'm currently still forced to use the last version of RJW that worked for the 1.0 version of the game since some of the mods I consider essential have yet to be updated. I know I'm asking a lot, but I tried a new 1.1 game with this mod installed and thought it was fantastic and I'm torn between using it and losing the functionality of my other outdated mods.

 

I'd do it myself if I knew how.

Link to comment
7 hours ago, Toastaddict said:

Right, I hate to be "that guy" but is there any possibility of having a 1.0 version? I'm currently still forced to use the last version of RJW that worked for the 1.0 version of the game since some of the mods I consider essential have yet to be updated. I know I'm asking a lot, but I tried a new 1.1 game with this mod installed and thought it was fantastic and I'm torn between using it and losing the functionality of my other outdated mods.

 

I'd do it myself if I knew how.

A big part of the update that it seems like a lot of modmakers have missed is that the ability to make mods compatible for multiple versions was added. So your 1.1 mod can also work for 1.0 if you just set it up to do so. But there are still so many mods on the workshop that have their 1.1 version and their 1.0 version.

Link to comment
1 hour ago, whateverdontcare said:

A big part of the update that it seems like a lot of modmakers have missed is that the ability to make mods compatible for multiple versions was added. So your 1.1 mod can also work for 1.0 if you just set it up to do so. But there are still so many mods on the workshop that have their 1.1 version and their 1.0 version.

I cant speak for the dev but I seriously doubt there will be a 1.0 version as this animation addon was developed alongside 1.1 RJW and many important changes to RJW were made after the last 1.0 version to even allow these animations to work properly (like defining the type of the sexact before the sex happens, not after its finished)

Link to comment
20 hours ago, Ranot said:

Hmm, and if it's possible to adjust the scale of that mesh, then it should be fairly feasible. If you have to recreate a different sized mesh and apply a material each time... I guess that's doable, but definitely not preferred. I imagine that'd be pretty taxing.

 

So, I've been devising a way to create an animation using Flash/Animate, and have it automatically generate an xml animation file for it (with a little preparation work). I have most of it done, but I still need to calculate tickDuration, headbob distance, and find a way to make things more user friendly. I tried using Photoshop, but figured that Flash/Animate was better suited for animation stuff, so I moved things over and things just kind of happened from there. Turns out, Flash is pretty stupid, but it seems to be workable, lol.

 

Anyway, thanks for the response! I asked about in-game sizes since I figured it'd be convenient to have things already properly scaled in the library folder, but it seems like I may have to eyeball it and guess.

 

Edit: Whoops, almost forgot to ask! What's the stageIndex for? It seems to always be 0, unless I'm missing one somewhere. It'd be neat to have different possible stages, and have it advance to one randomly depending on it's index or something.

StageIndex currently does nothing, I think I added it in case the player ever wanted to skip/rewind stages or something, but never got to it. Also since Rimworld uses Unity, I think I might be able to scale the meshes just by multiplying its vertices, though I'm not sure how that'll play with the object's default scale. Also if you make a way to create the animations in another program and export the XMLs that would be amazing. I know my method of using the measure tool in Photoshop is janky :P

Link to comment
12 hours ago, Toastaddict said:

Right, I hate to be "that guy" but is there any possibility of having a 1.0 version? I'm currently still forced to use the last version of RJW that worked for the 1.0 version of the game since some of the mods I consider essential have yet to be updated. I know I'm asking a lot, but I tried a new 1.1 game with this mod installed and thought it was fantastic and I'm torn between using it and losing the functionality of my other outdated mods.

 

I'd do it myself if I knew how.

I didn't start this mod until 1.1, and RJW 1.1 is very different from 1.0, so backwards updating to 1.0 would be very difficult I'm afraid. You might be able to compile an older version, but you'd need to rewrite a lot of code and you'd be missing out on the latest features.

Link to comment
2 hours ago, c0ffeeeee said:

StageIndex currently does nothing, I think I added it in case the player ever wanted to skip/rewind stages or something, but never got to it.

Ah, that explains it. I feel like it could have potential, but at least I know it's not doing anything atm, lol.

 

2 hours ago, c0ffeeeee said:

Also since Rimworld uses Unity, I think I might be able to scale the meshes just by multiplying its vertices, though I'm not sure how that'll play with the object's default scale.

Yeah, it looks like scaling the x, y, and z vertices would work. I also read something about adding a child GameObject, and applying the mesh to that instead. Apparently you can scale the transform of the child that way. I don't know enough about it to say for sure unfortunately.

 

2 hours ago, c0ffeeeee said:

Also if you make a way to create the animations in another program and export the XMLs that would be amazing. I know my method of using the measure tool in Photoshop is janky :P

That measure tool was one of the main reasons I switched to another program, haha. I prefer having exact measurements, and being able to more easily adjust and see what I'm animating. That and if you wanted to make any kind of complicated animation, it'd take a while to copy all the data into an xml. So far, I'm mainly concerned about trying to explain to others how to use it. It's not complicated... I think. But oh well, I'll try to show you whenever I have something presentable. It'll probably be another week, since I'd still have to test it myself and fix things up. I've spent far more hours working on this thing than I care to say...

 

You have Photoshop, so you have Flash or Animate, right? I'm using Animate, but I'm trying to make sure it works for Flash CS6.

Link to comment
8 hours ago, c0ffeeeee said:

I didn't start this mod until 1.1, and RJW 1.1 is very different from 1.0, so backwards updating to 1.0 would be very difficult I'm afraid. You might be able to compile an older version, but you'd need to rewrite a lot of code and you'd be missing out on the latest features.

Oh well, thanks anyway. Hopefully the authors of the outdated mods I use will rise from the grave at some point and release an update.

Link to comment
5 hours ago, Toastaddict said:

Oh well, thanks anyway. Hopefully the authors of the outdated mods I use will rise from the grave at some point and release an update.

while browsing the steam workshop I noticed a lot of different mods from different authors that were patched for 1.1 by someone called 'Mlie', maybe you could suggest your mods to be patched as well?

Link to comment
On 5/9/2020 at 8:03 AM, c0ffeeeee said:

Make sure you're updated to the latest version of rjw, and that this mod is loaded after.

I'm using 4.1.3, which there shouldn't be any problems with, though admittedly not "the latest" (but I'm using the version of this mod that was available when 4.1.3 was the latest), and as I said, the load order is correct.  So it's not that.

Link to comment
31 minutes ago, kurikinton said:

 and as I said, the load order is correct.  So it's not that.

I don't want to sound mean, but that really doesn't mean anything. Mods are complicated things, and getting the correct order can be difficult even for experienced modders. Unless we see what the order is ourselves, we're forever going to doubt that you did it correctly. It's nothing against you, that's just how it is with mods. That said, it does sound like you did your research, so chances are the problem is elsewhere.

 

I'm guessing that RJW works fine without the animations, right? It seems to be Harmony/ HugsLib that's getting the error, so it doesn't hurt to check those. HugsLib and Harmony are two separate mods, though they used to be combined. HugsLib is up to version 7.1.4, and Harmony was last updated 2 days ago (though the previous version would obviously be fine). There's a chance something else is causing the problem, but it's odd that it doesn't appear anywhere in that log if it is.

 

I guess I could also ask what version of Rimworld you're using, but if you're using the 1.1 version and RJW is working fine... that's probably not the problem.

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
  • Recently Browsing   1 member

×
×
  • 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