summaryrefslogtreecommitdiff
path: root/scripts/slimax_script_readme.txt
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/slimax_script_readme.txt')
-rw-r--r--[-rwxr-xr-x]scripts/slimax_script_readme.txt188
1 files changed, 138 insertions, 50 deletions
diff --git a/scripts/slimax_script_readme.txt b/scripts/slimax_script_readme.txt
index 148f7f7..f309203 100755..100644
--- a/scripts/slimax_script_readme.txt
+++ b/scripts/slimax_script_readme.txt
@@ -1,6 +1,6 @@
-SLIMax Manager III 3.0 Scripting Information - PART OF SLIMax Manager pkg
+SLIMax Manager III 3.3.1 Scripting Information - PART OF SLIMax Manager pkg
Copyright (c)2011-2013 by EK & Zappadoc - All Rights Reserved.
-updated 2013-02 by Zappadoc
+updated 2013-10 by Zappadoc
** ALL INFORMATION BELOW ARE SUBJECT TO CHANGE WITHOUT NOTICE **
@@ -37,42 +37,83 @@ All event functions below must return 1 if the event has been fully managed or
2 to skip and give control to SLIMax Mgr
---------------------------------------------
+GLOBAL EVENTS (ALL DEVICES)
+---------------------------------------------
+function controlsEvent(deviceType, ctrlType, ctrlPos, value, funcIndex, targetDevice) and custom_controlsEvent
+params = see the control.lua script
+Devices supported: global event
+Notes: Controls Event, Manage buttons and switches. (see controls.lua script)
+
+---------------------------------------------
+function deviceReport(deviceType) and custom_deviceReport
+param = the current targeted device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+Devices supported: global event
+Notes: This function is called periodically and outputs the previously processed data to the device when it returns
+back to the manager, if needed, patch any previous function here to
+display additional info or to change everything. (see devhook.lua script)
+
+---------------------------------------------
+function enterSessionEvent(deviceType) and custom_enterSessionEvent
+param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+Notes: Triggered when the session starts
+(see enter_exit_session.lua script)
+
+---------------------------------------------
+function exitSessionEvent(deviceType) and custom_exitSessionEvent
+param = current device (BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU)
+Devices supported: global event
+Notes: Triggered when the session ends
+(see enter_exit_session.lua script)
+
+---------------------------------------------
+LOCAL EVENTS (SPECIFIC TO DEVICES)
+---------------------------------------------
function shiftLightsMethodEvent(idx) and custom_shiftLightsMethodEvent
function shiftLightsBU0710Event(idx) and custom_shiftLightsBU0710Event
function shiftLightsFanatecMethodEvent(idx) and custom_shiftLightsFanatecMethodEvent
function shiftLightsG27LedsMethodEvent(idx) and custom_shiftLightsG27LedsMethodEvent
+function shiftLightsSRDlxMethodEvent(idx) and custom_shiftLightsSRDlxMethodEvent
+function shiftLightsSRF1MethodEvent(idx) and custom_shiftLightsSRF1MethodEvent
param = current method index
-Devices supported: SLI Boards series, Fanatec Wheels and Logitech G27 leds
+Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
Notes: shiftlights method event, computes all shiftlights methods
(see shiftlights.lua script)
---------------------------------------------
function ospMethodEvent(idx) and custom_ospMethodEvent
+function ospSRDlxMethodEvent(idx) and custom_ospSRDlxMethodEvent
+function ospSRF1MethodEvent(idx) and custom_ospSRF1MethodEvent
function ospFanatecMethodEvent(idx) and custom_ospFanatecMethodEvent
function ospG27LedsMethodEvent(idx) and custom_ospG27LedsMethodEvent
param = current method index
-Devices supported: SLI Boards series, Fanatec Wheels and Logitech G27 leds
+Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
Notes: OSP method event, computes all Optimal Shift-Points methods
(see osp.lua script)
---------------------------------------------
function spdLmtMethodEvent(idx) and custom_spdLmtMethodEvent
+function spdLmtSRDlxMethodEvent(idx) and custom_spdLmtSRDlxMethodEvent
+function spdLmtSRF1MethodEvent(idx) and custom_spdLmtSRF1MethodEvent
function spdLmtFanatecMethodEvent(idx) and custom_spdLmtFanatecMethodEvent
function spdLmtG27MethodEvent(idx) and custom_spdLmtG27MethodEvent
param = current method index
-Devices supported: SLI Boards series, Fanatec Wheels and Logitech G27 leds
+Devices supported: BU0710, SLI-M, SLI-PRO, SIM RACE Deluxe, SIM RACE F1, Fanatec Wheels and Logitech G27 leds and emulators SLI-EMU and SRF1-EMU
Notes: speedlimiter method event, computes all speedlimiter methods
(see speedlimiter.lua script)
---------------------------------------------
function leftDigitsEvent(swPosition) and custom_leftDigitsEvent
function rightDigitsEvent(swPosition) and custom_rightDigitsEvent
+function srdlxLeftDigitsEvent(swPosition) and custom_srdlxLeftDigitsEvent
+function srdlxRightDigitsEvent(swPosition) and custom_srdlxRightDigitsEvent
+function srf1LeftDigitsEvent(swPosition) and custom_srf1LeftDigitsEvent
+function srf1RightDigitsEvent(swPosition) and custom_srf1RightDigitsEvent
function fanatecDigitsEvent(swPosition) and custom_fanatecDigitsEvent
param = switch position
-Devices supported: SLI Boards series and Fanatec Wheels
-Notes: SLI-PRO Left and Right Panel and Fanatec digits functions events, computes data to be
-displayed on left and rights digits of SLI-PRO device
-(see slipro.lua script)
+Devices supported: SLI-PRO, SIM RACE Deluxe, SIM RACE F1 and Fanatec Wheels and emulators SLI-EMU and SRF1-EMU
+
+Notes: computes data to be displayed on digits panel of the device
+(see scripts: slipro.lua, simracedlx.lua, simracef1.lua and fanatec.lua)
---------------------------------------------
function gearEvent(gear) and custom_gearEvent
@@ -83,33 +124,6 @@ Notes: gear event, show the current selected gear on central digit
(see gear.lua script)
---------------------------------------------
-function controlsEvent(deviceIdx, ctrlType, ctrlPos, value, funcIndex) and custom_controlsEvent
-params = see the script
-Devices supported: global event
-Notes: Controls Event, Manage buttons and switches. (see controls.lua script)
-
----------------------------------------------
-function deviceReport(devType) and custom_deviceReport
-param = the current targeted SLI device
-Devices supported: global event
-Notes: This function is called periodically and outputs the previously processed data to the device when it returns
-back to the manager, if needed, patch any previous function here to
-display additional info or to change everything. (see devhook.lua script)
-
----------------------------------------------
-function enterSessionEvent(devType) and custom_enterSessionEvent
-param = current device (SLI-M, SLI-PRO or BU0710)
-Notes: Triggered when the session starts
-(see enter_exit_session.lua script)
-
----------------------------------------------
-function exitSessionEvent(devType) and custom_exitSessionEvent
-param = current device (SLI-M, SLI-PRO or BU0710)
-Devices supported: global event
-Notes: Triggered when the session ends
-(see enter_exit_session.lua script)
-
----------------------------------------------
function ledEvent(idx, ledFunction, state) and custom_ledEvent
param = index of the led, std state of the led and corresponding function
1=LowFuel
@@ -178,11 +192,11 @@ param motor = 0 or 1 (left or right motor )
param power: from 0 to 100
param delay: from 0 to 1000 ms (1sec max)
-SetFanatecLed(string table)
+SetFanatecLed(string table) <<<<< DEPRECATED use SetRPMLed()
param string = name of lua table (default mRPMLedTable)
set RPM led of Fanatec rim ( see shiftlights.lua script)
-SetFanatecGear(gear)
+SetFanatecGear(gear) <<<<< DEPRECATED use SetGearDigits()
param string = one char string (i.e. "r" or "n" or "1" ... )
set the gear value in center of the Fanatec digits panel (see fanatec.lua script)
@@ -206,19 +220,19 @@ set gear digit of current targeted SLI device ( see gear.lua script)
---------------------------------------------
SetRPMLed(string)
param string = name of lua table (default mRPMLedTable)
-set RPM led of current targeted SLI device, SLI-M or SLI-PRO ( see shiftlights.lua script)
+set RPM led of current targeted SLI device, SLI-M or SLI-PRO or SIM RACE Deluxe ( see shiftlights.lua script)
---------------------------------------------
SetWarnLed(idx, val)
param integer = index of led from 1 to 6
param integer = value 1 or 0
-set the 6 extra leds of current targeted SLI device (SLI-M or SLI-PRO)
+set the 6 extra leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
---------------------------------------------
SetExtLed(idx, val)
param integer = index of led from 1 to 5
param integer = value 1 or 0
-set the 5 external leds of current targeted SLI device (SLI-M or SLI-PRO)
+set the 5 external leds of current targeted SLI device (SLI-M or SLI-PRO or SIM RACE Deluxe)
---------------------------------------------
SetOSPStatus(boolean)
@@ -227,28 +241,28 @@ in Optimal ShiftPoints (OSP) Methods compute your own OSP curve and set
the corresponding OSP state with this function (true or false - see osp.lua script)
---------------------------------------------
-========== SLI-PRO DIGITS ==========
+========== SLI-PRO or SIM RACE Deluxe DIGITS PANELs ==========
SetRightDigits(string)
SetLeftDigits(string)
param string = 6 chars string + delimiter
set the alpha-numerical text (including the . and : delimiter) to the right
-and left digits (see slipro.lua script)
+and left digits (see slipro.lua or simracedlx.lua script)
---------------------------------------------
SetDigitsAllowed(boolean)
param boolean = true or false
-by default the 6 + 6 SLI-PRO digits are showed but sometime we need to temporarily
+by default the 6 + 6 SLI-PRO digits or 4 x 4 SIM RACE Deluxe digits are showed but sometime we need to temporarily
hide them to set our custom information, pass false to this function to hide digits
and true to show them again
---------------------------------------------
-SetKeystroke(keycode, delay, modifier)
+SetKeystroke(keycode, delay, modifier, modifier2)
param string or integer = the key as a string (see the special keycode table below ) or Microsoft VKey code as integer
param int = the delay from 50 to 1000 ms
-param modifier = SHIFT or CONTROL or ALT
-This function is experimental and unsupported
+param modifier = SHIFT or CONTROL or ALT or ""
+param optional modifier2 = SHIFT or CONTROL or ALT or ""
-SPECIAL KEYCODE TABLE:
+SPECIAL KEYCODE TABLE IN ADDITION TO A...Z CHARS:
BACKSPACE
DEL
INSERT
@@ -314,8 +328,9 @@ Param "selector" (string), this string contains the following value:
SLISleep(ms)
-----------------------------------------------------------------------------------
+Force sending report (not recommended)
SLISendReport()
-FanatecSendReport()
+FanatecSendReport() <<<<< DEPRECATED use SLISendReport()
-----------------------------------------------------------------------------------
SetGlobalBrightness(int)
@@ -336,6 +351,25 @@ param integer = from 0 to 5000
set interval to update the display for easy reading of time
the deltatime delay is in ms (1000 = 1s )
+---------------------------------------------
+result = SetSMXGlobal(globalVarName, stringValue)
+param globalVarName = ref name to global
+param stringValue = value (if you want to store a number convert it to string)
+result return = -2 exceed capacity (20 global max); -1 Error; 0 create new record; 1 update new record
+
+---------------------------------------------
+result, stringValue = GetSMXGlobal(globalVarName )
+param globalVarName = ref name to global
+return string in stringValue or empty
+result return = -1 Error; 0 not found; 1 ok
+
+---------------------------------------------
+SMXMessageBox(text, title, buttons_style, icon_style)
+param text = message text
+param title (optional) = title of the dialog box
+param buttons_style (optional) = see global.lua or Microsoft MessageBox buttons flags
+param icon_style (optional) = see global.lua or Microsoft MessageBox icon flags
+
=========================================
functions to get SLI Manager Information
=========================================
@@ -354,6 +388,9 @@ Param "selector" (string), this string contains the following value:
IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
+"devicelist" return the coma delimited list of current detected devices IDs (included game controllers)
+Reminder regarding device ID: if ID < 40 this is a shiftlight/Digits device; if >=40 this is a game controller
+
Fanatec additions:
"bypass" return the state of BYPASS preference (see advanced options panel)
"fanatecdigitscount" return the number of digits default = 3
@@ -371,7 +408,7 @@ Fanatec additions:
"shiftlightsmethod" return current selected method of targeted device
"ospmethod" return current selected method of targeted device
"speedlimitermethod" return current selected method of targeted device
-
+"pitfeedback" return true when car is on pit lane
"ospcustom" return true if an OSP record to the current car has been found
"neutral" return ascii code of neutral char (default 'n')
"reverse" return ascii code of reverse char (default 'r')
@@ -417,6 +454,7 @@ Fanatec additions:
"globalbrightness" return current global brightness value
"lowfuel" return low fuel status
"dumplastlap" return status of telemetry report (true = activated)
+"safetycar" return status of SC (true = ON TRACK ) if available
-----------------------------------------------------------------------------------
GetCarInfo("selector")
@@ -424,6 +462,8 @@ returns car info (internal function)
Param "selector" (string), this string contains the following value:
IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
+
+"ignition" return the ignition state in rFactor2, 0=off 1=ignition 2=ignition+starter
"kers" return kers value
"kers max" return max kers energy
"drs" return ON or OFF status
@@ -435,10 +475,14 @@ IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
"inpits" car is in pitlane? (integer) 0= on track; 1= pit stall area; 2= Approaching Pits (Pit Road)
"rpm" return current car rpm (r/mn)
"redzone" return current max engine rpm
+
"fuel" return current fuel in tank
"fuelmax" return the max capacity of fuel tank
"fuelperlap" return the consumption of fuel during the previous lap, updated after each lap
+"averagefuelperlap" return the average of consumption of fuel during a lap
+"remainlapsintank" get an average consumption of fuel per lap and return the remaining laps
"fuelatstart" return the fuel in tank at the beginning of each lap
+
"watertemp" return water engine temp (celsius)
"oiltemp" return oil engine temp (celsius)
"sector" return current sector (integer)
@@ -475,6 +519,7 @@ IMPORTANT ** THESE VALUES ARE NOT AVAILABLE IN ALL SIMULATIONS ** IMPORTANT
"laptime" return current lap time if available
"bestlaptime" return best lap time if available
"lastlaptime" return last lap time if available
+"realdifftimeready" return true when telemetry data of at least one lap has been collected if available
"realdiffbest" return real-time diff (delta) vs best if available
"realdifflast" return real-time diff (delta) vs last if available
"sector1" return current sector 1 if available
@@ -539,6 +584,31 @@ returns the corresponding name of device ID
Param deviceID (integer)
return string value
+-----------------------------------------------------------------------------------
+GetLedIndex("selector")
+returns the corresponding index of the led
+Param led function (string) see the list below
+return integer value
+
+"speedlimiter"
+"osp1"
+"osp2"
+"lowfuel"
+"tractioncontrol"
+"abs"
+"greenflag"
+"yellowflag"
+"redflag"
+"overheating"
+"damage"
+"pitrequest"
+"power"
+"revlimit"
+"headlights"
+"blueflag"
+"drs"
+"safeprefs"
+"drslegal"
===============================
Script Developpment
@@ -558,8 +628,26 @@ gRedZone = the default value is set in gear.lua script. This value can be overwr
mLeftSpdLmtText and mRightSpdLmtText contains the default text for left and right digits panel in speedlimiter method 4 and 5 and can be "patched" (replaced with your own text) in custom_spdLmtMethodEvent() function (see custom_scripts.lua file)
mOSPMethod to overwrite the method value, useful in custom_ospMethodEvent() function to patch the current OSP method with another one
+mOSPBU0710Method same as above for BU0710
+mOSPG27Method same as above for G27
+mOSPFanatecMethod same as above for Fanatec
+mOSPSRDlxMethod same as above for SIM RACE Deluxe
+mOSPSRF1Method same as above for SIM RACE F1
mSpdLimitMethod to overwrite the method value, useful in custom_spdLmtMethodEvent() function to patch the current PIT LIMITER method with another one
+mSpdLimitG27Method same as above for G27
+mSpdLimitFanatecMethod same as above for Fanatec
+mSpdLimitSRDlxMethod same as above for SIM RACE Deluxe
+mSpdLimitSRF1Method same as above for SIM RACE F1
+
+mShiftlightsMethodIndex to overwrite the method value, useful in custom_shiftlightsMethodEvent() function to patch the current shiftlights method with another one
+mShiftlightsBU0710MethodIndex same as above for BU0710
+mShiftlightsG27MethodIndex same as above for G27
+mShiftlightsFanatecMethodIndex same as above for Fanatec
+mShiftlightsSRDlxMethodIndex same as above for SIM RACE Deluxe
+mShiftlightsSRF1MethodIndex same as above for SIM RACE F1
+
+oldGear is useful in custom_gearFanatecEvent() function to patch the current gear value
-----------------------
SHIFTLIGHTS UTILITIES