Bubbajones_ya Posted April 7, 2017 Posted April 7, 2017 Sorry for starting another animation thread, but this is a new question entirely. With Anton's blender tools, I've managed to make animations in Blender (I'm using 2.78c) and get them in game surprising quickly as replacers. They work almost perfectly as replacers (the feet don't seem to move how I orient them, but it's not a big issue for me as of now). I have not yet learned about the FNIS setup, so I need to go over that so I know how to add my new animations in game instead of piggybacking and replacing other mods animations though. Currently for testing, I've been replacing other mods custom animations (the .hkx files) with the animations I make by simply renaming my animation with the same name of a mods animation, then calling that animation by a script. For example, I call an animation in my script (a reference alias on the player): ; ; Event OnAnimationEvent(ObjectReference akSource, String asEventName) if (akSource == PlayerREF) && (asEventName == "JumpDown") wait(1) sendanimationevent(PlayerREF, "PAF_Aroused01") endif endevent ; ; This event works. After the player jumps, a second later the animation "PAF_Aroused01" is played which is Leito's female arousal animation. When I rename my animation and replace the original animation file ("PAF_Aroused01" which has the filename leito_aroused_f_1.hkx) in the proper folder with mine, it plays my animation instead. When this animation is played, the player cannot move or do anything pretty much (jumping works and some other stuff, but walking/running doesn't.) This is the case for the original animation, and my animation I replace it with. I made a quick animation where I only moved and keyed the arms/hands (and not feet/legs etc) for one frame to see if I could get normal player movement/animation except for the arms/hands (as a new cover self animation test). Doing this resulted in having the player be in a static pose with the arms/hands where I moved them. No movement or anything was allowed until the animation timeframe was up. So my different animation still played, but it acted just the same as before despite not animating any movement on the rest of the body. However, when I change the script section to: ; ; Event OnAnimationEvent(ObjectReference akSource, String asEventName) if (akSource == PlayerREF) && (asEventName == "JumpDown") wait(1) sendanimationevent(PlayerREF, "DefeatZazCoverSelfF") endif endevent ; ; The "DefeatZazCoverSelfF" animation is played. This animation however is one where the character covers her chest and groin with her hands BUT she can still walk/run etc. When I changed this animation file (in the defeat folder) with the SAME animation I replaced the "PAF_Aroused01" animation earlier, my new 'cover self' for the hands/arms plays out fine, BUT I can move and walk around like normal (just like the "DeafeatZazCoverSelfF" animation is normally.) This is what I'm going for, but I need to know why this animations allows movement, while the other one doesn't, so I can setup several of these animations in my own mod. So here, I managed to figure out the animation file itself AND the scripting does NOT play into the players character movement, so this has to be elsewhere either in the Creation Kit or the behavior files. (Both of which I am not yet familiar with) Can anyone tell me where this behavior is defined, and how I can go about adding these settings to my animations? (Does the FNIS text document define this, or is it the creation kit? Something else?) Can anyone give me a link or tell me more about how to add animations through the creation kit/FNIS setup? Some of the animation I'm trying to make involve movement along with what I change. For example I want different type of cover self animations, as well as animations for eating/drinking/picking up objects but ON THE GO. There was a mod where whenever you eat/drink/pick something up, an animation would play, but it stopped all movement. This was a really cool idea, but too cumbersome where I'd have to wait for a slow eating animation every time I ate food. I'd love to make new animations where I can have these actions go on, but I could still walk/do stuff or even interrupt the animation and go to combat (just like how the "DefeatZazCoverSelfF" animation plays out.) Thanks for any guidance and help! I'm quite excited I've managed to get animations working in game so easily, I just need to figure out how to add them myself for standalone use instead of replacing other things!
fore Posted April 7, 2017 Posted April 7, 2017 You are right in that almost everything that controls animations is comprised in behavior files. CK is only defining some interfaces and conditions into the behaviors, but CK cannot be used to make something meaningful without behaviors. To understand behaviors you need to know that they are defined as graphs, with states and transitions to move inside this graph. When you do something like in your first examples, then you rudely interfere in this graph. And as it is a nature of interference you will cause side-effects. Some you see right away, some later, some never. It is hard to predict. If you want, you can look into behavior file and try to reconstruct what happens. But that's hard. I always refused to analyze what happens in cases like yours, and even more, to figure out how things could be adjusted. It's almost always wasted time. You have 2 choices: either see what FNIS provides, and life with it's features. Or go into behaviors and make the appropriate changes yourself. Like for example TK Dodge. But be warned. It takes a lot of time and dedication until you even remotely understand whats going on in there. If you go with FNIS you are of course restricted. FNIS is focussing very much on idles. Animations that play independently in certain situation. There you have a variety of options to choose from. What you want with doing on the go is only partially supported by the FNIS. You can either use Arm Offset animations. Here you define the arm animation, while the rest of the body is defined by the actual movement animation. This way the early cover up animations were implemented. Animated Objects are possible. It is pretty much what th game provides with animations for carry basket, and pick flower. With Alternate Animations you can dynamically replace most character animations with custom ones. However this doesn't work for eating/dringing, because you cannot add AnimObjects. For details see the FNIS Modder's doc in the FNIS download section.
Bubbajones_ya Posted April 7, 2017 Author Posted April 7, 2017 Thanks a lot fore for your reply (and work on mods you've done as well!) I figured the behavior files were a big role in what was causing the issue, I just haven't had a chance to look into that side of things yet. I think I may dabble in messing with behavior files eventually, but it sounds like sticking with your FNIS features for now. That should probably get me most of what I'm looking for currently. As for Alternate Animations, is that in reference to the PCEA2 setup? I was wanting to see if I could replace animations based on certain situations by using scripts to trigger PCEA2 features. Or maybe there is a different way to swap animations dynamically? Some ideas I had with that (maybe a ways down the road but I've been highly interested in this) was to dynamically change hand-to-hand/weapon/running animations (or more) based on character progression. Potentially have the animations change back and forth depending on given situations (like skill gains and/or magic effect buffs). Is this a possibility with your PCEA2 setup? If so, I'm under the impression that it would change the entire animation path, so I'd need to fill out the animation folders carefully based on what I want to change. (Because if I only wanted to change sword animations based on an event, but I had a custom walk animation solely for my character, then I'd need to have the custom walk AND different sword animation in the changed folder right? This is assuming it's possible to do this which it seems like it is.) Edit: I see in your download link for the documentation that there is information included on Alternate Animation. I'll be reading up on this and hopefully ready to put in new animations on my own soon! I think the work you've done has almost been the most important thing in the modding community for Skyrim so thank you! Edit 2: I just read through the FNIS for modders documentation quickly and was able to add my own animation (still piggybacking off another mod, but added it in instead of replaced it). That was much easier than I expected, the documentation was quite easy to understand for what I read so far!
Bubbajones_ya Posted April 11, 2017 Author Posted April 11, 2017 Okay, from working on this, I've manage to successfully get animations (idles/arm offset etc.) in game by using the Generate FNIS for modders setup. However I now have questions regarding the Alternate Animation functionality. While learning animations, I'm working on adding stuff to someones mod so far successfully except for the Alternate Animations portion. I believe I have the FNIS list and files set up correctly, I'm just trying to see how to set up the scripts to replace the animations. I followed the scripts in the documentation but am getting an error on the Player Alias Script portion. First I'll say I added (copy pasted, with replacing property names and replacing "mym" and "<myMod>" with the correct names) the Quest Script portion and received no errors upon compiling. On the Player Alias Script portion, I have the script portion setup like this and am getting the errors: ================================================================================================================== event OnPlayerLoadGame() int current_crc = FNIS_aa.GetInstallationCRC() if ( current_crc == 0 ) ; Installation Error: no AA generated by FNIS elseif ( current_crc != myMod.myModCRC ) Mod.ModID = FNIS_aa.GetAAModID("paf", "REAL PAF",true) ;true:testonly Mod.mtwalkforward_base=FNIS_aa.GetGroupBaseValue(Mod.ModID,FNIS_aa._mt(),"REAL PAF", true) ;I changed "mym" and "<myMod>" here to what's in red since that's the name of the esp myMod.myModCRC = current_crc endif AnimationRegister() ; This is here because I have this function used elsewhere in the script, it's unrelated to what I'm doing here endEvent -------------------------------------------------------------------------------- variable myMod is undefined This is in relation to the "elseif" line none is not a known user-defined type Same as above cannot compare a int to a none (cast missing or types unrelated) Same as above variable my myMod is undefined This is in relation to the last line in the "elseif" command none is not a known user-defined type Same as above type mismatch while assigning to a none (cast or types unrelated) Same as above ================================================================================================================== I'm assuming I have to rename the portion myMod with something, but I'm not sure what exactly. Can anyone point me in the right direction here? I tried replacing this with the esp name (it has spaces in it which maybe that's the problem?), also with "paf" and "REAL PAF", both with and without quotations and none of those worked. Also, once I do get this working, when I go to call an alternate animation in the script, all I'll need to do is use this line correct? : ================================================================================================================== if <set_my_animation> bOk = FNIS_aa.SetAnimGroup(Game.GetPlayer(), "_mtidle", myMod.my_mtidle_base, <value_0_to_9>, "myMod", true) else ; set vanilla bOk = FNIS_aa.SetAnimGroup(Game.GetPlayer(), "_mtidle",0,0,"myMod",true) endif if !bOk ;there was a problem endif ================================================================================================================== Where here <set_my_animation> can be any property or variable I define like: int AnimationChange = 0 if (AnimationChange == 0) ;Change the animation, just didn't rewrite code here else ; keeps it vanilla Any help or guidance on this would be appreciated!
Bubbajones_ya Posted April 11, 2017 Author Posted April 11, 2017 Well by copying the script for the katana (FNISACWeaponsScript) in the example file I got it working! I'm not sure if this is a good way of doing things though for what I want to do, so hopefully it won't bite me in the butt. Just for a test, I made it so the walk animation changes when the game registers the "jump fall" animation. I know know I can start working on movement animations and not be worried about not being able to implement them! Edit: However, it looks like this script won't give the option to change to a specific alternate animation if you have several defined. I'll have to look more into this, possibly I can get the b0k = FNIS_aa.SetAnimGroup working still.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.