Jump to content

Get custom enter/exit animations to work on custom furniture?


Recommended Posts

Furniture has a lot of potential, but for some reason I cannot get the enter and exit animations to kick in.  I can however get the main animation to kick in when I use custom furniture.


I can also select some of the pre-existing exit animations, but all they do is cause the npc or player to go into the falling animation.


Has anyone here managed to make a functional enter and exit animation for custom furniture?


I figured it out, the instructions for furniture animations, etc was in FNIS 5.1 documentation.


Download PDF from fnis nexus - www.nexusmods.com/skyrim/mods/11811/


The following information is from the PDF.


7. Furniture Animations (fu, fuo)
Example (for ONE complete furniture animation):
fu -a Kneel_Enter Kneel_Enter.hkx
+ -o,B1.2 Kneel_Loop1 Kneel_Loop1.hkx myAnimObject1 myAnimObject2
+ -o Kneel_Loop2 Kneel_Loop2.hkx myAnimObject1 myAnimObject2
+ -a,o Kneel_Exit Kneel_Exit.hkx myAnimObject1 myAnimObject2
Furniture animations are used for all animations which need to be executed at a certain position and
angle. Like chairs and beds, but also mining, smithing, searchchest, and even the Dragonborn Telvanni
tower lift.
FNIS furniture animations have the same functionality and syntax as Sequenced Animations, except that
they contain all the overhead necessary to run them like vanilla furniture animations. So like there you
can "jump" between different animations by using SendAnimationEvent(). Check the information there,
when you use AnimObjects and want to use optimized fu ("fuo"). The first and last animation MUST be
acyclic ("-a"). The second to last SHOULD be cyclic (NOT "-a").
This is what you need to run Furniture Animations for an NPC:
1. define a new furniture object with a different keyword(e.g. "MyFurniture")
Note 1: for furniture without necessary mesh (e.g. chair or bed) I prefer a modification of the
"SearchChest" furniture. This allows direct access without any necessary character turns.
2. in CK Animations -> 0_master.hkx -> ActionActivate -> ActivateRootChar -> Chair
define a new group of 3 or 4 Idle Animations, similar to IdleCrouchedPray. For example
MyKneelIdle (HasKeyword "MyFurniture" == 1, AnimEvent "None")
MyKneelIdleEnterInstant (IsEnteringInteractionQuick == 1, AnimEvent "KneelLoop1")
MyKneelIdleEnter (Getsitting == 2, AnimEvent "KneelEnter")
MyKneelIdleExit (Getsitting >= 3 AND Getsitting <= 4, AnimEvent "IdleChairExitStart")
When there are more than 3 animations in the fu group, the others are not defined in the CK.
Note 2: Most vanilla furniture idle definition include this EnterInstant definition. I couldn't find a
reason for that, but most likely it is useful when the NPC is unloaded and loaded again (re-enter
cell). Then the NPC doesn't need to start the animation again with the enter animation. If this is
not important for you, you can as well omit the EnterInstant. Everything else is tedious enough.
Note 3: If you copy/past/move existing Idle definitions, make sure you clean your mod with
TESVEdit afterwards.
3. in CK packages define a new "sittarget" package for one of your furniture object "MyFurniture"
4. In your script start the sittarget package with EvaluatePackage(). This will make your the NPC
walk to said furniture object and start the first (acyclic) animation of the group ("Enter"). After that
the 2nd animation is started. From there on you are free to "navigate" through the animations
with SAE().
5. The furniture ends once EvaluatePackage() is called again, and
- there is no new package (no condition that fits), or
- 7 / 16 -
FNIS for Modders 5.1
- the next package is a different package that is NOT a "DoNothing" package
If it's a "DoNothing" package, then you have to stop the furniture animations with
SAE ("IdleChairExitStart") or SAE("<exit_AE>").
Note 4: Don't use SAE ("IdleChairExitStart") or SAE("<exit_AE>") on top a package end condition
(except "DoNothing". This may result in re-playing the exit animation or more.
Note 5: Activate() does not work for NPCs
Note 6: For existing furniture objects to make this work you need to add conditioned Idle Definition
to the existing definitions in the CK. And this needs to be done in ALL relevant places (enter, exit,
loop) if they are spread over several groups. Unfortunately, my preferred condition
"GetItemCount" doesn't seem to work here. But you can use FNIS defined AnimVar's instead (with
This is what you need to run Furniture Animations for the Player:
The Player doesn't have AI packages. So PC furniture animations for the PC are started using Activate()
<FurnitureRef>.Activate(Game.getPlayer(), false)
This will teleport the PC to the furniture marker, and immediately start the enter animation. The PC
doesn't need to be within the furniture's UI activation radius (area where you can see the "E sit"
message). It even works when PC and furniture are in neighboring cells, 1000 units apart. But that's not
really "immersive".
If the furniture is already taken, a "furniture in use" notification is displayed, and Activate() returns false.
This is what you need to run (partner) Furniture Animations for the Player & NPC:
It is not possible to have player and NPC use the same furniture marker ("sit 0"). When a furniture is in
use, and the player is activated, a "furniture in use" notification is displayed. And an NPC with a sittarget
package will not walk up to the furniture, but simply start the animation right away. This NPC reaction is
not necessarily caused by "furniture in use", but always seem to happen when a collision object covers
the furniture marker. To use one furniture for both Player and NPC, the furniture has to have 2 markers.
But since both markers can have the same position, this is like having just one marker.
However, the sequence of action is most important here:
• Player starts first: this doesn't work properly, if the player's collision object covers NPC's marker.
Which is always the case when both markers have the same position
• NPC starts first: it's important that the player is not in the way. But if this works out, the player will
teleport to the 2nd marker, and both characters can play their animations, completely ignoring
Final Notes:
Note 7: Furniture animations don't work in separate behavior files like all other FNIS animations (except
ofa), and needed to be integrated into mt_behavior.hkx. Which means, every time a user runs the
generator a huge 150.000+ lines xml file has to be translated into hkx. A huge impact, and a big concern
on my part. But Progress can't be stopped. But on top of that there is a
Note 8: severe limit on how many furniture animations can be added to mt_behavior.hkx: about 270 3-file
furniture animations per user (not per mod!!!). BE RESPONSIBLE, and don't add dummy definitions
that you don't really need yet

Link to comment


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

  • Recently Browsing   0 members

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