Jump to content

Recommended Posts

View File

Brings simple idles within easy access for mod makers

  • This is a modders resource to play suitable idles with an easy papyrys call.


Current state and plans

  • 229 animations included so far, currently adding more variety and improving tag quality.
  • Includes poses and gestures, suitable for spicing and enhancing dialogues, scenes and events.


Permissions

  • This mod can ONLY be used as a resource in free mods.
  • Credit for authors must be mentioned.


Credits

  • Halofarm for animations
  • Dooge for the mod
  • hafertaler for help


Installation

  • Run FNIS for users


Requirements

  • SKSE
  • FNIS


Known mods using this resource


Workings

  • Calls SKSE plugin to return random animation file name that matches required tags. Since it is external dll it is fast. Tags are passed as bitmask, see code in the first post in support .


Help

  • Using Animator it is relatively easy for anyone to add and help classifying idle animations.
  • Tip me off about animations free to use.
  • Submit your own animations, discussion gestures on a standing pose would be useful, such as giving the finger, facepalm, simulated blowjob, a-a-aa (no, with finger) etc.


  • Submitter
  • Submitted
    08/29/2016
  • Category
  • Requires
    SKSE, FNIS
  • Special Edition Compatible

 

Link to comment


scriptName Idler Hidden

import StringUtil

; Plays random idle matching mask given as space separated UPPERCASE mask identifiers
; Example:
; result = PlayRandomSimpleS(Someone, "STAND WAIT")
int function PlayRandomSimpleS(actor akTarget, string mask, int recover=5) global
    int m = MaskBuilder(mask)
    int r = PlayRandomSimple(akTarget, m, recover)
    return r
endfunction

; Plays random idle matching mask given as integer
; Example:
; result = PlayRandomSimpleS(Someone, 1+134217728)
int function PlayRandomSimple(actor akTarget, int mask, int recovertime=5) global
    if (akTarget == none)
        debug.trace("[Idler] had no actor as target")
        return -1
    endif

      string AnimationFile = PickIdleSimple(mask);
      if (AnimationFile == "")
        debug.trace("[Idler] found no animation for mask: "+mask)
          return -2
      endif

      Debug.sendAnimationEvent(akTarget, AnimationFile)
    Debug.trace("[Idler] Playing file: "+AnimationFile+".hkx")

    if recovertime > 0        
        Utility.Wait(recovertime)
        Debug.sendAnimationEvent(akTarget, "IdleForceDefaultState")
    endif

    return 1
endfunction

; Mask builder function
; Mask is a space separated string including all desired mask names without the bms
int function MaskBuilder(string strMask) global
    int m = 0
    string[] strItems = StringUtil.Split(strMask, " ")
    int ItemId = strItems.length
    
    ; Theoretically one should use storageutil etc to get rid of possible duplicates in the array
    ; One could pass this string to the dll function, but I dont know much c plus plus so meh,
    ; such approach would however allow unlimited bits, so perhaps in the future if 31 becomes too few

    While ItemId
        ItemId -= 1
        
        if strItems[ItemId] == "STAND"
            m += 1
        endif
        if strItems[ItemId] == "SIT"
            m += 2
        endif
        if strItems[ItemId] == "LAY"
            m += 4
        endif
        if strItems[ItemId] == "CROUCH"
            m += 8
        endif
        if strItems[ItemId] == "CRAWL"
            m += 16
        endif
        if strItems[ItemId] == "FACING"
            m += 32
        endif
        if strItems[ItemId] == "SLEEP"
            m += 64
        endif
        if strItems[ItemId] == "KNEEL"
            m += 128
        endif

        if strItems[ItemId] == "MANLY"
            m += 65536
        endif        
        if strItems[ItemId] == "BEG"
            m += 131072
        endif
        if strItems[ItemId] == "DELI"
            m += 262144
        endif
        if strItems[ItemId] == "REBEL"
            m += 524288
        endif
        if strItems[ItemId] == "DUNNO"
            m += 1048576
        endif
        if strItems[ItemId] == "SHOCK"
            m += 2097152
        endif
        if strItems[ItemId] == "THINK"
            m += 4194304
        endif
        if strItems[ItemId] == "DOM"
            m += 8388608
        endif
        if strItems[ItemId] == "SUB"
            m += 16777216
        endif
        if strItems[ItemId] == "YES"
            m += 33554432
        endif
        if strItems[ItemId] == "NO"
            m += 67108864
        endif
        if strItems[ItemId] == "WAIT"
            m += 134217728
        endif
        if strItems[ItemId] == "POSE"
            m += 268435456
        endif
        if strItems[ItemId] == "LEWD1"
            m += 536870912
        endif
        if strItems[ItemId] == "LEWD2"
            m += 1073741824
        endif
    EndWhile

    return m
