Jump to content

Adding custom animations to vanilla idle markers?


Katy420

Recommended Posts

So I have a cool idea that should be fairly simple.

 

I want to get NPCs to smoke in taverns with the custom idles from Cannabis Skyrim (or Pipe Smoking, if you wanna count the SFW version), but really it's a proof of concept for a bunch of other stuff I could do. I got NPCs to use custom idle markers without too much trouble, but I want to avoid editing cells and conflicts in general. SO, I had the idea, what if I just added the animations to the list of idles that can play in vanilla idle markers? That way if someone makes a mod that uses those the custom animations would even play there. Plus I don't know of many mods that touch these at all, they mostly make their own. So I pulled up a couple of idle markers you see in/around taverns (drunkidlemarker, taverndrinkingmarker). I set them to play in sequence and added the cannabissmokejoinidle, cannabissmokedragonbongidle, etc. to their lists, and gave them a random timer setting (2.0, it doesn't really matter though). So in theory any place NPCs used to get drunk they should now use the custom animations mixed in with their normal drunk idles, right.

 

NPCs don't seem to want to use the new animations though. I ran FNIS, of course. There's a pause where it seems like it should trigger the new animations, but they just stand there. Not frozen in T pose. Just standing there normally without doing the animations.

 

Any advice much appreciated. If I can get this to work I was planning on adding more variety to other idle markers, which I think is a pretty cool idea for making sandboxing seem less repetitive without any of the normal compatibility concerns. Instead of just reading a book and flipping pages you could have the studyidlemarker read, stretch, yawn, read, then flip pages. Just an off the top of my head example. Once you start thinking of custom idles you could add it gets pretty cool.

 

I'm testing it on a blank MO profile with nothing else running but all DLC, FNIS, Cannabis Skyrim (duh, that's where the animations are from) and the unoffficial patch.

Link to comment
Share on other sites

How do you make your changes to the idle markers? Do you change the cannabis.esp? Generally, if I do a test, I never rely on other assets, but instead set up a little environment. Have my own FNIS animation list, and define my own Idle objects in the CK, or whatever.

 

Because I don't see any reason why FNIS animations should not work when used in standard idle markers. I used them in custom idle markers, and I don't see a difference with standard ones.

 

What I see however is a "strange" type of Idle object definitions used by Cannabis.esp. In the CK Idle Animation list they have added a branch for FNIS_Cannabis_Behavior.hkx, and added their custom animations their. When I have defined my Idle objects (which I didn't do very often, AnimationEvents usually were enougfh for my purposes), I have always defined them under 0_master.hkx in "LOOSE". I would recommend that you try that.

Link to comment
Share on other sites

Thanks :)

 

It's on a new .esp. I don't like the CK (who does), I'm doing most of this in TES5Edit, just using the CK for reference and (was) using it to place markers. At first I had it using the forms from Cannabis.esp, but just on a whim I tried packaging it all together already.... So I now have a standalone version of the animations I can make play on my character with the console, just a stripped down resource. It doesn't seem to matter if I use the standalone .esp or the one that uses Cannabis.esp as a master, they act the same. There's nothing wrong with FNIS. Works for both sexes. It's just getting the derpy NPCs to use them in an idle marker that doesn't work. I can make them do it with the console, but they get to the marker and don't know what to do. So it's something I'm doing wrong with the marker, not something wrong with the animations, right? Maybe a different flag than play in sequence? Random didn't work either. The timer is set to 2.0, which seemed pretty normal compared to some other idle markers I looked at. And there's really not that much more to idle markers that I could screw up (but obviously I am somewhere). I know with custom ones I had to set up ownership to get anyone to use them and those particular vanilla idle markers don't have any set ownership, but the NPCs don't have any trouble drinking or being drunk so that doesn't seem to be it.

 

I don't have any idea what that last couple of sentences means o.o Sorry, this is the first time I've tried to mess with animation in a mod of my own. Still (just a guess as to what that meant) it seems like if the animations work on NPCs and my character when forced to through the console then that wouldn't be the problem?

Link to comment
Share on other sites

It's neither something wrong with animations, NOR with the marker. It's (probably) something wrong with the way you have added the animations to the marker.

 

I'm not that familiar with with TES5Edit, but I doubt that you really know what you do with that animation/idle marker combination. :)

 

I could help you using CK, but not TES5Edit.

Link to comment
Share on other sites

Totally, I'm the first to admit I don't know what I'm doing when it comes to idle markers and animations in general :( Trying to fix that though. I WILL make this work, it's too stupid and simple for me to live with myself if I can't. EVEN if it means breaking out the CK.

 

