RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorExport (glTF)Follow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track (Gymkhana Generator)Rectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot Creator (Vehicle Thumbnails)ShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files Syntaxutil/vehicleRopeDebug - Rope Physics Debug UIutil/worker - Batch Job Workerutil/wsTest - WebSocket Test Server

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsutil

Log Streams

Simple file I/O helper for reading and writing logged stream data in JSON, wikitable, and reStructuredText formats.

Simple file I/O helper for reading and writing logged stream data in JSON, wikitable, and reStructuredText formats.


Overview

util_logStreams provides basic read/write functions for three file formats: JSON, wikitable (.txt), and reStructuredText (.rst). Used for persisting logged stream data to disk.

Extension path: lua/ge/extensions/util/logStreams.lua


Exports (M)

FunctionSignatureDescription
saveJson(data)Writes data as pretty JSON to loggedStreams.json.
readJson()Reads and returns parsed JSON from loggedStreams.json.
saveWikitable(data)Writes string data to loggedStreams.txt.
readWikitable()Reads loggedStreams.txt, escaping newlines as \n.
saveRst(data)Writes string data to loggedStreams.rst.
readRst()Reads loggedStreams.rst, escaping newlines as \n.

Internals

File Paths

FormatFile
JSONloggedStreams.json
WikitableloggedStreams.txt
RSTloggedStreams.rst

Read Behavior

The readWikitable and readRst functions replace newlines with literal \n strings using gsub('\n', '\\n'). This is a workaround to return the entire file as a single-line string suitable for embedding.


How It Works

  1. Use saveJson(data) to persist structured data.
  2. Use readJson() to load it back.
  3. Wikitable and RST variants work with raw string data.

Lua Examples

-- Save stream data as JSON
extensions.util_logStreams.saveJson({streams = {"stream1", "stream2"}})

-- Read it back
local data = extensions.util_logStreams.readJson()
dump(data)

-- Save as wikitable format
extensions.util_logStreams.saveWikitable("{| class='wikitable'\n|+ Streams\n|}")

-- Read wikitable (newlines escaped)
local wiki = extensions.util_logStreams.readWikitable()

Additional Exports

  • M.readJson - (undocumented)
  • M.readRst - (undocumented)
  • M.readWikitable - (undocumented)
  • M.saveJson - (undocumented)
  • M.saveRst - (undocumented)
  • M.saveWikitable - (undocumented)

JBeam Stats

Generates statistics about all JBeam files in the game - part counts, section usage, line counts, and modifier counts.

Map Tiles

Generates orthographic map tile images at multiple zoom levels for use with web map viewers (e.g., Leaflet). Includes an ImGui control panel with progress tracking.

On this page

OverviewExports (M)InternalsFile PathsRead BehaviorHow It WorksLua ExamplesAdditional Exports