Bazinga Posted January 30, 2019 Posted January 30, 2019 Hey @Xiderpunk, I really love your sex mod so far, it's stable as a rock and developing into an actual alternative framework to Sexlab. And on Skyrim VR it's the go to sex mod per se. And this thread can hopefully bring others aboard who are willing and able to create custom scripts or even scenes for this nice new framework. So about my problem: Since I did a bit of entry level Papyrus scripting when I still modded Oldrim I tried to add something for Flower Girls too. Got Sublime Text 3 all set up through MO2 and even the CK is kind of working but my little script isn't. What I tried is to add an alternative to that Fornicate spell that comes with the mod, one that triggers sex between the player and an NPC. And I basically failed to get this to work for the last 2 days. What I tried is creating a copy of both the spell (fornicate) and its magic effect (animate target actor pair) and tweaking some entries there: - attaching the "new" magic effect to my new spell - deleting a few properties from the magic effect (everything not needed in the customized script) - changing the script name in the magic effect and adding/filling a playerref property - making and compiling a custom copy of your dxanimatepaireffect script: Spoiler Scriptname dxAnimatePairSelf extends activemagiceffect Quest Property FlowerGirlsNpcScene Auto ReferenceAlias Property NpcActor1 Auto ReferenceAlias Property NpcActor2 Auto Actor Property PlayerRef Auto Message Property MsgFornicateActor2 Auto Message Property MsgFornicateDeny Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if (akTarget == None) Debug.Trace(Self + " akTarget is NONE. Skipping..") return endIf if (!FlowerGirlsNpcScene.IsRunning()) if (NpcActor1.GetActorReference() == NONE) NpcActor1.ForceRefTo(akTarget) NpcActor2.ForceRefTo(PlayerRef) MsgFornicateActor2.Show() FlowerGirlsNpcScene.Start() endIf else MsgFornicateDeny.Show() endIf endEvent Compiles just fine. I still used NPCActor1 and NPCActor2 because that dxNpcSexScene1 scene that ultimately triggers the sex scene ( inside the SF_dxNpcSexScene1_040C32A6 script fragment). Anyway... Fucking hell, now it's working all of the sudden. I must have forgot some important step and only included it now when I tried to explain the issue step by step. ? See the post below for the resulting mod. Target an NPC and you'll get laid. Wish there was some lifehack that achieved the same. Shag NPCs with Flower Girls.7z
Bazinga Posted January 30, 2019 Author Posted January 30, 2019 On second glance while that works it's not ideal like that. Because the NPC is is still hostile and has their weapon drawn while that combat music is playing. Which doesn't exactly put me in the right mood, you know? So I tried fixing it by adding a calm magic effect to that spell. But that breaks the Flower Girls sex scene and is probably the reason why it didn't work the last 2 days (I had that calm effect included before, took it out when I startet writing this spell from scratch). To circumvent that I though about just scripting my own calm effect using SetAV("Aggression", 0): Spoiler Scriptname dxAnimatePairSelf extends activemagiceffect Quest Property FlowerGirlsNpcScene Auto ReferenceAlias Property NpcActor1 Auto ReferenceAlias Property NpcActor2 Auto Actor Property PlayerRef Auto float NPCAgg Message Property MsgFornicateActor2 Auto Message Property MsgFornicateDeny Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if (!FlowerGirlsNpcScene.IsRunning()) NPCAgg = akTarget.GetAV("Aggression") ; Debug.Notification("Aggression before: " + NPCAgg) akTarget.SetAV("Aggression", 0) NpcActor1.ForceRefTo(akTarget) NpcActor2.ForceRefTo(PlayerRef) MsgFornicateActor2.Show() FlowerGirlsNpcScene.Start() else MsgFornicateDeny.Show() endIf endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) akTarget.SetAV("Aggression", NPCAgg) ; Debug.Notification("Aggression after: " + akTarget.GetAV("Aggression")) endEvent Now I still needed to increase the spell duration accordingly because only then the OnEffectFinish event does't trigger prematurely aggroing the NPC I'm shagging. It also needed to be greater than zero because otherwise that NPCAgg variable doesn't get filled before the OnEffectFinish event happens. resulting mod: Shag NPCs with Flower Girls.7z I'm still not sure about the mana costs and if I should keep the calm effect for that original fornicate spell (NPcs refused to stay in sex positions without that) or just change their aggression level via script too...
Xiderpunk Posted January 30, 2019 Posted January 30, 2019 Hi many thanks firstly for the nice comments. ? Give me an hour or so (currently real world work taking my attention) and will have a look through and see if I can make any suggestions. Actually before I do, just so I fully understand the intention... Would this be a correct statement? The mod gives a spell to shoot at hostile npc's in order for them to enter a dialogue scene ("What magic is this!?!.... etc") followed by a sex scene. You might also need to put in your spell: PlayerRef.SetAlert(False) akTarget.SetAlert(False) To hopefully stop the combat music and weapon drawn.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.