b3lisario Posted August 29, 2015 Posted August 29, 2015 View File INTRODUCTION This SKSE plugin allows registering custom animation events on ObjectReferences.Pretty much like the existing Form.RegisterForAnimationEvent, but not limited tothe vanilla animation events. I might need to run papyrus code triggered by animations called from arbitrarymods. I thought it was not possible registering custom animations, until I foundthese amazing work: https://github.com/towawot/DLL-GunsmithSystem ================================================================================ INSTALLATION Copy the contents of the Data folder into Skyrim\DataOr use any mod manager. ================================================================================ USAGE Register animation events, for a specific object reference or globally.For example: ; registers the animation only for the playerRCAE.RegisterForAnimEventOnRef(Game.GetPlayer(), "MyAnimationEvent") ; registers another animation for any characterRCAE.RegisterForAnimEvent("AnotherSexyAnimation") Then an OnAnimationEventEX callback event is called whenever a reference playsthe registered animation event. This event has some restrictions, read the notes Event OnAnimationEventEX(ObjectReference akSource, string asEventName)if akSource == Game.GetPlayer() && asEventName == "MyAnimationEvent"...endIfEndEvent ================================================================================ NOTES - Won't work on ObjectReferences that are not actors. I think it could, butcurrently is hardcoded just for actors (NPC or player) - The OnAnimation Event callback only seems to work when its script points tothe player character. Actually I'm not sure on this.I've successfully tested the callback on ReferenceAlias and ActiveMagicEffectscripts, both pointing to the player.The callback is not called if it's on a quest script, neither on a NPC'sActiveMagicEffect.I think this is because the player character is being used as a base object whenthe SKSE plugin sends the event to Papyrus. - The stuff registered is stored in memory and is lost when the game is closed ================================================================================ CREDITS - towawot for https://github.com/towawot/DLL-GunsmithSystem - himika for https://github.com/himika/libSKSE - SKSE Team for http://skse.silverlock.org/================================================================================CHANGE LOGv02: Added thread safetyv01: Initial release Submitter b3lisario Submitted 08/29/2015 Category Modders Resources Requires SKSE 1.7.0 or higher Special Edition Compatible 1
Guest Posted August 29, 2015 Posted August 29, 2015 Thank you for this. I will become handy. When you, in your notes, say: "The callback is not called if it's on a quest script, neither on a NPC's ActiveMagicEffect" It means that for NPCs it is called only for scripts attached to Actors or ObjectReferences or ReferenceAliases?
b3lisario Posted August 29, 2015 Author Posted August 29, 2015 The OnAnimationEventEX is not fired unless it is in a script pointing to the player, which is not the case on quest scripts or NPC's activemagiceffects. So you need a ReferenceAlias script pointing to the player, or something like that, or the OnAnimationEventEX won't be called. The event triggers for any NPC that performs the registered animation.
zaira Posted August 29, 2015 Posted August 29, 2015 Cool - but I need two events : one when an animation starts and the second (more important) when the animation has finished. And a suggestion for a very cool enhancement: Add the functionality to pass a global variable that is set to 1 (true) if the event has fired Because then we can use it in scene and package action conditions to wait until an animation has started / finished (I know - can be done by modder in script, but is a very frequent use case)
zaira Posted August 29, 2015 Posted August 29, 2015 When is the animation event fired in the current version - after start, before start, after finished?
b3lisario Posted August 29, 2015 Author Posted August 29, 2015 No idea how to know when the animation ends. Maybe you can hook some "AnimationEnd" event? I think is fired before. The original mod https://github.com/towawot/DLL-GunsmithSystem hooks the anim events to block animations from happening.
Arhon Posted August 29, 2015 Posted August 29, 2015 Um, I think I misunderstood but does this kind of help during the NSAP Object Animations(Throne,Chair and the like in MCM) ? I am not a modder so yeah I dont really know.
Guest Posted August 29, 2015 Posted August 29, 2015 Um, I think I misunderstood but does this kind of help during the NSAP Object Animations(Throne,Chair and the like in MCM) ? I am not a modder so yeah I dont really know. No. That will not help. The stickiness of AnimObjects is a different matter. B3lisario plug-in is a way to get a script event when an animation event is fired. With FNIS 5+, you can add to the HKX animation events. And I am checking if, when such animation plays, and the anim event is supposed to be fired, then the mod event is sent. For a very first test, on the player it works just fine. But I am not able (yet) to catch the events for a NPC. Probably I need to develop a "manager script", attached to the player, to keep track of events sent for other NPCs.
Arhon Posted August 29, 2015 Posted August 29, 2015 Um, I think I misunderstood but does this kind of help during the NSAP Object Animations(Throne,Chair and the like in MCM) ? I am not a modder so yeah I dont really know. No. That will not help. The stickiness of AnimObjects is a different matter. B3lisario plug-in is a way to get a script event when an animation event is fired. With FNIS 5+, you can add to the HKX animation events. And I am checking if, when such animation plays, and the anim event is supposed to be fired, then the mod event is sent. For a very first test, on the player it works just fine. But I am not able (yet) to catch the events for a NPC. Probably I need to develop a "manager script", attached to the player, to keep track of events sent for other NPCs. I see, that's quite interesting.
Earen Posted August 30, 2015 Posted August 30, 2015 This might be not what most of ppl. want to hear. Hope you are planning to add some thread safety as I noticed global variables in the code
b3lisario Posted August 31, 2015 Author Posted August 31, 2015 This might be not what most of ppl. want to hear. Hope you are planning to add some thread safety as I noticed global variables in the codeThanks for noticing the problem. I've added some ICriticalSection things Please let me know if this would be safe enough.
Earen Posted August 31, 2015 Posted August 31, 2015 This might be not what most of ppl. want to hear. Hope you are planning to add some thread safety as I noticed global variables in the codeThanks for noticing the problem.I've added some ICriticalSection things Please let me know if this would be safe enough. Thanks, it looks safe enough
nutluck Posted September 15, 2015 Posted September 15, 2015 Well there is a mod I want to try out that requires this mod. So to install you just use MO or NMM and that's it? Just making sure since there is no install instructions listed.
OnantheBarbarian Posted September 15, 2015 Posted September 15, 2015 Well there is a mod I want to try out that requires this mod. So to install you just use MO or NMM and that's it? Just making sure since there is no install instructions listed. There's also some files outside the Data directory as well, so should MO users be setting "DATA" as the data directory during installation, or instead simply click "ok" and set the mod to "ignore missing data"?
starfall17 Posted September 15, 2015 Posted September 15, 2015 yeah i would like to know too how are you supposed to install it with MO... so far i placed data in the left window... and the other folder i just extracted into skyrim folder without MO... not sure if that works but thats how skse is installed...
Kestrel77 Posted September 19, 2015 Posted September 19, 2015 download link dont work can someone refresh thanky
Claynation01 Posted September 27, 2015 Posted September 27, 2015 hi i am using this to support another mod as playeer not modder and i am not sure i installed this properly where would the RCAE src folder go or do i not need this unless i wish to change something thanks
b3lisario Posted September 30, 2015 Author Posted September 30, 2015 The "RCAE src" folder is not needed. These are the source files of the SKSE plugin. Just install the data folder. I've added a INSTALLATION section on the mod description.
Claynation01 Posted October 1, 2015 Posted October 1, 2015 The "RCAE src" folder is not needed. These are the source files of the SKSE plugin. Just install the data folder. I've added a INSTALLATION section on the mod description. cool thanks b3lisario
Bad Dog Posted December 21, 2015 Posted December 21, 2015 I'm not sure if I've properly reported this behavior here, but in case I didn't -- my khajiit SoS addon schlongs catch the SOS animation events so as to swap genital meshes. I don't touch the page up/down keybindings at all. Nonetheless, for some reason, my mod breaks page up/down in the console. SOS of course uses those to control schlongs--but they only break when my mod is catching the events. I have no idea why this is happening or even how to start looking--maybe you can figure out what's going on on your end.
Bullfye Posted November 21, 2017 Posted November 21, 2017 Does anyone can upload this file again..its blank the download page or giving missing page...
GuruSR Posted February 20, 2018 Posted February 20, 2018 Not too sure if this is still in development, though the Hoodie Schlong and so does the SOSFloppy mod use it, but after disabling the SOSFloppy mod from using the RCAE and me manually removing the dll from the plugins folder, the 1 second freeze of the game at random times (~10 seconds) vanished, a shame as I was hoping it would work, but it seems to be behind the times for current mods, or the other mod was causing grief with it. Hopefully someone is still around that works on this code, can look into this. GuruSR.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now