NAV Navbar
Logo
General - Audio - Ilios - Lua
lua

Introduction

Welcome to the reference documentation for Visionaire. This is a documentation for programmers discussing lua features and keeping track of advanced functions. If you're not to savy on programming you can still use the finished scripts.

Global Commands

Commands

Methods

startAction(action)
stopAction(action)
startAnimation(animation, reverse)
stopAnimation(animation)
getVolume(type)
setVolume(type, volume)
getCursorPos()
setCursorPos(pos)
createScreenshot(saveTo, flags)
registerEventHandler(eventtype, handler, flags)
unregisterEventHandler(event, handler)
registerHookFunction(hook, hookFunction)
initGameClient(clientID, clientSecret)
getGameClientStat(apiName)
setGameClientStat(apiName, value)
resetGameClientStats(resetAchievements)
getGameClientAchievement(apiName)
setGameClientAchievement(apiName, flags)
startDefaultBrowser(url)
getProperty(name)
startSound(sounditem, values)
stopSound(soundID)
getSoundId(sounditem)
getSoundProperty(soundID, property)
setSoundProperty(soundID, flags)
toggleSoundPause(soundID)
setWindowTitle(WindowTitle)
getWindowBrightness()
setWindowBrightness(Brightness)
replaceGame(vis-file)
startObjectTween(target, targetfield, from, to, duration, easing, repeat, reverse)
startTween(target, from, to, duration, easing, repeat, reverse)
setDelay(time, callback)
shaderCompile(code, fs)
shaderUniform(shader_number, name, value)
shaderSetOptions(value, id)
isPointInsidePolygon(point, polygon)
toggleWindowMode()
getWindowMode()
setWindowSize(size)
startHapticRumble(strength, length)
stopHapticRumble()
startHapticEffect(effectID)
stopHapticEffect(effectID)
createHapticEffectConstant(effectType, length, delay, level, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)
createHapticEffectPeriodic(effectType, length, delay, peroid, magnitude, offset, phase, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)
createHapticEffectCondition(effectType, length, delay, right_sat, left_sat, right_coeff, left_coeff, deadband, center)
createHapticEffectRamp(effectType, length, delay, start, end, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)
createHapticEffectLeftRight(effectType, length, large_magnitude, small_magnitude)
createEvent(event, position, threshold/sym, acceleration/mod)
getTime(reset)
getObject(path, logWarning)
createSprite(path)
sha1(tohash)
debugerror()
debugfunc()

Fields

localAppDir string
localResourcesDir string
game TVisObj
emptyObject TVisObj

DIVIDING_POINT
x -10000 y -10000

startAction(action)

startAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")

local act = getObject("Actions[action_name]")
startAction(act)

Starts an action. If the action is already running a new active action for the action data object is started.

Parameter Type Description
action TVisObj
Return Type Description
TVisObj activeAction

stopAction(action)

stopAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")

local act = getObject("Actions[action_name]")
stoptAction(act)

Stops a running action. If the action is not found (because it is not running) nothing happens.

Parameter Type Description
action TVisObj

startAnimation(animation, reverse)

startAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]")

local anim = getObject("Animations[animation_name]")
startAnimation(anim)

Starts an animation. If the animation is already running the existing animation is returned.

Parameter Type Description
animation TVisObj
reverse boolean
Return Type Description
TVisObj activeAnimation

stopAnimation(animation)

stopAnimation("Scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]")

local anim = getObject("Animations[animation_name]")
stopAnimation(anim)

Stops a running animation. If the animation is preloaded but not active or not active at all then nothing happens.

Parameter Type Description
animation TVisObj

getVolume(type)

-- is music volume over 50%?
if getVolume(eMusicVolume) > 50 then
-- do some action
end

-- is speech volume more than or equal to 80%?
if getVolume(eSpeechVolume) >= 80 then
-- do some action
end

-- is global (master) volume not equal to 50%?
if getVolume(eGlobalVolume) ~= 50 then
-- do some action
end

Returns the general volume for background music, sound or speech output.

Parameter Type Description
type int The type of volume to return: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4).

setVolume(type, volume)

setVolume(eSpeechVolume, 50)

Sets the general volume for background music, sound or speech output.

Parameter Type Description
type int The type of volume to set: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4).
volume int New value for volume. Must be between 0 and 100.

getCursorPos()

-- let's store the current position into a variable
local curPos = getCursorPos()

-- let's check if the stored cursor position equals another x,y value
if curPos.x == 200 and curPos.y == 400 then
  -- do some action
else
  -- do some other action
end

Returns the current absolute cursor position.

Return Type Description
point position Table with x and y values containing cursor position.

setCursorPos(pos)

setCursorPos({x=240,y=480})

local cPos = {x=240,y=480}
setCursorPos(cPos)

Parameter Type Description
pos point {x=int,y=int} - The position where the cursor will be set to.

createScreenshot(saveTo, flags)

-- save to "screenshots" folder as "filename.png"
createScreenshot("screenshots/filename.png")

-- add this as an execute script action inside of a key input; change filename to whatever you like

-- save to "screenshots" folder as "filename_(date)_(time).png
local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
createScreenshot("screenshots/filename_" .. time .. ".png")

createScreenshot( "", {flags=1, clear = true})

Creates a new screenshot which is either used for a savegame or stored to a file.

Parameter Type Description
saveTo string If specified the screenshot will be saved to the given path. Otherwise the screenshot will be used for the next savegame(s), as long as a new screenshot is created or the current screenshot is cleared. If a screenshot for a savegame was created before it will be overwritten by the new screenshot.
flags table If true the screenshot will be cleared. Default value is false. If the screenshot is cleared it will be generated automatically by the engine again, everytime the scene is changed from a playable scene to a menu.

registerEventHandler(eventtype, handler, flags)

function onMainLoop()
-- do something
end

registerEventHandler("mainLoop", "onMainLoop")

-- mouse event

function onMouseEvent(eventType, mousePosition)
  if eventType == eEvtMouseWheelUp or eventType == eEvtMouseWheelDown then
    -- mouse wheel was activated, do something
  end
end

registerEventHandler("mouseEvent", "onMouseEvent", {eEvtMouseMove, eEvtMouseLeftButtonDoubleClick, eEvtMouseLeftButtonDown, eEvtMouseLeftButtonUp, eEvtMouseLeftButtonHold, eEvtMouseLeftButtonHolding, eEvtMouseRightButtonDoubleClick, eEvtMouseRightButtonDown, eEvtMouseRightButtonUp, eEvtMouseMiddleButtonDown, eEvtMouseMiddleButtonUp, eEvtMouseWheelUp, eEvtMouseWheelDown})

-- key event

function keyboardHandler(eventType, character, keycode, modifiers)
  if eventType==eEvtKeyUp then
    print('key up: ' .. keycode)
    -- test for '0' with character parameter
    if character == '0' then print('0 released') end
    -- another option to test '0' key
    if keycode == 48 then print('0 released') end
  elseif eventType==eEvtKeyDown then
    print('key down: ' .. keycode)
  elseif eventType==eEvtKeyTextInput then
    -- this will also show more 'complex' unicode characters when multiple keys are used to generate a single character (e.g. Chinese characters)
    print('input: ' .. character)
  end
  if keycode == eKeyEscape then
    -- event will not be handled by engine. this means that also cutscenes can't be skipped with Escape key
    return true
  end
  return false -- key event will also be handled by engine
end

registerEventHandler("keyEvent", "keyboardHandler")

Registers an event handler function for a specific event.

The function for the events "animationStarted", "animationStopped", "textStarted" and "textStopped" should take exactly one argument which is the affected visionaire object.
There are no arguments for the "mainLoop" event handler.
The function for "mouseEvent" takes two arguments, the first one is the mouse event (see "eventFlags" parameter) and the second argument is the current mouse position (a table containing x- and y-position).
The function for "keyEvent" takes four arguments: eventType, character, keycode and modifiers. Return value must be true or false. If the function returns true, the key event will not be handled by the engine.
eventType: eEvtKeyDown (key pressed, can be fired multiple times for pressed key), eEvtKeyTextInput (text input, can be fired multiple times for pressed key) and eEvtKeyUp (key released, only fired once).
character: current text input of pressed key(s). This parameter only contains printable characters.
keycode: virtual keycode, only valid for eEvtKeyDown and eEvtKeyUp events. Can be used to query special keys like Esc or Shift.
modifiers: currently active key modifiers (e.g. Ctrl, Shift).

Parameter Type Description
eventtype string The event which triggers the event handler to be called. Currently supported events: "mainLoop", "mouseEvent", "keyEvent", "animationStarted", "animationStopped", "textStarted", "textStopped", "engineEvent", "actionArea".
handler string The name of the lua function which is called when the event occurs.
flags table {int,...} - Can only be specified for "mouseEvent": a list of mouse events where the event handler is called. Currently the following mouse events are supported: eEvtMouseMove, eEvtMouseLeftButtonDoubleClick, eEvtMouseLeftButtonDown, eEvtMouseLeftButtonUp, eEvtMouseLeftButtonHold, eEvtMouseLeftButtonHolding, eEvtMouseRightButtonDoubleClick, eEvtMouseRightButtonDown, eEvtMouseRightButtonUp, eEvtMouseMiddleButtonDown, eEvtMouseMiddleButtonUp, eEvtMouseWheelUp and eEvtMouseWheelDown. If no mouse event is specified then the event handler is registered for all mouse events.

unregisterEventHandler(event, handler)

function onMainLoop()
-- do something
end

registerEventHandler("mainLoop", "onMainLoop")
-- ... later on, when the main loop event handler is not needed anymore:
unregisterEventHandler("mainLoop", "onMainLoop")

Unregisters an event handler function for a specific event.

Parameter Type Description
event string The event which triggers the event handler to be called. Currently supported events: "mainLoop", "mouseEvent".
handler string The name of the lua function which is called when the event occurs.

