Jump to content

Need some help with FNIS added animations and a mod.


Deathmaw

Recommended Posts

Ok so I am trying to mod Private Needs Discreet (http://www.loverslab.com/files/file/948-private-needs-discreet/) to add in a new animation. So I have been following how the other animations in the mod are setup. My problem is, I cannot see ANYWHERE in the scripts where the FNIS animations are linked?

 

From my understanding to trigger the FNIS animations in game you have to call them exactly the same as you called them in the FNIS file.

So for example in the PND FNIS file there is "s -a PND_LeitoFemaleStanding2Begin standing_2_start.hkx"  So I was under the impression that to trigger this animation you would have to link it in the script using the name "PND_LeitoFemaleStanding2Begin". The problem is "PND_LeitoFemaleStanding2Begin" does not appear ANYWHERE at all in the scripts for PND, and yet it is still played in game, so I am confused as hell.

 

I have spent the last 4 hours trying to work this out so would love any guidance or help on the issue.

Link to comment

OK, here a little bit of information.

 

 

The actual animation file is inside a sub-[sub-]folder of meshes/character/animations/

They have HXK as the extension.

 

They are added to the game through a "behavior file" (that is generated by GenerateFNISForModders) by reading a FNIS text file that should be in the same folder where the animation is.

Consider the animation name "MyAnimation.hkx", the FNIS file will have a line inside like:

File FNIS_MyModName_LIST.txt

 

s -a MyAnimationEventName MyAnimation.hkx

 

After you generate FNIS for modders, giving this file as source, you will get a file named "MyModName_Behavior.hkx", this file should be put (if not yet there) inside the meshes/character/behavior folder.

 

Then, inside the game, you can run this animation on an actor with this simple line:

 

Debug.SendAnimationEvent(theActor, "MyAnimationEventName")

 

Be aware that the actor should have a "Nothing" package to avoid it to do actions and then replace your animation with a default one.

 

 

P.S. after you put the behavior file in place, you need to GenerateFNISForUsers.

Link to comment

OK, here a little bit of information.

 

 

The actual animation file is inside a sub-[sub-]folder of meshes/character/animations/

They have HXK as the extension.

 

They are added to the game through a "behavior file" (that is generated by GenerateFNISForModders) by reading a FNIS text file that should be in the same folder where the animation is.

Consider the animation name "MyAnimation.hkx", the FNIS file will have a line inside like:

File FNIS_MyModName_LIST.txt

 

s -a MyAnimationEventName MyAnimation.hkx

 

After you generate FNIS for modders, giving this file as source, you will get a file named "MyModName_Behavior.hkx", this file should be put (if not yet there) inside the meshes/character/behavior folder.

 

Then, inside the game, you can run this animation on an actor with this simple line:

 

Debug.SendAnimationEvent(theActor, "MyAnimationEventName")

 

Be aware that the actor should have a "Nothing" package to avoid it to do actions and then replace your animation with a default one.

 

 

P.S. after you put the behavior file in place, you need to GenerateFNISForUsers.

 

I am getting an error when I try to generate it: ERROR(2012): Could not generate: FNIS_PND_Behavior.hkx

 

s -a PND_LeitoFemaleBendover1Begin leito_bend_over_s1.hkx
+ -h PND_LeitoFemaleBendover1BeginPose leito_bend_over_s2.hkx
 
That is how I have it laid out, does that look right?
Link to comment

This looks like a two animations sequenced.

The first is set as acyclic, the second with head tracking enabled.

 

If you are sure the actual file names are correct and in the right folder, do you have any other error from GenForModders?

Can you post the full result of it?

Link to comment

This looks like a two animations sequenced.

The first is set as acyclic, the second with head tracking enabled.

 

If you are sure the actual file names are correct and in the right folder, do you have any other error from GenForModders?

Can you post the full result of it?

 

Animlist used: D:\Games\Mod Organizer\mods\PND Overhaul Patch Vol3.5\Meshes\actors\character\animations\PND\FNIS_PND_List.txt
Reading Animation List ...
Generating FNIS mod Behavior File xml...
Converting mod Behavior xml to hkx ...
 
ERROR(2012): Could not generate: FNIS_PND_Behavior.hkx
 
I don't know if those are the right settings to use with the animation, this is the one I am adding in, I am just following the previous animations in this mod.
 
*Edit* Solved that issue. it was the headtracking flag, I removed that and it generates it.
 
Ok so I have the animation files out, I still cant find out how this mod triggers its animations. 
Link to comment

Again, the very basic way to trigger animations is through "SendAnimationEvent".

If the animation is a SexLab animation then is SexLab that is using this command to run it.

 

There is also a possibility to create an Idle for the animation. This is done in the CK and is part of the ESP.

In this case, you can add the AnimationEvent to an Idle and then use the Idle inside a package (or still inside Papyrus code.)

 

 

Link to comment

Again, the very basic way to trigger animations is through "SendAnimationEvent".

If the animation is a SexLab animation then is SexLab that is using this command to run it.

 

There is also a possibility to create an Idle for the animation. This is done in the CK and is part of the ESP.

In this case, you can add the AnimationEvent to an Idle and then use the Idle inside a package (or still inside Papyrus code.)

 

What part of the CK are idles under?

I think that is how this mod must have done it, because I can not find any of the animation names in any of the scripts.

Link to comment

The Idle window is open from the top menu second last option.

Right now I don't remember the actual name of the menu, but then it has "...Animations..." inside.

 

When you will open this window, you will have the behavior tree on the left, just go in Characters/.../LOOSE/ they may be there.

Link to comment

 

Be aware that the actor should have a "Nothing" package to avoid it to do actions and then replace your animation with a default one.

 

That's not true any more. 

 

Since 5.5 (the version where Motion Driven data was introduced) the "engine motion" is surpressed, other packages or the player movement keys will NOT move the actor. Which is the usual scenario for an actor.

 

In order to allow engine movement during FNIS idles the "-md" parameter has to be set.

 

 

 

 

 

*Edit* Solved that issue. it was the headtracking flag, I removed that and it generates it.

 

"-h" works for me, always has worked. Must be something different. Since the MO data folder was not the projected result path, maybe the character/behaviors folder didn't exist before?

 

Try again with "-h".

Link to comment

 

 

Be aware that the actor should have a "Nothing" package to avoid it to do actions and then replace your animation with a default one.

 

That's not true any more. 

 

Since 5.5 (the version where Motion Driven data was introduced) the "engine motion" is surpressed, other packages or the player movement keys will NOT move the actor. Which is the usual scenario for an actor.

 

In order to allow engine movement during FNIS idles the "-md" parameter has to be set.

 

 

 

 

 

*Edit* Solved that issue. it was the headtracking flag, I removed that and it generates it.

 

"-h" works for me, always has worked. Must be something different. Since the MO data folder was not the projected result path, maybe the character/behaviors folder didn't exist before?

 

Try again with "-h".

 

 

Yeah got it working with -h, I think the issue was I was trying to run it through MO, I ran the Mod User generator externally and it worked fine.

Link to comment

Be aware that you can run it from MO, but the resulting behavior files will be in the Overwrite folder of MO.
Then you have to move it in the correct location.

I do it all the time.

 

 

Be aware that the actor should have a "Nothing" package to avoid it to do actions and then replace your animation with a default one.

 
That's not true any more. 
 
Since 5.5 (the version where Motion Driven data was introduced) the "engine motion" is surpressed, other packages or the player movement keys will NOT move the actor. Which is the usual scenario for an actor.
 
In order to allow engine movement during FNIS idles the "-md" parameter has to be set.

 


Nice to know! I will save tons of time in future.

 

Link to comment

Be aware that you can run it from MO, but the resulting behavior files will be in the Overwrite folder of MO.

Then you have to move it in the correct location.

 

I do it all the time.

 

MO is for mods, not for tools. MO is SHITTY for tools.

 

There was the same problem in the User Tool. For most people it worked, some got the same "Could not generate". Why? MO has a delay in putting the resultant files into it's final destination. And that's why an immediate check for existance sometimes doesn't work. In the user tool I introduced a work-around (something for which the MO author heavily critisized me later on). For the modder tool I did not.

 

 

 

That's not true any more. 

 

Since 5.5 (the version where Motion Driven data was introduced) the "engine motion" is surpressed, other packages or the player movement keys will NOT move the actor. Which is the usual scenario for an actor.

 

In order to allow engine movement during FNIS idles the "-md" parameter has to be set.

 

Nice to know! I will save tons of time in future.

 

I'm sorry. Looking through the docs I see that I didn't publish that change as I had thought. I had discussed that upfront with Ashal and a few others, but apparently that was not enough. 

Link to comment

Ok from what I can see, I have the scripts set up as they should be. I have the new animation listed in the MCM menu. But when I try to trigger it nothing happens.

 

Is there a console command I can use to trigger the animation? So I can see if it is an animation or script problem.

Link to comment

Yes, go in 3rd view, click on your character, and then type in the console:

 

SAE PND_LeitoFemaleBendover1Begin

 

If you see an error like "cannot process the behavior graph", then there is a problem somewhere.

 

Keep also in mind that AnimEvent names have to be all different from all mods, you cannot re-use one already used by another mod.

 

Link to comment

Yes, go in 3rd view, click on your character, and then type in the console:

 

SAE PND_LeitoFemaleBendover1Begin

 

If you see an error like "cannot process the behavior graph", then there is a problem somewhere.

 

Keep also in mind that AnimEvent names have to be all different from all mods, you cannot re-use one already used by another mod.

 

Yeah getting the graph error. Does that mean there is an issue with how I have it setup with Fnis?

 

*Edit* Strike that, if I use the animations names as in the FNIS text file they play.

So something is screwed in the script, but hell if I can see what. 

Link to comment

Ok from what I can see, I have the scripts set up as they should be. I have the new animation listed in the MCM menu. But when I try to trigger it nothing happens.

 

Is there a console command I can use to trigger the animation? So I can see if it is an animation or script problem.

 

Click the actor and then

sae PND_LeitoFemaleBendover1Begin

But are you sure you set everything up "as it should"? :)

 

