Jump to content

FNIS for Modders / FNIS 4.0 [WIP]


fore

Recommended Posts

 

Just did a quick test, graph variables for player are stored in save. :)

Interesting! This would explain why I get weird results. :)

 

How did you test it?

http://www.creationkit.com/SetAnimationVariableBool_-_ObjectReference

 

Call it on player, with some vanilla variable as param (i used "bAnimationDriven", true), then save:

 

1. load in current session to check if it is session persistent

2. restart the game, then load to see if its not just current session

 

The changed value should be there in both cases.

Link to comment

 

 

Just did a quick test, graph variables for player are stored in save. :)

Interesting! This would explain why I get weird results. :)

 

How did you test it?

 

http://www.creationkit.com/SetAnimationVariableBool_-_ObjectReference

 

Call it on player, with some vanilla variable as param (i used "bAnimationDriven", true), then save:

 

1. load in current session to check if it is session persistent

2. restart the game, then load to see if its not just current session

 

The changed value should be there in both cases.

 

I haven't tried this yet, but... I think this could very well explain why I get different results on my saves.

 

I guess the hkx file in the Nexus archive could also be an older file, and it should have been regenerated prior to releasing 5.0.2.3? (Which would then explain the older version.)

 

 

Anyway @Fore: Assuming you still want to keep the animation variable versioning system. Would you be willing to implement an alternative system for us doubters (like maybe just me)? I'm not confident that the system you have right now works, or rather, I'm confident that it doesn't work.

 

It would still be nice to be able to tell which FNIS version is being used, though ....

Link to comment

Just did a quick test, graph variables for player are stored in save. :)

 

 

 

 

 

Just did a quick test, graph variables for player are stored in save. :)

Interesting! This would explain why I get weird results. :)

 

How did you test it?

 

http://www.creationkit.com/SetAnimationVariableBool_-_ObjectReference

 

Call it on player, with some vanilla variable as param (i used "bAnimationDriven", true), then save:

 

1. load in current session to check if it is session persistent

2. restart the game, then load to see if its not just current session

 

The changed value should be there in both cases.

 

I haven't tried this yet, but... I think this could very well explain why I get different results on my saves.

 

I guess the hkx file in the Nexus archive could also be an older file, and it should have been regenerated prior to releasing 5.0.2.3? (Which would then explain the older version.)

 

 

Anyway @Fore: Assuming you still want to keep the animation variable versioning system. Would you be willing to implement an alternative system for us doubters (like maybe just me)? I'm not confident that the system you have right now works, or rather, I'm confident that it doesn't work.

 

It would still be nice to be able to tell which FNIS version is being used, though ....

 

 

zax, you are totally rtight. AnimVars ARE saved. Not only for the player, but also for NPCs. But for those the AV values will disappear once the 3d is unloaded.

xaz, I deeply apologize.

 

I have no idea what has blurred my brain that badly. I was so convinced AnimVars are not stored. I know I had tested it the time the idea came up to use AnimVars as AVs. That time something must have really gone bad with that test.

 

So no, xaz, I don't insist on the AnimVar solution. The problem is, that the script solution is not working either. Because when you use a script as input, this will only tell what FNIS version you have currently installed. It will not tell which FNIS version you have used to generate. That could give a totally wrong picture as well. You tell me if this is acceptable.

 

We need to find a way to update the values (AnimVar or script) with with the actual values from last generation. It's even possible to modify an FNISVersion.pex file during generation. But then again there is this uncertainty what is happening with MO profiles.

 

Let me think for a while. Of course I'm happy with every other proposal. Just get the cow out of the ditch. 

Link to comment

 

http://www.creationkit.com/SetAnimationVariableBool_-_ObjectReference

 

Call it on player, with some vanilla variable as param (i used "bAnimationDriven", true), then save:

 

1. load in current session to check if it is session persistent

2. restart the game, then load to see if its not just current session

 

The changed value should be there in both cases.

 

 

 

 

I haven't tried this yet, but... I think this could very well explain why I get different results on my saves.

 

I guess the hkx file in the Nexus archive could also be an older file, and it should have been regenerated prior to releasing 5.0.2.3? (Which would then explain the older version.)

 

 

Anyway @Fore: Assuming you still want to keep the animation variable versioning system. Would you be willing to implement an alternative system for us doubters (like maybe just me)? I'm not confident that the system you have right now works, or rather, I'm confident that it doesn't work.

 

It would still be nice to be able to tell which FNIS version is being used, though ....

 

 

Ok, I think I got the solution implemented now.

 

I make everything based on scripts, no more AnimVars. As you wish.  :shy:  The functions are basically the same (except that I romoved IsAlpha, and isBeta).

 

