Jump to content

Electro stimulation with Skyrim


Recommended Posts

EDIT: I've created it, with an awful lot of help from everyone here, thank you!

_____________________________________________________________________________________________


Heya

Im opening this topic to hopefully start a conversation on E-stim and get some modders interested in making magic happen. ☺️
I might attempt to learn modding, but someone knowledgeable joining me could vastly increase the chances that something fruitful comes out of this.

What is estim?  
A device connected to the computer receives special sound files and converts them to pleasurable (or painful) signals. Electrodes  such as pads and plugs in/on your fun parts stimulate with stroking/squeezing buzzing feelings causing muscle contractions. It can get very intense and result in an orgasm but tease and denial, tormenting and pain are also possible depending on the sound file.

Whats the big idea? 
To feel what my character feels basically. Sex scenes could be done in this way but my main insterest for starters is (Skyrim SE) devious plugs, and frequent game events such as taking damage, casting spells etc. In order to turn gameplay into a masturbation session , some kind of stimulation would have to be going on a lot of the time. Stimulation for walking/running/sprinting with a plug might be an important part to achieve this.

What needs to be done?
I mean , i'd start with the simplest thing, a 'zap' when taking damage, it needs to happen on a separate audio channel from the game sounds. An option menu would be integral, because there are different types of devices (and electrode placements) and calibrating them to the proper signal strenght at the beginning is important. A calibrating sound must be available to adjust the volume to it. From here, its basically a question of how much can we bloat it with content to make it enjoyable for a variety of people and adding options to toggle these things (stimulation when fighting/ moving / having sex, mod integrations, toggle and calibrate pain etc etc.

Im certain that if there was a modder who stims this thing would already be a reality. Buying a device can get expensive but building your own is less so. So if anyone is interested in this topic ask away. Ill eventually get to making a fresh install of SE sometime this week and start out on some basic tutorials with modding. So ill probably have lots of questions, hope some of you can help me out.

Cheers,
Saky

Link to comment

It appears that easily your biggest problem is going to be getting that separate audio channel working. I don't know everything about modding but when I imagine what this would take, that's the spookiest part.

 

My amateur opinion is that more than modding tutorials you probably want to study something like SkyUI or SKSE or PapyrusUtil, and see how they work to change or add to the more hard-coded parts of the game.

 

Edit: For example, PapyrusUtil can modify JSON files - functionality that isn't present in the Creation Kit without it, so that could be worth studying. I believe it uses a dll file somewhere in the process.

Link to comment
23 hours ago, Visio Diaboli said:

It appears that easily your biggest problem is going to be getting that separate audio channel working. I don't know everything about modding but when I imagine what this would take, that's the spookiest part.

 


Is it possible to make a mod communicate with an app, are there examples of this?
A background app that can play the soundfiles when instructed. In win10 sound settings a separate output can be selected for each app.

Link to comment
45 minutes ago, Sakyazel said:


Is it possible to make a mod communicate with an app, are there examples of this?
A background app that can play the soundfiles when instructed. In win10 sound settings a separate output can be selected for each app.

 

That seems like the closest example to what you're trying to do. Looks like the mod author created their own program to run simultaneously with Skyrim, which watches for in-game events and tells the controller to rumble when it needs to.

 

It may be a pretty steep learning curve depending on your programming knowledge, though if you could get input from the creator of that mod on how to approach it, that'd likely be an infinitely better starting point.

Link to comment

lmao

tl;dr it's possible but not easy

Spoiler

You'll definitely need a two ingredient solution for this but it should be doable.

The easy part is writing a Papyrus script which hooks up to events like OnHit and then either writes to a log or calls SKSE functions. The hard part is writing something to read the log or receive the function calls. Easiest would probably be making a standalone program which reads from the log created by the Papyrus script and then plays sounds using some sound library or premade sound effects. Alternatively you could probably also do that in a SKSE plugin. I've had some luck including other libraries in a SKSE plugin before, so it's definitely possible. Either read from log or just expose functions to Papyrus and call them directly from the script.

 

Link to comment

One important detail about Papyrus is that if a script isn't attached to something, it can't really receive events. This can mean an in-game object, but notably it can also be attached to a reference alias on a quest, that points to some object, and treats the script as though it were attached to that object.

 

So probably what you want to do is create a quest, create a reference alias for the player in that quest (that selects a forced reference and chooses cell:any, actor:PlayerREF), and add a script to that alias -> New Script. The script should automatically extend ObjectReference, which is what you want if you're registering hits.

 

