Jump to content

IdleGive with gift in hand


Recommended Posts

In my WIP mod, I have various circumstances where an NPC gives something to another.

Currently, I am just using the IdleGive animation (extend the right arm forward with palm up). I would like the gift to be visible, in the giver's hand, just like Delphine does with the Horn of Jurgen Windcaller.

What are my options? Anyway to make this work with random items? Or do I have to "prepare" the items, or even make them part of the animation itself?

As should be obvious from my questions, I understand very little of what happens in nif files and animations in general. Just enough to insert an NiAlphaProperty or rescale a shape.
Link to comment
Share on other sites

it is an animated object, and some (maybe a lot) Nifskope skills, get the hkx file Delphine uses in the game for extending the arm..   now swap out ANIO horn for the individual gifted, then insert (hacked the animation registry)  with FNIS or Nemesis.

I have to admit I have never used Nemesis,  I always pestered Fore when I needed help.. he is such a nice guy.. 

https://ck.uesp.net/wiki/AnimObject

add the animated object with the creation kit, then link it to hkx file with FNIS or Nemesis, then use like any other animation

FNIS 

<AnimObject>		any Animation Object defined in CK (can also be standard or from different mod)
  
 <type>: o		AnimObject: basic animation with one or more AnimObjects
  
<option>: o		one or more AnimObjects
  
Examples: 

o -h MyAnimEvent1 AnimationWithAO.hkx MyAnimObject01
o -h MyAnimEvent2 AnimationWithAO.hkx MyAnimObject02
o -h MyAnimEvent3 AnimationWithAO.hkx MyAnimObject03
  
 

btw notice I reuse the same hkx file and just swapped the ANIO, they are just extending the arm after all.

you can also use existing animations.. instead of duplicate it, but it might be easier to duplicate it, for more standalone mod

IMHO place ANIO idles into an Array, with another array with  the Gifts, then use the elements as Gift ID instead of nesting it LOL You know I am Anti Nester )))

int id = random int
play idle [id]
gift player [id]

three lines of code and 128 Gifts, bargain and profit 

DISCLAIMER: all FNIS and code was just made has an example, and does not represent working anything, and very important, find that ANIO horn and mod it with nifskope 

Link to comment
Share on other sites

EDIT: you may want to make sure you unequip their hands first.. sooner or later, something weird gonna happen, with a sword or a shield, if it is a follower, that a gimme

Function UnequipHandsEx(actor akActor)

    Int nIndex = 2
    While(nIndex)
        nIndex -= 1
        Form EquippedHand = akActor.GetEquippedObject(nIndex)
        If(EquippedHand)
            akActor.UnequipItem(EquippedHand)
        EndIf
    EndWhile
EndFunction

that code OK and will work

Link to comment
Share on other sites

Ok then.  Looking more closely at how Delphine does it, I find:
    idle event: IdleGiveMQ105Horn
    ANIO: AnimObjectMQ105Horn
    nif: AnimObjects\AnimObjecMQ105Horn.nif (in Skyrim - Meshes.bsa)
    hkx: idlegive.hkx (in Skyrim - Animations.bsa)

The content of the nif looks simple enough.  I might manage to cook my own nifs.  This dependency on cooked nifs will however limit where I can actually show the gift (most gifts are just taken from the giver's inventory and are therefore completely unpredictable).  That still leaves me with two important gifts (a book and a pamphlet; important for story telling, not for their intrinsic value).

I was however not able to find anything that ties IdleGiveMQ105Horn and AnimObjectMQ105Horn together, and idlegive.hkx is just a guess because I could find no file that links an hkx to anything related to IdleGiveMQ105Horn or AnimObjectMQ105Horn.

I guess my next step is to figure out where to insert:
    o -h myIdleGiveBook IdleGive.hkx myANIO_Book
    o -h myIdleGivePamphlet IdleGive.hkx myANIO_Pamphlet

I'll be reading the FNIS docs over the next few days.  In the mean time, if any of the above looks wrong, please speak up!  I'm going at this with a lot of assumptions.

Link to comment
Share on other sites

Yep go to the Fnis page and Yeah check out the modder's content, it will explain heaps, then you need to run Generate FNIS for MODDERS to create a behaviour file, THEN run Generate FNIS for USERS to see the new animation's in the Creation Kit..

I have faith in you

but first you need to create the ANIO's, before you create the mod behaviour hkx file, plus trust me FNIS is easy, it all about NifSkope

HINT for the ANIO in the FNIS Text use the Creation ID, also FNIS supports both HKX file in the same folder as the FNIS MOD TEXT and Relative PATHS  relative to the behaviour File (maybe too much info) for Custom Folders

EXAMPLE 

o	-a,h	_MyAniamtion01	..\..\..\..\MyMod\Animations\HandOver.hkx		_GiftAniO01

like I said, never use Nemesis, so no idea there 

EDIT the too much info was directed at casual readers, I know you get it 😆😆😆😆😁😁😁

Link to comment
Share on other sites

Success.

The FNIS bits were easy.  I did have to search a bit to find where the generated behavior file hid itself (in the FNIS XXL mod directory).

The nif hacking was somewhat tedious, correctly rotating, scaling and translating the animobject.  Otherwise, it was just a matter of deleting collision objects along with the BSX properties, and adding the "prn = R Hand" extra string property.

The book nif includes some animation bones (for opening the book), but you can just leave them in place and ignore them.

Link to comment
Share on other sites

On 7/7/2024 at 11:39 PM, PeterMartyr said:

 

      trust me FNIS is easy, it all about NifSkope

 

😉😉being a coder, FNIS would've been like a duck to water, you should look at alternate animation, and netimmerse override next 😈😈😈😆😆😆😆

Link to comment
Share on other sites

  • Recently Browsing   0 members

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