Xtoys integration
#1
I posted an Intiface Integration mod&box a few days back, and I'm back with it's counterpart for Xtoys. This might be interesting for people interested in using some kind of shock features as well as using toys that aren't cooperating with intiface, as Xtoys allows for quite wider selection of toys. 
But it comes at a cost of being a bit more complicated.

If you'd like to read about patterns configuration, please refer to the intiface integration mentioned earlier. 


.zip   Xtoys_Integration.zip (Size: 8.88 KB / Downloads: 37)

To get it to work you need to make a box scene filter and use either one of boxes - there's separate boxes for vibe(vibration) and shock(e-stim).
Then, use a xtoys proxy mod in mods section.

On Xtoys page you need to create a private webhook. It's in your profile config, in private webhook section.
Generate one and paste it in both webhook lines (or whichever you'll be using). 
You should be able to click connect and read 'connected' status both right under the webhook section and on bottom of the mod window.

Now, you need to configure a routing scripts for your toys. There are two .json files for both kind of effects - you can paste them into script creator: 
1. Open script creator (scripts, right bottom corner "+)
2. Click triple dot in right up corner, then import/export
3. Paste content and save code
4. Save script 

When that's done, you should be able to add them to your dashboard (load them) and then add your toys, link them to the script (a power plug icon) and turn script on (play button)
Fire a test button and you should feel effects on you skin Smile

Enjoy!
  Reply
#2
I have gotten the connection, but now I can't figure out what to do with the lines below to change the settings. There is currently no shock and it just pings Xtoys a bunch:

const STEP_DURATION = 0.05

# Shock patterns: zap | burst | stutter_shock
# Keep intensities conservative - test from 0.05 upward.
const STAGES = [
{\"pattern\": \"zap\", \"intensity\": 0.10, \"on\": 1.0, \"off\": 4.0, \"repeat\": 3},
{\"pattern\": \"burst\", \"intensity\": 0.15, \"on\": 1.2, \"off\": 3.0, \"repeat\": 3},
{\"pattern\": \"stutter_shock\", \"intensity\": 0.20, \"on\": 1.5, \"off\": 2.5, \"repeat\": 0},
]
# -

var _proxy = null
var _current_stage = 0
var _cycles_in_stage = 0

var _steps = []
var _step_time = 0.0
var _prev_step_idx = -1
var _in_off = false
var _off_timer = 0.0
var _retry_timer = 0.0
  Reply
#3
(07-31-2026, 05:02 PM)velrbin Wrote: I have gotten the connection, but now I can't figure out what to do with the lines below to change the settings. There is currently no shock and it just pings Xtoys a bunch:

const STEP_DURATION = 0.05

# Shock patterns: zap | burst | stutter_shock
# Keep intensities conservative - test from 0.05 upward.
const STAGES = [
{\"pattern\": \"zap\",          \"intensity\": 0.10, \"on\": 1.0, \"off\": 4.0, \"repeat\": 3},
{\"pattern\": \"burst\",        \"intensity\": 0.15, \"on\": 1.2, \"off\": 3.0, \"repeat\": 3},
{\"pattern\": \"stutter_shock\", \"intensity\": 0.20, \"on\": 1.5, \"off\": 2.5, \"repeat\": 0},
]
# -

var _proxy          = null
var _current_stage  = 0
var _cycles_in_stage = 0

var _steps        = []
var _step_time    = 0.0
var _prev_step_idx = -1
var _in_off        = false
var _off_timer    = 0.0
var _retry_timer  = 0.0
If you got no shock at all in xtoys i'd rather try and search for an error in connection - there's a test shock button in mod's settings, you should at least see an impulse in the settings of your toy in xtoys. If you don't see anything, make sure that:
1. you have a Xtoys HS shock script imported into xtoys, enabled and connected to e-stim toy
2.you have a box scene with xtoys_shock.box set up and enabled

If connection is ok, you should be getting any impulse on the toys timeline on firing test button
to change the settings you only need to change that section:
Code:
const STAGES = [
{\"pattern\": \"zap\",          \"intensity\": 0.10, \"on\": 1.0, \"off\": 4.0, \"repeat\": 3},
{\"pattern\": \"burst\",        \"intensity\": 0.15, \"on\": 1.2, \"off\": 3.0, \"repeat\": 3},
{\"pattern\": \"stutter_shock\", \"intensity\": 0.20, \"on\": 1.5, \"off\": 2.5, \"repeat\": 0},
]
There's quick guide as what all these mean:
Pattern stands for some kind of predefined behaviour - these are hardcoded at the bottom but i'd advise against modyfig theese presets unless you know what you're doing.
Intensity is max strength of shock, but it can be modified by patterns' settings - i believe the burst sends out 3 increasing zaps like 60-80-100% of max intensity 
on/off are for setting a length of pulse - a pattern can be stretched or compressed based on the time you put as a "on" value. off time is a required pause between on pulses. It is supposed to block any new detections from firing until the 'off; time ends. Each pattern has some predefined lenght - it is the 'on' time here (you can change it and make it proportionaly shorter or longer). off time is added additional break before next pattern get's fired
Repeat is amount of times a pattern has to repeat until it switches to the next one. Type 0 for never progressing beyond that one.

Hope that will help, I'll try and help you further if that'd be needed
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)