endfunction

; Play suitable random idle for submissive slut crawling infront of you offering her ass
; int Result = PlayRandomSimple(akTarget, idler.bmsCrawl+idler.bmsSub+idler.bmsFacing)
;
; Play suitable random idle for Authoritative refusal said to your face by a sitting person
; int Result = PlayRandomSimple(akTarget, idler.bmsSit+idler.bmsFacing+idler.bmsNo+idler.bmsDom)
;
; Play suitable random idle for a person standing in a neutral way
; int Result = PlayRandomSimple(akTarget, idler.bmsStand+idler.bmsWait)

; Animations will only have one bit amongst 0-7. Exception bit 5 which can be used with other stance bits
; Other bits are unrestricted but odd combos may yield no results (such as sub+dom or yes+no)
; Bit 27 should allways be used when no special emote is necessary. Masking just for position without bit 27 will return from amongs all idles in that posture.

; Examples
; Beg                Ask
; Beg+Dom            Demand "Fucking give me that already"
; Beg+Sub            Beg, plead

; To use these properties, idler script must be made a property on your mod script through Creation kit. If you do not want to do that, use the maskbuilder function
;            Const     Value              Bit Description
int property bmsStand  =1           auto; 0   Standing (default facing PC)
int property bmsSit    =2           auto; 1   Sitting (default facing PC)
int property bmsLay    =4           auto; 2   Laying (default facing sky)
int property bmsCrouch =8           auto; 3   Crouching, Squatting (default facing PC)
int property bmsCrawl  =16          auto; 4   Crawl 4x4 (default facing PC)
int property bmsFacing =32          auto; 5   Reversed facing; facing ground or turned away from player (or facing up when crawling... crabwalk down the stairs in Exorcist I guess?)
int property bmsSleep  =64          auto; 6   Pose suitable for sleeping (default facing sky)
int property bmsKneel  =128         auto; 7   Kneeling, on knees, one knee down (default facing PC)
;                      =256;              8   
;                      =512;              9   
;                      =1024;             10  
;                      =2048;             11  
;                      =4098;             12  
;                      =8192;             13  
;                      =16384;            14  
;                      =32768;            15  
int property bmsManly  =65536       auto; 16  With this bit, Pose or Lewd1 would be flexing arms, Lewd2 jerking off. With this the Emote does not look queer when done on (hetero) male actor.
int property bmsBeg    =131072      auto; 17  Ask, appeal, beg
int property bmsDeli   =262144      auto; 18  Delight, approval
int property bmsRebel  =524288      auto; 19  Rebellious. "What ya gona do about that?", "That's what I tought"
int property bmsDunno  =1048576     auto; 20  Undecided
int property bmsShock  =2097152     auto; 21  Shock, devastation, denial, upset
int property bmsThink  =4194304     auto; 22  Thinking, concentrating
int property bmsDom    =8388608     auto; 23  Dominant, certain
int property bmsSub    =16777216    auto; 24  Submissive, insecure
int property bmsYes    =33554432    auto; 25  Yes, OK, allow
int property bmsNo     =67108864    auto; 26  No, negative, deny
int property bmsWait   =134217728   auto; 27  Neutral, waiting/bored/passive/idle/Nothing. This should not require "Manly" flag
int property bmsPose   =268435456   auto; 28  Posing, show clothes, brag about looks, ducklips etc.
int property bmsLewd1  =536870912   auto; 29  Lewd pose, flirt, want to fuck me?
int property bmsLewd2  =1073741824  auto; 30  Lewd vulgar, touch genitalia etc.
; bit 31 is not used at the moment

