08-03-2026, 09:25 AM
(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: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:
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
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},
]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

