Jump to content

The Sexoutng Api (How-To For Modders)


Recommended Posts

I thought we used it more :(. At least it is in SexoutSex and SexoutSexAssault (and SexoutBrutalRapers but I don't have it anymore).

 

It is strange though,  I was sure I used it in SexoutWorkingGirls, and SexoutHookups, but I had so many unpublished version of those it might have been lost.

 

Ah, I meant: not used on an NG level.

 

Link to comment

Oh yes, right. Well in any case as I said, the queue can solve this as well, and do so in a way that doesn't require every mod be updated to support it. The formlist requires all mods to check it before using any actor -- and I'm sure many of them (most of them) are not doing that, and probably never will.

Link to comment

As far as I can tell, the queue only resolves act conflicts though. It wouldn't interfere with the accompanying dialog etc. And that's what I'd like too. Perhaps a SexoutListRestrictedActor check could be added to the scanner?

The queue would simply do as it says -- queue the act for running later, if it can't run now and the "queuethis" or whatever flag is set when it's setup. This is an alternate behavior to just rejecting the act outright with a SAN "inuse" error, as happens now.

 

As long as people don't irresponsibly set the flag (e.g. tryouts approaches should not set it) then it won't cause any problems.

 

Adding that check to the scanner.. I'm torn. It sounds like a good idea for this case, but it also means the scanner becomes less useful for non-sex-act uses, and I have some uses for it myself that don't directly lead to sex. At a 10k foot view, it's useful just to get a list of all the characters in the cell without everyone having to reinvent the wheel. You can use it to initiate sex acts or otherwise modify those actors, but you don't have to.

Link to comment

Yeah, except that "available people" should be the default, I think: valid actor refs, not reserved, & not when the scene is reserved.

 

Atm, I added Doc M to SCR's reserved actors list & NG's restricted actors list. I can also apply the "SO:Reserved" or the "SO:NotNow" evfls to reserve either the actor or the scene - just so he won't come on to you (& you don't easily come on to him through sexoutsex for instance) because it doesn't fit my story. All of this depends on convention between mods like sofo and mods like hookups etc though. Some check one thing, others another. If the convention changes, everyone has to change with. It's too precarious. NG itself is the most logical choice for an arbitrator.

Link to comment

I'm fine with NG being the arbitrator, but I'm hesitant to change default behavior of something like the scanner -- the scanner doesn't directly result in sex, so if someone uses the results for that, then they can 'fail' with a SAN error when they make the call.

 

That leaves two open questions; how to lock an actor to a specific mod, and how to identify calling mods to see if they match.

 

The only reliable way I can see to do this is first, for sexout to provide a UDF to do the reservation. The caller would have to provide their mod name, and sexout can use getmodindex if it needs to. This way it can detect load order changes and mods getting disabled when an actor is reserved.

 

Second, mods making reservations will have to pass their name in when starting the act.

 

Sexout can then check the reservation list, and reject the act if it includes a reserved actor and the caller isn't the reserver, or neglected to identify itself as such.

 

Thoughts?

Link to comment

I use the scanner in wear-and-tear for non-sex purposes, to update STDs on NPCs (via spell + NX variables as an alternative to tokens), so I'd rather you didn't change its behavior.

 

The caller doesn't need to provide their mod name, you can figure that out in the UDF using:

 

string_var calling_mod

let calling_mod := GetNthModName (GetSourceModIndex (GetCallingScript))

Link to comment

I use the scanner in wear-and-tear for non-sex purposes, to update STDs on NPCs (via spell + NX variables as an alternative to tokens), so I'd rather you didn't change its behavior.

 

The caller doesn't need to provide their mod name, you can figure that out in the UDF using:

 

string_var calling_mod

let calling_mod := GetNthModName (GetSourceModIndex (GetCallingScript))

This isn't reliable. I use that function already (GetCallingScript) and it returns 0 in dialog scripts and such. Passing it in isn't really that much work. Define it in one place in a questvar or something and pass it in so you don't typo it it and you're good to go.

Link to comment

 

Thoughts?

 

Eh, I get that there're other uses for the scanner than starting sex acts. I just thought I saw a potential to add some extra safety, not just for acts, but also dialog relating to such mods & leading up to acts. It's immersion I care about there, and I'd be reserving a few actors long before there's any question of there being an act.

 

Still, I suppose interceding at the scanner level doesn't safeguard against the appearance of SexoutSex's lines & the like either, and some level of convention can't be helped. Listaddforming to the 'restricted' formlist will do me fine for the moment - tbh, I had no idea it was actually being used by now. I'd rather do away with SCR's 'reserved' equivalent then, but don't know which of the older mods still look for it, and am unsure about the current use of "SO:Reserved" so I'll stick that in too, but then that becomes a 'used thing' as well that others will start to expect to be respected. Too many elements, really. Updating sofo & breaking down lust now, so this stuff is on my mind a bit.

 

 

Link to comment

Doc, would the UDF work for you? I know it's "one more thing" but it could be "the thing" that carries things forward. I'm already actively discouraging people from continuing to start acts directly from dialog results, so if everyone gets on board with that, the immersion break would only be for a scene or two.

 

The scanner side of things.. thinking about it more, I don't think it would help at all with tryouts approaches anyway. I'd imagine the player and companions would be added to the list, not all the members of every tryouts faction, so the scanner would still pick them up and send them on their merry. So that just needs adjusted so it doesn't send actors *to* those that are in the list, or reserved.

 

Speaking of, a reserved actor via the UDF would also show as inuse.

Link to comment

In my opinion:

  by default, the scanner keeps returning everyone so unchanged mods do not get broken.

  people looking to add consequences to sex should still use the current list that returns everyone.

  add new list that filter people and change plugins that randomly pick people to use those new lists. I would say that's there is less than 10 plugins and they are all maintained except for Hookups that I still wish to revisit after I have taken the time to finish SexoutSex.

 

Link to comment

Doc, would the UDF work for you? I know it's "one more thing" but it could be "the thing" that carries things forward. I'm already actively discouraging people from continuing to start acts directly from dialog results, so if everyone gets on board with that, the immersion break would only be for a scene or two.

Not sure if what you mean by the UDF is what I'm looking for, and I fear we're talking at cross purposes a bit. The thing about scanner-based mods is that they trigger behavior like walking over for dialog before they call in acts. Mods may want some characters not to do any of that because they're not supposed to, personality/story-wise. If I make Doc M very reticent about a sexual relationship with the player I can't have him be hijacked by hookups & come on to the player, or easily agree to sex via a player-initiated SexoutSex topic. Whether an act results from it or not isn't the point, immersion is already ruined by the dialog.

 

Aside from actor-based opt-outs, mods can't have some cutscene, scripted 3-way dialog, travel package or anything else that's precarious like that be interrupted by a random approach dialog package triggered by a mod using the scanner either. That's what I mean with reserving the scene: not necessarily a sex scene, just a period of time when everything should back off.

 

For both cases it's not a scanner issue but a generic v specific content issue - mods not using the scanner like sexoutsex have the same potential to interfere; it's just that the scanner facilitates such mods, so that makes it a good place to already do some checks, leave fewer things to chance. We already have the restricted actor list & the "SO:NotNow" evfl that mods can check - the options are there, but I figure it'd be good to have the scanner checking them too first, before adding actors to the formlists, adding some central oversight that way.

 

The scanner side of things.. thinking about it more, I don't think it would help at all with tryouts approaches anyway. I'd imagine the player and companions would be added to the list, not all the members of every tryouts faction, so the scanner would still pick them up and send them on their merry. So that just needs adjusted so it doesn't send actors *to* those that are in the list, or reserved.

I wouldn't presume to reserve the playerref & eliminate reserved actors from being targeted, because that'd be the same as not getting any of the approach mods to ever work as intended. Tryouts are a special case due to their additional faction checks, but SA or hookups should be able to work on anyone, as long as a specific-content mod doesn't override.

 

As it is, there's already a child check in the scanner which limits its potential for non-sexrelated use anyway. That check doesn't really prevent acts with kids, which NG already does elsewhere, but the behavior leading up to it, ie the packages and dialogs. I'm looking to expand those checks for sex approaches to include reserved actors & cells lists, the notnow evfl, getdead, getdisabled checks etc, and remove all checks for generic non-sex approach use. The scanner could populate 2 sets of lists, one just with all actors it finds, the other with ok-for-generic-sex actors that are checked, and have the sex-approach mods sign in to the latter only. (Let's make that the one they're already using.) Could be a once-and-for-all type measure that tightens some bolts.

 

Sorry to be rambling on a bit; I just want to make sure I'm not misunderstood.

Link to comment
Guest tomm434

I'd like to know player's partners at the start of the sex. I've got valid ActID(==37) and I have built nxKey string.

Then I use new way of getting actors and standart NX way too. All actors are shown as "noname" in console. Why is this happening? I directly try to return ActorA from player(who is the target of the spell). Player herself is actor B in that particular act.

ref ActorA
ref ActorB
ref ActorC
ref ActorZ

ref Myself


int nActID
string_var nxKey

Begin ScriptEffectStart
MessageBoxEx "Start spell is starting"
set Myself to GetSelf

Print "Name of the spell target is  " + $Myself

let nActID := Myself.NX_GetEVFl "Sexout:Start::ActID"

Print "ACTID is   " + $nActID

let nxKey    := "Sexout:Start:" + $nActID + "::"

Print "nxKey  " + $nxKey

  let actorA   := call fnSexoutNXGetEVFo Myself nxKey + "actorA"
  let actorB   := call fnSexoutNXGetEVFo Myself nxKey + "actorB"
  let actorC   := call fnSexoutNXGetEVFo Myself nxKey + "actorC"
  let ActorZ := Myself.NX_GetEVFo "Sexout:Start::ActorA"

Print $ActorA
Print $ActorB
Print $ActorC
Print $ActorZ


if eval (ActorA ==player) || eval (ActorB ==player) || (ActorC ==player)
  let Myself :=aaSexoutKillerHotKeyQuest.PlayerPartner
  MessageBoxEx "Partner is set"
  Print $Myself + " is set to be Player partner"
endif


MessageBoxEx "Start spell is finished"
end
Link to comment

I've got a dumb question. How do I access the variable that controls how long a standard sexout animation is? OR... can I set a fixed duration for a given animation sequence?

 

I've got a dream sequence where I'd like the player to blackout almost immediately after... the anim is finished. During which I reset all the actors and such. But I can't do that unless I know exactly when the player is done. :angel:

 

EDIT: Actually, not just player. I'll have the same problem with an NPC coming up.

 

EDIT 2: I should really check this place out more often. There's a NEW syntax now? *starts reading up*

 

EDIT 3: Another question, any way to set a variable only AFTER an animation is finished? That might solve the whole thing even easier. :blush:

 

EDIT 4: You can't have a sexout sequence with actors set to "ghost" can you? :s

 

If this keeps up I'll have 3 million questions...  Stopping here!! :lol: :lol:

Link to comment

You should register a callback spell for when the sex is done. At that time the anim should be stopped, even the KO if I am not mistaken.

In your spell script you handle the rest of your script.

Though precise timing is extremely hard to predict.

Link to comment
Guest tomm434

jaam, I've got experience with this. I check NPC via  "inUse" function  with 0.1 delay and it returns 0 when actor is starting to get up(after being thrown to the ground). It happens every time but you never know. I've got a script which kills actor after he is free of the mod and it looks like NPC is thrown to the ground after animation and then killed while he is on the ground.

Link to comment
Guest tomm434

So to "catch" actor I do somethin like this

if stage ==0
Start animation
let stage :=1

elseif stage ==1
if eval (call FnActorinUse == 1) ; now he is in use for sure. You can use timer but timers are unreliable as Pride said. So we catch this SoB right in the middle of the act
let stage :=2
endif

elseif stage ==2 ; he is in use now
if eval (call FnActorinUse ==0) ; not anymore
do your script
endif
Link to comment

Using CB Spell/Item is convenient but if the sexout animation doesn't play for some reason it won't get done, and I don't think you can ever be 100% sure it will. I do the same as tomm434 for all my sensitive scripted sequences, usually on 1-second delay quest script.

 

If I'm feeling paranoid I also use an extra timeout variable in case everything goes completely to hell, so if something still won't work after ~20 tries, you can give up, print a console error and move on.

Link to comment

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