; These are also stored in the creation kit object window/misc/global
; bms = bitmapsimple, there may be other categories later

; This SKSE plugin function returns a name of a random idle matching description given as bitmask or empty if nothing was found
string Function PickIdleSimple(int mask) global native

; This SKSE plugin function replaces IdlerX.hkx file with random animation matchng the mask
; This has no benefit, do not use it.
int Function SetIdleSlot(int slot, int mask) global native

 

Link to comment

For hard dependency

Not possible

 

For soft dependency

Use this code:

; Use "Import Idler" beginning of script
; soft dependency code
bool property IdlerModPresent=true auto
function TryIdle(actor akTarget, string mask, int recovertime=5)
  if (IdlerModPresent == true)
    Form frmExternal = Game.GetFormFromFile(0x00183D, "Idler.esp") As Form
    if (frmExternal)
      ; The Idler mod is present, we do stuff here.
      ; For compiling this script the Idler mod naturally needs to be present, but for end user it is not mandatory
      int ReturnCode = Idler.PlayRandomSimpleS(akTarget, mask, recovertime)
      if ReturnCode < 0
        debug.trace("Idler tried to play animation, return code: "+ReturnCode)
      endif
    else
      IdlerModPresent = false
      debug.notification("This mod tried to use Idler, which is not present. We won't try again.")
    endif
  endif

  if IdlerModPresent == false
    debug.trace("This mod tried to use Idler, which is not present")
  endif
endfunction

And then use this function in your script to play idles. Or to play idels in dialogue use this in fragment.

Main thisQuest = GetOwningQuest() as Main
thisQuest.TryIdle(akSpeaker, "STAND DOM")

Or if the dialogue is not in that same quest, then

Intro thisQuest = GetOwningQuest() as Intro
thisQuest.MainScript.TryIdle(akSpeaker, "STAND LEWD1")
Link to comment

This sounds very promising :D

 

Just to get a better understanding a few questions:

- will the idles be played for a defined duration or is this dependent on the idle itself? Like some being 2 seconds and others 5 seconds long?

- are these intended to be used instead of the "UseIdles" in dialogs? Do they "play nice" when I call them in a begin script of a response from a npc?

- do you intend to maybe make a video or something like that to showcase it in action, or will I have to see it in your mods?

- will the different attributes get extended? With that I mean "yes", "no", "neutral" and so on, will there come more options?

 

Edit: Alright, I saw in the posted script, that there may come more categories later and in the download I took a look at the excel file and saw that at least one idle has a duration defined (2 secs). So I assume the animation duration will differ from animation to animation.

 

But another question popped up, don't know if you can answer:

- How does it get handled when I try to play several idles like one after the other? will I have to know how long the animations will be that will get triggered to be able to chain them together, with wait() in between or something like that or does the animation call play the animation from start to end and then execute the next chained idle right afterwards?

 

Don't know if you already tested that or not or if there's even something in idler already or planned to handle that if necessary.

Link to comment

This sounds very promising :D

 

Just to get a better understanding a few questions:

- will the idles be played for a defined duration or is this dependent on the idle itself? Like some being 2 seconds and others 5 seconds long?

- are these intended to be used instead of the "UseIdles" in dialogs? Do they "play nice" when I call them in a begin script of a response from a npc?

- do you intend to maybe make a video or something like that to showcase it in action, or will I have to see it in your mods?

- will the different attributes get extended? With that I mean "yes", "no", "neutral" and so on, will there come more options?

 

Edit: Alright, I saw in the posted script, that there may come more categories later and in the download I took a look at the excel file and saw that at least one idle has a duration defined (2 secs). So I assume the animation duration will differ from animation to animation.

 

But another question popped up, don't know if you can answer:

- How does it get handled when I try to play several idles like one after the other? will I have to know how long the animations will be that will get triggered to be able to chain them together, with wait() in between or something like that or does the animation call play the animation from start to end and then execute the next chained idle right afterwards?

 

Don't know if you already tested that or not or if there's even something in idler already or planned to handle that if necessary.

 

The idles play once and the pose remains until the using mod set's the actor back to normal pose or another pose. I plan to add support so it also returns the duration of the idle in seconds so the script can wait before applying new poses.

 

These can be played easily from papyrus is the main benefit, no need to do anything in CK. I do not know if they play nice since it's work in progress and I haven't tried many things yet and I don't know many things yet.

 

This resource will be showcased on next versions of my mods.

 

We have room for 31 attributes, not all are filled, ideas are welcome.

 

To seamlessly go to next idle one would call wait with the duration of the idle in question. There is no support for it so far, but also all idles so far in it are very short.

 

Other than that, I just successfully used Idler from another mod called Slut. You can expect updates for both within few days that will show more how it works.

 

PS. the exe file in the download is dangerous, it may rename and delete stuff in the directory it is in. I should write a warning txt about it.

Link to comment

I'd be totally willing to play around with this : )

Like creating some kind of mod just to test it out a bit.

 

Now why I'm so interested in this is to try it out instead of the idleanims you can use in dialog. There's just such a limited variety and they get old really quick.

 

So removing the exe should be enough to avoid any problem I assume.

 

Oh and thanks for answering my questions : )

 

Edit:

Ok I tried to make a little test mod using the soft dependency option, but it seems, that:

 

Form frmExternal = Game.GetFormFromFile(0x00183D, "Idler.esp") As Form

 

doesn't work. That or the:

 

if (frmExternal)

 

does somehow deliver false : (

Link to comment

I'd be totally willing to play around with this : )

Like creating some kind of mod just to test it out a bit.

 

Now why I'm so interested in this is to try it out instead of the idleanims you can use in dialog. There's just such a limited variety and they get old really quick.

 

So removing the exe should be enough to avoid any problem I assume.

 

Oh and thanks for answering my questions : )

 

Edit:

Ok I tried to make a little test mod using the soft dependency option, but it seems, that:

 

Form frmExternal = Game.GetFormFromFile(0x00183D, "Idler.esp") As Form

 

doesn't work. That or the:

 

if (frmExternal)

 

