Jump to content
IGNORED

SexoutNG - Global multi-mod callbacks coming


prideslayer

Recommended Posts

New feature will be coming in the 0.2.x series to make life much easier on all mods that want to know the details of sex when it occurs, and/or when it ends.

 

Use of this will require mildly advanced scripting on the part of the mods that want to use it. If you're not familiar with how formlists can be used in scripts, some reading is in order! A demo/example ESP will be provided.

 

These callbacks will work with both classic and NG.

 

They will allow any mod that desires it to have a spell of their choosing cast on the 'catcher' for ALL sex acts that take place, when sex starts, when it ends, or both. No limit to the number of mods that can use this functionality simultaneously.

 

What you will need to do, as a modder:

 

 

1. Add one, two, or three formlists to your mod. Doesn't matter what they are called. Don't put anything in them. One will hold actors in the catchers vag, one for anal, one for oral.

 

2. Create one or two spells in your mod. Again, does not matter to Sexout what they are called.

 

3. During mod init, add these spells and formlists to new formlists that will be present in sexoutNG starting with the first 0.2.x release.

 

Your formlists are going to be filled in by sexout whenever your spells are cast. For example, if you want to be notified whenever sex starts, you might create "MyModListInVag" and "MyModSpellSexStarted".

 

To register these with sexout, you will add the MyModListInVag formlist to the SexoutNGFLGlobalCBStartVFL form list, and add your spell to SexoutNGFLGlobalCBStartS. Here is some early example code:

 

scn MyMainQuestScript

int nIdx

Begin GameMode
 if 0 == MyModListInVag.IsInList SexoutNGFLGlobalCBStartFLV
   ListAddForm SexoutNGFLGlobalCBStartFLV MyModListInVag
   ListAddForm SexoutNGFLGlobalCBStartS MyModSpellSexStarted
 endif
End

 

You do not have to add to both lists. You can just add to the spell list if you want, in which case, your spell will be called, but you will not have any data passed back to you. You can add to as many or as few of the formlists as you care to know about.

 

When SexoutNG starts sex, your formlists (if any) will be filled in with data described below, and then your spell will be called.

 

Other than actually writing your spell effect script that will process the data I give back to you, this is all you need to do. From here, what you do with the data passed back to you is your business. Read below on what data I will be handing back.

 

 

 

What I am doing in SexoutNG

 

 

Sexout is getting six new formlists, and two new token items.

 

- SexoutNGFLGlobalCBStartS (formlist mods add their sex-start scripts to)

 

- SexoutNGFLGlobalCBStartFLV (formlist mods add their sex-start Vag formlist to)

- SexoutNGFLGlobalCBStartFLO (formlist mods add their sex-start Oral formlist to)

- SexoutNGFLGlobalCBStartFLA (formlist mods add their sex-start Anal formlist to)

 

- SexoutNGFLGlobalCBEndS (formlist mods add their sex-end scripts to)

 

- SexoutNGFLGlobalCBEndFLV (formlist mods add their sex-end Vag formlist to)

- SexoutNGFLGlobalCBEndFLO (formlist mods add their sex-end Oral formlist to)

- SexoutNGFLGlobalCBEndFLA (formlist mods add their sex-end Anal formlist to)

 

- SexoutNGGlobalCBTokenStart (token given to actor, iterates through StartS and startFL then removes self)

 

- SexoutNGGlobalCBTokenEnd (token given to actor, iterates through EndS and endFL then removes self)

 

When sex starts, sexout will first loop through all the formlists in SexoutNGFLGlobalCBStartFL(V,O,A), which are provided by mods as described in the first section. It will add the actors involved to YOUR formlist and then loop through all the spells provided, casting them on the actor.

 

All the actors in the 'vag' will be added to whatever lists you add to SexoutNGFLGlobalSTartFLV. O for oral, A for anal.

 

Again, here is some example code.

 

scn MyModSpellSexStartedScript
; effect script

ref self
ref tmpRef
int cnt
int idx

Begin ScriptEffectStart
 set self to GetSelf

 set cnt to ListGetCount MyModListInVag
 if cnt > 0
   set idx to 0
   Label 1
   set tmpRef to ListGetNthForm MyModListInVag idx
   PrintToConsole "%n is doing %n in the vag!" tmpRef self
   set idx to idx + 1
   if idx < cnt
     GoTo 1
   endif
 endif

 ; Do the same thing for MyModListInAss, etc.

End

Begin ScriptEffectUpdate
 ; No need to do anything here but dispel.
 if self
   set self to 0 ; prevent running dispel over and over
   ; Dispel yourself
   Dispel MyModSpellSexStarted
 endif
End

 

The after-sex (End) bits work exactly the same way, but the spells will not be called until after sex is finishing. I don't know exactly when I will call this spell yet, I am thinking that I will call it at the same time the knockdown and cumming animation happens, but that may change.

 

 

 

 

So hold up your beers, and lets toast to the future. I think this is going to open a lot of possibilities, and make a lot of existing modding that's done much easier - especially mods involving scanners looking for sex that is occuring.

Link to comment

Wow' date=' I haven't even go into the NG vesion yet and you are gunna supercharge it :)

[/quote']

 

Well the purpose behind the override functionality I've added and been testing is to make it so you (and everyone else) do not actually have to mess around with the NG functionality for your mods to take advantage of it.

 

I know how much work it is to go in and change all the calls and crap.

 

This one however, can affect you a lot -- in a good way. :)

Link to comment

