Jump to content

[Sexlab/SLAL] timers and getsoundFX via JSON?


Recommended Posts

Posted

Hey,

 

It is a long time ago so I cannot find the thread anymore.

 

But somewhere in the past @Ashal and @MadMansGun made some comments about additional SLAL/json script lines that allow:

 

1. timer
- ends the animation stage when timer is up -> ignoring the Sexlab MCM stage time

2. getSoundByName(soundName)

this should allow playing a sound from a mod via JSON, so for example a special wav that times the whipping or other sex noises sexlab cannot cover.

 


I did some testing but I cannot get the timer to work for starters...

 

 

1. SLAnimGenerateForMNCv12.pyw is the latest I know but it does not recognize both timer and getsound by name 

 

2. so I have to set the both commands manually in the JSON, but where?

Did it like this but the timer was ignored in the animation, the normal Sexlab stage length was used instead.

same question with the sound command.

 

Can anybody tell me how to insert them correctly?

Or if there can be an update to the python thingy to respect them?
Alot of animators could profit from that, especially @PsycheHHH who uses whipping in scenes (without sound) and also has some very short stages that could be fixed via timer. 

 

Thx alot.

 

   {
      "actors": [
        {
          "stages": [
            {
              "forward": -15,
              "id": "Nade_Nade_GoldenShower_2P_01_A1_S1",
			  "timer": 5
            },
            {
              "forward": -15,
              "id": "Nade_Nade_GoldenShower_2P_01_A1_S2",
			  "timer": 5
            },
            {
              "forward": -15,
              "id": "Nade_Nade_GoldenShower_2P_01_A1_S3",
			  "timer": 5
            }
          ],
          "type": "Female"
        },
        {
          "stages": [
            {
              "forward": 52,
              "id": "Nade_Nade_GoldenShower_2P_01_A2_S1",
              "rotate": -180,
			  "timer": 5  
            },
            {
              "forward": 52,
              "id": "Nade_Nade_GoldenShower_2P_01_A2_S2",
              "rotate": -180,
			  "timer": 5
            },
            {
              "forward": 52,
              "id": "Nade_Nade_GoldenShower_2P_01_A2_S3",
              "rotate": -180,
			  "timer": 5
            }
          ],
          "type": "Male"
        }
      ],
      "id": "Nade_Nade_GoldenShower_2P_01",
      "name": "Nade GoldenShower 2P 01 MF",
      "sound": "none",
      "tags": "Nade,Sex,MF,Aggressive,AggressiveDefault,Bound,GoldenShower"
    },

 

 

SLAL script I found but I in all honesty looked at it for an hour and still have no idea.

 

 


function addStageInfo(sslBaseAnimation anim, int stageInfo)
    int stageNum = JMap.getInt(stageInfo, "number")

    if JMap.hasKey(stageInfo, "sound")
        string soundName = JMap.getStr(stageInfo, "sound")
        verboseMsg("  SetStageSoundFX(" + stageNum + ", " + soundName + ")")
        anim.SetStageSoundFX(stageNum, getSoundByName(soundName))
    endIf
    if JMap.hasKey(stageInfo, "timer")
        float timer = JMap.getFlt(stageInfo, "timer")
        verboseMsg("  SetStageTimer(" + stageNum + ", " + timer + ")")
        anim.SetStageTimer(stageNum, timer)
    endIf
endFunction

 

SLAnimGenerateForMNCv12.pyw

Posted

source:

Animation(
    id="vamponvamp",
    name="Vampire on Vampire",
    tags="Creature,VampireLord,Missionary,Vaginal,Loving",
    sound="Squishing",
    actor1=CreatureFemale(race="VampireLords", add_cum=Vaginal),
    actor2=CreatureMale(race="VampireLords"),
    stage_params = [
        Stage(1, timer=9.6, sound=NoSound),
        Stage(3, timer=8.3, sound=NoSound),
        Stage(6, timer=21.0, sound=NoSound),
    ]
)

valid sounds:
none
Squishing
Sucking
SexMix
Squirting

 

json:

    {
      "actors": [
        {
          "add_cum": 1,
          "race": "VampireLords",
          "stages": [
            {
              "id": "mmg_vamponvamp_A1_S1"
            },
            {
              "id": "mmg_vamponvamp_A1_S2"
            },
            {
              "id": "mmg_vamponvamp_A1_S3"
            },
            {
              "id": "mmg_vamponvamp_A1_S4"
            },
            {
              "id": "mmg_vamponvamp_A1_S5"
            },
            {
              "id": "mmg_vamponvamp_A1_S6"
            }
          ],
          "type": "CreatureFemale"
        },
        {
          "race": "VampireLords",
          "stages": [
            {
              "id": "mmg_vamponvamp_A2_S1"
            },
            {
              "id": "mmg_vamponvamp_A2_S2"
            },
            {
              "id": "mmg_vamponvamp_A2_S3"
            },
            {
              "id": "mmg_vamponvamp_A2_S4"
            },
            {
              "id": "mmg_vamponvamp_A2_S5"
            },
            {
              "id": "mmg_vamponvamp_A2_S6"
            }
          ],
          "type": "CreatureMale"
        }
      ],
      "creature_race": "VampireLords",
      "id": "mmg_vamponvamp",
      "name": "HCoS Vampire on Vampire",
      "sound": "Squishing",
      "stages": [
        {
          "number": 1,
          "sound": "none",
          "timer": 9.6
        },
        {
          "number": 3,
          "sound": "none",
          "timer": 8.3
        },
        {
          "number": 6,
          "sound": "none",
          "timer": 21.0
        }
      ],
      "tags": "HCoS,Creature,VampireLord,Missionary,Vaginal,Loving"
    },

 

 

as for external non sexlab sounds i do not know, i've never tried to do that. i think FNIS had some sort of function for that but it's been a while since i looked at the documentations for it.

 

Posted
17 minutes ago, MadMansGun said:

sourc

 

 

 

 

 

 

aaaaah, goddamn, I always forget that there is an extra stage params... grrrr.

I put the timer to the actors -.-

fuck me. the python thing works now ^^

 

But yeah, the sound is another thing. Ashal suggested that it is possible to use sounds registered by other mods. never got around testing it. But it would be a blast. 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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