Jump to content

[Closed thread] adcSexlife


Recommended Posts

Go to http://www.loverslab.com/topic/47307-sexlife/

 

 

 

adcSexlife

 

Is a mod that defines all NPCs to have sexual preferences and that allows them to engage in sexual activities accordingly. The intent is to make the world a bit more immersive by adding into the activities the NPCs perform.

 

Sex initiator and target candidates are picked at random, and the script validates if the act can take place or not based on the candidates' preferences. The player is can be informed with (optional) on-screen notifications of the developments going in near him. If all preferences and conditions match it will result in sexual act in public or in private, again depending on their preferences.

 

The sexual preferences of NPCs are stored into factions, 7 traits per faction allowing the script to be compact and fast. The testing for the feasibility of a potential act is relatively simple exclusion-approach starting with the most likely prohibiting conditions and working into more time consuming and less likely prohibiting conditions.

 

Attributes are on/off flags that can be edited for each actor through MCM (just aim crosshair at NPC and go to MCM). Attributes are randomly initialized on first encounter for any NPC, but I will possibly add some logic so certain rules are also applied when these are randomized, or possibly I will add presets.

 

Dependencies

 

 

  • Sexlab Framework
  • Sexlab Aroused
  • SOS (to be changed to soft dependency)

 

 

 

Attributes

 

 

Faithful

  • Consensual sex only with lover

Submissive

  • Initiates quest for sex less often
  • Gives into sex initiatives from others easier
  • Increased chance of to get raped

Dominant

  • Initiates quest for sex more often
  • Increased chance for rough animations
  • Assumes deviant devices on someone gives his/her permission

Rapist

  • May rape

Racist

  • Initiates and agrees only to same-race sex

Sizequeen (or king)

  • Prefers larger than average dick size on partner

Golddigger

  • Prefers prestige and wealth on partner

 

 

 

Todo

 

 

  • Submissive and dominant positions in animations
  • Rape cheks
  • Most descriptions

 

 

 

Future ideas

 

 

  • More attributes: Money
  • AI packages corresponding to actions

 

 

Link to comment

I want to extend all actors with both properties as well as getter functions. Obviously I can do so only in the context of my own scripts, so values wont get saved. If I understand correctly, he next best way is to fake new property values for actors as faction ranks with new custom factions. Are there any other ways that would 'easily' add properties-like functionality to any actor in game?

Link to comment

You can create a script that extends the Actor script, add properties and functions to that, and add it to the actors. However that would lead to every actor having the extra script, which is a lot of savegame bloat and papyrus load. That's why for keeping track of attributes of a large number of actors it's often better to use something like a faction. Another advantage of using a faction is that it is very easy to check a faction rank or membership in conditions for things like dialogues, quest aliasses and magic effects, whereas script functions and properties can be a lot harder to reach in conditions.

 

Another option is to use the StorageUtil to save values for actors. Like faction ranks, these values can easily be read by other mods without having to know about any extended scripts, all they would need to know is the key you use to store the values. However, like script properties, values stored this way are harder to check in conditions than faction ranks.

 

Link to comment

You can create a script that extends the Actor script, add properties and functions to that, and add it to the actors.

 

For sake of understanding I want to be able to do this, even if it is not best way to do it. I tried to do this yesterday but I wasn't able to. How is it done? Is there a base actor common to all actors in CK where you attach the script that extends actor?

 

 

Another option is to use the StorageUtil to save values for actors. Like faction ranks, these values can easily be read by other mods without having to know about any extended scripts, all they would need to know is the key you use to store the values. However, like script properties, values stored this way are harder to check in conditions than faction ranks.

 

Ok, I will look into that as well.

 

Thanks for you informative answers, they have saved me lot of time.

 

http://www.cipscis.com/skyrim/tutorials/externalaccess.aspxthis is helpful to me

Link to comment

 

You can create a script that extends the Actor script, add properties and functions to that, and add it to the actors.

 

For sake of understanding I want to be able to do this, even if it is not best way to do it. I tried to do this yesterday but I wasn't able to. How is it done? Is there a base actor common to all actors in CK where you attach the script that extends actor?

 

 

Another option is to use the StorageUtil to save values for actors. Like faction ranks, these values can easily be read by other mods without having to know about any extended scripts, all they would need to know is the key you use to store the values. However, like script properties, values stored this way are harder to check in conditions than faction ranks.

 

Ok, I will look into that as well.

 

