MistahIncognito Posted October 4, 2012 Posted October 4, 2012 Since this is in reference to the API, I suppose it might be more prudent to ask this here so that others in the future may see if should they have the same question. What is the preferred method for confirming whether or not an actor is engaged in a sex act? I've seen two methods, one involving tokens and another checking Var04. I'd hate to use one that is slated for deprecation. Var04 Method: set iAV to self.GetAV Variable04 if (0 == (LogicalAnd iAV SexoutNG.FlagInUse)) ;blah endif Token Method: if (0 == self.GetItemCount 00SexoutActor) ;blah endif
srayesmanll Posted October 4, 2012 Posted October 4, 2012 Prideslayer has said that either is fine, although I've always had the impression that he was moving away from the "token" method. He has advocated the Var04 method recently. You could combine the 2 methods to be safe: set iAV to self.GetAV Variable04 if ((0 == (LogicalAnd iAV SexoutNG.FlagInUse)) && (0 == self.GetItemCount 00SexoutActor)) ;blah endif
prideslayer Posted October 6, 2012 Author Posted October 6, 2012 For confirming you can use either.. don't worry about it. I thought the var04 method would be final, and intended it to be so when I thought I was never going to get save/load support into the extender. Now that it has save/load support, I will *eventually* be switching entirely to using that internally. Right now, var04 is used internally by sexout for it to check, but the tokens are still handed out and removed because some mods check for those. If it's easier for you, just stick with the token. An "official" NX interface for checking will be made available once I have the time to properly plan it out.
Santr Posted October 12, 2012 Posted October 12, 2012 Right! Totally noob question: how do I find out the gender of an actor? SexoutNG.ActorA.GetIsSex male ...looks silly and GECK said I'm stupid, but I just can't figure out the right way. Basically, I'm trying to tidy up and hopefully improve the Sexout addon to Imp's MCN, and its original relevant piece of code looks like this: if(SexoutNG.isOral || Sexout.sextype == Oral) if(SexoutNG.ActorB == PlayerREF || PlayerREF == Sexout.female) if(playerGivingOral == 0) set playerGivingOral to 1 endif endif endif ...which makes females also produce cum, but gives no cum when being orally raped. I'm also thinking of getting rid of excessive if/endifs there and just string the conditions with ||s and &&s. Good/bad/'oh-god-leave-the-poor-code-alone' idea?
prideslayer Posted October 12, 2012 Author Posted October 12, 2012 Your code is fine, the language just sucks.. you cannot do "a.b.c" so you need to do "set c to a.b; ..." e.g. set foo to SexoutNG.ActorA if (foo.GetIsSex male) ... That said, you cannot use SexoutNG.* to get that information -- unless you are the one that set them that is, and you set them in the same frame. Once the sexout spell is running, those variables are copied to internal ones and then cleared out -- they will be blank (or nonsense) when you read them. If MCN is the one that is actually casting SexoutBegin, then it's OK to use them (again, only if it happens in the same frame). Trying to use those variables at any other time is like giving sexout a cupcake and then trying to use the cupcake later -- while madly hoping against hope that sexout hasn't already eaten it.
DoctaSax Posted October 12, 2012 Posted October 12, 2012 I'm also thinking of getting rid of excessive if/endifs there and just string the conditions with ||s and &&s. Good/bad/'oh-god-leave-the-poor-code-alone' idea? That code example looks fine as it is to me. I hardly ever use more than 2 logical operators (&& or ||) in the same line. Stringing too many things together in the same line is sometimes unnecessarily harder on the engine than it needs to be, and definitely harder on your own eyes. Imagine a structure like this: if (something) && (((something else || something else) || (something else && something else)) && something else) ; do something endif which is only shorter, but not better for performance than chopping it up a bit. Now replace each "something (else)" by stuff like "GetPlayerTeamMateCount >= (someshort + GetRandomPercent * (someshort - someshort + 1) / 100)" or "player.IsCurrentFurnitureRef != MyIncrediblyLongQuestNameThatWasADumbChoiceWhenIStartedOutButImKindaStuckWithItNow.mystupidlynamedquestvarref", now misplace a bracket somewhere, and you just committed a crime against yer sanity.
prideslayer Posted October 12, 2012 Author Posted October 12, 2012 Note there is a limit in the geck script language to how long conditional constructs can be. This applies not just to single statements with the logical operators (&&, ||) but also to how many "elseif" blocks you can have. I already had to break up the random animation picker into two different if .. elseif .. endif blocks because it got to the point that adding one more elseif caused the script to start failing when it was run, though it still saved OK in the geck. I had to do something similar in tryouts, which is why in there you'll find a bunch of simple single-condition if statements one after the other that all do the same thing (return or dispel or something like that). Don't let them get too long or you'll get failures that just "don't make sense" when debugging.
ChancellorKremlin Posted October 18, 2012 Posted October 18, 2012 OK, bit confused with something here. I'm trying to use the set SexoutNG.CBDialog function, but using X as the "shadow placeholder" for an NPC not participating in the action, in this case a pimp with the JetSlaver01REF reference. However, how exactly do I make him work with the callback? I've tried the following: set SexoutNG.CBDialogJetSlaver01REF to SlaveJailTRenegade06CallbackB set SexoutNG.CBDialog JetSlaver01REF to SlaveJailTRenegade06CallbackB And a few others, none of which worked. I'm sure I'm missing something silly here, but I would really appreciate a hand. Cheers.
DoctaSax Posted October 18, 2012 Posted October 18, 2012 set SexoutNG.actorX to ActorRef set SexoutNG.CBDialogX to topicID
ChancellorKremlin Posted October 18, 2012 Posted October 18, 2012 Oh, so that's what I was screwing up. Thanks!
ChancellorKremlin Posted October 19, 2012 Posted October 19, 2012 Oh, and one last thing while we're at it. I noticed that quite a few of the SexoutNGAnims in the GECK have both a main name, like SNG201, and then are subdivided into SNG201a and SNG201b. Does this mean there are two variants of the same animation (201) or not? How would I add this in a script? Like this? set Sexout.anim to 201 set SexoutNG.ActorA to VeronicaREF set SexoutNG.ActorB to GetSelf CIOS SexoutBegin
DoctaSax Posted October 19, 2012 Posted October 19, 2012 Oh' date=' and one last thing while we're at it. I noticed that quite a few of the SexoutNGAnims in the GECK have both a main name, like SNG201, and then are subdivided into SNG201a and SNG201b. Does this mean there are two variants of the same animation (201) or not? [/quote'] The 201a would be for actorA, 201b for actorB. But yes, to pick an anim, all you really need is what you wrote there, although setting them both separately will work too.
ChancellorKremlin Posted October 24, 2012 Posted October 24, 2012 I know Prideslayer said this isn't a technical support type thread, but I figured its better than me opening up yet another one up in the TS forum. So here goes. Whenever I try and use this in the geck: VFSHighTimesDealer.NX_SetEVFl "Sexout:Start::CallVer" 1 VFSHighTimesDealer.NX_SetEVFo "Sexout:Start::ActorA" VFSHighTimesDealer VFSHighTimesDealer.NX_SetEVFo "Sexout:Start::ActorB" playerREF VFSHighTimesDealer.NX_SetEVFl "Sexout:Start::isAnal" 1 VFSHighTimesDealer.NX_SetEVFo "Sexout:Start::CBDialogA" SDCallbackGeneral VFSHighTimesDealer.CIOS SexoutBegin I get "SCRIPTS: Script 'DefaultCompiler', line 0: Unknown variable or function 'NX_SetEVFI'." Suggestions?
zippy57 Posted October 24, 2012 Posted October 24, 2012 I think the only reason that would happen is if your NVSE stuff is out-of-date. Make sure you have the latest Extender and the official NVSE 3b2.
ChancellorKremlin Posted October 24, 2012 Posted October 24, 2012 I do. I am opening the GECK though the geckpu-nv-14.exe. I remember being told somewhere that if I used that, it would auto-load NVSE and etc, but if I opened it up with nvse_loader - Shortcut it wouldn't load geckpu. I must be doing something wrong...
zippy57 Posted October 24, 2012 Posted October 24, 2012 Don't use the GeckPU.exe. Put the nvse_plugin_geckpu-nv-14.dll file in the NVSE/plugins folder and then launch via nvse_loader.
ChancellorKremlin Posted October 24, 2012 Posted October 24, 2012 Ah ok. It's already there, so I'll be launching it from teh nvse_loader -shortcut exe from now on. Thanks! EDIT: Now I'm getting this, to the same script: "Warning - Power Up - Scripts SCRIPTS: Script 'DefaultCompiler', line 1: Syntax error. Invalid reference 'VFSHighTimesDealer' (only object references and reference variables are available in this context." VFSHighTimesDealer is the id for Dixon. I'm taking it they aren't liking that very much...
DoctaSax Posted October 25, 2012 Posted October 25, 2012 Chances are VFSHighTimesDealer is the base editor ID, and you need the reference ID. Right-click on the entry in the object window/npc's, select "use info", double click on the cell where they placed him, and find his reference there.
iron_jack Posted November 1, 2012 Posted November 1, 2012 So getself no longer works in the new version of Sexout calls, right? For instance: GetSelf.NX_SetEVFo "Sexout:Start::ActorA" GetSelf It will not work in either of those places. Right?
DoctaSax Posted November 1, 2012 Posted November 1, 2012 You're best off declaring a ref first, set that to Getself, & then do the calling. I still use the old calling system when I can.
Halstrom Posted November 1, 2012 Posted November 1, 2012 You're best off declaring a ref first' date=' set that to Getself, & then do the calling. I still use the old calling system when I can. [/quote'] Yep and then you'r beter checking GetSelf == "Something", I found a lot of idssues I had with scripts on NPC's "Set rZActor to GetSelf" wasn't actually set till the script had run 2 or 3 times.
Dmouse52 Posted November 21, 2012 Posted November 21, 2012 presently in TTW alpha BR bans npc's when you're in capitol wasteland but kicks in when you get to the mojave is there a way to un-ban npc's?
Swyke Posted February 23, 2013 Posted February 23, 2013 Hello! I have a basic Sexout-modding-question. I tried to figure out, how to script a basic "whoring"-act, which allows to use the same toppics to begin an animation with different NPC. Watching other Mods in GECK I've seen, that Tryout for example uses a "GetSelf" for the NPC-Actor. I've tryied this using the "Now-And-Forever-Interface" as described in the first post here: GetSelf.NX_SetEVFl "Sexout:Start::CallVer" 1GetSelf.NX_SetEVFo "Sexout:Start::ActorA" GetSelfGetSelf.NX_SetEVFo "Sexout:Start::ActorB" playerREFGetSelf.CIOS SexoutBegin But that doesn't work. Shure I#ve did something stupid wrong. As searching through other mods, I recognized that noone(!) seems to use this "Now-And-Forever-Interface" (!?!) Is this true? Is it better to use the old interface? And how can I get my script run? Thakt you, for your attention Swyke
zippy57 Posted February 23, 2013 Posted February 23, 2013 Hello!Hello.I have a basic Sexout-modding-question.Okay. But that doesn't work. Shure I#ve did something stupid wrong. Please define "doesn't work". There are many possible outcomes of "doesn't work" in this system. As searching through other mods, I recognized that noone(!) seems to use this "Now-And-Forever-Interface" (!?!) Is this true? No.Is it better to use the old interface?No.And how can I get my script run?Explain your issue better and we'll see.Thakt you, for your attentionYou're welcome.Swykezippy57
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