Skip to content

For modders

mskynetll edited this page Feb 7, 2016 · 14 revisions

This is API reference for modders.

Here you will see detailed events information and information on how to access the stat values

Stat values

The stats can be read with the following keys by using StorageUtil script from PapyrusUtil library

They key names I believe are self-explanatory. Note that those keys are read only, for modification of the attributes there are two events that can be sent to Devious Attributes using ModEvent script. More details about this in the "Events - in" section.

String Property SoulStateAttributeId = "_Datt_Soul_State" AutoReadonly Hidden

;attribute value keys for StorageUtil
String Property PrideAttributeId = "_Datt_Pride" AutoReadonly Hidden
String Property SelfEsteemAttributeId = "_Datt_SelfEsteem" AutoReadonly Hidden
String Property WillpowerAttributeId = "_Datt_Willpower" AutoReadonly Hidden
String Property ObedienceAttributeId = "_Datt_Obedience" AutoReadonly Hidden
String Property SubmissivenessAttributeId = "_Datt_Submissiveness" AutoReadonly Hidden

;fetish value keys for StorageUtil
String Property HumiliationLoverAttributeId = "_Datt_HumiliationLover" AutoReadonly Hidden
String Property ExhibitionistAttributeId = "_Datt_Exhibitionist" AutoReadonly Hidden
String Property MasochistAttributeId = "_Datt_Masochist" AutoReadonly Hidden
String Property NymphomaniacAttributeId = "_Datt_Nymphomaniac" AutoReadonly Hidden

Events - in

  • Event name : "Datt_SetAttribute"
    This event will set value of specified attribute
    The event expects two parameters -> string (StorgateUtil attribute key defined above) and float (new attribute value) and can be sent using ModEvent script
  • Event name : "Datt_ModAttribute"
    (implemented, but not posted on releases yet) This event will mod (increase/decrease) specified attribute
    The event expects two parameters -> string (StorgateUtil attribute key defined above) and float (new attribute value) and can be sent using ModEvent script

Events - out

Devious Attributes fires several events as notifications for changes.

  • Event name : "Datt_AttributeChanged"

This event fires whenever any attribute is changed by Devious Attributes. Event parameters : Form actor, string attributeKey, float value For the reference, the code that sends this event:

If (attributeChangedEventId)
  ModEvent.PushForm(attributeChangedEventId, akActor) 
  ModEvent.PushString(attributeChangedEventId, attributeId)
  ModEvent.PushFloat(attributeChangedEventId, valueToSet)
  ModEvent.Send(attributeChangedEventId)
EndIf

The actor parameter, for now will be player reference

  • Event name : "Datt_FetishChanged"

This event fires whenever any fetish value is changed by Devious Attributes. Event parameters : Form actor, string fetishKey, float value For the reference, the code that sends this event:

If (fetishChangedEventId)
  ModEvent.PushForm(fetishChangedEventId, akActor) 
  ModEvent.PushString(fetishChangedEventId, fetishAttributeId)
  ModEvent.PushFloat(fetishChangedEventId, value)
  ModEvent.Send(fetishChangedEventId)
EndIf

The actor parameter, for now will be player reference

  • Event name : "Datt_SoulStateChanged"

This event fires whenever any soul state value is changed by Devious Attributes. Event parameters : Form actor, float value For the reference, the code that sends this event:

If(soulStateChangedEventId)
  ModEvent.PushForm(soulStateChangedEventId, akActor)
  ModEvent.PushInt(soulStateChangedEventId, value)
  ModEvent.Send(soulStateChangedEventId)
EndIf

Soul states, are defined as follows

Int Property State_FreeSpirit = 0 AutoReadonly Hidden
Int Property State_WillingSlave = 1 AutoReadonly Hidden
Int Property State_ForcedSlave = 2 AutoReadonly Hidden

Sending player decisions

We will start with the enumeration:

player response types

  • -2 -> Strongly refuse
  • -1 -> Meekly refuse
  • 0 -> Neutral
  • 1 -> Agreed, but not eagerly
  • 2 -> Enthusiastic

decision types

  • 0 -> regular master command (i.e "fetch me some food!")
  • 1 -> humiliating
  • 2 -> painful
  • 3 -> exhibitionist
  • 4 -> sex

There are four events - Datt_PlayerDecision1, Datt_PlayerDecision2, Datt_PlayerDecision3, Datt_PlayerDecision4 for sending multiple decision types in one "player decision" request. So, If a request is both humiliating and is sex related, and player meekly refused, sending the decision can look like:

int decisionEventId = ModEvent.Create("Datt_PlayerDecision2")
ModEvent.PushInt(decisionEventId, -1)
ModEvent.PushInt(decisionEventId, 1)
ModEvent.PushInt(decisionEventId, 4)
ModEvent.Send(decisionEventId)

If there is a need to send player decisions with extra decrease/increase to pride/self-esteem, there are four events for this as well

String Property PlayerDecisionWithExtraEventName1 = "Datt_PlayerDecision1WithExtra" AutoReadonly Hidden
String Property PlayerDecisionWithExtraEventName2 = "Datt_PlayerDecision2WithExtra" AutoReadonly Hidden
String Property PlayerDecisionWithExtraEventName3 = "Datt_PlayerDecision3WithExtra" AutoReadonly Hidden
String Property PlayerDecisionWithExtraEventName4 = "Datt_PlayerDecision4WithExtra" AutoReadonly Hidden

The principle here is the same like with Datt_PlayerDecision[num] events, except that the Datt_PlayerDecision[num]WithExtra events will take two additional int parameters, that represent extra change in pride and self-esteem.

So, if a request is both humiliating and is sex related, player meekly refused, and there is extra decrease to both pride and self-esteem, the event can be sent like this:

int decisionEventId = ModEvent.Create("Datt_PlayerDecision2WithExtra")
ModEvent.PushInt(decisionEventId, -1) ;player response type - meek refusal
ModEvent.PushInt(decisionEventId, 1) ;decision type - humiliating
ModEvent.PushInt(decisionEventId, 4) ;decision type - sex related
ModEvent.PushInt(decisionEventId, -15) ;extra decrease in pride
ModEvent.PushInt(decisionEventId, -20) ;extra decrease in self-esteem
ModEvent.Send(decisionEventId)