But since now the returned version is "only" the version which the user has installed, and NOT the version which is used for generatio, I have added a new function: FNIS.IsGenerated(). This boolean function returns true, if the user's last generator run was with the installed FNIS version, and was error-free.

 

That's probably even better than the AnimVar solution (if that had worked as planned). I'm thinking about adding a messagebox in FNIS Spells in case this function returns false. The only question mark again is MO. For that I'm shifting around script files. I hope those profiles don't strike there again.

Link to comment

Sorry for the late response. I've been away for some days now, and not been able to read/write on the forum.

 

A thing that popped up in my mind was that if auto generation of scripts was enabled, it would be possible to also get animation def. versions:

 

Int Function GetAnimationListVersion(String asFile)

  If asFile == "FNIS_ZazAnimationPack_List.txt"

    Return 552

  ElseIf asFile == "FNIS_FNIS_List.txt"

    Return 502

  EndIf

EndFunction

 

That way, Zaz could determine if the generator had been run for that particular version of the mod like this:

 

Bool Function IsMatchingVersion()

  Return FNIS.GetAnimationListVersion("FNIS_ZazAnimationPack_List.txt") == zbfUtil.GetVersion()

EndIf

 

Link to comment

Sorry for the late response. I've been away for some days now, and not been able to read/write on the forum.

 

A thing that popped up in my mind was that if auto generation of scripts was enabled, it would be possible to also get animation def. versions:

 

Int Function GetAnimationListVersion(String asFile)

  If asFile == "FNIS_ZazAnimationPack_List.txt"

    Return 552

  ElseIf asFile == "FNIS_FNIS_List.txt"

    Return 502

  EndIf

EndFunction

 

That way, Zaz could determine if the generator had been run for that particular version of the mod like this:

 

Bool Function IsMatchingVersion()

  Return FNIS.GetAnimationListVersion("FNIS_ZazAnimationPack_List.txt") == zbfUtil.GetVersion()

EndIf

 

Auto generation of scripts ?????? 

 

First time I hear that. If that was possible I coud do a whole lot of things. THis would even allow things like reading configuration files. Can you give me a link? THe only links I found was about autp-generating navmesh.

Link to comment

Does FNIS support Sequenced Animations, with AnimObjects, while using a furniture object? For example, is it possible to have copies of the vanilla eating/drinking seated animations, using different AnimObjects? I could add the animations in older versions of FNIS, the while they were playing, the character would float off of the furniture.

Link to comment

 

Sorry for the late response. I've been away for some days now, and not been able to read/write on the forum.

 

A thing that popped up in my mind was that if auto generation of scripts was enabled, it would be possible to also get animation def. versions:

 

Int Function GetAnimationListVersion(String asFile)

  If asFile == "FNIS_ZazAnimationPack_List.txt"

    Return 552

  ElseIf asFile == "FNIS_FNIS_List.txt"

    Return 502

  EndIf

EndFunction

 

That way, Zaz could determine if the generator had been run for that particular version of the mod like this:

 

Bool Function IsMatchingVersion()

  Return FNIS.GetAnimationListVersion("FNIS_ZazAnimationPack_List.txt") == zbfUtil.GetVersion()

EndIf

 

Auto generation of scripts ?????? 

 

First time I hear that. If that was possible I coud do a whole lot of things. THis would even allow things like reading configuration files. Can you give me a link? THe only links I found was about autp-generating navmesh.

 

Well, you run the tool to create the xml files. You could just as easily also create files inside the scripts/source folder, then call the compiler to compile those scripts into .pex files.

 

Not as easily, maybe, but it's not impossible to see how it could be done, at least.

 

Something along the lines of you parse a .psc file placed with the generator. When it finds a line which says "FNIS_INSERT_VERSIONS_HERE" it inserts two lines for each mod it has found. Something like:

    ElseIf asFIle == "FNIS_ModName.txt"
      Return <Detected Mod Version>
Then as a final step, call the compiler to compile that into Skyrim .pex file. Output the result in the console if needed, or just return an error if the compilation failed.
Link to comment

 

Well, you run the tool to create the xml files. You could just as easily also create files inside the scripts/source folder, then call the compiler to compile those scripts into .pex files.

 

Not as easily, maybe, but it's not impossible to see how it could be done, at least.

 

Something along the lines of you parse a .psc file placed with the generator. When it finds a line which says "FNIS_INSERT_VERSIONS_HERE" it inserts two lines for each mod it has found. Something like:

    ElseIf asFIle == "FNIS_ModName.txt"
      Return <Detected Mod Version>
Then as a final step, call the compiler to compile that into Skyrim .pex file. Output the result in the console if needed, or just return an error if the compilation failed.

 

 