Wow' date=' I haven't even go into the NG vesion yet and you are gunna supercharge it :)

[/quote']

 

Well the purpose behind the override functionality I've added and been testing is to make it so you (and everyone else) do not actually have to mess around with the NG functionality for your mods to take advantage of it.

 

I know how much work it is to go in and change all the calls and crap.

 

This one however, can affect you a lot -- in a good way. :)

 

Should be easy for me as it only involves change of around 20 lines of code and it means I can get condoms working :)

 

Link to comment

Curse you, Beth!

 

Going to have to revise the plan a little. You guys are going to have to add three formlists to your mods (or just one if you only care about one 'hole'). TempCloneForm only works on items unfortunately, so much for being clever and trying to use it to clone an empty formlist.

 

I will revise the instructions in the OP, but it comes down to this: You need to add a formlist for each orifice (oral, vaginal, anal), and you'll have to add those to the appropriate lists in NG (which will have six instead of two).

 

Edit: OP updated with the changes I have to make thanks to this TempCloneForm issue.

Link to comment

Code is in place for the start sex ones, will just do those and test them before going through the work of the after-sex ones.

 

For the curious:

 

 

 ; Call global callback hooks
 ref GCBSpell
 ref GCBFL
 ref tmpFLV
 ref tmpFLA
 ref tmpFLO
 int nIdx

 if spunTargets > 1
   set nIdx to ListGetCount SexoutNGFLGlobalCBStartFLV
   Label 1
   if nIdx > 0
     set nIdx to nIdx - 1
     set tmpFLV to ListGetNthForm SexoutNGFLGlobalCBStartFLV nIdx
     if spunTargets == 2
       if isVaginal
         ListAddForm tmpFLV actorA
       endif
     else
       if anim >= 5001 && anim <= 5200
       ; Spitroasts
         if isVaginal
           ListAddForm tmpFLV actorC
         endif
       elseif anim >= 5201 && anim <= 5600
         if isVaginal
           ListAddForm tmpFLV actorA
           if (0 == isAnal)
             ListAddForm tmpFLV actorC
           endif
         endif
       endif
     endif
     GoTo 1
   endif
 endif

 if spunTargets > 1
   set nIdx to ListGetCount SexoutNGFLGlobalCBStartFLO
   Label 2
   if nIdx > 0
     set nIdx to nIdx - 1
     set tmpFLV to ListGetNthForm SexoutNGFLGlobalCBStartFLO nIdx
     if spunTargets == 2
       if isOral
         ListAddForm tmpFLO actorA
       endif
     else
       if anim >= 5001 && anim <= 5200
       ; Spitroasts
         ListAddForm tmpFLO actorA
       endif
     endif
     GoTo 2
   endif
 endif

 if spunTargets > 1
   set nIdx to ListGetCount SexoutNGFLGlobalCBStartFLA
   Label 3
   if nIdx > 0
     set nIdx to nIdx - 1
     set tmpFLA to ListGetNthForm SexoutNGFLGlobalCBStartFLA nIdx
     if spunTargets == 2
       if isAnal
         ListAddForm tmpFLA actorA
       endif
     else
       if anim >= 5001 && anim <= 5200 && isAnal
       ; Spitroasts
         ListAddForm tmpFLA actorC
       elseif anim >= 5201 && anim <= 5600
         if isAnal
           ListAddForm tmpFLA actorC
           if 0 == isVaginal
             ListAddForm tmpFLV actorA
           endif
         endif
       endif
     endif
     GoTo 3
   endif
 endif

 ; FLs set, do callbacks
 set nIdx to ListGetCount SexoutNGFLGlobalCBStartS
 Label 4
 if nIdx > 0
   set nIdx to nIdx - 1
   set GCBSpell to ListGetNthForm SexoutNGFLGlobalCBStartS nIdx
   if spunTargets == 1
     actorA.CIOS GCBSpell
   else
     actorB.CIOS GCBSpell
   endif
   GoTo 4
 endif

 

 

 

If it tests out ok, it and a demo ESP that shows just how to use it will be in the next release, which will be 0.2.something.

 

If not, 0.1 releases will continue until I get it sorted. ;)

Link to comment

Do all mods need this? ie, do I have to add the formlists to the Tryouts if Halstrom's pregnancy mod wants to track the sex in those, or will the formlists being in his mod be good enough?

Link to comment

Do all mods need this? ie' date=' do I have to add the formlists to the Tryouts if Halstrom's pregnancy mod wants to track the sex in those, or will the formlists being in his mod be good enough?[/quote']

I'd be thinking you should set up everything assuming my Pregnancy mod isn't installed because some people might not want to install it.

 

Link to comment

It works!

 

Attached a new DEMO BETA BLAH BLAH zip file with a new Sexout.ESM (0.2.31) and a demo of how to use it (SexoutNotify.esp).

 

The ESP, when loaded, will display a message in the corner of the screen whenever sex happens, telling you who is involved, what hole, and if it's rape or not.. e.g. "so and so is raping so and so in her ass!"

 

Didn't do a message for masturbation, but would be easy enough.

 

Only works with sex started with NG right now, or if override is on.

 

I have testing to do with this ESM before it's suitable for release in the main thread, but I don't expect any issues / should be safe.

 

The SexoutNotify ESP will be included with the plugins once I add an MCM page for it to turn it off/on, and I'll put more thought into the messages that are displayed.

 

 

Link to comment

Archived

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

  • Recently Browsing   0 members

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