First, in this mod's script I can see that some of the animations are called with Debug.SendAnimationEvent(). Like CPU and I are always recommending. But many others are called via PlayIdle(). Which means the Idle Objects have to be defined in the CK. And, IMPORTANTLY, passed as properties.

 

Have you assigned their values?

 

But second, and more important, are you sure you did "all"?

 

Other animation sequences in this mod are defined with FIVE animations, instead of your 2.

s -a PND_LeitoFemaleStanding2Begin standing_2_start.hkx
+ -h PND_LeitoFemaleStanding2BeginPose standing_2_loop.hkx
b -h PND_LeitoFemaleStanding2Pose standing_2_loop.hkx
o PND_LeitoFemaleStanding2Tinkle standing_2_loop.hkx PND_FU01AO
b -a PND_LeitoFemaleStanding2End standing_2_end.hkx

Which is acually a real mess. I had expected lines 3 to 5 to start with "+" as well. Which would make all 5 animation together a "sequenced animation". This way only the first 2 are a sequence, while 3 to 5 have to be started individually by the scripts.

 

And in your example you have only defined the first 2. Something which has already struck CPU's attention before.

Link to comment

 

Ok from what I can see, I have the scripts set up as they should be. I have the new animation listed in the MCM menu. But when I try to trigger it nothing happens.

 

