VParamix

Inspector

Complete reference for editable controls and selectors in the VParamix Lua Script editor.

The Inspector turns annotated local literals into controls beside the Lua editor. Changing a control rewrites that literal in the script and marks the script as modified. The annotation does not add a runtime API: the variable remains an ordinary Lua local.

Basic syntax

Place an @inspect line immediately before one local literal assignment. There must be no blank or code line between them.

-- @inspect
local enabled = true

The assignment must have this shape:

local name = literal

Leading whitespace and a trailing line comment are allowed. The literal must be one finite number, true, false, or a single- or double-quoted string. Expressions, function calls, tables, nil, multiple assignments, and assignments without local are not supported.

Control types

Without a type hint, the Inspector infers the control from the literal.

Number

-- @inspect number min=0 max=2 step=0.01
local gain = 1.00

The Inspector shows a numeric drag control.

OptionRequirementBehavior
numberThe literal must be numeric.Explicitly selects a number control.
min=<number>Finite; no greater than max when both exist.Clamps edits to the lower bound.
max=<number>Finite; no lower than min when both exist.Clamps edits to the upper bound.
step=<number>Finite and greater than zero.Controls drag speed and retained decimal precision. It does not force values onto a step grid.

When step is omitted, the editor uses a drag speed of 0.1. Written numbers keep the literal's existing decimal precision where possible and use at most six decimal places.

Boolean

-- @inspect bool
local enabled = true

The Inspector shows a checkbox. The bool hint is optional when the literal is true or false.

String

-- @inspect string
local label = "Idle"

The Inspector shows a single-line text field. The string hint is optional for a quoted literal. Inspector edits write a double-quoted Lua string and escape backslashes, quotes, newlines, carriage returns, and tabs.

An explicit number, bool, or string hint must match the following literal type.

Source selectors

Use source=<scope> with a string literal to replace the text field with a selector:

-- @inspect source=audio
local input_name = "MicVolume"

The selector writes the selected parameter or ID into the string literal. Source availability affects live values, not the list of known parameter names.

Regular source scopes

ScopeOptions
timeTime and calendar parameters.
midiMIDI parameters.
hardwareHardware telemetry parameters.
gamepadGamepad parameters.
lolLeague of Legends parameters.
counter_strikeCounter-Strike 2 parameters.
dota2Dota 2 parameters.
mouseMouse parameters.
ios_trackingFace-tracking input parameters exposed to Script selectors.
audioMicrophone and speaker parameters.
stylusStylus parameters.

Special scopes

ScopeOptions and behavior
scriptDeclared Script output parameter names.
keyboardOpens key recording. Click once to record a key or combination and again to cancel. The literal stores canonical IDs joined with +.
vtsVtsConnected, VtsModelLoaded, VtsFaceFound, VtsHotkeyEvent, and VtsAnimationEvent.
vts.hotkeySearchable VTube Studio hotkey inventory. The UI shows the hotkey name and stores its ID.
vts.modelSearchable VTube Studio model inventory. The UI shows the model name and stores its ID.

VTS inventory selectors may have no options until VParamix has received the corresponding inventory from VTube Studio. An unsupported scope shows an Unknown source scope warning and cannot edit the literal.

Complete example

local params = vparamix.params

-- @inspect source=audio
local input_name = "MicVolume"

-- @inspect number min=0 max=2 step=0.01
local gain = 1.00

-- @inspect bool
local enabled = true

-- @inspect source=keyboard
local reset_key = "Space"

local output = params.declare({
    { name = "InspectorExample", min = 0, max = 1, default = 0 },
})

function update()
    if keyboard.pressed(reset_key) then
        save("held", 0)
    end

    local value = enabled and params.get(input_name) * gain or 0
    output.set("InspectorExample", value)
end

Diagnostics and limitations

  • Field names come from the local variable name. Custom display labels are not supported.
  • Field names should be unique within a script. Duplicates remain visible but produce a diagnostic on the later declaration.
  • Invalid annotations show their source line and do not prevent other valid controls from working.
  • min, max, and step must be finite. min may equal max; step must be positive.
  • source must use the source=<scope> form and requires a quoted string literal.
  • Annotations inside long comments or long strings are ignored.
  • The Inspector edits only the recognized literal range. If the script changes and that range no longer matches, a stale control edit is ignored rather than modifying another part of the file.
  • Inspector edits are unsaved script changes. Save the script to persist them.

Last updated on

On this page