Odessa Posted April 28, 2014 Posted April 28, 2014 if rZActor.NX_GetEVFo "Sexout:Start::spellTarget" ; actor is busy endif Returns the actor the sexout start spell was cast on, and is stored on all actors involved. Seems to be working for me much more reliably than checking for tokens.
jaam Posted April 28, 2014 Posted April 28, 2014 Variable04 is still the official test as far as I know
Halstrom Posted April 28, 2014 Posted April 28, 2014 Variable04 is still the official test as far as I know Ok so what is the format for that? if rActor.Variable04 == 1 or if Variable04 == rActor
jaam Posted April 29, 2014 Posted April 29, 2014 Its a lot simpler , direct from Prideslayer code... set iAV to ActorC.GetAV Variable04 if (0 < (LogicalAnd iAV SexoutNG.FlagInUse)) set bAbort to 1 set fReason to 7.2 Return endif
Odessa Posted April 29, 2014 Posted April 29, 2014 Prideslayer: http://www.loverslab.com/topic/6982-the-sexoutng-api-how-to-for-modders/?p=734722 Spell target NX is more reliable
DoctaSax Posted May 2, 2014 Posted May 2, 2014 There is an anim var. Pride told me to set it in addition to setting animA, etc., when something I was doing didn't work. They're doing different things, but the animation kf for each pose is combined into an anim number group. EDIT: The exception to that being Actor X, who is a bystander/next in line and with whom I've never worked with. Interesting, I always assumed it was safe to ONLY rely on animA-B-C-X and not anim. You may have been right. I just tried to detect the anim number with plain "Sexout:Start::Anim" from the spelltarget and got nothing. Went over an old save's csv to see which EVFLs are there, and only saw the animA/B. Perhaps this has something to do with how a mod sets the anim number (calling version, plain anim v setting animA/B/C separately). For setting, plain anim should be fine, but probably not for getting. Getting with the animA var works fine for me, but of course it requires detecting ActorA first, which isn't guaranteed, so it's a bit of a roundabout way now: let spelltarget := NX_GetEVFO "Sexout:Start::SpellTarget" let actorA := NX_GetEVFo "Sexout:Core:Partners:A" let actorB := NX_GetEVFo "Sexout:Core:Partners:B" let actorC := NX_GetEVFo "Sexout:Core:Partners:C" if ActorA let iAnim := spelltarget.NX_GetEVFL "Sexout:Start::AnimA" elseif ActorB ; "AnimB" elseif ActorC ; "AnimC" endif
nyaalich Posted May 2, 2014 Posted May 2, 2014 I'm sure that not all mods are setting all anim vars. In resize, I have it check all 4 vars now to make sure that the character isn't resized if they're masturbating.
DoctaSax Posted May 2, 2014 Posted May 2, 2014 It's probably that - whether & however an anim is set by a modder, ng seems to translate it to A/B/C. A regular anim var is probably a leftover from the mod setting it.
astymma Posted May 2, 2014 Posted May 2, 2014 In the SexoutNGCallSortEffectScript which writes the NX vars to the spellTarget, it does this: ; set NX vars NX_SetEVFo "Sexout:Start::spellTarget" self NX_SetEVFo "Sexout:Start::raper" raper NX_SetEVFl "Sexout:Start::duration" duration NX_SetEVFl "Sexout:Start::isAnal" isAnal NX_SetEVFl "Sexout:Start::isVaginal" isVaginal NX_SetEVFl "Sexout:Start::isOral" isOral NX_SetEVFo "Sexout:Start::actorA" actorA NX_SetEVFo "Sexout:Start::actorB" actorB NX_SetEVFo "Sexout:Start::actorC" actorC NX_SetEVFo "Sexout:Start::actorX" actorX NX_SetEVFl "Sexout:Start::animA" animA NX_SetEVFl "Sexout:Start::animB" animB NX_SetEVFl "Sexout:Start::animC" animC NX_SetEVFl "Sexout:Start::fHOffsetA" fHOffsetA NX_SetEVFl "Sexout:Start::fHOffsetB" fHOffsetB NX_SetEVFl "Sexout:Start::fHOffsetC" fHOffsetC NX_SetEVFl "Sexout:Start::fVOffsetA" fVOffsetA NX_SetEVFl "Sexout:Start::fVOffsetB" fVOffsetB NX_SetEVFl "Sexout:Start::fVOffsetC" fVOffsetC NX_SetEVFl "Sexout:Start::bDontUndressA" bDontUndressA NX_SetEVFl "Sexout:Start::bDontUndressB" bDontUndressB NX_SetEVFl "Sexout:Start::bDontUndressC" bDontUndressC NX_SetEVFl "Sexout:Start::bDontRedressA" bDontRedressA NX_SetEVFl "Sexout:Start::bDontRedressB" bDontRedressB NX_SetEVFl "Sexout:Start::bDontREdressC" bDontREdressC NX_SetEVFo "Sexout:Start::bodyA" bodyA NX_SetEVFo "Sexout:Start::bodyB" bodyB NX_SetEVFo "Sexout:Start::bodyC" bodyC NX_SetEVFo "Sexout:Start::CBDialogA" CBDialogA NX_SetEVFo "Sexout:Start::CBDialogB" CBDialogB NX_SetEVFo "Sexout:Start::CBDialogC" CBDialogC NX_SetEVFo "Sexout:Start::CBDialogX" CBDialogX NX_SetEVFo "Sexout:Start::CBSpellA" CBSpellA NX_SetEVFo "Sexout:Start::CBSpellB" CBSpellB NX_SetEVFo "Sexout:Start::CBSpellC" CBSpellC NX_SetEVFo "Sexout:Start::CBSpellX" CBSpellX NX_SetEVFo "Sexout:Start::CBItemA" CBItemA NX_SetEVFo "Sexout:Start::CBItemB" CBItemB NX_SetEVFo "Sexout:Start::CBItemC" CBItemC NX_SetEVFo "Sexout:Start::CBItemX" CBItemX NX_SetEVFo "Sexout:Start::CBPackA" CBPackA NX_SetEVFo "Sexout:Start::CBPackB" CBPackB NX_SetEVFo "Sexout:Start::CBPackC" CBPackC NX_SetEVFo "Sexout:Start::CBPackX" CBPackX NX_SetEVFo "Sexout:Start::refSurface" refSurface NX_SetEVFl "Sexout:Start::fSurfaceX" fSurfaceX NX_SetEVFl "Sexout:Start::fSurfaceY" fSurfaceY NX_SetEVFl "Sexout:Start::fSurfaceZ" fSurfaceZ NX_SetEVFl "Sexout:Start::fSurfaceAngle" fSurfaceAngle NX_SetEVFl "Sexout:Start::noAnim" noAnim NX_SetEVFl "Sexout:Start::nUseZAZ" nUseZAZ NX_SetEVFl "Sexout:Start::bActorAmale" bActorAmale NX_SetEVFl "Sexout:Start::bActorAblockCrotch" bActorAblockCrotch NX_SetEVFl "Sexout:Start::bActorBmale" bActorBmale NX_SetEVFl "Sexout:Start::bActorCmale" bActorCmale NX_SetEVFl "Sexout:Start::bCanOral" bCanOral NX_SetEVFl "Sexout:Start::bCanVaginal" bCanVaginal NX_SetEVFl "Sexout:Start::bCanAnal" bCanAnal NX_SetEVFo "Sexout:Start::refMoveATo" refMoveATo NX_SetEVFo "Sexout:Start::refMoveBTo" refMoveBTo NX_SetEVFo "Sexout:Start::refMoveCTo" refMoveCTo You'll notice anim isn't written but animA+B+C are. it's why I assumed they'd be preferred and actually yield results that were reliable. If they're 0, the script sets them == anim. So if the call set them specifically, they're not changed to == anim. If in doubt, I always go to the source code
Halstrom Posted May 3, 2014 Posted May 3, 2014 So if I'm forcing an actor to masturbate with this I should set the B&C to the same animation number too and Actor name too? if rZActor.NX_GetEVFo "Sexout:Start::spellTarget" == 0 && rZActor != PlayerREF rZActor.NX_SetEVFl "Sexout:Start::CallVer" 1 rZActor.NX_SetEVFo "Sexout:Start::ActorA" rZActor rZActor.NX_SetEVFl "Sexout:Start::bDontUndressA" 1 rZActor.NX_SetEVFl "Sexout:Start::anim" 101 if GetRandomPercent > 35 rZActor.NX_SetEVFl "Sexout:Start::anim" 105 endif if GetRandomPercent > 65 rZActor.NX_SetEVFl "Sexout:Start::anim" 106 endif rZActor.NX_SetEVFl "Sexout:Start::duration" 30 rZActor.CIOS SexoutBegin endif
nyaalich Posted May 3, 2014 Posted May 3, 2014 Why do I feel like I am holding a can opener above this wormfest? I'm going off of the bits of my memory and the OP here. Is the concern for your mod or for mods running after sex starts? I wouldn't think that there'd be a reason to do so. You can set the masturbator to A B or C and sanitize will sort out everything. "For masturbation, you only need to set a single actor, and it does not matter which one you use." After sex starts, you can have the callback stuff applied to any of the 3 actors. However, at sex end, notification spells are cast on Actor B. I think that that caused an issue in the Bangatron! when things weren't getting reset correctly post-masturbation. I'm totally guessing here, but if you set all actors to the current one, I think that would cause some mod somewhere to explode.
astymma Posted May 3, 2014 Posted May 3, 2014 Halstrom, your original code is good, no need for any additional code to be added. Although... this bit... rZActor.NX_SetEVFl "Sexout:Start::anim" 101 if GetRandomPercent > 35 rZActor.NX_SetEVFl "Sexout:Start::anim" 105 endif if GetRandomPercent > 65 rZActor.NX_SetEVFl "Sexout:Start::anim" 106 endif Why isn't it... set iSomeIntegerDefinedEarlier to GetRandomPercent if iSomeIntegerDefinedEarlier > 35 && <=65 rZActor.NX_SetEVFl "Sexout:Start::anim" 105 elseif ISomeIntegerDefinedEarlier > 65 rZActor.NX_SetEVFl "Sexout:Start::anim" 106 else rZActor.NX_SetEVFl "Sexout:Start::anim" 101 endif Anyway, for a masturbation scene, just set ActorA, then set our anim and any other tidbits you wanna set like duration... then CIOS Begin. As for setting animA, animB or animC DIRECTLY... There's absolutely no need UNLESS you are using a different animation number for each actor. Otherwise, set "anim" to a number and let CallSortEffect script set A, B, and C.
Halstrom Posted May 4, 2014 Posted May 4, 2014 Halstrom, your original code is good, no need for any additional code to be added. Although... this bit... rZActor.NX_SetEVFl "Sexout:Start::anim" 101 if GetRandomPercent > 35 rZActor.NX_SetEVFl "Sexout:Start::anim" 105 endif if GetRandomPercent > 65 rZActor.NX_SetEVFl "Sexout:Start::anim" 106 endif Why isn't it... set iSomeIntegerDefinedEarlier to GetRandomPercent if iSomeIntegerDefinedEarlier > 35 && <=65 rZActor.NX_SetEVFl "Sexout:Start::anim" 105 elseif ISomeIntegerDefinedEarlier > 65 rZActor.NX_SetEVFl "Sexout:Start::anim" 106 else rZActor.NX_SetEVFl "Sexout:Start::anim" 101 endif Yeah different coding style I guess, mine being from a mixture of Commodore/Apple Basic, MBasic/QBasic, LSL, & PLC / SCADA C stuff, I do weird scripting shit and now I look at that again in detail I don't like it and not sure why I did it that way on this occasion, should have done the same as you have, I'll fix that
astymma Posted May 4, 2014 Posted May 4, 2014 LOL come to think of it, don't write: if iSomeIntegerDefinedEarlier > 35 && <=65 Write... if iSomeIntegerDefinedEarlier > 35 && iSomeIntegerDefinedEarlier <= 65 Le oops...
Halstrom Posted May 4, 2014 Posted May 4, 2014 LOL come to think of it, don't write: if iSomeIntegerDefinedEarlier > 35 && <=65 Write... if iSomeIntegerDefinedEarlier > 35 && iSomeIntegerDefinedEarlier <= 65 Le oops... Yeah I wrote it from scratch anyway so didn't even notice your mistake, I've done that a few times, I got a feeling that may have been a valid thing in some early basic. Makes me wonder why compilers haven't evolved to allow people doing multiple things like using only one "=" or typing or instead of "||" "&" or "and" instead of "&&" just the old way of "a=4.6" and declaring it as float because you gave it a decimal place on the first usage or assuming it's a float unless told otherwise
Odessa Posted May 4, 2014 Posted May 4, 2014 Python does all those thing (except single '=' instead of '==', but it also has 'is') I have been wondering if it would be possible to do FNV scripting in Python via reading/editing savegames. More for some personal experimentation than gameplay benefit. /off topic
jaam Posted May 4, 2014 Posted May 4, 2014 LOL come to think of it, don't write: if iSomeIntegerDefinedEarlier > 35 && <=65 Write... if iSomeIntegerDefinedEarlier > 35 && iSomeIntegerDefinedEarlier <= 65 Le oops... Yeah I wrote it from scratch anyway so didn't even notice your mistake, I've done that a few times, I got a feeling that may have been a valid thing in some early basic. Makes me wonder why compilers haven't evolved to allow people doing multiple things like using only one "=" or typing or instead of "||" "&" or "and" instead of "&&" just the old way of "a=4.6" and declaring it as float because you gave it a decimal place on the first usage or assuming it's a float unless told otherwise How many bugs do you want in programs ? The last thing to do is trust the compiler to understand what you meant...
Guest Jezzy Posted May 4, 2014 Posted May 4, 2014 I see this "cont.getAV Variable04" a lot in SO Scripts... What does this does?
Halstrom Posted May 4, 2014 Posted May 4, 2014 Its a lot simpler , direct from Prideslayer code... set iAV to ActorC.GetAV Variable04 if (0 < (LogicalAnd iAV SexoutNG.FlagInUse)) set bAbort to 1 set fReason to 7.2 Return endif I see this "cont.getAV Variable04" a lot in SO Scripts... What does this does? It's basically a check to see if an actor is already animated by Sexout as trying to animate it twice causes failure, basically only one mod can animate an actors body at a time. There's also some mods using a check for a SexoutToken and a newer NX variable way outlined over the last 2 pages of this thread that do the same thing.
nyaalich Posted May 5, 2014 Posted May 5, 2014 Yeah different coding style I guess, mine being from a mixture of Commodore/Apple Basic, MBasic/QBasic, LSL, & PLC / SCADA C stuff, Aha! And I thought you said that you were once a noob in the 101 thread. LIES! ALL LIES! EDIT: It is one thing to be a noob to modding and another to be a noob to programming.
Halstrom Posted May 5, 2014 Posted May 5, 2014 Yeah different coding style I guess, mine being from a mixture of Commodore/Apple Basic, MBasic/QBasic, LSL, & PLC / SCADA C stuff, Aha! And I thought you said that you were once a noob in the 101 thread. LIES! ALL LIES! EDIT: It is one thing to be a noob to modding and another to be a noob to programming. No, I'm just a highly qualified noob, I'm a noob at all of them
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now