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
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console

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 Extensionscore

Multiseat

Local multiplayer input assignment. Maps input devices (keyboards, gamepads) to player slots and seats players into vehicles. Supports up to 64 simultaneous players.

Local multiplayer input assignment. Maps input devices (keyboards, gamepads) to player slots and seats players into vehicles. Supports up to 64 simultaneous players.


Public Functions

FunctionSignatureDescription
M.getAssignedPlayers(devices, logEnabled, seatPlayers) → tableAssigns input devices to player numbers and optionally seats them
M.enterNextVehicle(player, step)Cycles a player to the next available vehicle

Device Assignment Rules

  • Keyboard and mouse are always assigned to player 0
  • Each additional controller (xinput, etc.) gets the next player number
  • Player count = min(maxPlayers, controllerCount)
  • Wraps around when more controllers than vehicles

Usage Example

-- Get current device-to-player mapping
local devices = WinInput.getRegisteredDevices()
local assignments = core_multiseat.getAssignedPlayers(devices, true, true)
-- Result: { keyboard0 = 0, mouse0 = 0, xinput0 = 1, xinput1 = 2 }

-- Cycle player 1 to the next vehicle
core_multiseat.enterNextVehicle(1)

Seating Logic

When seatPlayers is true and multiseat mode is active:

  1. Count seats used per vehicle
  2. Find players without vehicles ("on foot")
  3. Assign on-foot players to the least-occupied vehicle
  4. Players beyond the controller count are exited from vehicles

Action Map

The MultiseatActionMap is pushed/popped based on the multiseat setting:

  • Enabled: Pushes the multiseat action map
  • Disabled: Pops it

Notes

  • Max players is hardcoded at 64 (matching the steering fast-path limit in the engine).
  • When not in multiseat mode, max players is 1.
  • Non-player-0 controllers can be unassigned (cycled to false via enterNextVehicle).
  • Uses assignPlayerToDevice() engine binding for low-level assignment.

See Also

  • multiseatCamera - Camera for multiseat view
  • virtualInput - Virtual input devices

Mod Manager

Core mod management system. Discovers, validates, mounts, activates/deactivates, packs/unpacks mod ZIP files and unpacked mod directories. Persists mod state in `mods/db.json`.

Multiseat Camera

Automatic camera system for multiseat mode. Calculates a shared camera view that encompasses all player vehicles by averaging positions and adjusting distance/FOV dynamically.

On this page

Public FunctionsDevice Assignment RulesUsage ExampleSeating LogicAction MapNotesSee Also