Jump to content

Sex Grants Experience


Recommended Posts

Posted

Sex Grants Experience

View File

Description

I use the Experience mod and decided I would like to gain some experience when engaging in sexual acts. I originally had created a simple version of this using SL Triggers, but  the file I made for it was getting difficult to maintain as I added support for more tags, and I wanted to gain exp from OStim scenes as well (I've mostly switched to using OStim for all human-only scenes and SexLab for creature ones). So this is a simple mod that grants experience whenever the player character engages in a sex scene.

 

The amount of experience granted is based on the tags (SexLab) or action types (OStim) associated with animations that are played. This is configurable in a json file. A default configuration is included for reference.

 

For SexLab I only grant exp based on the animation that was playing when the scene ended, as generally only one animation is played.

For OStim I detect every change and evaluate them separately, then take the maximum value over all actions and grant exp from that.


There is also an MCM to control a few settings.

 

MCM Settings

MCM is called "Sex Grants Experience". It contains:

 

  • Two flags indicating which of SexLab and Ostim were detected - not configurable, just informative
  • No Match EXP - A base amount of experience granted if the animation doesn't match any entries in the config file
  • Creature Multiplier - A multiplier applied to any scene involving at least one creature. Setting e.g. 0.25 results in a 25% increase in EXP from the base amount determined from the config file. Setting this to 0 results in no additional EXP
  • Per Actor Multiplier - A multiplier applied to any scene involving more than actors than the configured threshold. Setting e.g. 0.1 results in a 10% increase in EXP per actor (other than the player character) involved. So with that configuration and the default threshold of 3 a threesome would result in a 20% increase in EXP. Solo scenes or scene with just one other actor do not apply this multiplier.
    • Per Actor Threshold - How many actors are required in a scene for the per actor bonus to be applied. Setting this to 3 (the default) means only threesomes or higher apply the bonus.
    • Per Actor Behaviour - how the per actor bonus should be calculated. Three options:
      • Count all actors - in this case, assuming a threshold of 3 and multiplier of 0.1, a threesome would result in 30% more exp than a two-person scene
      • Count all actors except player - in this case, assuming a threshold of 3 and multiplier of 0.1, a threesome would result in 20% more exp than a two-person scene. This was the behaviour prior to v1.7, and is the default
      • Count actors at/above threshold - in this case, assuming a threshold of 3 and multiplier of 0.1, a threesome would result in 10% more exp than a two-person scene
  • The two multipliers are added together - so a threesome with a creature in it results in a 45% increase (0.25 + 0.1 + 0.1) with the example settings
    • As a complete example: let's say we set Blowjob to 20 exp, and perform a scene where the PC and another actor give a blowjob to a horse. Then the total exp granted will be 20 * (1 + 0.25 + 0.1 + 0.1) = 29
    • EXP is always rounded down, as the final value cannot contain a decimal
  • EXP Loss - Toggle for EXP loss system. EXP is lost if the framework decides that you were a victim in the scene, based on the usual exp calculation with an additional multiplier described below.
    • Allow Negative EXP - whether lost exp should allow going below 0 progress in the current level. Note that levels will not be lost, but if your exp is negative it may appear that you aren't gaining any until you go back above 0
    • EXP Loss Multiplier - a multiplier applied to exp when it is being lost. At 0 this eliminates exp gain instead of losing, at 1 it would cause you to lose the same amount of exp that you would have otherwise gained if you were not a victim in the scene
  • Cooldown - Toggle for whether there should be a cooldown between granting of EXP
    • Cooldown Hours - Number of hours after being granted EXP during which no more EXP will be granted
    • There is currently no UI for indicating your cooldown status. If you have the debug messages enabled and no EXP is granted as a result of being in cooldown, it will display a message of the form "No EXP granted, still under cooldown until MM/DD/YYYY HH:MM", with appropriate values filled in.
  • Require Orgasm - Toggle for whether an orgasm is required for EXP to be granted. If true, only scenes where at least one actor orgasms will grant EXP to the player. If false, all scenes will grant EXP.
  • Solo scenes grant EXP - Toggle for whether solo scenes should grant EXP. If false, only scenes involving at least two actors will result in EXP being granted.
  • And two options controlling where debug messages are displayed, if at all

 

Configuration File

The configuration file is located at SKSE/Plugins/SexExp/config.json. It is a simple key/value association, assigning a tag or action type a specific experience value. Note that it is case sensitive. There is a file included, but as an example you can write something like this:

{
    "Masturbation": 10,
    "Blowjob": 20,
    "Vaginal": 30,
    "vaginalsex": 30
}

If multiple tags / action types match, it chooses the highest value. So with this config if a scene that is tagged with both "Blowjob" and "Vaginal" is performed it will grant 30 exp. The order in the config file is irrelevant.

 

Requirements

SkyUI - for the MCM

Experience

JContainers

PapyrusUtil

SexLabFramework - if you want it to grant exp for SexLab scenes - soft requirement

OStim Standalone - if you want it to grant exp for OStim scenes - soft requirement

And all requirements of these mods

 

This has only been tested on Skyrim SE v1.5.97, because that's all I have installed. My code is all Papyrus, so it may work if all the requirements work on newer versions.


  • Submitter
  • Submitted
    09/01/2024
  • Category
  • Requirements
  • Regular Edition Compatible
    No

 

Posted (edited)

Thank you for the mod, i always wanted to get experience while fooling around 😉. 2 things though:

1) im getting 0 xp when using ostim SA

