xkkmEl Posted April 6 Share Posted April 6 I still don't know how to work with idles, or animations in general. I am hoping someone can provide a few hints... I would like to reuse the GreybeardMedite (furniture) animation. I am dynamically creating a furniture marker (marker = playerref.placeAtMe( furniture, 1, True)) and then activating it (marker.activate( playerref)). It works with some idles, like the BlessingKneelMarker, but not others. I don't really understand why. The furniture records are very similar. Is the difference in the nif? If so, what do I have to do to the nif to make it work for the player? Also, I can see that in some circumstances, you don't need a furniture. You can trigger idles with Actor.playIdle, or sendAnimationEvent. But most everything I try fails. I can see the name of the working animation events in the hkx files, but I don't know which events work or why others fail. Finally, I need to figure out when the idle is done... to chain more stuff, more animations, or other state changes. The mineOreScript does that by listening for animation events, but there again, when I see a promising event name in the hkx files, I never see those events triggering... except for the few that I find examples of in vanilla code (like the mineOreScript's pickaxe_exit event). PS: I know about dialogue animations, and idle lists in AI packages. They just don't work reliably enough or provide enough control for most of my use cases. Unless I am not using them right... in my current state of ignorance... PPS: I don't really care about nifs and hkx files... I just need proper reliable methods for starting idle animations and detecting their end. Link to comment Share on other sites More sharing options...
scorrp10 Posted April 6 Share Posted April 6 See this mod https://www.nexusmods.com/skyrimspecialedition/mods/32748 It does provide alternate .nif files for the markers. Many idles are looped, which means they are never 'done' untill there is a command to play some other idle. Link to comment Share on other sites More sharing options...
xkkmEl Posted April 6 Author Share Posted April 6 Wow. Thanks. Can't wait to experiment with it. Link to comment Share on other sites More sharing options...
xkkmEl Posted April 13 Author Share Posted April 13 This new GreybeardMeditate nif works very well. I copied the nif to a different path to avoid any possible conflicts with other mods, and created a new furniture record in order to adjust keywords and a couple of flags. There is a slight quirk though. Playing a female Dragonborn with high heels, when I use placeAtMe to create the furniture reference, it places it some 4 inches too high... so I am actually levitating above the floor as I meditate . You can't use moveTo on furniture... it stays put where you created it... and besides I have no idea on how to test for high heels and the offset being applied. I could force-remove footwear, but then I'd need to figure out how to catch the exit animation event in order to put the footwear back on (btw, it does align my correctly with the floor if I remove my heels beforehand). Does anyone have tips on how to deal with this? Link to comment Share on other sites More sharing options...
greyday01 Posted April 14 Share Posted April 14 I'm not sure how to catch the ending of furniture use, but removing footwear before meditating seems proper for everyone even without high heels. Link to comment Share on other sites More sharing options...
xkkmEl Posted May 4 Author Share Posted May 4 For anyone researching this, I have found a couple of interesting things, on top of Scorrp10's excellent pointer: Most idles (the loose ones) can be started with sendAnimationEvent, and they will generate an "IdleStop" event you can register for with registerForAnimationEvent. In my testing, I was able to use this to achieve more flexibility and better reliability than with IdleMarker, useIdleMarker, playIdle, dialogue idle animations or AI package idles. I used a "wait" AI procedure (stop movement: false), setRestrained, wait 0.1s, then sendAnimationEvent. The wait seems necessary to let the current animation exit cleanly, allowing the new idle to take hold. Perhaps the wait time needs adjusting depending on circumstances... I haven't gotten there in my testing yet. To explore what events to listen for, you can use this tool (untried yet, but very promising): Animation Catcher. Link to comment Share on other sites More sharing options...
xkkmEl Posted June 1 Author Share Posted June 1 On 5/4/2024 at 9:21 AM, xkkmEl said: Most idles (the loose ones) can be started with sendAnimationEvent, and they will generate an "IdleStop" event you can register for with registerForAnimationEvent. In my testing, I was able to use this to achieve more flexibility and better reliability than with IdleMarker, useIdleMarker, playIdle, dialogue idle animations or AI package idles. I used a "wait" AI procedure (stop movement: false), setRestrained, wait 0.1s, then sendAnimationEvent. Further testing reveals I still have no idea what I'm doing! The IdleStop event mostly does not fire, and when it does it looks like it's just before or just after sending the start event, not when the idle is done. I don't understand my initial success, and I sure don't know how to extend this to more interesting cases. I'll just keep experimenting... Link to comment Share on other sites More sharing options...
PeterMartyr Posted June 2 Share Posted June 2 I know the answer to both questions what to register for how to stop it but i do not want to spoil your fun, or place it under a spoiler button, that would just be mean.. so just asking outright do you really want to know Link to comment Share on other sites More sharing options...
xkkmEl Posted June 2 Author Share Posted June 2 Hey! What game are you playing? Of course I wanna know! I wouldn't be asking otherwise. Idles are just a small piece of a largish WIP... plenty of other areas I can have fun with :-) Don't be afraid to spoil it. Link to comment Share on other sites More sharing options...
PeterMartyr Posted June 3 Share Posted June 3 I did not want to spoil your fun Ok checking an old mod Spoiler akActor.GetAnimationVariableBool("bIsInMT") and debug.SendAnimationEvent(akActor, "IdleForceDefaultState") respectively bIsInMT tho was buggy, most of the time for me, it worked, easy with player, harder for NPC was my experience If the animation action basically pause but the animation was the still running and had not reached it end, it see under spoiler, can become problematic too, I recall abandoning it, in favour of a timer, the resetting or stopping the animation I 100% guarantee EDIT now picture me and no one to help me.. you have no idea how many tests I did, how could deny you that? https://ck.uesp.net/wiki/Animation_Events Link to comment Share on other sites More sharing options...
Recommended Posts