Jump to content

How to manipulate SLA Redux values via xEdit


Recommended Posts

Posted

Hello again!

I'm not sure if this is the correct place to post this, but I've been having trouble with figuring this out.
I would like to create a Magic Effect in xEdit that modifies current player arousal by an X amount by using Sexlab Aroused Redux (I would also like if the newly modified arousal value remains locked to that value for Y amount of time, but for now all I want is to get this first part to work).

I noticed that the way to find the current player's arousal value would be via the sla_arousal faction, but I'm not sure how to proceed from here. I assume I need to create a formula in the Magic Effect that would add value X to sla_arousal, but I don't know how to do that, so if anyone could please direct me towards the right direction I would much appreciate it.

PS: I cannot use the CK for this as it's crashing constantly since the AE update...

Posted (edited)

Working with SLA and getting it to do specific things is.... problematic. Mainly because there's no direct "set arousal" method. There is also no arousal value (sort of), as it is always the result of a formula.

 

slaFrameworkScr does expose some methods you can use to affect the current arousal value of an actor:

SetActorExposure
GetActorExposure
GetActorArousal
GetActorTimeRate
SetActorTimeRate

 

Some notes for those methods:

  1. The return value for GetActorArousal is a float, despite it internally mostly using ints. The sla_arousal faction is obviously an int as well.
  2. SetActorExposure has the same precision loss problem GetActorArousal has. In this case it means you can't use it to add small increments of exposure as it will get rounded down/up/wherever.
  3. GetActorTimeRate returns a modified value, meaning if its used together with SetActorTimeRate it will yield unexpected results. Use StorageUtil.GetFloatValue on "SLAroused.TimeRate" instead.
  4. GetActorArousal is the method that internally updates an actor's arousal values (ie. faction rank etc.). Call this after changing arousal values to immediately push changes, or wait for it to naturally update.

As for locking arousal. I recall attempting to do this in the past and couldn't find a reliable way. Some notes about that:

  1. GetActorArousal does not update arousal if the actor's arousal value is locked.
  2. When arousal is locked, GetActorArousal reads the sla_arousal faction rank and always returns 0.

My workaround for locking arousal such that it works with SLAC and other mods was to have a script set the exposure and timerate values of the actor to the locked value every time it was relevant, ie. when the player was approaching.

 

Note that some of this information may be wrong. The main takeaway here is that its not a simple Set/Get; there's a lot of odd and unexpected behavior. This may however get you started.

Edited by traison
Posted

Thank you, it seems I need to get a bit more comfortable with scripting before I attempt this.

I'm not sure why when I read on the SLA post that you can modify arousal I thought it would be simple enough.

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