Thanks for you informative answers, they have saved me lot of time.

 

 

You have to either add the script in the CK to every base actor you want to have the properties and functions, or you will need to dynamically attach the script to actors nearby the player. Of course the latter will only be useful if you only want to use the added functionality for actors that the PC has been nearby at least once. In that case it may actually be better to use a cloak that runs a magic effect on nearby actors, and put your extra properties and functions in that (and of course from within the magic effect script you can then change properties of the actor it's running on). This is for example what SOS and DSR do, as well as the original SLA. The advantage of this method is that the magic effect will run out when the actor gets outside of range of the cloak, so you don't need to add any code to clean up the scripts you are attaching.

 

In both cases, you should expect players to scream bloody murder and threaten to tar and feather you, unless you have very good reasons for it and provide such awesome and unique functionality that people are willing to live with the added load. ;)

 

The StorageUtil is included with (and used by) SexLab so if your mod depends on SexLab you can always count on it being there. It's simple to use and the script is well commented, just have a look at StorageUtil.psc.

Link to comment

Thanks again. I think I have now pretty good overview of m options as well as what is possible and what is not.

 

How is it that duckduckgo gives so much better results than google when it comes to skyrim modding? I'm definitely using it from now on.

Link to comment

Thanks again. I think I have now pretty good overview of m options as well as what is possible and what is not.

 

How is it that duckduckgo gives so much better results than google when it comes to skyrim modding? I'm definitely using it from now on.

 

Because it doesn't give preference to pages with google ads or analytics on them ;)

Link to comment

OK so I am able to lot of things now:

 

  • Scan for nearby actors and make lists for use... NPC, followers, spouses etc.
  • Add them to factions if seen fit based on arousal, sos size, attraction (unfortunately only NPC<->PC at this point, no NPC<->NPC)
  • Check if nearby actors are part of a faction
  • If they are faction put them into reference alias
  • Aliases that have scripts that makes them do stuff

 

Still to figure out:  Quests, Dialogue, animations

Link to comment

OK so I am able to lot of things now:

 

  • Scan for nearby actors and make lists for use... NPC, followers, spouses etc.
  • Add them to factions if seen fit based on arousal, sos size, attraction (unfortunately only NPC<->PC at this point, no NPC<->NPC)
  • Check if nearby actors are part of a faction
  • If they are faction put them into reference alias
  • Aliases that have scripts that makes them do stuff

 

Still to figure out:  Quests, Dialogue, animations

 

The difficulty with NPC<->NPC is that you cannot really use factions, as you would need a faction for every NPC. The StorageUtil could help here. SexLab does something similar by storing the position adjustments for different race combinations. It will create a key based on the race of the 2 actors and use that to store the values, this way it can keep track of offsets for all different race combinations.

 

You could do something similar by creating a key based on the name or ID of the 2 NPCs, plus some identifier for the value you are storing. for example, if you are storing the amount of attraction between NPCs "Punch" and "Judy", you could create a key "Punch.Judy.attraction" and use that to store and retrive the value. This way you can keep track of values for all NPC/NPC combinations.

Link to comment

Related to SOS, and this question of yours

 

I'm working on a API to make it easier for modders to do crazy stuff with SOS. Example:

Scriptname test_sos_api extends Quest  

SOS_API SOS

Function OnInit()
    SOS = SOS_API.Get()
EndFunction

Function Foo()
    SOS.SetSize(Game.GetPlayer(), 20)
EndFunction
I have these functions, let me know if you would need others:

 

SOS_API Function Get() Global

Bool Function IsSchlonged(Actor akActor)

Int Function GetSize(Actor akActor)

Bool Function SetSize(Actor akActor, Int size)

Form Function GetSchlong(Actor akActor)

Bool Function SetSchlong(Actor akActor, Form addon)

Bool Function RemoveSchlong(Actor akActor)

Function BreakSkyrim(Bool recovery = false)

Form Function FindSchlongByName(String name)

Link to comment

 

The difficulty with NPC<->NPC is that you cannot really use factions, as you would need a faction for every NPC. The StorageUtil could help here. SexLab does something similar by storing the position adjustments for different race combinations. It will create a key based on the race of the 2 actors and use that to store the values, this way it can keep track of offsets for all different race combinations.

 