2) no MCM is showing

 

P.S. the above is on a new game.

 

 

Edit: Never mind, turns out the problem was with No.esp V 1.2 i switched to V1.0.0 and all is good. Great Mod buddy.

Edited by ikaawach
Posted
9 hours ago, ikaawach said:

Thank you for the mod, i always wanted to get experience while fooling around 😉. 2 things though:

1) im getting 0 xp when using ostim SA

2) no MCM is showing

 

P.S. the above is on a new game.

 

 

Edit: Never mind, turns out the problem was with No.esp V 1.2 i switched to V1.0.0 and all is good. Great Mod buddy.

v1.2 is what I'm using and it worked on a new game, that was how I did quite a bit of my testing - by starting a new game with an alternate start mod and immediately masturbating in the starting cell to see if that granted me xp and how much.

 

 

1 hour ago, wiffe said:

mcm not showing...
should i start new game?

It shouldn't require a new game. Can you show the output of your Documents\My Games\Skyrim Special Edition\SKSE\no-esp.log? It might be failing to attach the script for some reason.

You can also try running the console command "setStage ski_configManagerInstance 1" (without quotes) to force the game to reload any mcms that exist, maybe that will make it show up.

Posted

I have uploaded a new version which does not require "no .esp" as a dependency. It contains an esp flagged as esl in SSEEdit.

Posted

Can you make a version that raises stats instead of giving you experience?

 

Like, sex with someone with a higher Block stat than you will raise your Block by 1?

 

I'm also using Experience but I'm getting more than enough experience from reading books and discovering and clearing places. I don't want new sources of XP. I need a way to level stats without grinding. Or rather, if I have to grind, I want the grinding to be sexlab scenes 🙂

Posted
27 minutes ago, Hakuna_Matata said:

Can you make a version that raises stats instead of giving you experience?

 

Like, sex with someone with a higher Block stat than you will raise your Block by 1?

 

I'm also using Experience but I'm getting more than enough experience from reading books and discovering and clearing places. I don't want new sources of XP. I need a way to level stats without grinding. Or rather, if I have to grind, I want the grinding to be sexlab scenes 🙂

 

Sorry, but no. This mod was made for my use case, and I use Experience with Static Skill Levelling (https://www.nexusmods.com/skyrimspecialedition/mods/89940) so granting XP was all this mod was intended to do.

If you don't want to grind to increase stats that mod is also an option for you - it basically changes the levelling system to be like Fallout 3/NV: instead of skills increasing as you use them, whenever you level up you get some number of skill points that you choose to assign.

Posted
On 9/5/2024 at 11:25 AM, zeelok said:

v1.2 is what I'm using and it worked on a new game, that was how I did quite a bit of my testing - by starting a new game with an alternate start mod and immediately masturbating in the starting cell to see if that granted me xp and how much.

 

 

It shouldn't require a new game. Can you show the output of your Documents\My Games\Skyrim Special Edition\SKSE\no-esp.log? It might be failing to attach the script for some reason.

You can also try running the console command "setStage ski_configManagerInstance 1" (without quotes) to force the game to reload any mcms that exist, maybe that will make it show up.

nvm, just swapped with esp and the mod showing mcm now.. thanks for the esp version

Posted

May have found a negative interaction between this mod and either Defeat (older mod) or Death Alternative, had a CTD after sex scene with Defeat and my crashlogger indicated that the cause was Sex Experience. Not really sure what is causing the conflict but as this was a newish mod I figured I would give you a heads up. I attached the crashlog file in case it helps you identify the conflict.

2024-09-07-09-56-07.log

Posted (edited)
3 hours ago, Huntress_Forest said:

May have found a negative interaction between this mod and either Defeat (older mod) or Death Alternative, had a CTD after sex scene with Defeat and my crashlogger indicated that the cause was Sex Experience. Not really sure what is causing the conflict but as this was a newish mod I figured I would give you a heads up. I attached the crashlog file in case it helps you identify the conflict.

2024-09-07-09-56-07.log 206.45 kB · 0 downloads

It looks like it was trying to grant 52 experience when it crashed.

[RSP+30  ] 0x15F30C83A58      (char*) "player.advlevel 52"

 

Unfortunately trainwreck doesn't include an esp list (https://www.nexusmods.com/skyrimspecialedition/mods/59818 does and is the crash logger I'd recommend), so could you link me to which defeat mod exactly you are using so I can test? Or reproduce the CTD with the crash logger I linked and provide that crash log?

 

