Jump to content

Sexout scripting questions


srayesmanll

Recommended Posts

I have finally started working on a mod I've had in mind since finding Sexout and playing as a male character. It's basically a "PC as Rapist" mod. The beginning stage works similarly to RapeGame in that the user targets a victim, and presses the "b" key to initiate the rape. Instead of a random rape, the PC is presented a menu with rape options based upon victim and PC followers (yes, the followers will get in on the action). So far the menu works very well. However, I have a few scripting questions:

 

1) The rapist can be male or female (PC or NPC), so with a female rapist I may need to equip a strapon. Equipping is not an issue, but I am having problems automatically removing the strapon. I assume that I need to use the Sexout callbacks (CBSpell) to remove. My problem was getting the reference of the Actor with the strapon within the callback script. In the initiating script, the strapon actor is stored in a REF variable (rStraponWearer). I have tried getting the value of that variable using GetQuestVariable from the callback script, but I don't seem to get the correct variable. I also need the ref to ActorB (the victim) in the callback. Can I reference them with the SexoutNG.ActorA (or B or C)?

 

2) Is there any quick way of getting a list of the PC's current (non-resting) teammates, including slaves? Maybe a formlist? I know I can check each of the vanilla (+ sunny) refs using the geck "teammate" commands, but I was hoping to get the non-vanilla NPCs and slaves.

 

3) Is it possible to initiate multiple Sexout animations from the same script? For example, initiate the rape plus have some non-raping followers masturbate while the rape is occurring.

 

Thanks for any help you guys can give, and thanks also to the mod developers on this site for the inspiration to get off my ass (so to speak) and try to give something back to the community.

 

 

Also, it might not be a bad idea to have a thread that contains a list of the "hot keys" used by various Sexout mods, so that it would be easy to look for conflicts. Maybe Zippy57 can add it to the descriptions within the "Sexout Plugin List" thread?

Link to comment

I have finally started working on a mod I've had in mind since finding Sexout and playing as a male character. It's basically a "PC as Rapist" mod. The beginning stage works similarly to RapeGame in that the user targets a victim' date=' and presses the "b" key to initiate the rape. Instead of a random rape, the PC is presented a menu with rape options based upon victim and PC followers (yes, the followers will get in on the action). So far the menu works very well. However, I have a few scripting questions:

 

1) The rapist can be male or female (PC or NPC), so with a female rapist I may need to equip a strapon. Equipping is not an issue, but I am having problems automatically removing the strapon. I assume that I need to use the Sexout callbacks (CBSpell) to remove. My problem was getting the reference of the Actor with the strapon within the callback script. In the initiating script, the strapon actor is stored in a REF variable (rStraponWearer). I have tried getting the value of that variable using GetQuestVariable from the callback script, but I don't seem to get the correct variable. I also need the ref to ActorB (the victim) in the callback. Can I reference them with the SexoutNG.ActorA (or B or C)?

[/quote']

 

GQV you don't need. If the var is in a quest script variable, you can just use "questname.var" e.g. "myquest.rStraponWearer". You will need to assign it to a local var before you can do much of anything with it, so..

 

ref r
...
set r to myquest.rstraponwearer
r.removeitem ...

 

2) Is there any quick way of getting a list of the PC's current (non-resting) teammates, including slaves? Maybe a formlist? I know I can check each of the vanilla (+ sunny) refs using the geck "teammate" commands, but I was hoping to get the non-vanilla NPCs and slaves.

 

No. There is no good way to do this. The engine doesn't maintain such a list itself, and there isn't a 'standard' list that all the different mods like unlimited companions use. There might be a way, using the scanner, to determine if an npc is a follower but I don't think so; if there were, the internal vanilla scripts would use it rather than checking all the different quest vars for the vanilla companions.

 

Your only reliable option is to check individually for each possible companion. You'll want to make sure this bit is robust, which means checking:

 

- Follower is an actual follower, via their quest vars.

- Follower is in the same cell as the player.

- Follower is following (not waiting)

- Follower is not dead.

 

Steps 2-4 are the same for all companions. Step 1 is different for each companion. Supporting non-vanilla companions (Sunny, Willow, etc) will require one clever use of buildref and/or per-mod "support" files for each of the companion mods. You can set all those mods as masters to yours and get around this difficulty, but then anyone using your mod will require all those mods to be installed and active as well.

 

3) Is it possible to initiate multiple Sexout animations from the same script? For example, initiate the rape plus have some non-raping followers masturbate while the rape is occurring.

 

Yes and no.

 

You can initiate as many sex scenes as you want from a single script, but I suspect that question isn't actually the one you meant to ask. You cannot initiate multiple sex scenes simultaneously, it doesn't matter if you are doing it from one script or a dozen of them.

 

The only ways to do this right now are either to delay between starting the scenes (a quarter or half second is enough usually) or wait for a beta release I will try to have out today, that will add a "sexoutReady" read only quest var, and use it as a semaphore. Details on this semaphore will be made available when the beta is released.

Link to comment

prideslayer:

 

Thanks for the info.

 

#1 - I did try this but it failed. However, it was around midnight and I was suffering caffeine withdrawal so whatever I tried was probably doomed to fail. I'll try what you suggested when I get home.

 

#2 - Thought as much but wasn't sure (again, late night loopiness). I do remember reading something in the geck about getting the assets within a specific cell based on the type, of which NPC was one available type. Of course, I'll have to look again in daylight to make sure of what I saw (IF I can find it again in the mess that is GECK documentation). Maybe was NVSE? Wouldn't hurt to look there as well.

 

#3 - Cool, looking forward to it. Also thought about using quest staging to handle this, but I assume the delay would still be necessary. Still, without a reliable way of doing #2, #3 doesn't happen easily.

Link to comment

Re #2, if you figure this out, we're all eager to know how. All of us currently do the questvar thing looking specifically at (for example) Cass' quest to see if the quest to gain her as a companion has been completed, and if so, to make sure she hasn't been dismissed. This is exactly how the vanilla companion stuff does it as well, e.g. if you look at the code for removing companion weapons when going into a casino. If there was an easier way, I assume (a mistake, I know) that obsidian/bethesda would've used it.

 

#3, it's just a simple "thing" with the engine that it seems I will never be able to stop explaining to people. In short, CIOS is no an immediate function, and spells themselves are not function calls. When you do a CIOS, the spell to cast and the target are 'queued' in the engine. The spell is not actually cast until (at least) the next frame. So when you do something like this:

set quest.vara to 1
set quest.varb to 2
cios somespell
set quest.vara to 3
set quest.varb to 4
cios somespell

 

What you've actually done is this:

set quest.vara to 3
set quest.varb to 4
cios somespell
cios somespell

 

the 1 and 2 are lost forever, and if somespell resets vara and varb (as sexout does with actora/actorb, etc) the second cios doesn't actually do anything, because the first one caused those vars to get cleared after they were used.

Link to comment

#2 - this brings a question to mind on the example you site. I use the Wendy Gilbert companion mod quite a bit (I like extras she provides without all of the extra questing). I have never verified this, but does she lose her weapons as well when entering a casino? If so, then it seems Bethesda might have a way of determining non-vanilla companions. Something for me to look into...

 

#3 - definitely understand what you are saying. I develop within a multi-client database app, and idea of last one wins (or actually in the case of the database, first one to lock the record wins) is one I'm use to. We use semaphores quite a bit.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use