I sure am familiar with creating text files from templates. FNIS basically is built on that. :)

 

But it would require that each user has papyrus installed. So FNIS installation would need to include papayrus. And I not really want to do that. Besides, I don't know if this even would be allowed.

Link to comment
  • 2 weeks later...

 

Well, you run the tool to create the xml files. You could just as easily also create files inside the scripts/source folder, then call the compiler to compile those scripts into .pex files.

 

Not as easily, maybe, but it's not impossible to see how it could be done, at least.

 

Something along the lines of you parse a .psc file placed with the generator. When it finds a line which says "FNIS_INSERT_VERSIONS_HERE" it inserts two lines for each mod it has found. Something like:

    ElseIf asFIle == "FNIS_ModName.txt"
      Return <Detected Mod Version>
Then as a final step, call the compiler to compile that into Skyrim .pex file. Output the result in the console if needed, or just return an error if the compilation failed.

 

 

I sure am familiar with creating text files from templates. FNIS basically is built on that. :)

 

But it would require that each user has papyrus installed. So FNIS installation would need to include papayrus. And I not really want to do that. Besides, I don't know if this even would be allowed.

 

Good point. I have no idea what is included by default anymore, so then that isn't an option.

Link to comment

Why non kill-move paired animations must always have duration defined? Is there any specific reason?

 

There are 5 or 6 events that are raised at the end of a paired animation. PAired animations and killmove are almost the same. PA even raise 2 different pairs of KillMoveEnd and KillMoveStart. The only difference is the missing KillActor.  

 

The reason is, that these animations (like furnitures) are not totally controlled by behaviors. So the engine needs to know exactly when it ends.

Link to comment
  • 1 month later...

I've got versions set for the primary SexLab animations, however how do I set version numbers for the creature animations so it no longer says ?.? seeings as they are spread across multiple FNIS files.

 

Create Creature Behaviors ...

Reading SexLabCreature V?.? ...

 

EDIT:

Nevermind, looks like setting the version number in only the bears file makes it work. Hurrah for not having to edit every single file whenever I update.

Link to comment
  • 1 month later...

I see the problem. 

 

The "Reading ..." message is done when the generator finds the first animlist for a specific mod. And it goes through creatures according to the BehavioredObjects.txt files. So the first 3 would be the 3 atronach types. But since you don't have those it's number 4, the bear.

Link to comment
  • 3 weeks later...

I'm curious if behavior controlled movement toggle would be possible?

 

For example, there could be new flag for movement control. If an animation is defined with said flag, actors movement is blocked for its duration (it would switch graph variables internally). It could be nice alternative to DoNothing packages.

Link to comment

I'm curious if behavior controlled movement toggle would be possible?

 

For example, there could be new flag for movement control. If an animation is defined with said flag, actors movement is blocked for its duration (it would switch graph variables internally). It could be nice alternative to DoNothing packages.

 

To be honest: I don't understand those things enough to make it work with behaviors. I had it on my list at one time, but I'm afraid it will not pay off to spent probably a considerable amount of time for investigation.

 

But you might try without behavior support. There are 2 behavior variables: bAnimationDriven, and bMotionDriven. bAnimationDriven tells if an animations defined character movement. Foe example cart descend, bleedout movement, and stagger are AnimationDriven. MotionDriven seems to be the opposite, although I don't know why it takes 2 variables to do this.

 

So setting bAnimationDriven to true, and MotionDriven to false could do what you want.

Link to comment

As a random stab in the dark follow up question regarding behaviors, do you have any indication/idea for how I might go about implementing a system to send animation events to actors via a SKSE plugin? As my current project I'm looking to convert as much of SexLab over to custom native SKSE functions as possible and/or necessary. My hope is that by sending the animation events to the graph to multiple actors via SKSE will more reliably result in a the animations syncing up properly, as opposed to doing it via Papyrus and more subject to scripting lag. Tried asking the people in the Bethesda SKSE thread awhile ago but pretty much went on ignored.

 

Aside from knowing the inner workings of SKSE and SKSE plugins, some decent information on how the animation events are received/interrupted by the actor would be helpful in narrowing down a target.

Link to comment

As a random stab in the dark follow up question regarding behaviors, do you have any indication/idea for how I might go about implementing a system to send animation events to actors via a SKSE plugin? As my current project I'm looking to convert as much of SexLab over to custom native SKSE functions as possible and/or necessary. My hope is that by sending the animation events to the graph to multiple actors via SKSE will more reliably result in a the animations syncing up properly, as opposed to doing it via Papyrus and more subject to scripting lag. Tried asking the people in the Bethesda SKSE thread awhile ago but pretty much went on ignored.

 

