nyaalich Posted May 18, 2014 Posted May 18, 2014 Unless I'm missing something, there are only UDFs to be used to initiate sex as opposed mods that trigger things after sex has started, right?
Loogie Posted May 18, 2014 Posted May 18, 2014 Using this, multiple acts can be called in the same frame like with NX, correct?
prideslayer Posted May 18, 2014 Author Posted May 18, 2014 Unless I'm missing something, there are only UDFs to be used to initiate sex as opposed mods that trigger things after sex has started, right? For now, yes. In the future, there will be many more triggers that mods will be able to subscribe to for before, during, and after sex. I think I will create callbacks for every logical stage of the sexout act progression eventually. That means there will be sexout notifications to subscribing mods at the start of an act (like now), just before undressing, just after undressing, just before the animations start, just after it's ended, and so on.  Using this, multiple acts can be called in the same frame like with NX, correct? Yessir, works exactly like NX in that regard.
Loogie Posted May 18, 2014 Posted May 18, 2014 How do I set a callback? GECK chokes if I use   call fnSexoutActSetInt "CBDialogA" aaMS15MutantLeaderCB1
prideslayer Posted May 18, 2014 Author Posted May 18, 2014 Right there are three different ones, just like NX  fnSexoutActSetInt fnSexoutActSetRef fnSexoutActSetFloat  Doc, I don't suppose there's a variant type I can use as a function param and then do a GetType on, is there?
Loogie Posted May 18, 2014 Posted May 18, 2014 Thanks for the heads up. I'm retarded when it comes to scripting - I rely on the kindness of others, prayer and duct tape.
DoctaSax Posted May 18, 2014 Posted May 18, 2014 Right there are three different ones, just like NX  fnSexoutActSetInt fnSexoutActSetRef fnSexoutActSetFloat  Doc, I don't suppose there's a variant type I can use as a function param and then do a GetType on, is there?  Do you mean: "can we boil this down to only one function to call with some sort of parameter that could hold anything?" Other than getting people to pass a an array, I don't see it... maybe they could be boxed to a one-element array with '&' for you to run typeof on before you retrieve the value. Sounds needlessly complicated though.  I think it's fine as is - although I'm not sure if there's a need for separate int and float functions.
Loogie Posted May 18, 2014 Posted May 18, 2014 I just took something I'm working on that has 7 stages of sex - with 6 of those stages featuring two acts happening simultaneously - and converted it to the new calls. They're all linked together through callbacks and everything went off without a hitch, except for one cycle I was testing I got a 9.2 error.
prideslayer Posted May 18, 2014 Author Posted May 18, 2014  Right there are three different ones, just like NX  fnSexoutActSetInt fnSexoutActSetRef fnSexoutActSetFloat  Doc, I don't suppose there's a variant type I can use as a function param and then do a GetType on, is there?  Do you mean: "can we boil this down to only one function to call with some sort of parameter that could hold anything?" Other than getting people to pass a an array, I don't see it... maybe they could be boxed to a one-element array with '&' for you to run typeof on before you retrieve the value. Sounds needlessly complicated though.  I think it's fine as is - although I'm not sure if there's a need for separate int and float functions.  Yeah that's what I was hoping, but it's fine. Floats vs. ints, most of the time, people can just use whatever they want. It's there for completeness and debugging simplicity. I might floor SetInt's arg at some point.   I just took something I'm working on that has 7 stages of sex - with 6 of those stages featuring two acts happening simultaneously - and converted it to the new calls. They're all linked together through callbacks and everything went off without a hitch, except for one cycle I was testing I got a 9.2 error. NGSAN or NGRAN? It shouldn't be possible to get an NGSAN 9.2 anymore. An NGRAN 9.2 indicates sex with an unknown creature type... hmmmm.
Loogie Posted May 18, 2014 Posted May 18, 2014 I forget which. But it worked the other three times I went through the cycle. All ActorAs were TTW supermutants.
prideslayer Posted May 19, 2014 Author Posted May 19, 2014 Beta 6 in OP - Sexout no longer uses Variable04 for tracking actor locks, it uses an NX flag. V04 and the 00SexoutActor token will continue to be set and cleared for a few releases, but sexout itself does not honor them. - fnSexoutSetFlag - fnSexoutGetFlag  This is probably the last or second to last (depending on a response from DoctaSax) beta release for this cycle.  Details on the above two functions:  Internally, these are using NX vars on the given reference in the "Sexout:Flags" namespace, but you should use these function rather than looking at the NX vars directly.  int fnSexoutSetFlag ref:rRef string:sFlag int:iVal int:iATS  Sets the flag sFlag on rRef to iVal, with Atomic Test-and-Set (ATS) support. if iATS is non-zero, then the value of the flag is checked before it is set, and it is only set if it's current value is 0. The function returns 1 if the flag was successfully set, 0 if it wasn't.  int fnSexoutGetFlag ref:rRef string:sFlag  Returns 1 if the current value of the given flag is nonzero, 0 if it is zero. This may change at a later date to return the actual flag value that was set, but for now, they assume you are using them as actual flags where 'set' or 'unset' are the only meaningful values.  https://www.youtube.com/watch?v=Z6zqYSezqwo
Loogie Posted May 19, 2014 Posted May 19, 2014 With using these flags, does that mean leaving in the middle of a sex scene will no longer break those actors for future scenes, or will it just break them differently? Â I'm asking because with the last stable release, I was testing an encounter where I had given some feral ghouls AI packages to travel to, then have sex with a character. I slapped a "GetInSameCell" check for the player to it because once I actually met up with this character, I could see the ghoul having at her in the distance and once I reached her, it would be nothing but 5.2 errors for subsequent scenes.
prideslayer Posted May 19, 2014 Author Posted May 19, 2014 With using these flags, does that mean leaving in the middle of a sex scene will no longer break those actors for future scenes, or will it just break them differently? Â I'm asking because with the last stable release, I was testing an encounter where I had given some feral ghouls AI packages to travel to, then have sex with a character. I slapped a "GetInSameCell" check for the player to it because once I actually met up with this character, I could see the ghoul having at her in the distance and once I reached her, it would be nothing but 5.2 errors for subsequent scenes. This isn't going to help with that, but I wonder what's causing it. For now, the flags are just wrappers around calls to NX. The point of the functions for the flags is so that I can change how they're stored (NX or something else), the actual names of the NX vars they use, and so on -- without breaking any mods. Â If the mods just use the functions and don't look at actual sexout quest vars or NX values, then they won't break when I change things around under the hood.
Loogie Posted May 19, 2014 Posted May 19, 2014 I had no idea what was causing it, either - if I went into console and did inv on her or the ghouls, I didn't see any tokens. Â But, I solved it by doing a check to make sure the player is in the cell before any shenanigans.
prideslayer Posted May 19, 2014 Author Posted May 19, 2014 5.2 in the sanitizer is the error code that says actor A is already in use by sexout when a new act is trying to kickoff. It shouldn't have 'spammed' though unless something was spamming sexoutbegin CIOS's. Hmmmmm.
Loogie Posted May 19, 2014 Posted May 19, 2014 Oh no, it wasn't spamming - was just popping up when the AI packages tried to fire a scene or I tried calling one on her.
prideslayer Posted May 19, 2014 Author Posted May 19, 2014 That would indicate that the lock (the Variable04) flag had been set by the previous act, but not cleared -- you were in the cell when the scene started, but out of it when it was supposed to end, and came back later? That makes some level of sense, if the variable got left set, but the spells and stuff got cleared because you left the cell. Â I can add an internal scanner that clears all the sexout 'stuff' upon cell load, if that's what's happening, but I thought that in most cases sex in other cells was working fine -- not that I ever tested it, just what I thought I heard through the grapevine.
Loogie Posted May 19, 2014 Posted May 19, 2014 I was out of the cell when it began and in the cell when it ended.
prideslayer Posted May 19, 2014 Author Posted May 19, 2014 Well that is not what I expected to hear. I wonder if it didn't set the flag in the first place? Â If you can't repeat it, I'll just chalk it up to "WTF, keep an eye open for this." If you can, please do so with the current beta.
Loogie Posted May 21, 2014 Posted May 21, 2014 I might be blind, but I can't find what to check to see if a character is having sex since the old ways are going to out of style soon.
jaam Posted May 21, 2014 Posted May 21, 2014 if eval Actor.call fnActorInUse == 0 ... available else ... unavailable endif That should work  Â
prideslayer Posted May 21, 2014 Author Posted May 21, 2014 That's the ticket. New update coming up right now.
prideslayer Posted May 21, 2014 Author Posted May 21, 2014 Beta7 in OP - Mavia animation offsets updated post-renumbering. - Use TFC flag in MCM now honored -- do not use this until there is a "use first person" setting!! - Feral Ghoul animation 1203 removed from random picker due to bad rotation. - fnSexoutSetFVal refTarget stringName floatVal - fnSexoutSetRVal refTarget stringName refVal - fnSexoutGetFVal refTarget stringName - fnSexoutGetRVal refTarget stringName - nDefaultTime flag now set via setFlag in addition to Variable04
Recommended Posts