GEWelcome to the open source BeamNG.Drive Lua docs! I started this project because there isn't much out there about the Lua API, and I got sick of having to use dump to scoure for any useful functions and some lucky inspiration. If you would like to contribute with information, feel free to create a PR on Github. To see the source code for this little project, check out my Github repository. These docs have been generated using the code in that repository, with the help of the DocGen mod I wrote.
You currently find yourself on the GE Lua page. For vehicle-specific Lua docs, check out the VE lua page.
ActionMapActionMapCommandContextAdvancedLightBinManagerADVLMCallbacksAIPathAIPlayerAL_DepthVisualizeCallbacksAL_LightColorVisualizeCallbacksAL_LightSpecularVisualizeCallbacksAL_NormalsVisualizeAngAxisFAnnotationVisualizeCallbacksArrayObjectBaseMaterialBasicCloudsbeBeamEngineBeamEngineStreamBeamNGBoosterBeamNGEnvTriggerBeamNGGameplayAreaBeamNGLightBeamNGNodeGrabberBeamNGNodeStreamPhysFSBeamNGParkingBeamNGPointOfInterestBeamNGSpecialPointlightBeamNGSpecialSpotlightBeamNGTriggerBeamNGVehicleBeamNGWaypointBeamNGWorldIconsRendererbitBLMCallbacksBNGBase_FS_IFileSystemBNGUIDataStreamManagerBNGWebMgmtBNGWebWSServerBNGWSClientBox3FBrushbullettimeCameraCameraBookmarkCameraDatacampaign_campaignsLoadercareer_branchescareer_careercareer_saveSystemCefGuiChromaticLensPostFXCallbacksCloudLayerColorFColorIcommandsCompoundUndoActionConsoleBaseTypeConsoleLoggerConsoleObjectConvexShapecore_audiocore_audioRibboncore_cameracore_checkpointscore_commandhandlercore_devicescore_environmentcore_flowgraphManagercore_forestcore_funstuffcore_gameContextcore_gamestatecore_groundMarkerArrowscore_groundMarkerscore_hardwareinfocore_highscorescore_input_actionFiltercore_input_actionscore_input_bindingscore_input_categoriescore_input_deprecatedActionscore_input_vehicleSwitchingcore_input_virtualInputcore_inventorycore_jobsystemcore_lapTimescore_levelscore_modmanagercore_multiseatcore_multiseatCameracore_multiSpawncore_onlinecore_pathscore_quickAccesscore_recoveryPromptcore_remoteControllercore_replaycore_settings_audiocore_settings_graphiccore_settings_settingscore_soundscore_terraincore_trafficSignalscore_trailerRespawncore_vehicle_colorscore_vehicle_managercore_vehicle_mirrorcore_vehicle_partmgmtcore_vehicleActivePoolingcore_vehicleBridgecore_vehiclePaintscore_vehiclescore_vehicleTriggerscore_versionUpdatecore_weathercore_windowsConsolecoroutineCoverPointCppSettingsCrowdCubemapDataCustomMaterialdebugDebugDrawerdebugDrawerDecalDataDecalInstanceDecalManagerDecalProjectionDecalProjectionMaterialDataDecalProjectionShapeDecalRoadDecalShapeRenderAppDeferredDecalDeviceDiscorddocgen_mainDOFPostEffectCallbackseditoreditor_maineditor_veMainEditorGizmoEditorGizmoProfileEditorToolBaseEditorViewportCtrlEngineEventManagerextensionsFakeInteriorAppffiFG_New Project_2_virtual_1FG_New Project_2_virtual_1_state_Main-10_virtual_2FG_New Project_2_virtual_1_StateResolver_virtual_3FileObjectFILTER_NAMEFlashFxCallbacksFlowgraphSceneObjectFontRasterizerForestForestBrushForestBrushElementForestBrushToolForestDataForestEditorCtrlForestItemForestItemDataForestSelectionToolForestToolForestWindEmitterfreeroam_bigMapMarkersfreeroam_bigMapModefreeroam_bigMapPoiProviderfreeroam_configuratorOptions_freeroamOptionsfreeroam_crashCamModeLoaderfreeroam_facilitiesfreeroam_freeroamfreeroam_freeroamConfiguratorfreeroam_gasStationsfreeroam_levelStatsfreeroam_organizationsfreeroam_specialTriggersfreeroam_vueBigMapFrustumFSFXAA_PostEffectCallbacksGameBaseGameBaseDatagameConnectiongameplay_citygameplay_crawl_boundarygameplay_crawl_displaygameplay_crawl_generalgameplay_crawl_saveSystemgameplay_crawl_utilsgameplay_discovergameplay_drag_dragBridgegameplay_drag_generalgameplay_drag_saveSystemgameplay_drift_displaygameplay_drift_driftgameplay_drift_freeroam_cruisinggameplay_drift_freeroam_driftSpotsgameplay_drift_generalgameplay_drift_quickMessagesgameplay_drift_saveLoadgameplay_drift_scoringgameplay_drift_statisticsgameplay_forceFieldgameplay_garageModegameplay_markerInteractiongameplay_missions_missionManagergameplay_missions_missionsgameplay_missions_missionScreengameplay_missions_progressgameplay_missions_startTriggergameplay_missions_unlocksgameplay_parkinggameplay_playmodeMarkersgameplay_policegameplay_rawPoisgameplay_sites_sitesManagergameplay_speedTrapLeaderboardsgameplay_speedTrapsgameplay_statisticgameplay_statisticModules_watchJturngameplay_statisticModules_watchRollovergameplay_trafficgameplay_traffic_trafficUtilsgameplay_util_crashDetectiongameplay_util_damageAssessmentgameplay_util_groundContactgameplay_walkGameViewportCtrlGammaPostFXCallbacksGBitmapGFXDeviceGFXInitGFXOcclusionQueryHandleGFXSamplerStateDataGFXStateBlockDataGPUMeshground_modelGroundCoverGroundPlaneGui3DMouseEventGuiCanvasGuiContainerGuiControlGuiControlProfileGuiCursorGuiEditCtrlGuiEditorRulerGuiEventguihooksGuiViewportCtrlhptimerHtmlGuiIconInfoImGuiInputTextCallbackDataImguiRenderViewControliojitjsonLevelInfoLevelLogItemLightAnimDataLightBaseLightDescriptionLightFlareDataLightManagerLightRayPostFXCallbacksLightShadowMaploadingContextLoadingManagerLoadingManagerClassLoadingScreenScopedCallbackContextLogSinklpackLuamapMarkerMaterialMaterialManagermathMatrixFMeshRoadMessageMessageForwardermimeMirrorDataMissionMarkerMissionMarkerDataMotionBlurFXCallbacksMoveManagerNavMeshNavPathNewWorldEditorOcclusionVolumeOnlineServiceProviderOpenXROrientedBox3FospackageparseArgsParticleDataParticleEmitterParticleEmitterDataParticleEmitterNodeParticleEmitterNodeDatapathperfPersistenceManagerPhysicsFlexMeshPhysicsPluginPhysicsPropPlanetPlatformSwitchesPlayerPlayerDataPoint2FPoint2IPoint3DPoint4FPointLightPortalPostEffectPostEffectBasePostEffectBloomClassPostEffectBloomGaussianBlurPostEffectBrightPasspostEffectCallbacksPostEffectCombinePassPostEffectDebugPostEffectDownSampleLuminancePostEffectDownScalePostEffectFinalLuminancePostEffectGaussianBlurPostEffectLuminancePostEffectMaskedBlurPostEffectMotionBlurPostEffectSampleLuminanceInitialPostEffectSSAOpostFxModulePostFxTAAPrecipitationPrecipitationDataPrefabPrefabInstancePrefabV2presetKeysProceduralMeshQuatFRectIReflectorDescrender_hdrRenderAnnotationBinManagerRenderBinManagerRenderBinSecondayRenderEditorMgrRenderExamplePostEffectDesaturateRenderFastMgrRenderFormatTokenRenderGlowMgrRenderImposterMgrRenderObjectMgrRenderOcclusionMgrRenderParticleMgrRenderPassfunctionBinRenderPassManagerRenderPassPipelineRenderPassStateBinRenderPassStateTokenRenderPrePassMgrRenderTerrainMgrRenderTexTargetBinManagerRenderTranslucentMgrRenderVelocityPassMgrRenderViewRenderViewManagerRenderViewManagerInstanceResearchVerifierRiverRopeVisualScatterSkyscenario_quickRaceLoaderscenario_racescenario_scenariosscenario_scenariosLoaderSceneCullingStateSceneManagerSceneObjectSceneStaticManagerRenderscenetreeScopeAlwaysShapescreenshotScriptMsgListenerScriptObjectSDFGenerator2DSDFGeneratorAppSecureCommSelectionserverserverConnectionsetSpawnpointsettingsSettingsSFXAmbienceSFXDescriptionSFXEmitterSFXEnvironmentSFXFMODEventDescSFXFMODEventDescImplSFXFMODEventDescOverrideSFXFMODEventSourceSFXFMODProjectSFXParameterSFXParameterGroupSFXProfileSFXSceneBlendLayer2DSFXSoundSFXSourceSFXSourceChannelSFXSourcesIterSFXSpaceSFXSystemSFXTrackShaderDataShadowMapManagerShadowMapPassShapeBaseShapeBaseDataShapePreviewSimSimDataBlockSimGroupSimObjectSimPathSimPersistSetSimResponseCurveSimSetsimTimeAuthoritySimXMLDocumentSkyBoxSMAA_PostEffectCallbackssocketspawnSpawnSphereSpotLightSSAOPostFxCallbacksStaticShapeStaticShapeDataSteamstringSuntabletech_licensetelemetry_coreTerrainActionTerrainBlockTerrainEditorTerrainMaterialTerrainMaterialTextureSetTerrainSmoothActionTextureDrawPrimitiveTextureDrawPrimitiveRegistryTheoraTextureObjectTimeOfDaytimerTorqueScriptTorqueScriptLuatrackbuilder_trackBuilderTrackIRTSShapeConstructorTSStaticui_appsui_apps_genericMissionDataui_apps_pointsBarui_appSelector_generalui_audioui_bindingsLegendui_consoleui_fadeScreenui_flowgraph_editorui_freeroamSelector_generalui_gameplayAppContainersui_gameplaySelector_generalui_gameplaySelector_tileGenerators_campaignTilesui_gameplaySelector_tileGenerators_levelTilesui_gameplaySelector_tileGenerators_missionTilesui_gameplaySelector_tileGenerators_scenarioTilesui_gameplaySelector_tilesui_gridSelectorui_imguiui_messagesTasksAppContainersui_missionInfoui_topBarui_topBar_configui_vehicleSelector_detailsInteractionui_vehicleSelector_generalui_vehicleSelector_tilesui_vehicleSelector_vehicleOperationsui_vehicleSelector_vehicleSpecificationsui_visibilityUnderwaterFogPostFxCallbacksUndoActionUndoManagerUndoScriptActionutil_richPresencevEditorVehicleTriggerVirtualInputManagerWaterBlockWaterObjectWaterPlaneWayPointWinInputworldEditorCppApiZipArchiveZonefunction __finalizeLuaBindings(classes, luaVMname)function __luaBindIndex(t, k)function __luaBindIndexStatic(t, k)function __luaBindNewindex(t, k, v)function __luaBindNewindexStatic(t, k, v)function _flowgraph_createModule(...)function _flowgraph_createNode(...)function _flowgraph_createStateNode(...)function _kv(kv)function activeVehiclesIterator(ctx)function addLevelLog(object, logLevel, origin, uniqueErrorCode, message)function addPrefab(objName, objFileName, objPos, objRotation, objScale, useGlobalTranslation)function alertOK(...)function altitudeOBB_Plane(c1, x1, y1, z1, plpos, pln)function arrayConcat(dst, src)function arrayFindValueIndex(t, val)function arrayReverse(array)function arrayShuffle(array)function assert(...)function assignPlayerToDevice(...)function assimpGetSupportedFileformats(...)function attachDebugger(...)function biasFun(x, k)function biasGainFun(x, t, s)function biQuadratic(p0, p1, p2, p3, t)function bpackDecode(...)function bpackEncode(...)function BString(...)function bumpFun(x, peakLeftX, peakRightX, leftSlope, rightSlope, leftY, peakY, rightY, roundness)function bytes_to_string(bytes)function cameraMouseRayCast(...)function captureCameraCubemap(...)function cardinalSpline(p0, p1, p2, p3, t, s, d1, d2, d3)function castRay(origin, target, includeTerrain, renderGeometry)function castRayDebug(origin, target, includeTerrain, renderGeometry)function castRayStatic(...)function catmullRom(p0, p1, p2, p3, t, s)function catmullRomCentripetal(p0, p1, p2, p3, t, s)function catmullRomChordal(p0, p1, p2, p3, t, s)function CEFTypingLostFocus()function checkFSErrors()function checkTableDataTypes(data, expectedTypes)function checkVehicleProperty(vid, propertyName, value)function clamp(x, minValue, maxValue )function clearAllRopeVisuals(...)function clearLevelLogs()function clientEndMission(levelPath)function clientPostStartMission(levelPath)function clientPreStartMission(levelPath)function clientStartMission(levelPath)function closeMeshAnimationTester(...)function closestLinePoints(l1p1, l1p2, l2p1, l2p2)function closestLineSegmentPoints(l1p1, l1p2, l2p1, l2p2)function collectgarbage(...)function collisionReloadTest()function color(r, g, b, a)function colorGetRGBA(col)function colorHex(rgbHex, a)function compileCollada(...)function completeIntegrityChunk(...)function concatWorkBuffer(...)function conicBezier(p1, p2, p3, t, w)function consoleAddAvailableContext(...)function consoleClearAvailableContexts(...)function ConsoleInputCallback(data)function consoleRemoveAvailableContext(...)function consoleSetContext(...)function consoleSetPrintLogTimeAndOrigin(...)function constainsCylinder_Point(cposa, cposb, cR, p)function containerRayCast(...)function containsEllipsoid_Point(c1, x1, y1, z1, p)function containsOBB_OBB(c1, x1, y1, z1, c2, x2, y2, z2)function containsOBB_point(c1, x1, y1, z1, p)function containsOBB_Sphere(c1, x1, y1, z1, c2, r2)function containsSphere_OBB(c1, r1, c2, x2, y2, z2)function convertAnimationFormat(...)function convertColladaToGlTF(...)function convertCStoJson(filenames, newExtSuffix)function convertDDSToPNG(...)function convertLevelPrefabs(levelPath)function convertPrefabtoJson(filepath)function convertToDDS(...)function convertVehicleColorsToPaints(colorTable)function convertVehicleIdKeysToVehicleNameKeys(data)function convertVehicleNameKeysToVehicleIdKeys(data)function copyfile(src, dst)function createGlobalSnapshot(filename)function createObject(className)function createPlayerSpawningData(model, config, color, licenseText, vehicleName, pos, rot)function createRopeVisual(...)function createScreenshot(...)function createVehiclePaint(color, metallicData)function debugBreak(...)function decalManagerClear(...)function deepcopy(object)function deleteObject(name)function deserialize(s)function deserializePackages(data, filter)function destroyRopeVisual(...)function detachDebugger(...)function detectGlobalWrites()function dirContent(path)function dofile(...)function dot(...)function dump(...)function dumpGfxResourcesMemory()function dumpNamedTextureToPNG(...)function dumpNotNil(x)function dumps(...)function dumpsz(o, depth)function dumpToFile(filename, ...)function dumpz(o, depth)function editorEnabled(enabled)function enableCEFDevConsole(...)function enableCommunityTranslations()function enableMaterialDebug(...)function enableWinConsole(...)function endActiveGameMode(callback)function enumerateConsoleClasses(...)function error(...)function escape_magic(str)function exec(...)function executeLuaSandboxed(cmd, source)function exportPersistentData()function exportToJson(...)function extractVehicleData(vid)function fileExistsOrNil(path)function fillVehicleSpawnOptionDefaults(modelName, opt)function findAllObjects(...)function findFirstFile(...)function findNextFile(...)function findObjectList(...)function findObjectListFrustum(...)function flattenTable(tbl)function flushGroundCoverGrids(...)function forceShutdown(...)function forEachAudioChannel(callback)function formatTimeStringNow(res)function freqGenC(period, ampl, t)function sign(x)function gcinfo(...)function gcprobe(printZero, omitPrint)function generateObjectNameForClass(className, objectName)function getActiveDDSFiles(...)function getActiveLightManager(...)function getAllLevelIdentifiers()function getAllRopeVisuals(...)function getAllVehicles()function getAllVehiclesByType(typeList)function getAudioChannelsVolume()function getBitmapInfo(...)function getBlueNoise1d(x)function getCamera(...)function getCameraForward() deprecationWarning("getCameraForward", "core_camera.getForward") return core_camera.getForward() endfunction getCameraFov() deprecationWarning("getCameraFov", "core_camera.getFovDeg") return core_camera.getFovDeg() endfunction getCameraFovDeg() deprecationWarning("getCameraFovDeg", "core_camera.getFovDeg") return core_camera.getFovDeg() endfunction getCameraFovRad() deprecationWarning("getCameraFovRad", "core_camera.getFovRad") return core_camera.getFovRad() endfunction getCameraMouseRay(...)function getCameraMouseRayPosDir(...)function getCameraMouseRayStartPosEndPos(...)function getCameraPosition() deprecationWarning("getCameraPosition", "core_camera.getPosition") return core_camera.getPosition() endfunction getCameraProjMatrix(...)function getCameraQuat() deprecationWarning("getCameraQuat", "core_camera.getQuat") return core_camera.getQuat() endfunction getCameraRight() deprecationWarning("getCameraRight", "core_camera.getRight") return core_camera.getRight() endfunction getCameraTransform(...)function getCameraUp() deprecationWarning("getCameraUp", "core_camera.getUp") return core_camera.getUp() endfunction getCefDevConsoleOpen(...)function getCEFFocusMouse(...)function getClipboard(...)function getClosestVehicle(requesterID, callbackfct)function getComparisonOps() return comparisonOps endfunction getConsoleBoolVariable(...)function getConsoleVariable(...)function getCurrentLevelIdentifier(raw)function getDateTimeUTCString()function getDesktopVideoMode(...)function getDevicesByRecentActivity(...)function getDirectories(path)function getDirs(path, recursiveLevels)function getDisplayDeviceInformation(...)function getfenv(...)function getFileSize(filename)function getFunctionParameters(func)function getGame() return gameConnection end -- backward compatibilityfunction getGroundCoverScale(...)function getHardwareID(...)function getLevelLogs()function getLightManagerNames(...)function getMaxVehicleAmount(cap)function getmetatable(...)function getMissionFilename(...)function getMissionPath(...)function getModuleLocals(moduleTbl)function getMovedMouseLastTimeMs(...)function getObjectByClass(className)function getObjectByID(id)function getObjectsByClass(className)function getPlayerVehicle(player)function getRandomPaint(vehId, commonPaintProb)function getRenderWorldMain(...)function getRopeVisual(...)function getRopeVisualManagerStats(...)function getSceneWaypointRadius(o)function getScreenShotDateTimeString(...)function getScreenShotFolderString(...)function getStockColor(...)function getStreamManager(...)function getTimeOfDay(asString)function getTSVar(...)function getVehicleColor(vehicleID)function getVehicleColorPalette(index, vehicleId)function getVehiclePaint(vehicleId)function getVirtualInputManager(...)function graphs(v, len)function greyColor(x, a)function guardZero(x) --branchlessfunction hashStringSHA1(...)function hashStringSHA256(...)function hashStringXXH(...)function hex_dump(str)function HSVtoRGB(h, s, v)function imageExistsDefault(path, fallbackPath)function importPersistentData()function init(reason)function intersectsRay_Capsule(rpos, rdir, cposa, cposb, cR )function intersectsRay_Cylinder(rpos, rdir, cposa, cposb, cR)function intersectsRay_Ellipsoid(rpos, rdir, c1, x1, y1, z1)function intersectsRay_OBB(rpos, rdir, c1, x1, y1, z1)function intersectsRay_Plane(rpos, rdir, plpos, pln)function intersectsRay_Sphere(rpos, rdir, cpos, cr)function intersectsRay_Triangle(rpos, rdir, a, b, c)function invalidatePlayerVehicles()function invalidateVehicleCache()function inverseLerp(from, to, value)function ipairs(...)function ironbowColor(x, a)function isDebuggerAttached(...)function isFile(...)function isinf(a)function isMeshAnimationTesterOpen(...)function isnan(a)function isnaninf(a)function isOfficialContent(path)function isOfficialContentVPath(vpath)function isPlayerVehConfig(vpath)function isSafeMode()function isTorqueScriptFunction(...)function isWindowFocused(...)function jetColor(x, a)function jitprobe()function jsonDecode(content, context)function jsonEncode(v)function jsonEncodePrefix(prefix, v, postfix)function jsonEncodePretty(v, lvl, numberPrecision)function jsonEncodeWorkBuffer(v)function jsonReadFile(filename)function jsonWriteFile(filename, obj, pretty, numberPrecision, atomicWrite)function lerp(from, to, t)function lightScene(...)function linearScale(v, minValue, maxValue, minOutput, maxOutput)function lineBB2d(x1, y1, x2, y2, radius)function linePointFromXnorm(p0, p1, xnorm)function load(...)function load_spawn_prefabv2_indirect()function load_test_prefabv1()function load_test_prefabv2()function loadDirRec(dir)function loadfile(...)function loadGameModeModules(...)function loadIni(filename)function loadJsonMaterialsFile(...)function loadManualUnloadExtensions()function loadPrefabv2Template(filename)function loadPresetExtensions()function loadstring(...)function lockMouse(...)function log(...)function logAlways(...)function logError(...)function logInputRegistryListeners(...)function logWarning(...)function lpad(s, l, c)function LuaExecuteFile(...)function LuaExecuteQueueString(...)function LuaExecuteStringSync(...)function luaPreRender(dtReal, dtSim, dtRaw)function LuaProfiler(...)function makeRelativePath(...)function materialDebugGetFlag(...)function materialDebugSetFlag(...)function median3(a,b,c)function median4(a,b,c,d)function median5(a,b,c,d,e)function messageBox(...)function module(...)function monotonicSteffen(y0, y1, y2, y3, x0, x1, x2, x3, x)function nanError(x)function newExponentialSmoothing(window, startingValue, fixedDt)function newExponentialSmoothingT(window, window2, startingValue)function newExtensionProxy(parentExtension, identifierPrefix)function newFPSLimiter(targetFPS)function newFreqDetector()function newFreqExists()function newFreqFilter1()function newLinearSmoothing(dt, inRate, outRate)function newLineFitting(window, weight, bias, scale)function newNopSmoothing()function newproxy(...)function newTemporalSigmoidSmoothing(inRate, startAccel, stopAccel, outRate, startingValue)function newTemporalSmoothing(inRate, outRate, autoCenterRate, startingValue)function newTemporalSmoothingNonLinear(inRate, outRate, startingValue)function newTemporalSpring(spring, damp, startingValue)function next(...)function nop()function OBBsquaredDistance(c1, x1, y1, z1, p)function onAiModeChange(vehicleID, newAiMode)function onBeamNGTrigger(data)function onBeamNGWaypoint(args)function onClusterTeleportNoReset(vehicle, nodeId, px, py, pz, rdx, rdy, rdz, rdw)function onCouplerAttached(objId1, objId2, nodeId, obj2nodeId)function onCouplerDetach(objId, nodeId)function onCouplerDetached(objId1, objId2, nodeId, obj2nodeId)function onExit()function onFileChanged(files)function onGameEngineStartup()function onInstabilityDetected(vid)function onLuaReloaded()function onMouseLocked(locked)function onPreExit()function onPreStart()function onPreStartCallback(...)function onPreWindowClose()function onSetClusterPosRelRot(vehicleID, cNodeId)function onSpawnError(status, jbeamFilename)function onTexDrawPrimCompressDone(textureName)function openMeshAnimationTester(...)function openWebBrowser(...)function openXRErrorDetected(...)function openXRStateChanged(...)function overlapsOBB_OBB(c1, x1, y1, z1, c2, x2, y2, z2)function overlapsOBB_Plane(c1, x1, y1, z1, plpos, pln)function overlapsOBB_Sphere(c1, x1, y1, z1, c2, r2)function pairs(...)function parseColor(v)function parseISO8601Date(isoString)function pcall(...)function physicsEngineEvent(...)function physicsStateChanged(val)function vec3(x, y, z)function point3f_2_Vector3(...)function pointBB2d(x, y, radius)function popActionMap (map)function prefabIsChildOfGroup(obj, groupName)function prepareStartupExtensionsList()function print(...)function nop()function nop()function push3(x, y, z)function pushActionMap (map)function pushActionMapHighestPriority(map)function quadraticBezier(p1, p2, p3, t)function quat(x, y, z, w)function quatFromAxisAngle(axle, angleRad)function quatFromDir(dir, up)function quatFromEuler(x, y, z) -- in radiansfunction queueCallbackInVehicle(veh, geluaFunctionName, vluaCommand, ...)function queueCmdlineLevelLoadExtension(extension)function quit(...)function quitWithErrorMessage(...)function rainbowColor(numOfSteps, step, format)function randomASCIIString(len)function randomGauss3()function randomState(v)function rapidjsonEncode(...)function rapidJsonSerializeTest(...)function rapidJsonSerialzieTest(...)function rawequal(...)function rawget(...)function rawset(...)function rayCastStartPosEndPos(...)function readDictJSONTable(filename)function readFile(filename)function readFiles(filenames, maxBatchSize)function registerCoreModule(extensionName)function reloadTextures(...)function reloadUI(...)function removeConsoleVariable(...)function removePrefab(objName)function replace_char(pos, str, r)function replaySpawnVehicle(jbeamFilename, partConfigData)function replayStartLevel(levelPath)function replayStateChanged(...)function requestAnnotatedBuffers(...)function requestGeluaProfile()function require(...)function require_optional(module)function rerequire(module)function rescale(v, minValue, maxValue, minOutput, maxOutput)function resetGameplay(playerID)function resetLightManager(...)function returnToMainMenu()function RGBtoHSV(r, g, b)function round(a)function roundNear(x, m)function rpad(s, l, c)function sanitizePath(...)function sanitizeVehicleSpawnOptions(model, opt)function saveIni(filename, d)function scenetree_test_fields()function scenetree_tests()function select(...)function sendUIModules()function serialize(v)function jsonWriteFile(filename, obj, pretty, numberPrecision, atomicWrite)function serializePackages(reason)function serializeWorkBuffer(v)function setAudioChannelsVolume(data)function setCameraFov(fovDeg)function setCameraFovDeg(fovDeg)function setCameraFovDegC(...)function setCameraFovRad(fovRad)function setCameraPosC(...)function setCameraPosRot(px, py, pz, rx, ry, rz, rw)function setCameraPosRotFovNearClipC(...)function setCameraRotC(...)function setCEFFocus()function setCEFTyping(...)function setClipboard(...)function setConsoleVariable(...)function setDifference(dst, src)function setEqual(set1, set2)function setExtensionUnloadMode(extension, unloadMode)function setfenv(...)function setGroundCoverScale(...)function setLightManager(...)function setLogMode(...)function setmetatable(...)function setMissionFilename(...)function setMissionPath(...)function setMouseCursorPosition(...)function setRandomSeed(...)function setRenderWorldMain(...)function setTimeOfDay(inp)function setTSVar(...)function setUnion(dst, src)function setVehicleProperty(vid, propertyName, value)function setWindowTitle(...)function sfxCreateDevice(...)function shallowcopy(orig)function showCefDevConsole(...)function shuffledPairs(t, ctx)function shutdown(...)function sigmoid1(x, a)function sign(x)function sign2(x)function signApply(s, v)function simObjectExists(...)function simpleDebugText3d(text, pos, radius, sphereColor, dir)function sleep(...)function smootherstep(x)function smootheststep(x)function smoothmax(a, b, k)function smoothmin(a, b, k)function smoothstep(x)function sortedPairs(t, ctx, f)function spaceSeparated4Values(a,b,c,d)function spawnPrefab(objName, objFileName, objPos, objRotation, objScale, useGlobalTranslation)function split(str, delim, nMax)function square(a)function startDebugServer(...)function startExperiment(...)function stopDebugServer(...)function String(...)function stringFormatWorkBuffer(...)function stringHash(text)function stringReplaceFast(...)function stringToTable(str, sep)function tableChooseRandomKey(t)function tableContains(t, element)function tableContainsCaseInsensitive(table, element)function tableDepth(tbl, lookup)function tableEndC(tbl)function tableFindKey(t, element)function tableFindRecursion(tbl)function tableInsertC(tbl, data)function tableIsArraySlow(tbl)function tableIsDict(tbl)function tableIsEmpty(tbl)function tableKeys(tbl, target)function tableKeysSorted(tbl, target)function tableMerge(dst, src)function tableMergeRecursive(t1, t2)function tableMergeRecursiveArray(t1, t2)function tableReadOnly(table)function tableRoundRobinKey(tbl, lastKey)function tableSize(tbl)function tableSizeC(tbl)function tableToColor(v)function tableValuesAsLookupDict(tbl, target)function test_GE_fields()function test_lua()function test_prefabv2()function test_spawn_prefabv2()function test_spawn_prefabv2_massive(count)function test_unload_prefabv2()function testBindings()function testCdaeSaveSpeed(...)function testColladaPerformance(...)function testColladaSuperCharger(...)function testGBitmap()function testRaycasting(dtReal)function testSounds()function testZIP()function the_high_sea_crap_detector()function timeprobe(omitPrint)function timeprobeStart()function toBFloat(...)function toFloat(...)function toggleAnnotationVisualize(...)function toggleCEFDevConsole(...)function toggleDepthViz(...)function toggleLightColorViz(...)function toggleLightSpecularViz(...)function toggleLightVisualizer(objName, enable, tsVariable)function toggleNormalsViz(...)function togglePerformanceGraph(...)function tonumber(...)function tostring(...)function translate(...)function translateDistance(value, big)function translateLanguage(...)function translateVelocity(value, big)function trim(s)function type(...)function ui_message(msg, ttl, category, icon)function uiReady()function unflattenTable(tbl)function unloadAutoExtensions()function unpack(...)function unrequire(m)function update(dtReal, dtSim, dtRaw)function updateFirstFrame()function updateLoadingProgress(val, txt)function updateTranslations()function updateTSShapeLoadProgressDynamic(progress, msg)function validateLevelPrefabs(levelPath)function validatePrefabJson(filepath)function validateVehicleDataColor(color)function validateVehiclePaint(paint)function vec3(x, y, z)function LuaVec3:__tostring()function vehicleActiveChanged(vehicleID, active)function vehicleDestroyed(vid)function vehicleMetallicPaintDataFromColor(colorTable)function vehicleMetallicPaintString(metallic, roughness, clearcoat, clearcoatRoughness)function vehicleReset(vehicleID)function vehicleSetPositionRotation(id, px, py, pz, rx, ry, rz, rw)function vehiclesIterator(ctx)function vehicleSpawned(vid)function vehicleSwitched(oldVehicle, newVehicle, player)function writeFile(filename, data)function xpcall(...)