does somehow deliver false : (

 

Hello, the file online is not the latest version, and I wouldn't expect it to work as explained. I will upload tonight a version that should work properly.

 

I guess in addition to this running from script second fun thing is that the library will be big and random, so even when NPCs say the same thing, the animations will be slightly different each time. 

Link to comment

Alright, that makes sense. To test I made another version with Idler as Master and it works fine. 

 

Will you add a function to "reset" actors to their previous state so they stop the last pose assigned to them or is there already a preferred function in Skyrim to do that?

 

Most likely I will have different options... some idles are supposed to stay on, or at least play for a long time, some need to reset back to default. I will know better when I start using it.

Link to comment

I finished watching "Forever" and I'm so sad and angry at ABC for cancelling the show that I do not feel like working tonight. Sorry you need to wait for the update until tomorrow.

 

I have plenty of time this weekend to work with this so that's good news I guess.

Link to comment

HOLY SHIT! OMG OMG!

 

It is this easy from a fragment... meaning each spoken line can call different idle

Main thisQuest = GetOwningQuest() as Main
thisQuest.TryIdle(akSpeaker, "STAND DOM")

Given that the TryIdle code is in the Main script which is included in the quest owning the dialog.

 

Also, need to take care of undoing the pose, but that's trivial.

 

That can make the whole of Skyrim seem so much more real place!

Link to comment

Hmmm... seems the lack of animations already categorized is the only thing holding this back as of now ^^ 

But that can only get better I assume!

 

I'll share my testmod here, because it has basically no point.

 

Adds a dialog option (for everyone) that will guide you through a few selections of options to combine a few of them.

First the stance: like standing, laying etc.

Second the facing direction: normal or opposite

Third the "emote": I bundled the rest together here. After every selection you can either add another one or say it's enough.

 

Things like Sub - Dom, Yes - No, neutral with things like Sub, Dom etc. are all not possible.

I don't know if this is correctly set up, but easily tweakable, so if someone finds combinations that don't make sense, but are still possible, just tell me.

 

In the end you can start the animation, either at the end of the dialog or during a few words that are spoken.

 

Nothing more, it's just to showcase what the Idler has to offer.

And if you chose combinations that currently don't have animations, you will get a message in the upper left corner that tells you so, when you try to play the animation.

 

Edit: Updated to remove the reset of actor to default behavior because this is now integrated in the Idler function

IdlerTestDialog.7z

Link to comment

I coudln't test that since I have changed many things already. Perhaps also tag your example to work with 0.2?

 

Anyway I spend good time fixing my SLUT mod since I caused some damage to it ealrier when my Skyrim setup went haywire. It's fixed, and I added some Idler moves to dialogue. Looks awesome!

 

It is as you said, now then is time to add more content!

Link to comment

No, that file works with 0.3 or 0.31 and will continue to work as long as you don't change the call completely or the bits around.

Still updated it though because you integrated the reset to default behavior, since I don't have to call it anymore.

 

Great! Will try it later today!

Link to comment

No, that file works with 0.3 or 0.31 and will continue to work as long as you don't change the call completely or the bits around.

Still updated it though because you integrated the reset to default behavior, since I don't have to call it anymore.

 

Great work! I would like to include link to this in the main downloads as sample project. I can add you in the credits as collaborator for this mod. One minor issue tho is that the import idelr is commented out:

Scriptname IdlerDialogTest extends Quest  Conditional

;import Idler

Which needs to be uncommented and compiled for this to work.

 

Other than that, are you interested in classifying the idles? It's relatively easy with my mod Animator, I added some help text inside the exe.

 

Also, what do you think of a "Manly" tag ensuring the specific pose is suitable for hetero male actor?

 

Another mask could be fo high heels, seems there are many idles for those.

 

Other functions could come useful when amount of idles grow, such as return all animations that match given mask. This would be useful for removing idles that are too similar and balancing the content.

 

One thing is, so far the 300 idles I've classified from Halofarms pack of 4000, are all very female-posing oriented. That's great, but I do not intend to remain limited only to that type of idles. There are more free resources out there, and I will add them at some point.

 

And yet one more thing, I'll look into Emotions. Perhaps there is a way to put a stern face on the actor as well when they tell "No".

http://www.creationkit.com/index.php?title=SetExpressionOverride_-_Actor

Some masks could automatically send override for facial expression as well, and clear it too. Perhaps these emotions are good guideline for the masks as well. Or maybe the dialogue mood can be retrieved and passed on to Idler to select pose.

Link to comment

Writing this down so I remember it tomorrow.

 

It could be possible to put one animation assignment through CK, and use that everywhere, and each time that animation was called, a dll would copy something else into that .hkx file each time mask was changed. But I guess it would not work since it is not only the file contents but FNIS does also something.

 

I guess easy to test by renaming some animations.

 

Edit. Renamed animations, works just fine, but how does it work at runtime... with MO

 

Edit2. Still works even with run-time renaming. I guess this is even better than the script based approach, but both have merits and should co-exists.

 

Edit3. The system could have for example 10 Idler animation slots, they could be masked before situation/dialog starts so the file operations would have time to finish.

Link to comment
  • 4 weeks later...

I am having trouble getting this to work.

 

I added the script to the "Scripts" section of the quest. It is in a script.

 

I try to compile the following in a dialogue:

Main thisQuest = GetOwningQuest() as Main
thisQuest.TryIdle(akSpeaker, "STAND DOM")

This returns the error:

cannot convert to unknown type main
cannot cast a quest to a main, types are incompatible
unknown type main
main is not a known user-defined type

I know programming, but a noob to papyrus. I must be making a very basic mistake. Any ideas what it might be?

 

 

 

 

 

 

Link to comment
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use