You could do something similar by creating a key based on the name or ID of the 2 NPCs, plus some identifier for the value you are storing. for example, if you are storing the amount of attraction between NPCs "Punch" and "Judy", you could create a key "Punch.Judy.attraction" and use that to store and retrive the value. This way you can keep track of values for all NPC/NPC combinations.

 

 

Good information as always, thanks. This is just the type of advice I need, since I have no pre-knowledge of what is possible and what is not. Once I am pointed to right direction I can figure out the details myself.

 

 

Related to SOS, and this question of yours

 

I'm working on a API to make it easier for modders to do crazy stuff with SOS. Example:

Scriptname test_sos_api extends Quest

 

SOS_API SOS

 

Function OnInit()

SOS = SOS_API.Get()

EndFunction

 

Function Foo()

SOS.SetSize(Game.GetPlayer(), 20)

EndFunctionI have these functions, let me know if you would need others:

 

SOS_API Function Get() Global

Bool Function IsSchlonged(Actor akActor)

Int Function GetSize(Actor akActor)

Bool Function SetSize(Actor akActor, Int size)

Form Function GetSchlong(Actor akActor)

Bool Function SetSchlong(Actor akActor, Form addon)

Bool Function RemoveSchlong(Actor akActor)

Function BreakSkyrim(Bool recovery = false)

Form Function FindSchlongByName(String name)

 

 

My original question about esp and esm was just fundamental, like why the game structure needs to differentiate the data into these types, but I understand it better now.

 

For the SOS interface at this moment I just need the sizes and maybe the type, which I can now get one way or another. But urges grow as I learn more, any estimate on the API system ETA?

 

 

 

Ahhh... interesting. Will read more about these.

 

I think I am at the point that I can actually make something simple all the way, and for that I need to define what I will do. A prelude and a practice work piece. In general I'm drawn to some sort of AI ideas that would improve the NPC-world interaction, as well as sexual themes obviously.

 

Link to comment

You might want to also look into the SexLab Stats module. It's the part that keeps track of how often you've had sex with males, females, creatures, and what your purity level is but it also allows you to define additional stats yourself. So for example you could add things like exhibitionism rating, masochism and sadism ratings, etc, whatever you have in mind. Not suitable for storing relationships but ideal for keeping track of sex related actor stats.

 

You could do it quite easy yourself by using the Storage Util (which is also what SexLab does to keep track of the stats) but then you'd have to add filtering to prevent ending up with a million chickens and goats and the likes in your database. By using SexLab for it you automatically limit yourself to the actors that actually can have sex, and you don't need to write the whole framework for it yourself. I don't know if it's useable for your purposes, but worth looking into.

 

Link to comment

I've never used it. To me it always sounded like an excellent way to create a super buggy mod :) Skyrim can barely manage to properly load its mods during normal start, I wouldn't trust it to hotload anything reliably.

 

I would use for validating my script syntax sometimes it compiles but doesn't do what I intended. It would save time if I didn't need to restart the game for each check. Maybe I get over this need once I'm bit more fluent in paryrus.

 

I mean... when you write something... you just know it's going to work?

 

Wow I had too many beers, better not to code anything tonight.

 

OK sober now... but too late to do anything useful, but I have one question: 

 

Form types:

43 is NPC

62 is Character

 

What is the difference?

 

Next thing I need to do is to allow MCM to pick target.

Link to comment

 

I've never used it. To me it always sounded like an excellent way to create a super buggy mod :) Skyrim can barely manage to properly load its mods during normal start, I wouldn't trust it to hotload anything reliably.

 

I would use for validating my script syntax sometimes it compiles but doesn't do what I intended. It would save time if I didn't need to restart the game for each check. Maybe I get over this need once I'm bit more fluent in paryrus.

 

I mean... when you write something... you just know it's going to work?

 

Wow I had too many beers, better not to code anything tonight.

 

OK sober now... but too late to do anything useful, but I have one question: 

 

Form types:

43 is NPC

62 is Character

 

What is the difference?

 

Next thing I need to do is to allow MCM to pick target.

 

 

Some script updates will not work on savegames even if you load normally. Typically adding properties, functions and events is fine, but if you remove any properties or functions or change the parameter types, you probably need a clean save to be able to test the changes. A way to get around that is by creating a new copy of the object the script is attached to (like a quest) and use that one in place of the old one.

 

If it compiles, it works. Doesn't mean it does exactly what I want, but it works :D I run Skyrim on an i7 with 16GB RAM from an SSD drive, so it doesn't take all that long to load it. I've been coding for a long time and since a very young age though, so I can typically make pretty large changes before I feel the need to test it.

 