Is there a console command I can use to trigger the animation? So I can see if it is an animation or script problem.

 

Click the actor and then

sae PND_LeitoFemaleBendover1Begin

But are you sure you set everything up "as it should"? :)

 

First, in this mod's script I can see that some of the animations are called with Debug.SendAnimationEvent(). Like CPU and I are always recommending. But many others are called via PlayIdle(). Which means the Idle Objects have to be defined in the CK. And, IMPORTANTLY, passed as properties.

 

Have you assigned their values?

 

But second, and more important, are you sure you did "all"?

 

Other animation sequences in this mod are defined with FIVE animations, instead of your 2.

s -a PND_LeitoFemaleStanding2Begin standing_2_start.hkx
+ -h PND_LeitoFemaleStanding2BeginPose standing_2_loop.hkx
b -h PND_LeitoFemaleStanding2Pose standing_2_loop.hkx
o PND_LeitoFemaleStanding2Tinkle standing_2_loop.hkx PND_FU01AO
b -a PND_LeitoFemaleStanding2End standing_2_end.hkx

Which is acually a real mess. I had expected lines 3 to 5 to start with "+" as well. Which would make all 5 animation together a "sequenced animation". This way only the first 2 are a sequence, while 3 to 5 have to be started individually by the scripts.

 

And in your example you have only defined the first 2. Something which has already struck CPU's attention before.

 

 

Yeah I have since ammended my FNIS text file to make it match the others. All of these animations play fine in game with the sae command. This is what I currently have:

s -a PND_LeitoFemaleBendover1Begin leito_bend_over_s1.hkx
+ -h PND_LeitoFemaleBendover1BeginPose leito_bend_over_s2.hkx
b -h PND_LeitoFemaleBendover1Pose leito_bend_over_s2.hkx
o PND_LeitoFemaleBendover1Tinkle leito_bend_over_s2.hkx PND_FU04AO
b -a PND_LeitoFemaleBendover1End kneeling_end.hkx

I have set up the Idles in the ESP as Follows:

Idle Editor ID : Animation Event

PND_FU_LeitoB1_Begin : PND_LeitoFemaleBendover1Begin

PND_FU_LeitoB1_Pose : PND_LeitoFemaleBendover1Pose