registerHookFunction(hook, hookFunction)

function adaptedTextPosition(text)
  -- show texts of character Hero 10 pixel below character position
  local owner = text:getLink(VTextOwner)
  if owner:getId().tableId == eCharacters and owner:getName() == 'Hero' then
    local pos = owner:getPoint(VCharacterPosition)
    pos.y = pos.y + 10
    text:setValue(VTextPosition, pos)
    return true
  end
  return false
end

registerHookFunction("setTextPosition", "adaptedTextPosition")

function myActionText(mousePos)
  -- individual action text: object name (in current language) of object below cursor, if there is no object then '<empty>' is shown as action text
  local obj = game:getLink(VGameCurrentObject)
  if obj:getId().tableId == eObjects then
    return 'current object: ' .. obj:getTextStr(VObjectName)
  end
  return '<empty>'
end

registerHookFunction("getActionText", "myActionText")

Registers a hook function for a specific operation.

"setTextPosition": The function should take exactly one argument which is the affected visionaire object. The function must return a boolean value: true if the operation was handled in the hook function, false if the operation was not handled and should be handled by the engine (as if there were no hook). "getActionText": The function should take exactly one argument which is the current mouse position (a table containing x- and y-position). The function must return a string value which will be used as the current action text. "getCharacterAnimationIndex": The function takes exactly 3 arguments: the character (visionaire object), animation type () and new direction (degrees). The function must return an integer value which specifies the walk animation to use for the new direction (0-based index). If -1 is returned the index is handled by the engine (as if there were no hook).

Parameter Type Description
hook string The operation for which the hook function should be called. Currently supported hooks: "setTextPosition" (the hook is called everytime the position of a displayed text is set), "getActionText" (the hook is called everytime to get the currently displayed action text), "getWalkAnimationIndex" (the hook is called everytime a character changes its direction during walking).
hookFunction string The name of the lua function which is called when the hook is executed.

initGameClient(clientID, clientSecret)

Init the gog galaxy client with the given values. Note: this command only works for the gog galaxy client!

Parameter Type Description
clientID string gog galaxy clientID.
clientSecret string gog galaxy clientSecret.
Return Type Description
boolean success

getGameClientStat(apiName)

Returns the requested game client stat. Note: this command only works if the steam_api/gog galaxy library was loaded and if a steam / gog galaxy account for your game exists.

Parameter Type Description
apiName string The name of the requested stat. This is the API name specified in the steam account.
Return Type Description
stat The integer value of the stat or -1 if the stat could not be retrieved.

setGameClientStat(apiName, value)

Sets the specified steam/gog galaxy stat to the given value. Note: this command only works if the steam_api/gog galaxy library was loaded and if a steam / gog galaxy account for your game exists.

Parameter Type Description
apiName string The name of the stat to set. This is the API name specified in the steam/gog galaxy account.
value int Stat will be set to this value.
Return Type Description
boolean success True if the value was set successfully, false if the operation failed.

resetGameClientStats(resetAchievements)

Resets all game clients stats. Note: this command only works if the steam_api/gog galaxy library was loaded and if a steam / gog galaxy account for your game exists.

Parameter Type Description
resetAchievements boolean If true all achievements will be cleared, otherwise only all stats will be reset. Default value is false
Return Type Description
boolean True if the stats were cleared successfully, false if the operation failed.

getGameClientAchievement(apiName)

Gets current state of an achievement. Note: this command only works if the steam_api/gog galaxy library was loaded and if a steam / gog galaxy account for your game exists.

Parameter Type Description
apiName string The name of the requested achievement. This is the API name specified in the steam / gog galaxy account.
Return Type Description
bool result True/false depending if the achievement is set or not, false if the operation failed.

setGameClientAchievement(apiName, flags)

Sets an achievement to done. Note: this command only works if the steam_api/gog galaxy library was loaded and if a steam / gog galaxy account for your game exists.

Parameter Type Description
apiName string The name of the achievement to set. This is the API name specified in the steam / gog galaxy account.
flags table If clear flag is true the achievement will be cleared. Default value is false.

startDefaultBrowser(url)

-- launch default browser & open included link, if browser is already running then open link in a new tab
startDefaultBrowser("http://visionaire-studio.net")

-- returns true if customURL exists, false otherwise:
local customURL = startDefaultBrowser("customURL://", true)

Open an url in user's default browser or in the steam overlay (if active).

Parameter Type Description
url string
Return Type Description
bool status True if browser was successfully launched, false otherwise.

getProperty(name)

-- if platform equals windows then do some action else if mac do some other action
if getProperty("platform") == "win" then
  getObject("Conditions[win?]"):setValue(VConditionValue, true)
elseif getProperty("platform") == "mac" then
  getObject("Conditions[mac?]"):setValue(VConditionValue, true)
end

-- let's check if steam has initialized & set a value based on return value
local steamLoaded = getProperty("steam_initialized")

if steamLoaded then
  getObject("Conditions[steamLoaded?]"):setValue(VConditionValue, true)
else
  getObject("Conditions[steamLoaded?]"):setValue(VConditionValue, false)
end

-- let's check if gog galaxy has initialized & set a value based on return value
local galaxyLoaded = getProperty("galaxy_initialized")

if galaxyLoaded then
  getObject("Conditions[galaxyLoaded?]"):setValue(VConditionValue, true)
else
  getObject("Conditions[galaxyLoaded?]"):setValue(VConditionValue, false)
end

-- set game language to users operating system language
local sysLang = getProperty("system_language")

if sysLang == "English" then
  game:setValue(VGameStandardLanguage, getObject("Languages[English]"))
elseif sysLang == "German" then
  game:setValue(VGameStandardLanguage, getObject("Languages[Deutsch]"))
end

"string" - The requested property to retrieve.
Currently supported properties:
"platform" (win,mac,ios,android,linux,ps4,xbox1,html5)
"steam_initialized" (true/false depending if the steam_api was loaded and client is connected, false if the operation failed)
"galaxy_initialized" (true/false depending if the gog galaxy_api was loaded and client is connected, false if the operation failed)
"galaxy_ready" (true if the galaxy_api is ready)
"system_language" Returns English name of system language or "unknown" if language could not be retrieved.
"display_resolution" Returns the rect that is drawn in, subtracting the black borders

Parameter Type Description
name string
Return Type Description
variant result

startSound(sounditem, values)

--play audio file, store sound id (for later use) and update sound balance of currently started sound
local soundId = startSound('vispath:sounds/example.ogg')
setSoundProperty(soundId, {flags=1, balance=40})

-- play audio file and set volume, balance and offset
startSound('vispath:sounds/example.ogg', {flags=1, volume=70, balance=-10, offset=1000})

Plays a sound file.

"vol"/"volume" - Sound volume (0 ... mute, 100 ... full volume), default value is 100.
"bal"/"balance" - Sound balance (-100 ... left, 0 ... center, +100 right), default value is 0.
"lop"/"loop" - If true then loop sound, otherwise play it only once (default).
"ofs"/"offset" - Set the sound to a specific offset (seek) in milliseconds. Default value is 0.

Parameter Type Description
sounditem path Relative filename of sound which should be started.
values table
Return Type Description
int soundID Unique id referencing the started sound or -1 if the sound could not be started.

stopSound(soundID)

local soundID = getSoundId('vispath:sounds/example.ogg')
stopSound(soundID)

Parameter Type Description
soundID int ID of the sound which should be stopped
Return Type Description
bool status

getSoundId(sounditem)

-- store sound id of a currently active sound in a local variable
local soundID = getSoundId('vispath:sounds/example.ogg')

Gets the sound ID of the specified sound if it is currently active.

Parameter Type Description
sounditem path Relative filename of sound
Return Type Description
int soundID Unique id referencing the requested sound or -1 if the sound is not active

getSoundProperty(soundID, property)

local soundID = getSoundId('vispath:sounds/example.ogg')
local soundOffset = getSoundProperty(soundID, "offset")

Return the requested sound property.

Currently supported properties:
"volume" (0 mute ... 100 full volume, -1 if volume could not be retrieved),
"balance" (-100 ... left, 0 ... center, +100 ... right, 0 if balance could not be retrieved),
"offset" (current position from beginning of the sound in milliseconds, -1 if offset could not be retrieved),
"duration" (total duration of sound in milliseconds, -1 if duration could not be retrieved),
"loop" (true if sound is looped, false it is only played once, false if loop property could not be retrieved),
"playing" (true if sound is currently playing, false otherwise).
"paused" (true if sound is currently paused, false if sound is playing or not active at all).

Parameter Type Description
soundID int
property string

setSoundProperty(soundID, flags)

local soundID = getSoundId('vispath:sounds/example.ogg')
setSoundProperty(soundID, {flags=1, volume=80, balance=20, loop=true, offset=100})

Sets properties of the specified sound.

Parameter Type Description
soundID int
flags table

toggleSoundPause(soundID)

local soundID = getSoundId('vispath:sounds/example.ogg')
toggleSoundPause(soundID)

Pause/resume the specified sound.

Parameter Type Description
soundID int
Return Type Description
bool status

setWindowTitle(WindowTitle)

-- basic set window title command
setWindowTitle("my new game title")

-- set window title based on current users system language
sysLang = getProperty("system_language")
if sysLang == "English" then
  setWindowTitle("my demogame")
elseif sysLang == "German" then
  setWindowTitle("mein Demospiel")
end"));

Sets the window title.

Parameter Type Description
WindowTitle string

getWindowBrightness()

Returns the brightness (gamma) for the window. Note: 0 is completely dark and 100 is normal brightness.

Return Type Description
int Brightness

setWindowBrightness(Brightness)

setWindowBrightness(100)

Sets the brightness (gamma) for the window.

