Odessa Posted October 16, 2013 Posted October 16, 2013 I think it would be a good idea that could greatly aid mod compatability if we have a Sexout NX variable (a simple 0 or 1) which all mods can use to indicate when an essential sensitive scripted sequence is in effect. By which I mean any mod with some feature that has significant general potential to break scripted sequences (example: stalkers) would check this NX var, and if it is 1 would not proceed. Other mods would sparingly set the var to 1 for their short sensitive sequences then reset it to 0 once they are done. (I'd suggest it would be good etiquette to debugprint when they do, to track down if someone forgets to reset) --- I actually included this feature in the update to SexAssault I made already- allowing stalking to be disabled. (I'm happy to change the "Sexout:iNotNow" var name if desired) set rActor to PlayerREF if (rActor.NX_GetEVFl "Sexout:iNotNow") DebugPrint "Sexual Assault: RR B0 - Stalking disabled externally via NX" return endif What do other modders think?
prideslayer Posted October 16, 2013 Posted October 16, 2013 There's a problem with this var approach, a race condition, that can cause it to break unexpectedly. I also think that it may be a bit much to ask every mod to switch to check that var -- and every mod will have to be changed, to check for the var, even if they aren't creating a complex scene that might want to set it. Is this intended to prevent actors from being used for sex if they are going to be needed again shortly, but the mod isn't using callbacks for that? My first thought is to use the callbacks, they're more powerful than most modders realize and already have safeguards against interruption. What problem are you having that this attempts to solve?
Odessa Posted October 17, 2013 Author Posted October 17, 2013 The problem I was trying to solve in particular was that mods that randomly scan actors (stalkers, hookups, tryouts, etc) and add packages to them can often break or cause problems for other mods during short specific sequences; stalkers being the most common culprit. The idea was that if other mods could set a flag briefly that would make other supported mods 'back off' temporarily it could solve a lot of potential issues. The var wouldn't stop sexout and there would be no requirement for any mod to use it, it would just be an available feature that could be incorporated as a 'check -> go/wait' into any mods with general anytime actor scripting, and as a 'set...reset' in other mods during short scripting or immersion sensitive sequences. ---- So if one mod constantly scans all local actors and adds some 'pork player package' which might interrupt some other mod's story where NPC X follows player, does Y then speaks Z, or whatever- just for that one minute the first mod could be asked to wait.
prideslayer Posted October 17, 2013 Posted October 17, 2013 I think a formlist in sexout could be setup to achieve the same goal, and wouldn't be as invasive. If I create a new formlist to hold actors that should be excluded from scans, I can put it to use in the sexout scanner and exclude them from the 'found' list. Tryouts uses that scanner, not sure about hookups or brutalrapers. Anything that needs a scanner should be using it though, as a bunch of different scanners running just causes extra load on the players PC. This is easy enough for me to just toss into the next release. In my gut though I don't think it's the "right" solution. Too many other mods do things like you describe that are unrelated to sexout's scanning; if there are important characters involved in a scene, the mod that needs them should probably just keep track of them in its own list, and check periodically that the package hasn't been changed. It's the only way to make it bulletproof, or as close as we can get in this dodgy engine.
Odessa Posted October 17, 2013 Author Posted October 17, 2013 Hookups, brutal rapers and sexassault dont use the sexout scanner, though it sounds like they should. Using formlists seems clunky to me- what if you want to exclude all actors for 30 seconds and you don't know who they may be at a particular time- you would have to scan to find out who they all were and add to the list- but then why bother running the sexout scanner anyway if you know you've blocked everyone I don't think the NX would be invasive, perhaps I explained badly, but I mean just a simple 1 / 0 flag, then it is just a case of optionally adding an extra 'if' conditional before mods start whimsically influencing local NPCs, if you want to aid compatability. Keeping track of packages as you say is always worth doing, but if you have something happening that is timed then the interruption can still break things. Plus it doesn't stop immersion breaking storywise
DoctaSax Posted October 17, 2013 Posted October 17, 2013 The point is with formlists you exclude the actor, like I do with Doc Mitchell in SOFO now, adding him to SCR's IsReserved list because I can't have scanner-based mods ruin the character I fleshed out for him, ever. Odessa's rather talking about a few moments, scenes, that can't be interrupted by anyone, but after that it's business as usual, or it can be. And for that all you really need is a boolean.
prideslayer Posted October 17, 2013 Posted October 17, 2013 I am thinking.. trying to find a better way. Tryouts uses a lot of packages itself for management, though they're all easily inhibited if the scanner is disabled (I am thinking of an NX semaphore value for use here) since they all result from the scanner. Sewerslave uses few packages but it needs to lock the actors for a long time for the intro sequence. The idea will work though I think it needs to be a float/integer instead and hold the modindex of the locking mod, not just a simple boolean, that the mods using it would check before unlocking to make sure something hasn't gone wrong. I am loathe to think of the effort involved to add a check for this flag in every current and future script of every sexout mod that adds packages to NPCs or even casts SexoutBegin. There must be a better way. I do have a solution in mind that can easily lock sexout to a mod that requests it and ignore calls from other mods until unlocked, without any mods but the locking one having to be modified, but this does not address packages. There are so many different places and reasons that packages can be added finding a solution that doesn't require alll those mods to be updated to use it is probably not possible. Immersion breaking doesn't bother me too much. I'm a lot more bothered by the idea of a mod setting the lock and then the script crashing or other conditions not being met to release it. Due to the nature of NX vars, not even a clean save can fix this problem if it happens -- players will have to manually unset the var in the console, and then save the game to make it 'stick'.
Odessa Posted October 17, 2013 Author Posted October 17, 2013 ... I am loathe to think of the effort involved to add a check for this flag in every current and future script of every sexout mod that adds packages to NPCs or even casts SexoutBegin. There must be a better way. ... I think you misunderstand; what I am suggesting is not at all wide ranging. Toggling the NX would simply be equivalent to setting stalk/hookup/tryout approach rates to 0 temporarily. That way modders don't have to worry about adding warnings and providing support for when interruptions break them. I've seen a lot of posts on these forums about 'stalkers may break x..' or 'disable stalkers whilst ...' etc. No mods would require modification. It would be <5 lines of code in one or two scripts of a small number of 'dangerous' mods to check for the flag Other mods don't ever need to set/reset the flag, but if there is a small part where compatability with 'dangerous' mods is a known issue, they can add 2 lines to set/reset the flag. That way we can all worry much less about compatability. ---- Tryouts/stalkers/hookups are great because they liberally add content to the game all the time; but this by nature is risky. One could describe them as hogging all/most the NPCs in the game. What I'm suggesting is a way that they could gracefully give way to other mods during very short periods, if it is a known/obvious issue.
prideslayer Posted October 17, 2013 Posted October 17, 2013 Tryouts is only "dangerous" in the scanner, everything else is dialog driven, so why wouldn't having a simple toggle for the scanner (in sexout) as a whole work? This seems like it would give the same result without tryouts having to add any code -- rather than the 5 or 6 lines, that would need added (at least) to each of the 7 tryout modules. Other mods would have to switch to the built in scanner if they're not using it, but that's not very difficult.
Odessa Posted October 17, 2013 Author Posted October 17, 2013 Yes, that sounds good I can switch SexAssault (and Hookups if no one else wants to) over to using the sexout scanner
prideslayer Posted October 17, 2013 Posted October 17, 2013 Ok. What I'm thinking now is exposing a timer var (in seconds) instead of a simple flag. If you need to inhibit the scanner for 5 minutes, set the value to 300. Sexout will decrement it automatically and reenable the scanner if it reaches zero. If you need to extend it, just increase the value, or set it to 0 if you don't need it blocked any more. This will prevent mods from setting the inhibit flag and then crashing or being disabled by the user. You will still need to back-stop and check your packages have not gone away at least once, because there's a 50/50 chance that the scanner already ran in the frame where you disable it, and if so, the mods using the scanner to adjust packages will not happen until the next frame.
jaam Posted October 17, 2013 Posted October 17, 2013 There are a few part of Hookups meant for NPC/NPC that I think could not be done with SexoutNG scanner. Same for Brutal Rapers where you require two scanners active.
Odessa Posted October 17, 2013 Author Posted October 17, 2013 There are a few part of Hookups meant for NPC/NPC that I think could not be done with SexoutNG scanner. Same for Brutal Rapers where you require two scanners active. Two scanners are not required; SexAssault manages it with one- each actor scanned may be either given the stalk script or added to the potential victims list
DoctaSax Posted October 27, 2013 Posted October 27, 2013 Something else that occurred to me: apart from npc approaches, Lust also factors in automatic masturbation for the player & lust-tracked npcs. A safety in the scanner alone won't hold that back, so for the moment I've added the "Sexout:iNotNow" variable in additional checks anyway.
t3589 Posted November 2, 2013 Posted November 2, 2013 There are a few part of Hookups meant for NPC/NPC that I think could not be done with SexoutNG scanner. Same for Brutal Rapers where you require two scanners active. Two scanners are not required; SexAssault manages it with one- each actor scanned may be either given the stalk script or added to the potential victims list I'm in this boat at the moment. I DO need two scanners, sort of. I'm using NG scanner for approaches, but when rape happens, I need to fire up another scanner during sex to get who is around, determine if they will react or not (not how they react), and start that reaction (travel package). I say sort of because I wouldn't need to run the approach scanner during sex. So really I mean to switch them. I haven't been able to get it to work using NG scanner so far. Maybe I missed it but does the NG scanner pause during sex? Any suggestions? Should I just write my own scanner that only applies when the above scenario takes place? EDIT: OK well I answered my own question. Guess I'll write my own scanner that runs during sex only. EDIT EDIT: OK it does scan. Wasn't scanning because of a typo.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.