I never use the numerical form type, I can't really think of a purpose for it other than some low level mod analysis tool, like TES5Edit or the CK. NPC seems obvious, my guess would be that Character is either a special type for the PC, or it might simply be a dummy form type used for the Character folder in the CK object tree. Typically you know what type of form you are loading, otherwise why load it? Simply cast the form to the object type you need and check that it isn't none. In general, at any time you cannot be 100% sure at compile time that an object is of a specific type, wrap any usage of it in a "If (myObjectMightBeNone)" block so it doesn't run if your reference is empty, and add a Trace message in the Else block if that is unexpected.

 

For the MCM target, you'll need to set up a callback. Start here. Register for the crosshair change callback, as well as for a hotkey press callback. When the crosshair ref changes, cast it to an actor type, and if it isn't none store it in a script variable. When the hotkey is pressed, send the script variable to a property on your MCM script. Then when the MCM menu is opened, that property will always contain the last target actor that the player hotkeyed.

Link to comment

OK thanks, got that. Also now have MCM with target. Can add or remove actors from 'enabled for sexlife' faction within MCM

 

Now I need to figure out what I want to do with all this new functionality!

Link to comment

I am giving everyone some boolean properties that guide their activities, all done with just one faction.

 

Faithful

Refuses consensual sex if in relationship with someone.

 

Submissive

Accepts sex propositions easier, victim role.

 

Dominant

Suggests sex easier, forces own preferences.

 

Rapist

May rape

 

Rasist

Sex with own or preferred races only

 

Sizequeen

Prefers well endowed

 

Golddigger

Prefers prestige

 

 

So I can easily add more, but I don't know what sort of things are easy to test for. For example faithful, one would need to scan all actors to know if the person in question is in relationship with someone, and since having faithful perk, would refuse sex.

 

Anyone with ideas what perks would be cool and how to test for them and these mentioned here, please come forward.

 

EDIT: GetHighestRelationshipRank

Link to comment

I am giving everyone some boolean properties that guide their activities, all done with just one faction.

 

Faithful

Refuses consensual sex if in relationship with someone

 

Submissive

Accepts sex propositions easier, victim role

 

Dominant

Suggests sex easier, forces own preferences

 

Rapist

May rape

 

Rasist

Sex with own or preferred races only

 

Sizequeen

Prefers well endowed

 

Golddigger

Prefers prestige

 

 

So I can easily add more, but I don't know what sort of things are easy to test for. For example faithful, is there any other way to know this other than scanning relationshiprank with all actors int he world... So, anyone with ideas and how to test for them, please come forward.

Some of these may overlap such as Dominant and Rapist or racist/sizequeen/golddigger with any other. Add a SizeWaif for the opposite of SizeQueen.

 

This may also need to be able to read a preset file so that people can preset the actors in their game to have the preferences they want them to have.

Link to comment

 

Some of these may overlap such as Dominant and Rapist or racist/sizequeen/golddigger with any other. Add a SizeWaif for the opposite of SizeQueen.

 

This may also need to be able to read a preset file so that people can preset the actors in their game to have the preferences they want them to have.

 

 

Presets are good idea also, but these are easily changed in the MCM too

 

Link to comment

 

Some of these may overlap such as Dominant and Rapist or racist/sizequeen/golddigger with any other. Add a SizeWaif for the opposite of SizeQueen.

 

This may also need to be able to read a preset file so that people can preset the actors in their game to have the preferences they want them to have.

 

Presets are good idea also, but these are easily changed in the MCM too

 

The problem is that I've been thinking that for people like Rolff Stone-Fist in Windhelm I'd like a preset for him as a Racist but then would also like to specify he's got minimal sexual experience and has a size 1 dick in SOS which means I may be wanting to see a presets mod that works across several other mods.

 

Been thinking about it lately, may end up writing it.

Link to comment

imo first for something like this wouldnt it be easier to basicaly combine attraction,approach and this into 1?

also plz use the new arousal as its less a load on papyrus.

presets are good just have a way to change them if the person wants.

Link to comment

imo first for something like this wouldnt it be easier to basicaly combine attraction,approach and this into 1?

also plz use the new arousal as its less a load on papyrus.

presets are good just have a way to change them if the person wants.

 

Attraction and Approach are not needed, but I am looking at their code and doing similar things. Any version of arousal is OK, updated the initial post.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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