Aside from knowing the inner workings of SKSE and SKSE plugins, some decent information on how the animation events are received/interrupted by the actor would be helpful in narrowing down a target.

 

I know nothing about SKSE plugins. But I can't believe that SKSE/plugins will help you in any way.

 

There are only those 3 well-known interfaces between engine and behaviors: Send AE, Receive AE, and AnimationVariables. Unfortunately, the CK adds a couple of necessary layers, like for the furniture and paired animations. Sending AEs to 2 actors from one script cannot be the problem. Maybe executing them? But that wouldn't make a noticeable difference when sent from SKSE. Can you describe a specific scenario wher you have difficulties?

Link to comment

Fore was wondering what does fnis coins are that are added to npc inventory ?? i use the other mod where female can use other walking style and seem to be adding coins to them. Was there any chance you could make that invisible so i do not accidentally take them out of a female inventory especially those that has allot of stuff in them or make them quest item so they cannot be removed ??

Link to comment

With the coins I remember which animation was chosen for a specific NPC after the character was unloaded. AnimVars are lost after an unload, and there are no (easy) ways like custom AVs. 

 

But if you don't like them, you can switch them off with MCM. Then all NPCs will change their walk every time, even when you have them assigned via dialog. Dot a bit deal in my opinion.

Link to comment

Thanks so that was what they where for. It is not that i don't like them but some npc has allot of junk in there inventory and sometime i just place r to take all and so these coins are also removed from there inventory. I was trying to avoid that part or else the npc will lose there walk style. What happens to coins itself ?? when i take they don't show in my inventory, so it take it they just disappear ??

Link to comment

Sure, a script removes them. Unfortunately I forgot to try to make them disappear as soon as their container (NPC) is opened. I don't know if this even works, and now I don't want to spend that time any more.

Link to comment
  • 3 months later...

Anyone know a reference as to how to script animations into skyrim.  I'm trying to learn how to replace Walk/Run, Sneak, Idle, Animations on a trigger event, then replace the originals after a second trigger event.  I know how to script the basic events, just not how to replace the animations after the event has triggered.

 

Say I want to play a cover animation on armor removal:

 

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference )
     if akBaseObject as Armor
          armorCheckEvent()
     endif
EndEvent
 
Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference )
     if akBaseObject as Armor
          armorCheckEvent()
     endif
EndEvent
 
Function armorCheckEvent()
     Armor dovaArmor = Game.GetPlayer().GetWornForm(0x00000004) as Armor
          if dovaArmor == None
               {Replace Normal Idle/Walk/Run/Sneak animations with New Animation}
          else
               {Remove/Prevent New Animations}
          endif
EndFunction
 
I looked at BU for a Source file (as it does what I'm looking for) and I found none.  FNIS SexyMove was too complicated for me to understand.
 
Any help would be appreciated.

 

Link to comment

Have you read the FNIS for modders' doc? That'S a must, even when I try to help you. If you don't understandd what you are doing you will not be able to deal with possible problems later.

 

Basically it is not that hard. You need to make an AnimFileList which contains a line like the following

aa mt_loco_forward 1 1_mt_walkforward.hkx 1_mt_walkforward.hkx 1_mt_walkforward.hkx  1_mt_runforward.hkx 1_mt_runforward.hkx

To activate this walk/run set you have to call

FNIS.set_AACondition(Game.GetPlayer(), "mt_loco_forward", "<your_mod_name>", 1, DebugLevel)

DebugLevel tells about the amount of information added to the Papyrus log. 4 is max (during your test), 1 is little (released mod)

 

Go back to default with

FNIS.set_AACondition(Game.GetPlayer(), "mt_loco_forward", "<your_mod_name>", 0, DebugLevel)

And at the start of your mod you should always check if the right FNIS version is installed and properly generated. Do this with the following. It also includes the check for SKSE, which you most likely will need.

bool isGenerated = FNIS.isGenerated()
string VersionToString = FNIS.VersionToString()
bool isVersionOK = (FNIS.VersionCompare( 5, 1, 0 ) >= 0)
bool isSKSE = (SKSE.GetVersionRelease() > 0)
if ! (isGenerated && isVersionOK && isSKSE)
   string out = "FNIS Sexy Move stopped with ERROR(s):"
   if ! isVersionOK
      out = out + "\n- FNIS version " + VersionToString + " older than required" 
   endif
   if ! isGenerated
      out = out + "\n- Last FNIS generation failed" 
   endif
   if ! isSKSE
      out = out + "\n- SKSE not started" 
   endif
   Debug.Messagebox(out)
   StartUpStatus = -1
   return
endif

 

 

 

 

 

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