PND_FU_LeitoB1_Tinkle : PND_LeitoFemaleBendover1Tinkle

PND_FU_LeitoB1_End : PND_LeitoFemaleBendover1End

 

Which match what I have set them to in the script as far as I am aware.

Here is a link to the edited script: http://pastebin.com/WjEY7mc4 (Warning it is a mess, but not through my doing)

I have only added in entries which reference the above by attempting to follow the other animations.

if options.kAnimations_UFN09
			anims[11] = PND_FU_LeitoB1_Tinkle
		endIf

Is where I have linked the MCM script to this one.

 

If anyone has any idea what I am missing I would massively appreciate it, this has been driving me mad all day. I am either missing something in the script, or have set something up different from the other animations, and I am at a loss.

Link to comment

Looking at your code I can see right away something strange.

Why are you re-defining the Body Slot constants?

 

Just type (when you use them):

 

Armor.kSlotMask30

 

(or any slot number you need.) They are there for a reason  ;)

 

Then, as @fore suspected, you are using the animations as Idles and not as basic AnimEvents.

This is not the best solution.

 

And, just to let you know, not 100% of HKX anim files will work as Idle.

Especially the ones that are in sequence.

 

The only utilization of SendAnimationEvent in your code is to interact with SOS.

You are correctly sending the (Sub-)AnimationEvents SOSBendx and SOSFlaccid (that will be played only by the "penis" armor added by SOS, and ignored by the actual actor.)

 

Link to comment

Looking at your code I can see right away something strange.

Why are you re-defining the Body Slot constants?

 

Just type (when you use them):

 

Armor.kSlotMask30

 

(or any slot number you need.) They are there for a reason  ;)

 

Then, as @fore suspected, you are using the animations as Idles and not as basic AnimEvents.

This is not the best solution.

 

And, just to let you know, not 100% of HKX anim files will work as Idle.

Especially the ones that are in sequence.

 

The only utilization of SendAnimationEvent in your code is to interact with SOS.

You are correctly sending the (Sub-)AnimationEvents SOSBendx and SOSFlaccid (that will be played only by the "penis" armor added by SOS, and ignored by the actual actor.)

 

None of that code is mine sorry, I am trying to insert a new animation into the already existing mod. This is the main script from Private Needs Discreet. The only stuff I have added is in my post above.

 

I am just trying to work out why the animation I added wont work, even though I am fairly sure I set it up like the rest of the animations that already existed in the mod.

Link to comment

Whoa.

Playing anims in this way is difficult.

 

Create a brand new Idle for the animation you did.

 

Then create a package DoNothing for a very long time, and add the idle you created as Idle.

Assign it to an NPC (be sure it is not conditioned and first in the package list), and then check this NPC if it plays the Idle.

 

Link to comment

I'm not gonna go into details of the script. But I want to reiterate my my previous comment.

 

You define idle properties like PND_FU_LeitoB1_Tinkle in the script. But that's not enough.

 

Have you defined the VALUE of the PND_FU_LeitoB1_Tinkle property? In the quest where the script is attached???

 

Just by NAMING a property "PND_FU_LeitoB1_Tinkle" you don't give it the VALUE "PND_FU_LeitoB1_Tinkle". 

 

That's the most common mistake. For starting beginners and advanced beginners (like me) alike. :)

Link to comment

I'm not gonna go into details of the script. But I want to reiterate my my previous comment.

 

You define idle properties like PND_FU_LeitoB1_Tinkle in the script. But that's not enough.

 

Have you defined the VALUE of the PND_FU_LeitoB1_Tinkle property? In the quest where the script is attached???

 

Just by NAMING a property "PND_FU_LeitoB1_Tinkle" you don't give it the VALUE "PND_FU_LeitoB1_Tinkle". 

 

That's the most common mistake. For starting beginners and advanced beginners (like me) alike. :)

 

If you mean in the properties of the script in the quest screen, yes I have.

 

http://i.imgur.com/WiRRNo1.png

Link to comment

No, @fore was mentioning to "fill" the property.

That is done in the CK user interface.

 

OK, I love to say that I am a "master beginner", I still forget to fill the properties from time to time...  :P

Link to comment

Ok so I tried the idles of one of the original animations with my new ones. They played fine and as they should when triggered.

So the animation is fine, and plays as an idle fine. 

My issue then is apparently I haven't added it via script properly the same way as the others.

 

@CPU. That is the CK interface, If you don't mean that for defining properties, where else is it?

Link to comment

I meant inside the CK interface. It is probably the only valid way to fill a property.

(If you fill it through scripts then probably you don't need a Property.)

 

I may give another look at your code in future. Not today.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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