Did it work in other scenes with the Defeat mod installed?

 

I tested just now with Sexlab Defeat SSE and a scene triggered when my health hit 0 but I successfully received exp and did not crash.

 

I am seeing in your crash log that you are using Skyrim v1.6.1170, with ConsoleUtilSSE v1.4.0 - If you just installed that for this mod and didn't already have it, you could try instead https://www.nexusmods.com/skyrimspecialedition/mods/76649 which supports newer versions, looks like 1.4.0 might only work up to 1.6.640. But if you already had it and it was working fine then that isn't the issue.

Edited by zeelok
Posted
37 minutes ago, Someone92 said:

Would it be possible to add a negative Exp gain when you are the victim of non-con sex, or does negative Exp break Experience?

I could possibly add an option for that, yes - both OStim and SexLab have functions to check if the player is a victim in the playing scene. I'm just not sure how it would be best for it to work - should it be a fixed amount of exp lost, or whatever the configuration works out to based on tags etc. lost instead of gained, possibly with a multiplier (e.g. only lose 50% of the xp you would have gained if it was consensual - configurable in the MCM of course)?

 

Negative exp works a little weird if you are near the start of a new level - say if you are level 10 and have gained 20 exp, then lost 50 exp, it still counts you as level 10 but with -30 exp so the next 30 exp you gain it will look like nothing is being gained (the bar will stay as empty). I could potentially clamp the exp loss so you can't lose more than your progress in your current level (reduce it to 20 lost in this scenario) so that this doesn't happen.

Posted
1 hour ago, zeelok said:

It looks like it was trying to grant 52 experience when it crashed.

[RSP+30  ] 0x15F30C83A58      (char*) "player.advlevel 52"

 

Unfortunately trainwreck doesn't include an esp list (https://www.nexusmods.com/skyrimspecialedition/mods/59818 does and is the crash logger I'd recommend), so could you link me to which defeat mod exactly you are using so I can test? Or reproduce the CTD with the crash logger I linked and provide that crash log?

 

Did it work in other scenes with the Defeat mod installed?

 

I tested just now with Sexlab Defeat SSE and a scene triggered when my health hit 0 but I successfully received exp and did not crash.

 

I am seeing in your crash log that you are using Skyrim v1.6.1170, with ConsoleUtilSSE v1.4.0 - If you just installed that for this mod and didn't already have it, you could try instead https://www.nexusmods.com/skyrimspecialedition/mods/76649 which supports newer versions, looks like 1.4.0 might only work up to 1.6.640. But if you already had it and it was working fine then that isn't the issue.

I had noticed that but the linked requirements didn't have a newer version so I kinda just ignored it thinking that it might not be important (I have a rather large amount of older mods not designed for the current game version that still work so I tend to accept that some just aren't updated but still work).

The Linked ConsoleUtilSSE NG worked to fix the issue.

Posted
8 minutes ago, Huntress_Forest said:

I had noticed that but the linked requirements didn't have a newer version so I kinda just ignored it thinking that it might not be important (I have a rather large amount of older mods not designed for the current game version that still work so I tend to accept that some just aren't updated but still work).

The Linked ConsoleUtilSSE NG worked to fix the issue.

 

I'm glad that fixed it.

 

