Gauge Studio
Build a gauge cluster for a BeamNG car from modules, wire each one to the values the game sends, test it on a demo drive, and take it into the game as an HTML cluster or out as a picture.
The cluster
Test it
Into BeamNG
The cluster becomes an HTML file the car’s screen shows, drawn by the same code as the stage above.
As in vehicles/folder/ in the car’s mod.
The materialName of the car’s screen.
Fill in to get a jbeam part for that slot in the mod.
In the mod, the cluster is vehicles/my_car/gauge_studio/cluster.html. Give the car’s screen this controller and section (or change its own htmlPath and displayData to match):
Values it reads
The game sends only what displayData lists. dump(electrics) in its console shows what a car has.
Worth a look
How it works in the game
BeamNG draws a car’s screen from an HTML page: the gauges/genericGauges controller in the car’s jbeam loads the page onto the screen’s material, calls its setup() once, then updateData() many times a second with the values its displayData lists (and updateMode() when the drive mode changes). The HTML cluster answers those calls and draws itself on a canvas.
The car needs a screen for it: a surface in its 3D model whose material takes its colour from that page. Many cars have one already; then the jbeam above, with the car’s own material name, is all it takes. After changing a car’s files, press Ctrl+R in the game to reload it.
Opened in a browser, the HTML cluster plays the demo drive, so you can look at it before going into the game.
An infotainment screen is touched with the mouse in the game, as on the Hirochi CCF: the mod carries a controller for the car (gaugeStudioScreen) and an extension for the game (gaugeStudioTouch1) that meets the mouse with the screen’s rectangle, given by the corners above, and passes each press, drag and release to the page. Set to change the car, its touches can turn on the hazard lights, the headlights and the fog lights, change the drive mode, and set values of the car’s own; a dummy screen only pretends. In a browser, the mouse touches it.
Publish
Save it to your account, list or share it in the gauge catalog, and fit it to your catalog cars.