Jump to content

Can a Specific NPC Have Their Own Custom Animations?


TheSwordFluffy

Recommended Posts

  • 4 weeks later...

There is nothing a user can do. There are 2 ways a modder COULD achieve that, but both have severe limitations.

  1. The static way (like PCEA). Of course you have to have your own race with seperate folders for the NPC's animations. And copy the behavior files from the original race. But then you have to
    - modify the new race's behavior files starting from the races's behavior graph in the CK race definition.
    - add the new file names to the new race's default(fe)male.hkx.
    - add the crc code for the new files in FNIS "CustomPreCacheFiles.txt"
    Both PCEA and and FNIS had started a combined effort to make this possibel. But then xp32 left the scene before it was done.

    EDIT: Actually it is less complicated if you (unlike PCEA) make a complete copy of everything. Then you don't need to make changes in the behavior files. But you still need to have a custom race. And you have to add to CustomPreCacheFiles.txt. Or you will have sporadic t-poses on movement/attack animations. Like it was in PCEA before FNIS has added the pre-cache funtionality.
  2. The dynamic way (like PCEA2), using FNIS "Alternate Animations" functionality. That is relatively easy (for a Papyrus savy modder). It requires the FNIS animation list, and a little bit of code which sets a few corresponding animation variables whenever the NPC regains its 3d representation.
    HOWEVER, the FNIS AA functionality is very limited (do to Papyrus' 128 array elements restriction) and can therefore only support limited number of animation changes. With PCEA2, XPMSE, and maybe 2 NPC races (with PCEA like number of custom files) the FNIS AA limitations would be probably exceeded.

So I can't really recommend either way for what it's worth. I made PCEA2 to allow dynamic animation replacement, and to change limited animation groups (for example support new weapon types. But just to allow NPCs have their own animation sets I don't think it's suited.

Link to comment
Share on other sites

There is nothing a user can do. There are 2 ways a modder COULD achieve that, but both have severe limitations.

  1. The static way (like PCEA). Of course you have to have your own race with seperate folders for the NPC's animations. And copy the behavior files from the original race. But then you have to

    - modify the new race's behavior files starting from the races's behavior graph in the CK race definition.

    - add the new file names to the new race's default(fe)male.hkx.

    - add the crc code for the new files in FNIS "CustomPreCacheFiles.txt"

    Both PCEA and and FNIS had started a combined effort to make this possibel. But then xp32 left the scene before it was done.

     

    EDIT: Actually it is less complicated if you (unlike PCEA) make a complete copy of everything. Then you don't need to make changes in the behavior files. But you still need to have a custom race. And you have to add to CustomPreCacheFiles.txt. Or you will have sporadic t-poses on movement/attack animations. Like it was in PCEA before FNIS has added the pre-cache funtionality.

  2. The dynamic way (like PCEA2), using FNIS "Alternate Animations" functionality. That is relatively easy (for a Papyrus savy modder). It requires the FNIS animation list, and a little bit of code which sets a few corresponding animation variables whenever the NPC regains its 3d representation.

    HOWEVER, the FNIS AA functionality is very limited (do to Papyrus' 128 array elements restriction) and can therefore only support limited number of animation changes. With PCEA2, XPMSE, and maybe 2 NPC races (with PCEA like number of custom files) the FNIS AA limitations would be probably exceeded.

So I can't really recommend either way for what it's worth. I made PCEA2 to allow dynamic animation replacement, and to change limited animation groups (for example support new weapon types. But just to allow NPCs have their own animation sets I don't think it's suited.

THANK YOU VERY MUCH FOR YOUR INSIGHT!

 

So okay if I got this right

STEP 1:

you need to make your own race with its own folder which I have already done as below with the vanilla file path: Skyrim\Data\meshes\actors\Xanthys

 

9cc2913f964e1124243574c1dd7780d5.png

 

Step 2: Extract animations from meshes\actors\character into the custom race folder

996dc22d16ca45881e92751aaceba4f2.png

 

Step 3:

 

modify the new race's behavior files starting from the races's behavior graph in the CK race definition.

Im assuming that you mean to define the path of the new behavior file

 

42c34f2aae00aa17eb6488815d32fd3d.png

 

Step 4:

 

"add the new file names to the new race's default(fe)male.hkx."

Do you essentially mean renaming the hkx files?

Link to comment
Share on other sites

Exactly. Except that I didn't say anything about renaming.

 

But all that is only theoretical. I never made it myself. You should check in all hkx files (using hkxcmd), starting from your Xanthys/defaultfemale.hkx, that all path names for other hkx files are relative. Then the complete copy should do the trick. SHOULD. xp32 basically has done it, although a little more complicated. I read others had done it a couple of years ago. Recently someone posted that it didn't work for him, but I didn't see a final result.

Link to comment
Share on other sites

ok cool, and how do you get a hold of crc code for fnis? I got this far for the Customprecachefiles.text. The actor can play animations in the renderwindow now and I even got him to play custom animations in the render window aswell. in game hes stuck in his idle pose an slides around, not your typical t-pose

37c3eb79809e33e17ce2b353a5f06b0c.gif
'Xanthys
meshes\actors\Xanthys\animations
'<reference file crc>[/<appearance1>,<appearance2>]
'<custom path crc>
'<no of custom animations to be added to the reference>
' <custom file crc 1>
' .......
' <custom file crc n>
Edited by PyroToaster
Link to comment
Share on other sites

You should check in all hkx files (using hkxcmd), starting from your Xanthys/defaultfemale.hkx

 

 

also I tried opening xanthys's defaultmale.hkx with the cmd provided with fnis and it just opens an closes am I doing that part right? or no?

Edited by PyroToaster
Link to comment
Share on other sites

hkxcmd is a command line tool. You have to open the (DOS) command box, or, better, write .bat files to make it work. What I have, as examples, are commands to translate a complete directory tree from hkx to xml with

d:\hkxcmd.exe convert -v:xml . xml

or, to convert a single xml file to hkx with

d:\hkxcmd.exe convert -v:WIN32 1hm_behavior.xml 1hm_behavior.hkx

The crc entries you might forget. It will not work the way you have set it up.

 

If you look into PCEA then you will see that xp32 has left custom races as "character", and has redefined the new behavior files for standard races as modifications within "character". What you have defined is a new race "Xanthys", like a wolf or bear. And FNIS pre-cache support does not work for wolf or bear.

 

I thought what you did SHOULD work. At least from behaviors point of view. But since you can't make it work ingame, I can't tell whether this is your mistake, or if this is a game restriction. The problem here is an ugly back-door interface between engine and behavior. An iterface that the engine uses to execute more complicated animation parts like furniture, killmoves, or pre-cache. An interface that, of course, only knows about standard races. And maybe that's why it doesn't work for you.

 

And if it doesn't work despite making everything correct, you need to change behavior files similar to PCEA. Which makes it very complicated (and FNIS incompatible). And that's why I originally said I can't recommend it.

 

EDIT: Forget the last 2 paragraphs. It HAS to work the way you described. I just checked one of the first versions of AP, and it did just the same copy of all files into a seperate, non-character folder. And we know that worked.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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