So that's what I'm doing today. So far same result :( There's really not much difference from TES5Edit as far as editing the fields in the idle markers, there's just not that much you can change. List the anims, then there's how they should play (random, in sequence, etc), the timer, and ownership. I haven't touched any packages and don't want to for compatibility. That's about it. But I still have no clue why it won't use these animations. I'm about to try just adding new vanilla anims and seeing if they use those, so I know if it's how I'm doing it or the way these particular animations are "looked up" (for lack of a better term) when they're used.

Link to comment
Share on other sites

Some NPCs just don't use the idle animations randomly no matter what you do.

 

For example, if I place a PlayDrum, PlayLute, PlayFlute then no NPC will just randomly walk up to the spot and start the animation.

They walk up to the spot sometimes, stabnd there and then walk somewhere else.

 

Different story if I setup a package to use the idle marker.

 

Some other idle markers any free roaming NPCs will use without fail without being told to do so.

Even the SweepFloor idle marker, some unconfigured NPCs will never use it while other unconfigured NPCs will use it all the time.

So I think it's just a case of hit and miss at times or luck of the draw to say.

 

Other ways of invoking those animations when a NPC is in the spot is a trigger volume with a script.

Or custom special furniture markers (which for me work pretty well, most roaming NPCs will use furiture markers more often then idle markers when sandboxing if flagged to do so)

Link to comment
Share on other sites

Totally, I'm the first to admit I don't know what I'm doing when it comes to idle markers and animations in general :sad: Trying to fix that though. I WILL make this work, it's too stupid and simple for me to live with myself if I can't. EVEN if it means breaking out the CK.

 

So that's what I'm doing today. So far same result :sad: There's really not much difference from TES5Edit as far as editing the fields in the idle markers, there's just not that much you can change. List the anims, then there's how they should play (random, in sequence, etc), the timer, and ownership. I haven't touched any packages and don't want to for compatibility. That's about it. But I still have no clue why it won't use these animations. I'm about to try just adding new vanilla anims and seeing if they use those, so I know if it's how I'm doing it or the way these particular animations are "looked up" (for lack of a better term) when they're used.

 

The problem is not adding additional entries for the idle markers, I'm sure you can do this with TES5Edit. The problem is WHAT you add there: the idle objects themselves. How do you define them? Or do you just use whatever you see in the Cannabis.esp? What is it that you do EXACTLY?

 

The reason I'm cautioning you is the way Cannabis.esp defines the Idle Objects. Idle Objects are NOT animations. They are CK Objects that connect to animation events, which are entry points to the behavior files. And nothin else. Especially NOT animations. This connection is done in Cannabis.esp through a behavior file called FNIS_Cannabis.hkx. However, ALL Skyrim animations are always connected through 0_master.hkx. So before you don't use this same connection I wouldn't trust anything.

 

Some NPCs just don't use the idle animations randomly no matter what you do.

...

Other ways of invoking those animations when a NPC is in the spot is a trigger volume with a script.

Or custom special furniture markers (which for me work pretty well, most roaming NPCs will use furiture markers more often then idle markers when sandboxing if flagged to do so)

 

But Katy simply wants to use the existing idle markers... :smile:

Link to comment
Share on other sites

UGH. So I'm no closer to getting it to work, but a little bit validated that I'm not making a dumb mistake. I CAN add vanilla animations to idle markers and get NPCs to use them like they should. I CAN force NPCs to use the Cannabis Skyrim/Pipe Smoking animations with the console or the spell from the original mod/s. I CAN get NPCs to use idles in custom markers, although that's really something I want to avoid (cell edits). I CAN NOT get them to use Cannabis Skyrim or Pipe Smoking animations in a custom marker. I CAN NOT get NPCs to use them in a vanilla marker that they otherwise use.

 

I think whatever jargon Fore was talking about up there ^^^^ might be my problem. It seems local to the mod.

 

 

Some NPCs just don't use the idle animations randomly no matter what you do.

 

For example, if I place a PlayDrum, PlayLute, PlayFlute then no NPC will just randomly walk up to the spot and start the animation.

They walk up to the spot sometimes, stabnd there and then walk somewhere else.

 

Different story if I setup a package to use the idle marker.

 

Some other idle markers any free roaming NPCs will use without fail without being told to do so.

Even the SweepFloor idle marker, some unconfigured NPCs will never use it while other unconfigured NPCs will use it all the time.

So I think it's just a case of hit and miss at times or luck of the draw to say.

 

Other ways of invoking those animations when a NPC is in the spot is a trigger volume with a script.

Or custom special furniture markers (which for me work pretty well, most roaming NPCs will use furiture markers more often then idle markers when sandboxing if flagged to do so)

 

Thanks :smile: But I really specifically want to add these to vanilla idle markers. I know they don't like to use just any idle marker unless you force them to, but since I'm working on getting all NPCs to use them, not an NPC I made or a specific one, I try not to do it with AI packages. I've made it work by setting ownership, usually to the town faction the marker is in.... But the ones I'm working on are ones they readily use no problem, generic vanilla markers. They do every idle listed in the marker, EXCEPT these, and you can tell they're thinking about it because they stand there looking stupid during the time they SHOULD be using the idle.

 

So that's good news for my overall bigger project I was thinking of, I can get the concept to work. But crappy news for the fun stupid simple mod I wanted as a first step.

 

I guess I'd be happy with it if I could get them to use the animations in a custom idle marker, I'd just put them in rarely contested areas like outside taverns. But they won't do it then either. They recognize the marker I made and just stand there. If I take the EXACT SAME marker, and swap the animations with a vanilla idle, changing nothing else, they use it no problem.

 

Could anyone maybe explain what he was talking about and how I fix it? Now I'm determined, it's the principal.

Link to comment
Share on other sites

Ooooooooooooooooooh OK, now I kind of get it.

 

Like I said I know nothing about animations. It's called "idle", it shows up under "idle animations", I assumed it would work like anything else you find there. And yeah, that's all I did, I changed basically nothing. After all the mod has a custom NPC who just sits there smoking pot in perpetuity, and you can make NPCs do it manually, so I know it's POSSIBLE.

 

So how would I go about attaching the animations in a way the CK would recognize as idles it can use?

 

 

The reason I'm cautioning you is the way Cannabis.esp defines the Idle Objects. Idle Objects are NOT animations. They are CK Objects that connect to animation events, which are entry points to the behavior files. And nothin else. Especially NOT animations. This connection is done in Cannabis.esp through a behavior file called FNIS_Cannabis.hkx. However, ALL Skyrim animations are always connected through 0_master.hkx. So before you don't use this same connection I wouldn't trust anything.

 

Edit, now that I reread it and think about it again, I'm confused again :sad: No I'm not using the animated objects instead of the animations. Objects are like things to use for an animation, say a pile of wood to carry (or joint to smoke) if I'm understanding right. Is that the same idea as idle objects? No, I'm only using idles, actual animations that show up in the same list as the vanilla idles (which DO work in markers). And if I was just missing the object wouldn't it just show the animation for the actor without the object? Smoking an invisible joint? It seems like this would be easier if I had something to read these file extensions, is there something free for that? I obviously don't plan on manipulating anything, the equivalent of a paint.net/gimp for animations would work.

 

Behavior file= Not a concept Katy gets. I see the file, and now that I look through some other mods I see that they don't seem to have the same thing. But I have no clue what it means. How do I get them to use the one Skyrim understands?

 

(Thanks for your patience)

Link to comment
Share on other sites

Behavior files are the ones that control all the action related to animations. Most of them are located in the directory called "behaviors" (wonder why?), and, like animation files, have the ending .hkx.

 

Idles (in my understanding) are animations that are played while an actor is not fighting or moving (in the sense of "idling"). Bethesda has made a great mess in defining the animation related things. When you go into CK -> Gameplay -> Animations you will get a window called "Idle Animations". But there are not only "Idles", and these things are not animations. Animations are defined by animation files in the behaviors. What you define here is a CK "object" that allows you to reference an animation event which in turn makes the behaviors play an animation.

 

A little complicated, but I need to explain. Because so many users are surprised when in many cases they cannot play certain arbitrary animation just by using these idle objects, or the animation events.

 

Now with the FNIS tool for modders (in the FNIS Animation List, like FNIS_Cannabils_List.txt) you can define animation events that are attached to single animation files. Like:

b MyAnimEvent MyAnimFile.hkx

Now you already can already play MyAnimFile.hkx from the console, by

sae MyAnimEvent

However the CK is stubborn, and refuses to use animevents. It requires it's own objects, the ones that I call Idle Objects. For that you go into the Idle Animations window I mentioned before , expand the branch which ends on 0_master.hkx, go to the last sub branch called "LOOSE" and add one entry (RMB -> "insert sibling") just like the other ones. Make sure you started CK after you created MyAnimEvent. You only define the ID (the object) and search for MyAnimEvent in the Anim Event pull-down.

 

And now you can use the ID for the idle marker.

 

See why I refuse to call these things just "Idles"? :smile:

 

EDIT: just for clarification why I talk you into all of this.

You make a new .esp. Then you can use the animation files and animevents (defined in Cannabis' FNIS animationlist). They are like globals, not related to the Cannabis.esp.

But you can NOT use the Cannabis Idle Objects. They are part of Cannabis.esp. You could only use them if Cannabis would be an esm.

AND: Because I distrust the way the Cannabis Idle Objects are defined.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...