Jump to content

SL Animation Loader list


Recommended Posts

Posted (edited)

Quick question please: is there any way to view the list of SLAL Sexlab registered animations outside the game?  (AE Game)

I saw CPU wrote a script to dump the list into Papyrus Log, but it would be a lot easier to look at a JSON or something similar.

 

Ta!

Edited by Bluegunk
Posted

How 'bout dis.

Scriptname DumpAnims Extends ActiveMagicEffect

Import JsonUtils

;; >> Dumpers
Function DumpAnims1()
    sslAnimationSlots animQuest = Game.GetFormFromFile(0x639df, "SexLab.esm") \
    As sslAnimationSlots
    
    If (animQuest == none)
        Return
    EndIf
    
    int pages = animQuest.PageCount()
    int page = 1 ; Pages appear to start at 1
    int i = 0
    sslBaseAnimation[] anims
    string out = "dumpanims1.json"
    
    ;Debug.Notification("pages = " + pages)
    
    While (page <= pages)
        anims = animQuest.GetSlots(page)
        Debug.Notification("page = " + page + ", anims = " + anims.Length)
        i = 0
        
        While (i < anims.Length)
            SetStringValue(out, page + ":" + i, anims[i].Name)
            ;Debug.Notification(anims[i].Name)
            i += 1
        EndWhile
        
        page += 1
    EndWhile
    
    Save(out)
EndFunction

Function DumpAnims2()
    sslCreatureAnimationSlots animQuest = Game.GetFormFromFile(0x664fb, \
    "SexLab.esm") As sslCreatureAnimationSlots
    
    If (animQuest == none)
        Return
    EndIf
    
    int pages = animQuest.PageCount()
    int page = 1 ; Pages appear to start at 1
    int i = 0
    sslBaseAnimation[] anims
    string out = "dumpanims2.json"
    
    ;Debug.Notification("pages = " + pages)
    
    While (page <= pages)
        anims = animQuest.GetSlots(page)
        Debug.Notification("creature page = " + page + ", anims = " + anims.Length)
        i = 0
        
        While (i < anims.Length)
            SetStringValue(out, page + ":" + i, anims[i].Name)
            ;Debug.Notification(anims[i].Name)
            i += 1
        EndWhile
        
        page += 1
    EndWhile
    
    Save(out)
EndFunction
;; <<

;; >> Events
Event OnEffectStart(Actor target, Actor caster)
    DumpAnims1()
    DumpAnims2()
EndEvent
;; <<

 

Posted (edited)

(I thought I had replied to you, but post has vanished...sorry).

 

Very many thanks!  Did you write this yourself? Amazing!  Cheers!

Edited by Bluegunk
Posted

I did, for the most part. I had a look at how the SL Animation Editor (in MCM) gets the animation slots, that is the first 2 lines of each Dump* function.

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...