Parameter Type Description
Brightness int The brightness (gamma) value. 0 is completely dark and 100 is normal brightness. Returns false if not supported otherwise true.

replaceGame(vis-file)

replaceGame('load.vis')

Replaces the game with a file relative from the current file.

Parameter Type Description
vis-file path

startObjectTween(target, targetfield, from, to, duration, easing, repeat, reverse)

startObjectTween(game,VGameScrollPosition,game:getPoint(VGameScrollPosition),{x=100,y=0},3000,easeBackInOut)

->Tweening

Parameter Type Description
target TVisObj
targetfield int
from variant
to variant
duration float
easing int type
repeat bool
reverse bool repeat

startTween(target, from, to, duration, easing, repeat, reverse)

startTween("q", q, 3, 3000, easeBackInOut)

->Tweening

Parameter Type Description
target string
from variant
to variant
duration float
easing int type
repeat bool
reverse bool repeat

setDelay(time, callback)

function callback()
  print("called")
end

setDelay(1000, "callback()")
setDelay(1000, function() print("called") end)
setDelay(1000, callback)

Parameter Type Description
time int
callback function/string

shaderCompile(code, fs)

int num = shaderCompile([[VSCBIN...]])

GLSL code can only be used if using OpenGL.

Parameter Type Description
code string
fs string

shaderUniform(shader_number, name, value)

shaderUniform("iTime",shader_iTime*0.1)
shaderUniform("shader_coeff",{shader_coeff0,shader_coeff1,shader_coeff2,shader_coeff3})

Set uniforms for shader

Parameter Type Description
shader_number int
name string option name, use i prefix to set integer values as lua has only numbers
value variant value, supports integer, float, vec2, vec3, vec4, mat4

shaderSetOptions(value, id)

shaderSetOptions({ renderbuffers=2,
{ shader = shaders.num(), source=0, target = 1, clear = 0 },
{ shader = shaders.num(), source=0, target = 0, clear = 0 },
{ shader = shaders.bnum(), source=1, target = 0, clear = 0, comp_dst=0 }
})

set shader options

Parameter Type Description
value table
id int

isPointInsidePolygon(point, polygon)

-- Test if the current position of an active 'cloud' animation is inside the polygon of a 'window' object on the current scene 
-- and store the result in a global variable
local anim = ActiveAnimations['Cloud']
local polygon = game.GameCurrentScene.SceneObjects['Window'].ObjectPolygon
cloudVisible = isPointInsidePolygon(anim.AnimationCurrentPosition, polygon)

Tests if a point is inside polygon.

Parameter Type Description
point point
polygon pointlist A single polygon. Bear in mind that a field containing multiple polygons (e.g. a way border or object polygon) must first be split into single polygons and tested separately.

toggleWindowMode()

toggleWindowMode()

Toggle the window mode to fullscreen or windowed.

getWindowMode()

Returns the window mode (fullscreen or not). Note: true is fullscreen and false is windowed.

Return Type Description
bool windowed

setWindowSize(size)

setWindowSize({x=640,y=480})

Sets the size of the window.

Parameter Type Description
size point

startHapticRumble(strength, length)

local rumble = startHapticRumble(50, 5000)

Start an basic haptic rumble effect.

Parameter Type Description
strength int Strength of the rumble to play (0 to 100)
length int Length of the rumble to play in milliseconds, -1 for infinite

stopHapticRumble()

local rumble = stopHapticRumble()

Return Type Description
bool status

startHapticEffect(effectID)

local effectID = createHapticEffectConstant('constant', 1000, -1, 0x6000, 1000, -1, 1000, -1, 'polar', 20000)
startHapticEffect(effectID)

Parameter Type Description
effectID int
Return Type Description
bool status

stopHapticEffect(effectID)

stopHapticEffect(effectID)

Parameter Type Description
effectID int
Return Type Description
bool status

createHapticEffectConstant(effectType, length, delay, level, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)

local effectID = createHapticEffectConstant('constant', 1000, -1, 0x6000, 1000, -1, 1000, -1, 'polar', 20000)
startHapticEffect(effectID)

Parameter Type Description
effectType string
length int
delay int
level int
attack_length int
attack_level int
fade_length int
fade_level int
effectDirection string
dir0 int
dir1 int
dir2 int
Return Type Description
int effectID

createHapticEffectPeriodic(effectType, length, delay, peroid, magnitude, offset, phase, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)

local effectID = createHapticEffectRamp('ramp', 5000, -1, 0x4000, -0x4000, 1000, -1, 1000, -1, 'cartesian', 1, -1)
startHapticEffect(effectID)

Parameter Type Description
effectType string
length int
delay int
peroid int
magnitude int
offset int
phase int
attack_length int
attack_level int
fade_length int
fade_level int
effectDirection string
dir0 int
dir1 int
dir2 int
Return Type Description
int effectID

createHapticEffectCondition(effectType, length, delay, right_sat, left_sat, right_coeff, left_coeff, deadband, center)

local effectID = createHapticEffectCondition('spring', 5000, -1, 0xFFFF, 0xFFFF, 0x2000, 0x2000, -1, 0x1000)
startHapticEffect(effectID)

Parameter Type Description
effectType string
length int
delay int
right_sat int
left_sat int
right_coeff int
left_coeff int
deadband int
center int
Return Type Description
int effectID

createHapticEffectRamp(effectType, length, delay, start, end, attack_length, attack_level, fade_length, fade_level, effectDirection, dir0, dir1, dir2)

local effectID = createHapticEffectRamp('ramp', 5000, -1, 0x4000, -0x4000, 1000, -1, 1000, -1, 'cartesian', 1, -1)
startHapticEffect(effectID)

Parameter Type Description
effectType string
length int
delay int
start int
end int
attack_length int
attack_level int
fade_length int
fade_level int
effectDirection string
dir0 int
dir1 int
dir2 int
Return Type Description
int effectID

createHapticEffectLeftRight(effectType, length, large_magnitude, small_magnitude)

local effectID = createHapticEffectLeftRight('leftright', 5000, 0x3000, 0xFFFF)
startHapticEffect(effectID)

Create an new haptic Left/Right effect.

Parameter Type Description
effectType string Type of the effect
possible effects: leftright
length int Duration of the effect
large_magnitude int Control of the large controller motor
small_magnitude int Control of the small controller motor
Return Type Description
int effectID Unique id of the effect or -1 if effect was not supported on connected controller.

createEvent(event, position, threshold/sym, acceleration/mod)

createEvent( "eEvtKeyDown", { x = 0, y = 0 }, eKeyEscape, 0 )
createEvent( "eEvtKeyUp", { x = 0, y = 0 }, eKeyEscape, 0 )

local mouse_x = 0,
local mouse_y = 0
local charmove_x = 0
local charmove_y = 0\n
function keyboardHandler(eventType, character, keycode, modifiers)
  if eventType==eEvtKeyUp then
    print('key up: ' .. keycode)
  elseif eventType==eEvtKeyDown then
    print('key pressed: ' .. keycode)
  elseif eventType==eEvtControllerKeyUp then
    print('controller up: ' .. keycode)
    if keycode == 1000001 then --controller key A up
      createEvent('eEvtMouseLeftButtonUp')
    end
  elseif eventType==eEvtControllerKeyDown then
    print('controller down: ' .. keycode)
    if keycode == 1000001 then --controller key A down
      createEvent('eEvtMouseLeftButtonDown')
    end
  elseif eventType==eEvtControllerAxis then
    if string.match(character, 'RIGHTX') then
      mouse_x = keycode
      createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9)
    elseif string.match(character, 'RIGHTY') then
      mouse_y = keycode
      createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9)
    elseif string.match(character, 'LEFTX') then
      charmove_x = keycode
      createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25)
    elseif string.match(character, 'LEFTY') then
      charmove_y = keycode
      createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25)
    end
  end
  return false
end

registerEventHandler('keyEvent', 'keyboardHandler')

Create an event and push it onto the SDL event queue.

event name params
eEvtMouseLeftButtonDown
eEvtMouseLeftButtonUp
eEvtMouseMiddleButtonDown
eEvtMouseMiddleButtonUp
eEvtMouseRightButtonDown
eEvtMouseRightButtonUp
eEvtMouseWheelDown
eEvtMouseWheelUp
eEvtKeyDown sym, mod
eEvtKeyUp sym, mod
eEvtControllerAxisMouseMove ControllerAxis, Threshold, Acceleration
eEvtControllerAxisCharacterMove ControllerAxis, Threshold, Acceleration
Parameter Type Description
event string
position point
threshold/sym int
acceleration/mod int

getTime(reset)

local time = getTime()

function checkTime()
  if getTime() > 3000 then -- if time elapsed is more than 3 seconds then ...
    -- do some action
    getTime({flags=1, reset=true}) -- let's reset timer back to zero
  end
end
-- the checkTime() function would be most effective if included in a mainLoop event handler

Returns the number of milli seconds since the command was called the first time (or the timer was reset). Use this command for relative time measurements. E.g. call this command twice at different locations and calculate the time differential to see the time passed.

Parameter Type Description
reset table

getObject(path, logWarning)

local obj = getObject("\\eScenes\\")
print(obj.name)

