Jump to content

[For modders] Stats registered in the Sexlab Journal


mainfct

Recommended Posts

Posted

Sexlab 1.2 added the possibility of registering custom stats in the SL Journal. This is very useful. For instance, one can use this system to "talk" across mods that have a similar goal, without having them depend on each other in any way.

 

The main goal of this thread is to index the existing custom Journal variables. If you're planning to register a stat in the SL Journal, drop the name of the stat and a short description and I'll add it to the list in the OP. This will offer a quick reference to what's already out there.

 

So far, I've used the following code to register and sync my local value to the value in the SL journal

int Function ValidateStatInt(string statName, int localValue, int modLocValue)
if(SexLab.FindStat(statName) == -1)
        int value = localValue + modLocValue
SexLab.RegisterStat(statName, value as string) 
        return value
else
return SexLab.AdjustBy(statName, modLocValue)
endif
endFunction 

which is called as in the following example for a local global variable

aGlobalVarName.SetValue(ValidateStatInt("Stat Name", aGlobalVarName.GetValueInt(), Increment))

This way, if the stat wasn't registered prior to the call, it is set to the local value plus the increment. If the stat exists, it is incremented and the new local value is set to the value in the journal. The only problem occurs if another mod as already registered the stat and a second mod (with a non zero local value) attempts to register and increment the stat as well. In this case, the local value in the second mod is lost and then synchronized to the Journal value. This shouldn't be a problem on a new game. 

 

Any idea on a better implementation of the previous synchronization code?

 

---------------- LIST OF JOURNAL VARIABLES --------------------------

Mod Name: Radiant Prostitution v0.8

 

  "Client Count" : The number of times (individual sex act) NPC have paid the player for sex

  "Times As Client" : The number of times the player has paid for sex

-----------------------------------------------------------------------------------

 

I'm also open to suggestion regarding these stats name or usage.

Posted

In SexLab Solutions there are several places where you can skip paying money to solve a quest by offering sex. This would also be prostitution, so I hope it's alright if I also add a link to that stat in a future release.This would then replace my current plan of a sluttiness stat.. 

Posted

I see. It could be something like "Times using sex bribes" and "Times accepting sex reward" or something like that. I could imagine these being used in a mod that tracks the player's fame/infamy.

  • 2 weeks later...
Posted

Here are my suggestions:

 

  • As Whore: Total times you had sex when you worked as a whore
  • As Slave: Total times you had sex while being enslaved
  • As Slaver: Total times you had sex with slaves (yours or others)
  • As Client: Total times you paid for sex

 

Still there is a question how this would be handled with translations. From what I've seen, the stat name itself appears in the SexLab journal. That means, it can not easily be translated except using the $this_string_to_translate notation which still doesnt solve the core problem itself.

Posted

In SexLab Solutions there are several places where you can skip paying money to solve a quest by offering sex. This would also be prostitution, so I hope it's alright if I also add a link to that stat in a future release.This would then replace my current plan of a sluttiness stat.. 

 

Sexlab already has a purity stat. You could use that.

Archived

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

  • Recently Browsing   0 members

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