prideslayer Posted September 16, 2014 Posted September 16, 2014 A problem tomm is having just reminded me of this post from Hal in the 101 thread, from a year and a half ago. Any Effects on NPC's are likely to be automatically dispelled if the Player leaves the cell, this seems to occur even on Fast Travel, Wait, Sleep as well. So to add scripts to NPC's you are better adding them in Tokens, which I found will continue to run even when the Player isn't in the same cell. So if that script casts effects on the NPC, it may lag the game by continuing to recast the effect as it is removed immediately because the NPC isn't in the Players cell. So you need to put a check checking "GetInSameCell PlayerREF". if rZActor.GetInSameCell PlayerREF if iCurrNumOva == 1 && rZActor.IsSpellTarget SexoutP2EFertile < 1 rZActor.CIOS SexoutP2EFertile else rZActor.Dispel SexoutP2EFertile endif endif Given this problem, and how much I hate tokens, I'm considering ditching the sexout long-term spell effects in favor of a (new) single quest script that manages all running acts. With the maturity NVSE now brings to scripting, I think I can make this happen. The end result would be a large-scale replacement of existing end-point spells, like the main effect spell that the sanitizer casts, with quests. Any scripts that are looking for the spell on an actor (rather than using the InUse UDF, etc) will be broken by this change -- as will any mods that are altering the spells (naughty naughty!). Looking for feedback/thoughts from other NG modders to see what you think or potential gotchas I'm not seeing right now. The goal is to ensure that acts run to completion normally even when the actors aren't in the same cell as the player.
DoctaSax Posted September 16, 2014 Posted September 16, 2014 In principle, I'm on board with avoiding tokens, if for no other reason than that they tend to get stuck - the exact opposite problem as spells magically removing themselves. Spunk's been using quest scripts going over "actors to track" arrays since forever - the method's stable, if done right. IE: don't run everything off a foreach loop because you could get lag if there's a lot of scripting to be done for everybody in the array. I'm assuming this is primarily aimed at the spell(s) running while sex is ongoing? IE FinishNow would remain untouched?
prideslayer Posted September 16, 2014 Author Posted September 16, 2014 That's right. The interface spells will remain as is, but at the end, they would add to the quest arrays or something rather than casting another spell that lasts on the target actor until the act is complete. I'm with you on the foreach. I could process one entry per frame, one every other frame, or only spend 0.0x seconds per loop.. whatever. There would have to be some refactoring of things that currently return to do delays and such but I don't think it's insurmountable. I do wonder though, say an act begins in the cell and the player leaves before it's done. The new system would keep on chugging and finish it on time (not counting new cell load delay) but what about the 'effects' like knockdown, reequipping items, etc. Does that stuff (especially reequpping) work on actors in a different cell?
DoctaSax Posted September 16, 2014 Posted September 16, 2014 I do wonder though, say an act begins in the cell and the player leaves before it's done. The new system would keep on chugging and finish it on time (not counting new cell load delay) but what about the 'effects' like knockdown, reequipping items, etc. Does that stuff (especially reequpping) work on actors in a different cell? No idea. I think this may have something to do with whether the actor's still in memory or not, having low-level processing or not, who knows. Maybe hal can shed some light on the equipping side of things.
jaam Posted September 16, 2014 Posted September 16, 2014 Judging by Odessa's ActorX recent issue, I would say no. By the way before going on a rewriting spree, you may want to wait for few days (weeks ) .
Odessa Posted September 16, 2014 Posted September 16, 2014 Equipping items on NPCs from foreign cells appears to work. I just tested removing sunny's armor, adding another one and equipping it from another interior, and when I went to Goodsprings it had worked correctly. -- On changing the method, I'm in favor, and volunteer to fix old mods if they get broken by it- it should be pretty easy by looking at use info for the spells, and its straight forward to find/replace old-> new call methods with a script, if need be.
prideslayer Posted September 16, 2014 Author Posted September 16, 2014 Thanks Odessa, that's good news. There should only be one potential bit of breaking (haha.. should..), and that's for any scripts that are actively looking for the sexout effect on actors. I honestly don't know of any mods that do this, or have ever done it, but the possibility is there. Most just do the right thing -- look for the token in inventory, check variable04, or use inuse. I can't imagine any other potential problems with the switch. Jaam.. ok.. I'm still fighting with fnvscript stuff anyway for my work with AJ. Just had to take a break from that, so I decided to fix some NG beta problems.
Halstrom Posted September 16, 2014 Posted September 16, 2014 A problem tomm is having just reminded me of this post from Hal in the 101 thread, from a year and a half ago. Any Effects on NPC's are likely to be automatically dispelled if the Player leaves the cell, this seems to occur even on Fast Travel, Wait, Sleep as well. So to add scripts to NPC's you are better adding them in Tokens, which I found will continue to run even when the Player isn't in the same cell. So if that script casts effects on the NPC, it may lag the game by continuing to recast the effect as it is removed immediately because the NPC isn't in the Players cell. So you need to put a check checking "GetInSameCell PlayerREF". if rZActor.GetInSameCell PlayerREF if iCurrNumOva == 1 && rZActor.IsSpellTarget SexoutP2EFertile < 1 rZActor.CIOS SexoutP2EFertile else rZActor.Dispel SexoutP2EFertile endif endif Given this problem, and how much I hate tokens, I'm considering ditching the sexout long-term spell effects in favor of a (new) single quest script that manages all running acts. With the maturity NVSE now brings to scripting, I think I can make this happen. Just to clarify, probably not relevant, I think since I wrote that, I have come under the impression that there's a bit more to whether the token scripts run, I think they run if in an adjacent "visible" cell most times in my experience. I've had cases where scripted objects in an adjacent visible cell would run on one start of a save then not run on the next. Which has got me wondering if sometimes spells follow similar randomness. Generally all my tokens have self delete in one way or another on timers or GetDead checks. My only concern with removing tokens is for newer modders who can't script and possibly never will, they remove the ease of checks for dialogue etc. Could the tokens remain as just external indication and just throw a timer self-delete script into them? I'm pretty sure most of my stuff looks for NX_Started and/or tokens, I've never used any spells unless you mean like SexoutNotify. Where I use this to add a spell to an actor in pregnancy to add fertility, SCR uses it too in the Semen system to add semen, though the Semen system is now removed completely in my current Alpha release for SexoutSpunk instead, dropping compatibility for older mods like Breeder. Main starup Script: ; *** Sexout Notifyish Formlist Initialisation if ListGetFormIndex SexoutNGFLGlobalCBEndFLV SexoutPNotifyFLVaginal < 1 ListAddForm SexoutNGFLGlobalCBEndFLV SexoutPNotifyFLVaginal endif if ListGetFormIndex SexoutNGFLGlobalCBEndFLO SexoutPNotifyFLOral < 1 ListAddForm SexoutNGFLGlobalCBEndFLO SexoutPNotifyFLOral endif if ListGetFormIndex SexoutNGFLGlobalCBEndFLA SexoutPNotifyFLAnal < 1 ListAddForm SexoutNGFLGlobalCBEndFLA SexoutPNotifyFLAnal endif if ListGetFormIndex SexoutNGFLGlobalCBEndS SexoutP2ENotifySexEvent < 1 ListAddForm SexoutNGFLGlobalCBEndS SexoutP2ENotifySexEvent endif Spell cast on Actor: ; *** Vaginal Sex Set nCnt to ListGetCount SexoutPNotifyFLVaginal Label 1 if nCnt > 0 Set nCnt to nCnt - 1 Set rZPartner to ListGetNthForm SexoutPNotifyFLVaginal nCnt rZActor.NX_SetEVFo"SOP:rLastSexPartnerV" rZPartner if GetItemCount 00SexoutRapee DebugPrint "Preg2SexEvent %n: Virginal raped by %n" rZActor rZPartner elseif GetItemCount 00SexoutRaper DebugPrint "Preg2SexEvent %n: Virginal raping %n" rZActor rZPartner else DebugPrint "Preg2SexEvent %n: Virginal fucking with %n" rZActor rZPartner endif <If actor female and not in Infertily lists add Fertility token> etc........... If there's an NX way of adding a scripted token to any female NPC involved in sex not in an exclusion list then I can easily replace it.
jaam Posted September 16, 2014 Posted September 16, 2014 Well, when in exterior and as far as I know, the "active cells" are the square of uGridsToLoad cells centered on the player. So any reference in that square should run its AI and its scripts and its spells. EDIT: By the way prideslayer, since V4.5 beta 7, your scanner should scan with the -1 radius to find active actors.
prideslayer Posted September 17, 2014 Author Posted September 17, 2014 Hal the tokens are going to remain for now, that's always been the plan. I'm just talking about getting rid of the long-lasting spells. These are internal spells that no other mods call, that remain on the actors during sex to keep things moving along. Eventually the tokens will all be retired, but that's still a year or so away. I don't think any non-coders will have trouble using InUse when that time comes.
Loogie Posted September 21, 2014 Posted September 21, 2014 What's your timeline for doing this? Scripts in all the Tryout mods would need re-written.
prideslayer Posted September 21, 2014 Author Posted September 21, 2014 What's your timeline for doing this? Scripts in all the Tryout mods would need re-written. Why would tryouts need rewritten? Let me state once again, this would in no way impact the "public interfaces" that SO mods use. It's an internal reorg that will affect any (few, I imagine) mods "peeking" where they're not supposed to. "someref.IsSpellTarget SexoutNGStartSex" is the only one that immediately comes to mind and I haven't actually seen any scripts doing that.
Guest tomm434 Posted September 21, 2014 Posted September 21, 2014 Pridelsayer, what about Sexout quest that handles animation? Will it work non-stop or start when there is a call and end when there are no actors having sex?
prideslayer Posted September 21, 2014 Author Posted September 21, 2014 Pridelsayer, what about Sexout quest that handles animation? Will it work non-stop or start when there is a call and end when there are no actors having sex? What do you mean? Are you asking about the quest cpu load or something?
Loogie Posted September 21, 2014 Posted September 21, 2014 What's your timeline for doing this? Scripts in all the Tryout mods would need re-written. Why would tryouts need rewritten? Let me state once again, this would in no way impact the "public interfaces" that SO mods use. It's an internal reorg that will affect any (few, I imagine) mods "peeking" where they're not supposed to. "someref.IsSpellTarget SexoutNGStartSex" is the only one that immediately comes to mind and I haven't actually seen any scripts doing that. Okay, I got you. I thought you meant the way I currently check to see if actors are having sex.
Guest Long John Posted September 21, 2014 Posted September 21, 2014 Also will it have any affect on the starting of vanilla games with it active or any alternate start mods? The reason for asking is because with SexLab active Skyrim's vanilla start can go nuts. Namely the cart to Helgen going cart wheels. Killing the horses and occupants. How about compatibility with modification called NCR CF? If done will this allow for gradual implementation of some of the features of SexLab? Bearing in mind the more up to date skse version when compared to nvse.
Guest tomm434 Posted September 22, 2014 Posted September 22, 2014 What do you mean? Are you asking about the quest cpu load or something? Yes.
prideslayer Posted September 23, 2014 Author Posted September 23, 2014 Okay, I got you. I thought you meant the way I currently check to see if actors are having sex. Nope! Every published interface to sexout will be unchanged. Those are interfaces I've made available and told people to use in the API and whatnot. Also will it have any affect on the starting of vanilla games with it active or any alternate start mods? No. It's not "that kind" of quest. How about compatibility with modification called NCR CF? If done will this allow for gradual implementation of some of the features of SexLab? Bearing in mind the more up to date skse version when compared to nvse. Not sure what you mean on either of these. What do you mean? Are you asking about the quest cpu load or something?Yes. There should be no difference. If anything, the quest will reduce overall load when more than one act is running at a time. It's one gamemode script vs. two at that point. When no acts are running, the array will be empty, and it will just end without doing anything -- no more load than any other "empty" gamemode script.
Guest Long John Posted September 23, 2014 Posted September 23, 2014 The "NCR CF" is a modification on the Nexus Mods website which can optionally use Sexout. The other question is about whether any of the features from Skyrim SexLab will be implemented in Sexout new version.
prideslayer Posted September 23, 2014 Author Posted September 23, 2014 The "NCR CF" is a modification on the Nexus Mods website which can optionally use Sexout. The other question is about whether any of the features from Skyrim SexLab will be implemented in Sexout new version. Haven't tried the NCR thing, but I don't expect problems. You'll have to be more specific about what features you want from sexlab that sexout doesn't have.
Nessa Posted September 24, 2014 Posted September 24, 2014 If we're talking about features... the ability to turn off the um... squirt effect would be nice.
Halstrom Posted September 24, 2014 Posted September 24, 2014 If we're talking about features... the ability to turn off the um... squirt effect would be nice. That's in Spunk not NG and an option in the MCM I think
Guest Long John Posted September 25, 2014 Posted September 25, 2014 I'm talking about facial expressions. The foreplay the ability to disable player controls. There's also a bug in current SexoutNG where either of the partipants can become invisible (can still be heard though). In addition though some times the 3rd person camera zooms out so far during sex, that it goes out of the game world and keeps zooming out (or moving back).
prideslayer Posted September 25, 2014 Author Posted September 25, 2014 I'm talking about facial expressions. The foreplay the ability to disable player controls. Those are generic feature requests. We're working on the first one. Neither one has anything to do with the subject of this thread though. There's also a bug in current SexoutNG where either of the partipants can become invisible (can still be heard though). In addition though some times the 3rd person camera zooms out so far during sex, that it goes out of the game world and keeps zooming out (or moving back). Becoming invisible is not a sexout bug, I can't do anything about it. The zoom only happens if you have telephoto enabled in MCM, and the duration is adjustable. That is disabled by default. If you didn't turn it on, then sexout isn't the mod doing that.
Nessa Posted September 25, 2014 Posted September 25, 2014 If we're talking about features... the ability to turn off the um... squirt effect would be nice. That's in Spunk not NG and an option in the MCM I think Wait, you can turn off the squirt somehow? That would save me a load of issues on one scenario. Oh, you mean spunk's shaders? I'm talking about the squirt that happens at the end of an animation sequence. It's the bloatfly "hit" I believe. (Or maybe it just uses the sounds.) ANYWAY... THAT would be nice to selectively turn off. But it's not exactly high on the list either.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.