Since my previous response I actually realized that the Experience mod has its own API to grant experience so I don't need ConssoleUtilSSE at all - it was an artifact of when I was doing this using SL Triggers and console commands were the only way I could grant exp from there so I copied that into this mod. But using the actual API is better, and now there is a new version uploaded without that dependency.

Posted
11 minutes ago, crajjjj said:

Another idea is to connect sexlab levels to experience via multipliers. Kinda - the more you fuck - the less experience you get.

 

If you mean the various proficencies in the sex diary page of the SexLab MCM, then I don't think I'm going to implement that. OStim doesn't have levels like that, and ideally I'd like to try and treat both frameworks the same. Currently the only difference is that the creature bonus is only obtainable in SexLab because OStim doesn't support creature animations. I'd rather not add more divergence between the handling of the two frameworks.

Posted
13 hours ago, zeelok said:

I'm just not sure how it would be best for it to work - should it be a fixed amount of exp lost, or whatever the configuration works out to based on tags etc. lost instead of gained, possibly with a multiplier (e.g. only lose 50% of the xp you would have gained if it was consensual - configurable in the MCM of course)?

A multiple of the Exp you would gain if the act had been consensual makes the most sense.

An option in the ini file to set the multiplier, like you can set it anywhere between 0.0 to 10.0.

Personally I would set it to 2.

 

13 hours ago, zeelok said:

Negative exp works a little weird if you are near the start of a new level - say if you are level 10 and have gained 20 exp, then lost 50 exp, it still counts you as level 10 but with -30 exp so the next 30 exp you gain it will look like nothing is being gained (the bar will stay as empty). I could potentially clamp the exp loss so you can't lose more than your progress in your current level (reduce it to 20 lost in this scenario) so that this doesn't happen.

Being able to lose a level would be way out of scope for this mod, right?

You would need to keep track of where the player invested their perks and remove them upon losing a level.

 

Maybe a toggle to be able to go into negative Exp?

Posted
1 hour ago, Someone92 said:

A multiple of the Exp you would gain if the act had been consensual makes the most sense.

An option in the ini file to set the multiplier, like you can set it anywhere between 0.0 to 10.0.

Personally I would set it to 2.

 

Adding a toggle to control whether there is exp loss when being a victim and a slider for a multiplier makes sense.

 

1 hour ago, Someone92 said:

Being able to lose a level would be way out of scope for this mod, right?

You would need to keep track of where the player invested their perks and remove them upon losing a level.

 

Maybe a toggle to be able to go into negative Exp?

Yeah, being able to actually lose a level isn't really feasible here - too many cases to consider. It's not just the perk(s), I'd also need to know which of the three attributes they invested in, and in the case of the Static Skill Levelling mod that I use I'd need to track the investment in every skill to reduce them, just too much. Also, actually losing a level without losing skills is almost a benefit - you'd stay effectively the same strength, but levelled enemies may get slightly weaker.

 

I will start work on adding an exp loss feature.

Posted

I have uploaded a new version that supports losing EXP when the player character is a victim in a non-consensual scene.

Posted

There is an issue with the newest update. 

 

The exp gain doesn't seem to work for me.

I had it running, went through a scene

but no exp was given.

 

When I checked the debug in console it was adding up the exp just fine but when it came to stating the total exp the value was always 0.

Before that it would add it normally saying something like the exp for anal scene was 40 and the negative exp was -0 (I have negative exp turned off),

but the total exp value dished out in the debug console was always 0.

Posted
2 hours ago, Log9931 said:

There is an issue with the newest update. 

 

The exp gain doesn't seem to work for me.

I had it running, went through a scene

but no exp was given.

 

When I checked the debug in console it was adding up the exp just fine but when it came to stating the total exp the value was always 0.

Before that it would add it normally saying something like the exp for anal scene was 40 and the negative exp was -0 (I have negative exp turned off),

but the total exp value dished out in the debug console was always 0.

Yeah, this was broken. I did some refactoring and removed a check for the EXP loss checkbox in one place meaning to add it in another (to check it in a common spot rather than in both the SexLab and OStim code), but then didn't add it so it wasn't checked anywhere - I just apparently hadn't tested a victim scene with exp loss turned off after making that change.

 

41 minutes ago, Someone92 said:

No Match Exp does not seem to be working. Tried to set it to 1, but it did not accept that.

Set Exp gain in the config to 1-3 in case that makes a difference.

This has apparently always been broken, because of a typo in my code.

 

I've uploaded a new version that should fix both of these issues.

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...