-- Access object by scanning whole object table (object name must be unique for whole table)
getObject(\"Conditions[door_open?]\") -- get condition with name 'door open?'

-- Specific object access
getObject(\"Scenes[office].SceneConditions[door_open?]\") -- get condition 'door open?' linked to scene 'office'

The path has to start with a table name, then follows the object name in brackets ('[',']') - only the game table does not have an object name. Optionally a field name (field type must either be t_link or t_links) can follow after a dot '.'. For t_links fields you must specify an object name in brackets ('[',']'). For t_link fields there are no brackets. Alternatively you can also pass in a tuple with the table id and the object id, e.g. "(0,3)".

->Object Paths

Parameter Type Description
path string
logWarning bool If true (default) a warning will be printed to the log file if the object could not be found.
Return Type Description
TVisObj The found visionaire object or an empty object if no object was found.

createSprite(path)

local sprite = createSprite("vispath:test.png")
print(sprite:getSize().x)

Parameter Type Description
path string
Return Type Description
TSprite

sha1(tohash)

print(sha1("test"))

Parameter Type Description
tohash string
Return Type Description
string hash

debugerror()

internal debug function to create a stacktrace

debugfunc()

internal debug function to create a stacktrace

TVisObj

Methods

isEmpty()
isAnyObject()
getId()
getParent()
getObject(path, logWarning)
getName()
setName(name)
setValue(field, value)
clearLink(field)
setTextStr(field)
getInt(field)
getFloat(field)
getBool(field)
getStr(field)
getPath(field)
getSprite(field)
getRect(field)
getPoint(field)
getLink(field)
getLinks(field)
debug()
getPoints(field)
getRects(field)
getSprites(field)
getPaths(field)
getInts(field)
getFloats(field)
getTexts(field)
getTextStr(field, language)
to(time, values, easing, repeat, reverse)
duplicate(name)
create(field, name)
remove()
info()
__eq()
__tostring()

Fields

id readonly int
tableId readonly int
name readonly string
parent readonly TVisObj

isEmpty()

Return Type Description
bool

isAnyObject()

Return Type Description
bool

getId()

Return Type Description
table {id = id, tableId = tableId}

getParent()

Return Type Description
TVisObj

getObject(path, logWarning)

Parameter Type Description
path string
logWarning bool
Return Type Description
TVisObj

getName()

Return Type Description
string

setName(name)

Parameter Type Description
name string

setValue(field, value)

Parameter Type Description
field int
value variant
Parameter Type Description
field int

setTextStr(field)

Parameter Type Description
field int
Return Type Description
string

getInt(field)

Parameter Type Description
field int
Return Type Description
int

getFloat(field)

Parameter Type Description
field int
Return Type Description
float

getBool(field)

Parameter Type Description
field int
Return Type Description
bool

getStr(field)

Parameter Type Description
field int
Return Type Description
string

getPath(field)

Parameter Type Description
field int
Return Type Description
string

getSprite(field)

Parameter Type Description
field int
Return Type Description
TSprite

getRect(field)

Parameter Type Description
field int
Return Type Description
rect

getPoint(field)

Parameter Type Description
field int
Return Type Description
point
Parameter Type Description
field int
Return Type Description
TVisObj
Parameter Type Description
field int
Return Type Description
table TVisObjs

debug()

getPoints(field)

Parameter Type Description
field int
Return Type Description
table points

getRects(field)

Parameter Type Description
field int
Return Type Description
table rects

getSprites(field)

Parameter Type Description
field int
Return Type Description
table sprites

getPaths(field)

Parameter Type Description
field int
Return Type Description
table paths

getInts(field)

Parameter Type Description
field int
Return Type Description
table ints

getFloats(field)

Parameter Type Description
field int
Return Type Description
table floats

getTexts(field)

Parameter Type Description
field int
Return Type Description
table texts

getTextStr(field, language)

Parameter Type Description
field int
language TVisObj default GameStandardLanguage
Return Type Description
string text

to(time, values, easing, repeat, reverse)

game:to(3000, { ScrollPosition = {x = 100, y = 0} }, easeBackInOut)
game.CurrentScene:to(delay, {Brightness = 0}, easeLinearInOut)

-> Tweening

Parameter Type Description
time int
values table
easing int
repeat bool
reverse bool

duplicate(name)

local obj = game.CurrentScene.Objects.Object0:duplicate("duplObj")
obj.Offset = {x=100, y=100}
obj = game.CurrentScene.Objects.duplObj

obj = game.CurrentScene:create(VSceneObjects, "temp0")
obj:create(VObjectSprite, "obj")

obj:remove()

Parameter Type Description
name string
Return Type Description
TVisObj

create(field, name)

Parameter Type Description
field int
name string
Return Type Description
TVisObj

remove()

info()

get all values as a table

__eq()

if a == b then
else
end

compare visobjs

__tostring()

Used In:

Commands.startAction
Commands.startAction
Commands.stopAction
Commands.startAnimation
Commands.startAnimation
Commands.stopAnimation
Commands.startObjectTween
Commands.getObject
TVisObj.getParent
TVisObj.getObject
TVisObj.getLink
TVisObj.getTextStr
TVisObj.duplicate
TVisObj.create
graphics.drawAnimation
graphics.instantiateAnimation
graphics.instantiateAnimation
graphics.getCurrentSpritePath
graphics.getAnimationSize
graphics.getAnimationInnerSize
graphics.getCharacterTextPosition
graphics.getParticles
graphics.registerRenderHook
TextScrollPane.addText

TSprite

Methods

getPath()
setPath(path)
getSize()
setPosition(position)
getPosition()

getPath()

Return Type Description
string path

setPath(path)

Parameter Type Description
path string

getSize()

Return Type Description
point size

setPosition(position)

Parameter Type Description
position point

getPosition()

Return Type Description
point position

Used In:

Commands.createSprite
TVisObj.getSprite

graphics

graphics

Methods

loadFromFile(path)
loadMemoryJPG(bytes)
loadMemoryPNG(bytes)
loadMemoryWEBP(bytes)
drawFont(text, x, y, alpha)
drawSprite(sprite, alpha, tint)
drawSpriteWithNineRect(sprite, destRect, nineRect, color, alpha)
drawBox(x, y, w, h, color, alpha)
drawLine(x, y, x2, y2, color, alpha)
drawAnimation(ActiveAnimation, alpha, tint)
isUpsideDown()
clear()
setupOffsets(attribId, size, stride, offset, elementSize)
drawIndexed(offset, count)
createIndexBuffer(dynamic, size)
createBuffer(dynamic, size)
createFramebuffer(width, height)
bindCurrentTexture(slot)
bindFramebuffer()
addDrawFunc(name, position)
removeDrawFunc(name)
shaderUniform(shader, uniformName, value)
shaderCallback(shader, luafunc)
shaderDrawCallback(shader, luafunc)
shaderUse(shader)
shaderAttrib(shader, attrib)
lightmapCallback(callback)
performLinebreaks(text)
fontDimension(text)
fontLineHeight()
fontColor()
noise(pos1, pos2)
noise2(pos1, pos2, pos3, pos4)
movieOpen(file)
unlockAspectRatio()
lockAspectRatio()
evalTween(from, to, completition, easing)
clipboard()
setScrollPosition(x, y)
getScrollPosition()
instantiateAnimation(animation, reverse, size)
getCurrentSpritePath(obj)
getAnimationSize(obj)
getAnimationInnerSize(obj)
getCharacterTextPosition(character)
getMatrix1Properties()
createBox2DDebugRender()
setDebugRenderOffset(x, y)
orthogonal(left, right, bottom, top)
transferMode(src, dst, alpha_src, alpha_dst)
openedVideos()
createTextScrollPane()
setSpineTime()
setSpineSlot()
getParticles(object)
registerRenderHook(object, hook)

Fields

fontShader int
defaultShader int
matrix1 int
matrix2 int
textMatrix int
invMatrix1 int
fontShaderIndizes int[]

clipboard string
font TVisObj

loadFromFile(path)

local sprite = graphics.loadFromFile("vispath:test.png")

Parameter Type Description
path string ->vispath
Return Type Description
Sprite
nil if not found

loadMemoryJPG(bytes)

local f = io.open("test.jpg", "rb")
local content = f:read("*all")
f:close()
local sprite = graphics.loadMemoryJPG(content)

Parameter Type Description
bytes string
Return Type Description
Sprite

loadMemoryPNG(bytes)

local f = io.open("test.png", "rb")
local content = f:read("*all")
f:close()
local sprite = graphics.loadMemoryPNG(content)

Parameter Type Description
bytes string
Return Type Description
Sprite

loadMemoryWEBP(bytes)

local f = io.open("test.webp", "rb")
local content = f:read("*all")
f:close()
local sprite = graphics.loadMemoryWEBP(content)

Parameter Type Description
bytes string
Return Type Description
Sprite

drawFont(text, x, y, alpha)

graphics.font = 
graphics.drawFont

Parameter Type Description
text string
x int
y int
alpha float

drawSprite(sprite, alpha, tint)

Parameter Type Description
sprite Sprite
alpha float
tint int

drawSpriteWithNineRect(sprite, destRect, nineRect, color, alpha)

Parameter Type Description
sprite Sprite
destRect rect
nineRect rect
color int
alpha float

drawBox(x, y, w, h, color, alpha)

Parameter Type Description
x int
y int
w int
h int
color int
alpha float

drawLine(x, y, x2, y2, color, alpha)

Parameter Type Description
x int
y int
x2 int
y2 int
color int
alpha float

drawAnimation(ActiveAnimation, alpha, tint)

Parameter Type Description
ActiveAnimation TVisObj
alpha float
tint int

isUpsideDown()

true for DirectX and GNM, (0,0) is upper left instead bottom left

clear()

clear current framebuffer

setupOffsets(attribId, size, stride, offset, elementSize)

graphics.setupOffsets(graphics.shaderAttrib(shader, "position"), 2, 20, 0)

Parameter Type Description
attribId int
size int count of components
stride int
offset int
elementSize int default 4

drawIndexed(offset, count)

Parameter Type Description
offset int
count int

createIndexBuffer(dynamic, size)

Parameter Type Description
dynamic bool
size int in bytes
Return Type Description
TBuffer

createBuffer(dynamic, size)

Parameter Type Description
dynamic bool
size int in bytes
Return Type Description
TBuffer

createFramebuffer(width, height)

Parameter Type Description
width int
height int
Return Type Description
TFramebuffer

bindCurrentTexture(slot)

Parameter Type Description
slot int

bindFramebuffer()

reset/bind framebuffer for the scene

addDrawFunc(name, position)

graphics.addDrawFunc("draw()", 0)
function draw()

end

-1 before scene
0 after scene
1 after interfaces

Parameter Type Description
name string
position int default 0

removeDrawFunc(name)

Parameter Type Description
name string

shaderUniform(shader, uniformName, value)

-> Shader Uniforms

Parameter Type Description
shader int
uniformName string
value variant

shaderCallback(shader, luafunc)

 graphics.shaderCallback(shaderId, "callback")
function callback(object)
    print(object.name)
end

Parameter Type Description
shader int
luafunc string

shaderDrawCallback(shader, luafunc)

 graphics.shaderDrawCallback(shaderId, "drawCallback")
function drawCallback(data)

end

Calls the draw function instead of internal drawing.

Data contains the coordinates.

Parameter Type Description
shader int
luafunc string

shaderUse(shader)

bind shader and bind textures

Parameter Type Description
shader int

shaderAttrib(shader, attrib)

Parameter Type Description
shader int
attrib string
Return Type Description
int attribId

lightmapCallback(callback)

graphics.lightmapCallback("lightmapModify")
function lightmapModify(character, r,g,b)
  local tempR = r
  r = b
  b = tempR
  return r,g,b
end

set lightmap callback -> see example

Parameter Type Description
callback string

performLinebreaks(text)

break text into lines

Parameter Type Description
text string
Return Type Description
table lines

fontDimension(text)

get the dimension of the text with the current font

Parameter Type Description
text string

fontLineHeight()

get the font line height for the current font

Return Type Description
int h

fontColor()

get the font color for the current font

Return Type Description
int r
int g
int b

noise(pos1, pos2)

simplex perlin noise

Parameter Type Description
pos1 float
pos2 float default 0
Return Type Description
float noise

noise2(pos1, pos2, pos3, pos4)

perlin noise with up to 4 components

Parameter Type Description
pos1 float
pos2 float
pos3 float
pos4 float
Return Type Description
float noise

movieOpen(file)

Parameter Type Description
file string ->vispath
Return Type Description
TMovie

unlockAspectRatio()

unlocks aspect ratio and makes filling the screen possible

lockAspectRatio()

resets aspect ratio

evalTween(from, to, completition, easing)

Parameter Type Description
from float
to float
completition float 0-1
easing int ->easing
Return Type Description
float result

clipboard()

Return Type Description
string

setScrollPosition(x, y)

Parameter Type Description
x float
y float

getScrollPosition()

Return Type Description
float x
float y

instantiateAnimation(animation, reverse, size)

Parameter Type Description
animation TVisObj
reverse bool
size int default 100
Return Type Description
TVisObj animation

getCurrentSpritePath(obj)

Parameter Type Description
obj TVisObj character, animation or activeanimation
Return Type Description
string path

getAnimationSize(obj)

sprite rect for current sprite

Parameter Type Description
obj TVisObj character, animation or activeanimation
Return Type Description
point size

getAnimationInnerSize(obj)

cropped sprite rect (transparent pixels removed)

Parameter Type Description
obj TVisObj character, animation or activeanimation
Return Type Description
rect size

getCharacterTextPosition(character)

Parameter Type Description
character TVisObj
Return Type Description
point position
nil

getMatrix1Properties()

Return Type Description
float scaleX
float scaleY
float tX
float tY

createBox2DDebugRender()

Return Type Description
b2Draw

setDebugRenderOffset(x, y)

Parameter Type Description
x int
y int

orthogonal(left, right, bottom, top)

Leave left at -1 for getting current matrix.

Parameter Type Description
left int
right int
bottom int
top int
Return Type Description
table matrix

transferMode(src, dst, alpha_src, alpha_dst)

Parameter Type Description
src int
dst int
alpha_src int
alpha_dst int

openedVideos()

createTextScrollPane()

Return Type Description
TextScrollPane

setSpineTime()

setSpineSlot()

getParticles(object)

Parameter Type Description
object TVisObj
Return Type Description
Particles

registerRenderHook(object, hook)

Parameter Type Description
object TVisObj
hook string

Sprite

Fields

position point
rotation float
scale float
scaleX float
scaleY float
shaderSet int
rotationCenter point
matrixId int
size readonly int
width readonly int
height readonly int

Used In:

graphics.loadFromFile
graphics.loadMemoryJPG
graphics.loadMemoryPNG
graphics.loadMemoryWEBP
graphics.drawSprite
graphics.drawSpriteWithNineRect

TMovie

Methods

draw(x, y, w, h)
finish()
seek(time)
getDuration()
getTime()
pause()
resume()

Fields

width int
height int

draw(x, y, w, h)

Parameter Type Description
x float default -1 for centered
y float
w float default -1 use movie size, -2 fit in screen
h float
Return Type Description
bool finished

finish()

clean up video

seek(time)

Parameter Type Description
time float in seconds with fractional part

getDuration()

Return Type Description
float time in seconds with fractional part

getTime()

Return Type Description
float time in seconds with fractional part

pause()

resume()

Used In:

graphics.movieOpen

TFramebuffer

Methods

bind()

bind()

Used In:

graphics.createFramebuffer

TBuffer

Methods

bind()
update(values)

bind()

update(values)

Parameter Type Description
values table ints for index buffer or floats for vertices buffer

Used In:

graphics.createIndexBuffer
graphics.createBuffer

TextScrollPane

Methods

show()
destroy()
addText(text, font, color, offsetX, offsetY, bulletPointImage, imageOffset)

Fields

bg path
scroll path
scrollUp path
scrollDown path
scrollHover path
scrollUpHover path
scrollDownHover path
padding int
scrollPosition int
rect rect
bg9R rect
scroll9R rect
alwaysShowScrollbar bool
button TVisObj

show()

destroy()

addText(text, font, color, offsetX, offsetY, bulletPointImage, imageOffset)

Parameter Type Description
text TVisObj
font TVisObj
color int
offsetX int
offsetY int
bulletPointImage path
imageOffset point

Used In:

graphics.createTextScrollPane

⌛particleSystem

particleSystem

Methods

new(settings)
draw()
update()
updateDraw()

Fields

images table
emissionDirection table
visibility table
velocityOverLife table
angularVelocityOverLife table
motionRandomnessOverLife table
sizeOverLife table
spinOverLife table
weightOverLife table
velocity table
velocityOverLife table
weight table
life table
size table
rotation table
angularVelocity table
motionRandomness table
spin table
numberOfEmitted table
visibilityOverLife table
colorOverLife table
center table

directionToRotation bool

imageChoice int
creationRate int
maximum int
warmup int
length float
angle float
radius float
innerRadius float
sizeX float
sizeY float
loops int
duration float
directionToRotationOffset float

imageChoice string
transferMode string

new(settings)

Parameter Type Description
settings table

draw()

update()

updateDraw()

⌛system

system

Methods

getDisplayModes()
controllerGuid(device)
controllerName(device)
controllerCount()
joystickCount()
joystickIsController(id)
pauseCurrentActions()
resumeAllActions()
pauseCurrentAnimations()
resumeAllAnimations()
pauseBackgroundMusic()
pauseAllSounds()
resumeBackgroundMusic()
resumeAllSounds()
systemInfo()
skipText()
skipCutscene()
registerActionPartHook(actionPartCommand, hook)

Fields

vramUsed readonly
memoryUsed readonly
lastFrameTime readonly
frameTime readonly
cacheContents readonly
savegamesCount readonly
selectedSavegame readonly
savegamesScrollPos readonly

pauseOnFocusLost bool
pauseMainLoops bool
pauseEngineUpdate bool

getDisplayModes()

Return Type Description
table {1="1920x1080",...}

controllerGuid(device)

Parameter Type Description
device int
Return Type Description
string guid

controllerName(device)

Parameter Type Description
device int
Return Type Description
string joystickName
string gamecontrollerName

controllerCount()

Return Type Description
int maxid

joystickCount()

Return Type Description
int joystick count

joystickIsController(id)

Parameter Type Description
id int
Return Type Description
bool

pauseCurrentActions()

resumeAllActions()

pauseCurrentAnimations()

resumeAllAnimations()

pauseBackgroundMusic()

pauseAllSounds()

resumeBackgroundMusic()

resumeAllSounds()

systemInfo()

Return Type Description
table infos

skipText()

skipCutscene()

registerActionPartHook(actionPartCommand, hook)

local ADD_REMOVE_ITEM = 150
system.registerActionPartHook(ADD_REMOVE_ITEM, "addRemoveItem")

function addRemoveItem(actionPart)
  if actionPart.Int == 0 then
    -- added
  elseif actionPart.Int == 1 then
    -- removed
  end
  local evt = {}
  evt.item      = actionPart.Link
  evt.character = actionPart.AltLink
  -- now do something
  return true -- don't execute
  --return false // still execute
end

Parameter Type Description
actionPartCommand int
hook string

Enums

Text Alignment

Fields

eAlignCentered 2
eAlignCenteredWithLeftPos 5
eAlignLeft 0
eAlignLeftWithCenterPos 3
eAlignRight 1
eAlignRightWithCenterPos 4

Text Event Type

Fields

eEvtKeyDown 1
eEvtKeyTextInput 3
eEvtKeyUp 2
eEvtControllerKeyDown 4
eEvtControllerKeyUp 5
eEvtControllerAxis 6
eMsgControllerConnected 7
eMsgControllerDisconnected 8
eMsgControllerRemapped 9

Mouse Event Type

Fields

eEvtDollarGesture 15
eEvtMouseLeftButtonDoubleClick 2
eEvtMouseLeftButtonDown 3
eEvtMouseLeftButtonHold 5
eEvtMouseLeftButtonHolding 6
eEvtMouseLeftButtonUp 4
eEvtMouseMiddleButtonDown 10
eEvtMouseMiddleButtonUp 11
eEvtMouseMove 1
eEvtMouseRightButtonDoubleClick 7
eEvtMouseRightButtonDown 8
eEvtMouseRightButtonUp 9
eEvtMouseWheelDown 13
eEvtMouseWheelUp 12
eEvtMultiGesture 14
eEvtTouchDown 16
eEvtTouchMove 18
eEvtTouchUp 17

Dialog Return Type

Fields

eDialogReturnToEnd 2
eDialogReturnToSame 0
eDialogReturnToUpper 1

Disable Interaction Type

Fields

eDisableInteractionAlways 2
eDisableInteractionCharacterAnim 1
eDisableInteractionNever 0

Draw Action Text Type

Fields

eDrawActionTextAtCurrentPos 1
eDrawActionTextAtRect 2
eDrawNoActionText 0

Inteface Displacement

Fields

eInterfaceDisplacementAbsolute 4
eInterfaceDisplacementBottom 1
eInterfaceDisplacementLeft 2
eInterfaceDisplacementRelative 5
eInterfaceDisplacementRight 3
eInterfaceDisplacementTop 0

Container Count

Fields

eMainContainer 0
eSingleContainer 1
eMultipleContainers 2

Mouse Behaviour

Fields

eMouseActionBehaviourDoNotSendCharacter 0
eMouseActionBehaviourSendCharacterToCursor 1
eMouseActionBehaviourSendCharacterToObjects 2

Replay Type

Fields

eReplayNormal 0
eReplayRandom 2
eReplayReverse 1

Script Type

Fields

eScriptTypeDefinition 1
eScriptTypeExecution 0

Activate Standard Command

Fields

eSetStdCommandAlways 0
eSetStdCommandNever 1
eSetStdCommandOnSuccess 2

Text Output

Fields

eTextAndSpeechOutput 0
eOnlySpeechOutput 1
eOnlyTextOutput 2

Interpolation Type

Fields

eLinearInterpolation 0
eNearestNeighborInterpolation 1
eTriLinearInterpolation 2

Keys

Fields

eKeyBackspace 8
eKeyEscape 27
eKeyModAlt 768
eKeyModCaps 8192
eKeyModCtrl 192
eKeyModGui 3072
eKeyModLAlt 256
eKeyModLCtrl 64
eKeyModLGui 1024
eKeyModLShift 1
eKeyModMode 16384
eKeyModNum 4096
eKeyModRAlt 512
eKeyModRCtrl 128
eKeyModRGui 2048
eKeyModRShift 2
eKeyModShift 3
eKeyReturn 13
eKeySpace 32
eKeyTab 9

Button Type

Fields

eButtonActionArea 4
eButtonCombined 1
eButtonCommand 3
eButtonCommandGroup 5
eButtonCommandInGroup 6
eButtonGive 2
eButtonNormal 0
eButtonPlaceholder 0
eButtonScrollDown 2
eButtonScrollUp 1

Execution Type

Fields

eAtBeginningOfScene 31
eAtEndOfScene 32
eExecutionTypeActionCommand 6
eExecutionTypeActionCommandBoth 21
eExecutionTypeActionCommandIm 17
eExecutionTypeActionCommandImBoth 22
eExecutionTypeActionCommandImOther 24
eExecutionTypeActionCommandOther 23
eExecutionTypeCalledByOtherAction 5
eExecutionTypeCombinedCommandMouseClickIm 19
eExecutionTypeCommandMouseClickIm 18
eExecutionTypeFixtureDropped 3
eExecutionTypeFixtureDroppedBoth 25
eExecutionTypeFixtureDroppedIm 20
eExecutionTypeFixtureDroppedImBoth 26
eExecutionTypeFixtureDroppedImOther 28
eExecutionTypeFixtureDroppedOther 27
eExecutionTypeLeftMouseClickIm 7
eExecutionTypeLeftMouseDblClick 12
eExecutionTypeLeftMouseDblClickIm 13
eExecutionTypeLeftMouseHold 14
eExecutionTypeLeftMouseHoldIm 15
eExecutionTypeMouseEntersArea 1
eExecutionTypeMouseLeavesArea 2
eExecutionTypeRightMouseClick 0
eExecutionTypeRightMouseClickIm 16

Shader Exclude

Fields

eShaderExcludeCursor 3
eShaderExcludeInterfaces 1
eShaderExcludeNothing 0
eShaderExcludeTextsAndCursor 2

Command Use Type

Fields

eUseOnAll 0
eUseOnCharacters 1
eUseOnObjects 2

Sound Volume Types

Fields

eMusicVolume 0
eSoundVolume 1
eSpeechVolume 2
eMovieVolume 3
eGlobalVolume 4

Transitions

Fields

eFadeIn 1
eFadeInAndOut 3
eFadeNo 0
eFadeOut 2
eFadeToNew 4
eShiftLeft 5
eShiftRight 6
eTunnelEffect 7
eTunnelEffectFadeOut 8
eTunnelEffectFadeIn 9
eFadeKeep 10
eFadeShader 11

Animation Type

Fields

eCharacterAnim 4
eStandingAnim 3
eTalkAnim 2
eWalkAnim 1
eNoAnim 0
eRandomAnim 5

Tables

Fields

eActionAreas 32
eActionParts 8
eActions 7
eActiveActions 25
eActiveAnimations 26
eActiveTexts 24
eAnimationFrames 28
eAnimations 9
eAreaActions 33
eButtons 2
eCharacters 0
eCommentSetEntries 27
eCommentSets 16
eConditions 10
eCursors 15
eDialogParts 12
eDialogs 11
eFonts 3
eGame -1
eInterfaces 1
eInterfaceClasses 31
eLanguages 18
eLoadings 21
eModels 35
eObjects 6
eOutfits 17
eParticleContainers 23
eParticles 22
ePoints 5
eScenes 4
eScriptVariables 34
eScripts 30
eSprites 13
eTextLanguages 19
eTexts 14
eValues 20
eWaySystems 29

Transparency

Fields

eTransparencyAlpha 2
eTransparencyColorKey 1
eTransparencyNone 0
eTransparencyUndefined -1

Easing

Fields

easeBackIn 0
easeBackInOut 2
easeBackOut 1
easeBounceIn 3
easeBounceInOut 5
easeBounceOut 4
easeCircIn 6
easeCircInOut 8
easeCircOut 7
easeCubicIn 9
easeCubicInOut 11
easeCubicOut 10
easeElasticIn 12
easeElasticInOut 14
easeElasticOut 13
easeLinearIn 15
easeLinearInOut 17
easeLinearOut 16
easeNoneIn 18
easeNoneInOut 20
easeNoneOut 19
easeQuadIn 21
easeQuadInOut 23
easeQuadOut 22
easeQuartIn 24
easeQuartInOut 26
easeQuartOut 25
easeQuintIn 27
easeQuintInOut 29
easeQuintOut 28
easeSineIn 30
easeSineInOut 32
easeSineOut 31

iOS

ios

Methods

initPurchases()
canPurchase()
initPurchase(id)
restorePurchases(strings)
setAchievementProgress(id, percent)
unlockAchievement(id)
getAchievement(id)
showAchievements()
signIn()

initPurchases()

function ios_callback(str, a1, a2, a3, a4)
  if str == "PRODUCT_DESCRIPTION" then
    print(string.format("product id:%s title:%s descr:%s price:%s",a1,a2,a3,a4))
  elseif str == "FAILURE" then
    print("fail info:"..a1)
  elseif str == "SUCCESS" then
    print(string.format("purchased id:%s count:%s",a1,a2))
  elseif str == "LOGGED_IN" then
    print("logged in")
  elseif str == "LOGIN_FAILURE" then
    print("login failed")
  end
end

ios.initPurchases({"ID"})

if ios.canPurchase() then
    ios.initPurchase("ID") -- begin purchase
end

if ios.signIn() then
    ios.unlockAchievement("ID")
    ios.setAchievementProgress("ID",100)
end

canPurchase()

Return Type Description
bool

initPurchase(id)

Parameter Type Description
id string

restorePurchases(strings)

Parameter Type Description
strings table with ids

setAchievementProgress(id, percent)

Parameter Type Description
id string
percent int

unlockAchievement(id)

Parameter Type Description
id string

getAchievement(id)

Parameter Type Description
id string
Return Type Description
int id

showAchievements()

signIn()

Return Type Description
bool

JS

JS

Methods

js(js)

js(js)

js([[jsfunction();]])

execute javascript statement

Parameter Type Description
js string

⌛PS4

ps4

Methods

initAchievements()
unlockAchievement(id)
getAchievement(id)
user(id)
saveState()
resetSaveData()

initAchievements()

load trophies

unlockAchievement(id)

unlock trophy

Parameter Type Description
id int

getAchievement(id)

Parameter Type Description
id int
Return Type Description
bool unlocked

user(id)

Parameter Type Description
id int
Return Type Description
table { id = userID, name = name

saveState()

Initing
Okay
Broken
Error
OutOfSpace

Return Type Description
string state

resetSaveData()

steam

⌛Xbox1

xbox1

Methods

updateAchievement(id, percent)
setPresence(name, ...)
user(id)
saveUser()
saveState()
showAccountPicker(AccountPickerOptions)
loadEventManifest(file)
writeEvent(name, ...)

updateAchievement(id, percent)

Parameter Type Description
id string
percent int

setPresence(name, ...)

Parameter Type Description
name string
... string

user(id)

Parameter Type Description
id int
Return Type Description
table { id = userID, xboxUserId = xboxUserId, name = name

saveUser()

Return Type Description
table { id = userID, name = name

saveState()

Initing
Okay
CantSave
NotLoggedIn

Return Type Description
string state

showAccountPicker(AccountPickerOptions)

Parameter Type Description
AccountPickerOptions int

loadEventManifest(file)

Parameter Type Description
file string

writeEvent(name, ...)

Parameter Type Description
name string
... variant

⌛lua

lua

Methods

assert(condition/nil, error)
collectgarbage(what)
dofile()
error()
gcinfo()
getfenv()
getmetatable()
ipairs()
load()
loadfile()
loadstring()
module()
newproxy()
next()
pairs()
pcall()
print()
rawequal()
rawget()
rawlen()
rawset()
require()
select()
setfenv()
setmetatable()
tonumber()
tostring()
type()
unpack()
xpcall()

Fields

_G
_VERSION Lua

assert(condition/nil, error)

local file = assert(io.open("fake_file.lua", "rb"))
assert(false, "error: false unexpected")
assert(a == 0, "a should be 0")
local arg = assert(file)

Parameter Type Description
condition/nil variant
error string message
Return Type Description
variant passthrough all variables

collectgarbage(what)

"collect": performs a full garbage-collection cycle. This is the default option.
"stop": stops the garbage collector.
"restart": restarts the garbage collector.
"count": returns the total memory in use by Lua (in Kbytes).
"step": performs a garbage-collection step. The step "size" is controlled by arg (larger values mean more steps) in a non-specified way. If you want to control the step size you must experimentally tune the value of arg. Returns true if the step finished a collection cycle.
"setpause": sets arg as the new value for the pause of the collector. Returns the previous value for pause.
"setstepmul": sets arg as the new value for the step multiplier of the collector. Returns the previous value for step.

Parameter Type Description
what string or nil for "collect"
Return Type Description
int depending on the option

dofile()

error()

gcinfo()

getfenv()

getmetatable()

ipairs()

load()

loadfile()

loadstring()

module()

newproxy()

next()

pairs()

pcall()

print()

rawequal()

rawget()

rawlen()

rawset()

require()

select()

setfenv()

setmetatable()

tonumber()

tostring()

type()

unpack()

xpcall()

bit

Methods

arshift()
band()
bnot()
bor()
bswap()
bxor()
lshift()
rol()
ror()
rshift()
tobit()
tohex()

arshift()

band()

bnot()

bor()

bswap()

bxor()

lshift()

rol()

ror()

rshift()

tobit()

tohex()

coroutine

Methods

create()
resume()
running()
status()
wrap()
yield()

create()

resume()

running()

status()

wrap()

yield()

debug

Methods

debug()
getfenv()
gethook()
getinfo()
getlocal()
getmetatable()
getregistry()
getupvalue()
getuservalue()
setfenv()
sethook()
setlocal()
setmetatable()
setupvalue()
setuservalue()
traceback()
upvalueid()
upvaluejoin()

debug()

getfenv()

gethook()

getinfo()

getlocal()

getmetatable()

getregistry()

getupvalue()

getuservalue()

setfenv()

sethook()

setlocal()

setmetatable()

setupvalue()

setuservalue()

traceback()

upvalueid()

upvaluejoin()

io

Methods

close()
flush()
input()
lines()
open()
output()
popen()
read()
stderr ()
stdin ()
stdout ()
tmpfile()
type()
write()

close()

flush()

input()

lines()

open()

output()

popen()

read()

stderr ()

stdin ()

stdout ()

tmpfile()

type()

write()

jit

Methods

attach()
flush()
off()
on()
status()

Fields

arch x86
opt
start

os Windows
version LuaJIT
version_num 20100

attach()

flush()

off()

on()

status()

math

Methods

abs()
acos()
asin()
atan()
atan2()
ceil()
cos()
cosh()
deg()
exp()
floor()
fmod()
frexp()
huge -()
ldexp()
log()
log10()
max()
min()
modf()
pi 3()
pow()
rad()
random()
randomseed()
sin()
sinh()
sqrt()
tan()
tanh()

abs()

acos()

asin()

atan()

atan2()

ceil()

cos()

cosh()

deg()

exp()

floor()

fmod()

frexp()

huge -()

ldexp()

log()

log10()

max()

min()

modf()

pi 3()

pow()

rad()

random()

randomseed()

sin()

sinh()

sqrt()

tan()

tanh()

os

Methods

clock()
date()
difftime()
execute()
exit()
getenv()
remove()
rename()
setlocale()
time()
tmpname()

clock()

date()

difftime()

execute()

exit()

getenv()

remove()

rename()

setlocale()

time()

tmpname()

package

string

Methods

byte()
char()
dump()
find()
format()
gmatch()
gsub()
len()
lower()
match()
rep()
reverse()
sub()
upper()

byte()

char()

dump()

find()

format()

gmatch()

gsub()

len()

lower()

match()

rep()

reverse()

sub()

upper()

table

Methods

concat()
foreach()
foreachi()
getn()
insert()
maxn()
pack()
remove()
sort()
unpack()

concat()

foreach()

foreachi()

getn()

insert()

maxn()

pack()

remove()

sort()

unpack()

⌛PCRE

rex_pcre

--[[
Pcre-wrapper script for Visionaire
(c) 13/6/2015
]]

regex = {
match_all = function(pattern, subject, callback) 
    local pos = 0
    local start = 0
    local pattern2 = rex_pcre.new (pattern)
    while (pos~=nil) do
        start, pos, matches = pattern2:tfind(subject, pos)
        if matches~=nil then
            callback(matches)
        end
    end
end,
match_all_return = function(pattern, subject)
    local rtable = {}
    local pos = 0
    local start = 0
    local pattern2 = rex_pcre.new (pattern)
    while (pos~=nil) do
        start, pos, matches = pattern2:tfind(subject, pos)
        if matches~=nil then
            table.insert(rtable, matches)
        end
    end
    return rtable
end
}


 -- example
subject = "http://google.de/-ABCaz http://"
regex.match_all("(http://google\\.de/[\\-A-Za-z0-9_\\-]+)", subject, function(matches)
    print(matches[1])
end)

Methods

match(subject, pattern, offset, compilationFlags, executionFlags)
find(subject, pattern, init, compilationFlags, executionFlags)
gmatch()
gsub()
split()
new()
flags()
version()
maketables()

match(subject, pattern, offset, compilationFlags, executionFlags)

Parameter Type Description
subject string
pattern string or PCREpattern
offset init can be negative
compilationFlags int
executionFlags int
Return Type Description
table string captures / whole string
false no match

find(subject, pattern, init, compilationFlags, executionFlags)

Parameter Type Description
subject string
pattern string or PCREpattern
init int offset can be negative
compilationFlags int
executionFlags int
Return Type Description
int start point
int end point
table string matches
false no match

gmatch()

gsub()

split()

new()

flags()

version()

maketables()

PCREpattern

Methods

exec()
tfind()
find()
match()
__tostring()

exec()

tfind()

find()

match()

__tostring()

utf8

utf8

Methods

offset()
codes()
codepoint()
len()
sub()
reverse()
lower()
upper()
title()
fold()
byte()
char()
escape()
insert()
remove()
charpos()
next()
width()
widthindex()
ncasecmp()
find()
gmatch()
gsub()
match()

offset()

codes()

codepoint()

len()

sub()

reverse()

lower()

upper()

title()

fold()

byte()

char()

escape()

insert()

remove()

charpos()

next()

width()

widthindex()

ncasecmp()

find()

gmatch()

gsub()

match()

box2D

curl

curl

Methods

escape()
new()
new_multi()
unescape()

Fields

ABORTED_BY_CALLBACK 42
ARRAY 8
AUTH_ANY -
AUTH_ANYSAFE -
AUTH_BASIC 1
AUTH_DIGEST 2
AUTH_GSSNEGOTIATE 4
AUTH_NONE 0
AUTH_NTLM 8
BAD_CALLING_ORDER 44
BAD_CONTENT_ENCODING 61
BAD_DOWNLOAD_RESUME 36
BAD_FUNCTION_ARGUMENT 43
BAD_PASSWORD_ENTERED 46
BUFFER 11
BUFFERLENGTH 13
BUFFERPTR 12
CLOSEPOLICY_CALLBACK 5
CLOSEPOLICY_LEAST_RECENTLY_USED 2
CLOSEPOLICY_LEAST_TRAFFIC 3
CLOSEPOLICY_OLDEST 1
CLOSEPOLICY_SLOWEST 4
CONTENTHEADER 15
CONTENTSLENGTH 6
CONTENTTYPE 14
COPYCONTENTS 4
COPYNAME 1
COULDNT_CONNECT 7
COULDNT_RESOLVE_HOST 6
COULDNT_RESOLVE_PROXY 5
CURL_FORMADD_DISABLED 7
CURL_FORMADD_ILLEGAL_ARRAY 6
CURL_FORMADD_INCOMPLETE 5
CURL_FORMADD_MEMORY 1
CURL_FORMADD_NULL 3
CURL_FORMADD_OK 0
CURL_FORMADD_OPTION_TWICE 2
CURL_FORMADD_UNKNOWN_OPTION 4
END 17
FAILED_INIT 2
FILE 10
FILECONTENT 7
FILENAME 16
FILESIZE_EXCEEDED 63
FILE_COULDNT_READ_FILE 37
FTPAUTH_DEFAULT 0
FTPAUTH_SSL 1
FTPAUTH_TLS 2
FTPSSL_ALL 3
FTPSSL_CONTROL 2
FTPSSL_NONE 0
FTPSSL_TRY 1
FTP_ACCESS_DENIED 9
FTP_CANT_GET_HOST 15
FTP_CANT_RECONNECT 16
FTP_COULDNT_GET_SIZE 32
FTP_COULDNT_RETR_FILE 19
FTP_COULDNT_SET_ASCII 29
FTP_COULDNT_SET_BINARY 17
FTP_COULDNT_STOR_FILE 25
FTP_COULDNT_USE_REST 31
FTP_PORT_FAILED 30
FTP_QUOTE_ERROR 21
FTP_SSL_FAILED 64
FTP_USER_PASSWORD_INCORRECT 10
FTP_WEIRD_227_FORMAT 14
FTP_WEIRD_PASS_REPLY 11
FTP_WEIRD_PASV_REPLY 13
FTP_WEIRD_SERVER_REPLY 8
FTP_WEIRD_USER_REPLY 12
FTP_WRITE_ERROR 20
FUNCTION_NOT_FOUND 41
GOT_NOTHING 52
HTTP_POST_ERROR 34
HTTP_RANGE_ERROR 33
HTTP_RETURNED_ERROR 22
HTTP_VERSION_1_0 1
HTTP_VERSION_1_1 2
HTTP_VERSION_NONE 0
INFO_CONNECT_TIME 3145733
INFO_CONTENT_LENGTH_DOWNLOAD 3145743
INFO_CONTENT_LENGTH_UPLOAD 3145744
INFO_CONTENT_TYPE 1048594
INFO_COOKIELIST 4194332
INFO_EFFECTIVE_URL 1048577
INFO_FILETIME 2097166
INFO_HEADER_SIZE 2097163
INFO_HTTPAUTH_AVAIL 2097175
INFO_HTTP_CONNECTCODE 2097174
INFO_LASTSOCKET 2097181
INFO_NAMELOOKUP_TIME 3145732
INFO_NONE 0
INFO_NUM_CONNECTS 2097178
INFO_OS_ERRNO 2097177
INFO_PRETRANSFER_TIME 3145734
INFO_PRIVATE 1048597
INFO_PROXYAUTH_AVAIL 2097176
INFO_REDIRECT_COUNT 2097172
INFO_REDIRECT_TIME 3145747
INFO_REQUEST_SIZE 2097164
INFO_RESPONSE_CODE 2097154
INFO_SIZE_DOWNLOAD 3145736
INFO_SIZE_UPLOAD 3145735
INFO_SPEED_DOWNLOAD 3145737
INFO_SPEED_UPLOAD 3145738
INFO_SSL_ENGINES 4194331
INFO_SSL_VERIFYRESULT 2097165
INFO_STARTTRANSFER_TIME 3145745
INFO_TOTAL_TIME 3145731
INTERFACE_FAILED 45
IOCMD_NOP 0
IOCMD_RESTARTREAD 1
IOE_FAILRESTART 2
IOE_OK 0
IOE_UNKNOWNCMD 1
IPRESOLVE_V4 1
IPRESOLVE_V6 2
IPRESOLVE_WHATEVER 0
LDAP_CANNOT_BIND 38
LDAP_INVALID_URL 62
LDAP_SEARCH_FAILED 39
LIBRARY_NOT_FOUND 40
LOGIN_DENIED 67
MALFORMAT_USER 24
NAMELENGTH 3
NETRC_IGNORED 0
NETRC_OPTIONAL 1
NETRC_REQUIRED 2
OBSOLETE 9
OBSOLETE2 18
OK 0
OPERATION_TIMEOUTED 28
OPT_AUTOREFERER 58
OPT_BUFFERSIZE 98
OPT_CAINFO 10065
OPT_CAPATH 10097
OPT_CLOSEPOLICY 72
OPT_CONNECTTIMEOUT 78
OPT_COOKIE 10022
OPT_COOKIEFILE 10031
OPT_COOKIEJAR 10082
OPT_COOKIESESSION 96
OPT_CRLF 27
OPT_CUSTOMREQUEST 10036
OPT_DNS_CACHE_TIMEOUT 92
OPT_DNS_USE_GLOBAL_CACHE 91
OPT_EGDSOCKET 10077
OPT_ENCODING 10102
OPT_FAILONERROR 45
OPT_FILETIME 69
OPT_FOLLOWLOCATION 52
OPT_FORBID_REUSE 75
OPT_FRESH_CONNECT 74
OPT_FTPAPPEND 50
OPT_FTPLISTONLY 48
OPT_FTPPORT 10017
OPT_FTPSSLAUTH 129
OPT_FTP_ACCOUNT 10134
OPT_FTP_CREATE_MISSING_DIRS 110
OPT_FTP_RESPONSE_TIMEOUT 112
OPT_FTP_SSL 119
OPT_FTP_USE_EPRT 106
OPT_FTP_USE_EPSV 85
OPT_HEADER 42
OPT_HEADERDATA 10029
OPT_HEADERFUNCTION 20079
OPT_HTTP200ALIASES 10104
OPT_HTTPAUTH 107
OPT_HTTPGET 80
OPT_HTTPHEADER 10023
OPT_HTTPPOST 10024
OPT_HTTPPROXYTUNNEL 61
OPT_HTTP_VERSION 84
OPT_INFILESIZE 14
OPT_INFILESIZE_LARGE 30115
OPT_INTERFACE 10062
OPT_IOCTLDATA 10131
OPT_IOCTLFUNCTION 20130
OPT_IPRESOLVE 113
OPT_KRB4LEVEL 10063
OPT_LOW_SPEED_LIMIT 19
OPT_LOW_SPEED_TIME 20
OPT_MAXCONNECTS 71
OPT_MAXFILESIZE 114
OPT_MAXFILESIZE_LARGE 30117
OPT_MAXREDIRS 68
OPT_NETRC 51
OPT_NETRC_FILE 10118
OPT_NOBODY 44
OPT_NOPROGRESS 43
OPT_NOSIGNAL 99
OPT_PORT 3
OPT_POST 47
OPT_POSTFIELDS 10015
OPT_POSTFIELDSIZE 60
OPT_POSTFIELDSIZE_LARGE 30120
OPT_POSTQUOTE 10039
OPT_PREQUOTE 10093
OPT_PROGRESSDATA 10057
OPT_PROGRESSFUNCTION 20056
OPT_PROXY 10004
OPT_PROXYAUTH 111
OPT_PROXYPORT 59
OPT_PROXYTYPE 101
OPT_PROXYUSERPWD 10006
OPT_PUT 54
OPT_QUOTE 10028
OPT_RANDOM_FILE 10076
OPT_RANGE 10007
OPT_READDATA 10009
OPT_READFUNCTION 20012
OPT_REFERER 10016
OPT_RESUME_FROM 21
OPT_RESUME_FROM_LARGE 30116
OPT_SOURCE_POSTQUOTE -68614
OPT_SOURCE_PREQUOTE -68615
OPT_SOURCE_QUOTE -3334
OPT_SOURCE_URL -3335
OPT_SOURCE_USERPWD -68613
OPT_SSLCERT 10025
OPT_SSLCERTTYPE 10086
OPT_SSLENGINE 10089
OPT_SSLENGINE_DEFAULT 90
OPT_SSLKEY 10087
OPT_SSLKEYPASSWD 10026
OPT_SSLKEYTYPE 10088
OPT_SSLVERSION 32
OPT_SSL_CIPHER_LIST 10083
OPT_SSL_VERIFYHOST 81
OPT_SSL_VERIFYPEER 64
OPT_TCP_NODELAY 121
OPT_TELNETOPTIONS 10070
OPT_TIMECONDITION 33
OPT_TIMEOUT 13
OPT_TIMEVALUE 34
OPT_TRANSFERTEXT 53
OPT_UNRESTRICTED_AUTH 105
OPT_UPLOAD 46
OPT_URL 10002
OPT_USERAGENT 10018
OPT_USERPWD 10005
OPT_VERBOSE 41
OPT_WRITEDATA 10001
OPT_WRITEFUNCTION 20011
OPT_WRITEINFO 10040
OUT_OF_MEMORY 27
PARTIAL_FILE 18
PROXY_HTTP 0
PROXY_SOCKS4 4
PROXY_SOCKS5 5
PTRCONTENTS 5
PTRNAME 2
READFUNC_ABORT 268435456
READ_ERROR 26
RECV_ERROR 56
SEND_ERROR 55
SEND_FAIL_REWIND 65
SHARE_IN_USE 57
SSLVERSION_DEFAULT 0
SSLVERSION_SSLv2 2
SSLVERSION_SSLv3 3
SSLVERSION_TLSv1 1
SSL_CACERT 60
SSL_CERTPROBLEM 58
SSL_CIPHER 59
SSL_CONNECT_ERROR 35
SSL_ENGINE_INITFAILED 66
SSL_ENGINE_NOTFOUND 53
SSL_ENGINE_SETFAILED 54
SSL_PEER_CERTIFICATE 51
TELNET_OPTION_SYNTAX 49
TIMECOND_IFMODSINCE 1
TIMECOND_IFUNMODSINCE 2
TIMECOND_LASTMOD 3
TIMECOND_NONE 0
TOO_MANY_REDIRECTS 47
UNKNOWN_TELNET_OPTION 48
UNSUPPORTED_PROTOCOL 1
URL_MALFORMAT 3
URL_MALFORMAT_USER 4
WRITE_ERROR 23
_COPYRIGHT (C)
_CURLVERSION libcurl/7.43.0
_DESCRIPTION LuaCurl
_NAME luacurl
_SUPPORTED_CURLVERSION 7.43.0
_VERSION 1.1.0

escape()

new()

new_multi()

unescape()

curlm

Methods

close()
perform()
info()
add()

close()

perform()

info()

add()

Used In:

curl

Methods

close()
setopt()
perform()
getinfo()

close()

setopt()

perform()

getinfo()

Used In:

lfs

lfs

Methods

attributes()
chdir()
currentdir()
dir()
link()
lock()
mkdir()
rmdir()
symlinkattributes()
setmode()
touch()
unlock()
lock_dir()

Fields

_COPYRIGHT string
_DESCRIPTION string
_VERSION string

attributes()

chdir()

currentdir()

dir()

lock()

mkdir()

rmdir()

symlinkattributes()

setmode()

touch()

unlock()

lock_dir()

socket

http://w3.impa.br/~diego/software/luasocket/introduction.html

lua