In that script you can add your onhit event (make sure you copy all the parameters the wiki has even if you don't need them for your purposes). If you want to test it you can write Debug.Notification("Player got hit"). Now the script is treated as attached to the player, so OnHit events sent to the player will call that event on your script, which should cause that notification to appear whenever you get hit ingame.

 

In the future you could set up that script to receive more events, like ones sent by DD, theoretically containing the scope of your Creation Kit work to one Script.

 

Edit: And yes you'll probably want to eventually use debug logging if you go the route that the controller vibrator mod did. Personally I think it might be easier to try including new functions in Papyrus rather than that, but I couldn't say for certain.

 

Edit 2: Skyrim's Papyrus is also a bit different than Fallout's, which that article is intended for. If you were to use debug logs you'd probably be looking at Debug.Trace(): https://www.creationkit.com/index.php?title=Trace_-_Debug

Link to comment
On 3/4/2021 at 7:35 PM, Visio Diaboli said:

 


Thank you! When I read it yesterday I didnt realize how specific you were so I wasted - iwontadmithowmuch- time trying things today before returning to your post. Now we have userlog printing "ouch" every time I get hit. Next up the impossible task...

Link to comment

Programming is more than half ready. Ill need to complicate it a bit but it knows the basics already.
-on/off button (so it starts off and no suprise signals if the game is already running)
-can play the file which the log prints
-can adjust the volume based on log

-calibration signal (placeholder beep sound)

 

I still need to create the actual sounds and figure out how ill want the scripts. 
 

skstimlook.png

Link to comment

required (...)+ loop did not match anything at input 'angle'
No output generated for SkStimAlias, compilation failed.
 

Function checkDirection()
    float angle = ObjectReference.GetHeadingAngle(akAggressor)
    If angle <= 90
        return "Front"
        Debug.TraceUser("SkStimLog", "front")
    Else angle > 90 
        return "Back"
        Debug.TraceUser("SkStimLog", "back")
    Endif
EndFunction


this is the referenceAlias script and i put this function after the onhit event, also tried putting it inside the event.. doesnt help.
my goal is to print a single line to the user log made of 2 parts(for now) (akSource.getname() + checkDirection)
checkDirection is supposed to be a string value either front or back based on where the hit came from relative to where the player is facing.
Pls help :)

Link to comment
17 minutes ago, Sakyazel said:

required (...)+ loop did not match anything at input 'angle'
No output generated for SkStimAlias, compilation failed.
 



Function checkDirection()
    float angle = ObjectReference.GetHeadingAngle(akAggressor)
    If angle <= 90
        return "Front"
        Debug.TraceUser("SkStimLog", "front")
    Else angle > 90 
        return "Back"
        Debug.TraceUser("SkStimLog", "back")
    Endif
EndFunction


this is the referenceAlias script and i put this function after the onhit event, also tried putting it inside the event.. doesnt help.
my goal is to print a single line to the user log made of 2 parts(for now) (akSource.getname() + checkDirection)
checkDirection is supposed to be a string value either front or back based on where the hit came from relative to where the player is facing.
Pls help :)

The function needs 'String' before 'Function' to tell the compiler to return a string.

Link to comment

You'll probably want something like

 

event OnHit(<forgot all the parameters>)

     Debug.Trace(akAgressor.GetLeveledActorBase().GetName() + ", " + checkDirection(akAgressor))

endEvent

 

String function checkDirection(actor aggressor)

     <identical to your function except no traces performed here and using aggressor instead of akAgressor>

endFunction

 

Obviously tweak it to your exact needs, but the notion being that the Debug.Trace returns a combined string of the format "<agressor name>,  <result of your function>", and the function takes an actor as an argument since akAgressor is confined to the scope of the OnHit event.

Link to comment

this language just doesnt want me to learn it.

 

String Function checkDirection(ObjectReference akAggressor)
    float angle =PlayerRef.GetHeadingAngle(akAggressor)
    Debug.Notification(angle)


this always returns 0.00000

also MiscUtil WriteToFile doesnt add timestamps even on true (it would make each line unique and that is important)

 

; Write string to file.
bool function WriteToFile(string fileName, string text, bool append = true, bool timestamp = false) global native

 

and I cant break it to new lines with "/n" at the end. it simply prints all iterations in a single line, /n -appears in the txt. Except sometimes when it feels like working but i couldnt find what is different....

im asking for help for every line at this point :(

Link to comment
Spoiler

 

Scriptname SKStimAlias extends ReferenceAlias  

ObjectReference Property PlayerRef Auto

event OnPlayerLoadGame()
    (GetOwningQuest() as SkStim).RegModEvents()
endEvent

int vol = 80

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)

      if abHitBlocked == true 
        vol = vol - 66
      endif

    if abPowerAttack == true 
       vol = vol +6
      endif

    MiscUtil.WriteToFile("data/SkStim/stimLog.txt","wep:" +akSource.GetName()+ "," +checkDirection(akAggressor)+ "," +vol+ "/n", true, true)
    ;Debug.TraceUser("SkStimLog", "ouch" +akSource.GetName()+ ","  +checkDirection(akAggressor))

    ;Debug.Notification("Player got hit "+vol)
      vol = 80
EndEvent


String Function checkDirection(ObjectReference akAggressor)
    float angle =PlayerRef.GetHeadingAngle(akAggressor)
    Debug.Notification(angle)
    If angle < 90.0 && angle > -90.0
           return "Front"
     Else
          return "Back"
     Endif
EndFunction

 

 

Link to comment

I need to hook into DD. Like really hook into it. Really deep.

I found this in zadEventVibrate.psc:
 

bool Function HasKeywords(actor akActor)
    return (libs.ActorHasKeyword(akActor, libs.zad_EffectVibratingRandom) || libs.ActorHasKeyword(akActor, libs.zad_EffectVibratingVeryStrong) || libs.ActorHasKeyword(akActor, libs.zad_EffectVibratingStrong) 
|| libs.ActorHasKeyword(akActor, libs.zad_EffectVibrating) || libs.ActorHasKeyword(akActor, libs.zad_EffectVibratingWeak) 
|| libs.ActorHasKeyword(akActor, libs.zad_EffectVibratingVeryWeak))
EndFunction


what does it take for me to be able to use these in my own script? i hope registering for some mod events would be enough, because the stuff i need are across many different scripts. for example the chaos plug has a 25% chance to shock (and its own script file). is it possible to make my mod react to playernotifications and which sounds DD plays? that might be the most straight forward since strong vibrations have 2 different sound files with completely different rhythms (just like all strenghts are different rhytms) .  Mr.privates script already registered for vibrationeffect start, and it send a notification to the app. if i could expand his event to check for vibration strenght (even better the specific sound it plays) that would be great. and whenever a shock happens (sometimes just a shock event sometimes at the end of vibration ) id like to notify my app of that too. Id like to ask for your input what is the most straightforward way of getting this done before i waste any more time trying to look for some event i could register or trying to extend ddscripts and importing them or idk...

Link to comment

To use the keywords and everything you can define a property "zadLibs property libs Auto", then go into your properties menu and set it to zadQuest. Essentially the way Creation Kit approaches object-oriented is that most uniquely named scripts (i.e. the zadLibs script) are a class, and then the forms they're attached to (the quest that you chose in the properties menu) are the "instances" of the class (though not strictly because they also do all the things their normal form type would do as well). So Papyrus won't complain if you have a property that isn't of a non-native type, as long as you have the script of that name installed.

 

You're correct that events are the key to doing this, since you need your mod to react to something another mod could do at any time. I'm assuming DD determines the sound to play internally, and then sends a mod event when it does. It'll be fairly impossible to monitor the DD scripts, so your best bet is registering for vibration events, and extracting either the sound or keyword from them each time they occur.

 

Registering for the mod event is fairly simple, but you need to know what parameters DD is passing into the event (if it passes a keyword or if there's a way to figure out which sound file it's playing based on the parameters of the mod event). Interfacing with DD isn't my specialty - I tried to figure it out but failed pretty miserably. What I would do is ask one of the DD team members about it, since they'll know the most about it by far. Specifically about whether a mod event is sent for shocks, whether a mod event is sent for vibrations, and what parameters those events take.

Link to comment
  • 2 weeks later...

Quick update, my enemy at this stage is signal generation. I want to do an initial release, 0.1 if I ever finish the signals. But probably the only way thats happening is me giving up on getting the exact feelings Im looking for, seems near impossible. But this is something I should go on about in the estim community. :)
In the first version there will be 1 signal for each pattern of vibration in DD (6), 1 for several DD events (like tripping, getting mana/stamina/health drained, receiving electric shock ofcourse etc.etc. Some of these will have painful versions. Jumping ,walking, sitting and riding a horse  (when plugged) has 1-2 signals each. Movement and vibrations are mostly ready so far. The mod also takes into account wether its front or anal stimulation (with plugs, sex and combat too), piercings just make the stim marginally stronger. For combat I planned to have 2for each weapon , pain and no pain version, I might end up making more generic signals first (piercing,blunt,magic dmg or something...) . It is possible to create hundreds of distinct feelings but this too have to be mastered and its my first time just like scripting was. The big issue is sex animations and this is something the vibratins mod havent dealt with yet either. There are hundreds of unique animations with plenty of stages. Both vibrations or in my case stimming would need to be matched to rhythm to make it real fun. Well for the initials release sex wont be matching, it would take a year even if i knew what im doing. But i will try approximate it better later on, faster signals will appear in later stages thats all for first release.
I stuck with tri-phase signals for now (testing with cockhead-buttcommon-lower back) combo , because I expect it will be easy to make the same signals work well for normal stereo. Tri phase is often favored for the complex feelings it can create with interference. But in our case plain stereo might end up being more interesting because it can provide front only or back only stimulation.
There are minor issues like the game not reporting on every event in every situation (cursed loot related, not integrated yet but i cant imagine playing without that mod) I might or might not do something about it until 0.1 .

Saky off

Link to comment
  • 2 weeks later...

If anyone is interested in testing SkStim message me.

   + im desparately looking for people who might want to fiddle around with the sound files... change them to fit their device / make new ones, balance them etc.
Both SE and LE works, the important requirement is devious devices and ofcourse having an ESTIM DEVICE if you want to feel things not just listen to beeping sounds:
(I have a simple DIY-stereo with a single knob ,not this beast in the picture but it works just as well for this)


 

device.jpg

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