Gauges & Meters - user-grinch/ModelExtras GitHub Wiki

πŸš— General Instructions for All Gauges & Meters

✨ You can add as many gauges/meters as you want.

βš™οΈ Analog Gauges

  • Place the node at the pivot point where the needle should rotate.
  • Make sure the pivot is at the needle base, so rotation sweeps correctly from Empty β†’ Full.
  • Align the needle in 3D space so it points at 0 value initially.
  • Scale the needle to match your dashboard: adjust length & thickness.
  • Multiple needles? Add numbers: x_gauge_fixed1, x_gauge_fixed2, …
  • Each needle needs its own pivot node.

πŸ’» Digital Meters

  • Create a parent node with child nodes representing digits or states.
  • Position & scale digits so they fit perfectly on your display.
  • Name children sequentially: 0, 1, 2… and assign textures/materials.

πŸ“„ Use a​ JSONC file (JSON with Comments) to configure the Gauges & Meters

πŸ“‚ File Location & Structure

πŸ“Œ Path: ModelExtras/data/<FILENAME>.jsonc or modloader/AnyFolder/<FILENAME>.jsonc

Both model ID and model name are valid FILENAME (e.g. 602.jsonc or alpha.jsonc).
πŸ’‘Tip: It is recommended to use model names instead of model IDs to avoid conflicts with other mods β€” especially when using added vehicles.

βš οΈβ€‹ Attention:

Every JSONC configuration requires a metadata specification before any other settings. See here: METADATA

πŸ”§ Adapting Gauges to Your Model:

  • Match dashboard layout: pivot points, rotation angles, needle/digit positions.
  • Check rotation direction: clockwise or counter-clockwise.
  • Keep naming consistent if you have multiple gauges.
  • Test in-game to ensure proper sweep & alignment.

πŸ”„ VehFuncs & Custom Modder Compatibility Aliases

ModelExtras supports VehFuncs and custom gauge naming conventions out of the box:

ModelExtras Node VehFuncs / Alternate Node Description
x_sm fc_sm, speedook Speedometer needle
x_rpm fc_rpm, tahook RPM Tachometer needle
x_odometer fc_om Odometer cylinder digits
x_gearmeter fc_gm Gear indicator frames
x_gauge_fixed x_gasmeter, x_gm, petrolok Fixed / Fuel level gauge
x_chain fc_chain Animated bike/bicycle chain

πŸ“Š Analog Gauges

1️⃣ Fixed Gauge – x_gauge_fixed

  • Displays a fixed/random value.
  • Set the value in JSONC: (ME will choose a random value without that range)
{
    "gauges": {
        "x_gauge_fixed1": {
            "minangle": 20,
            "maxangle": 70
        }
    }
}

Speed Gauge

2️⃣ Speed Gauge – x_sm

  • Displays vehicle speed.
  • Make sure needle rotates correctly according to your model’s scale.
{
    "gauges": {
        "x_sm2": {
            "maxspeed": 100.0,
            "maxrotation": 100.0,
            "kph": true
        }
    }
}

kph defaults to true. Set it to false to convert the measured km/h value to mph. Match maxspeed to the dial's units and full-scale value.


RPM Gauge

3️⃣ RPM Gauge – x_rpm

  • Displays engine RPM (estimated).
  • Align needle pivot with your RPM dial.
{
    "gauges": {
        "x_rpm3": {
            "maxrpm": 100.0,
            "maxrotation": 100.0
        }
     }
}

4️⃣ Turbo Gauge – x_tm

  • Displays turbo pressure (estimated).
  • Align the needle to match turbo gauge scale.
{
    "gauges": {
        "x_tm4": {
            "maxturbo": 100.0,
            "maxrotation": 100.0  
        }
     }
}

πŸ’» Digital Meters

5️⃣ Gear Indicator – x_gearmeter

  • Shows current vehicle gear using textures.

Setup:

  1. Create a parent object x_gearmeter.
  2. Add child nodes for each gear.
  3. Name children sequentially: 0, 1, 2…
  4. Assign number textures.
  5. Position & scale to fit the dashboard.

Hierarchy Example:

x_gearmeter
β”œβ”€β”€ 0 (Texture: "0") // Reverse Gear
β”œβ”€β”€ 1 (Texture: "1")
β”œβ”€β”€ 2 (Texture: "2")
β”œβ”€β”€ 3 (Texture: "3")
β”œβ”€β”€ 4 (Texture: "4")
β”œβ”€β”€ 5 (Texture: "5")

6️⃣ Mileage Indicator / Odometer – x_odometer

  • Measures distance traveled, up to 6 digits (999999 max).

Setup for Analog Odometer:

  1. Add dummy node x_odometer.
  2. Add 6 cylinder-shaped objects (10 faces each) for digits.
  3. Position, scale, and rotate cylinders to match dashboard.
  4. Ensure digits are visible to the driver.

Hierarchy Example:

x_odometer
β”œβ”€β”€ Cylinder_6 (10 faces)
β”œβ”€β”€ Cylinder_5 (10 faces)
β”œβ”€β”€ Cylinder_4 (10 faces)
β”œβ”€β”€ Cylinder_3 (10 faces)
β”œβ”€β”€ Cylinder_2 (10 faces)
β”œβ”€β”€ Cylinder_1 (10 faces)

JSONC Example:

{
    "gauges": {
        "x_odometer5": {
            "kph": true
        }
     }
}

Visual References:

7️⃣ Digital Clock – x_dclock

In-game hour & minute for the vehicle dashboard.

You need 10 models, one for each number from 0 to 9.

  • These models will represent the digits of your speedometer.
  • The order of the models matters β€” make sure they are arranged from 0 to 9.
  • The position of digits doesn't matter; it will be deleted during the game.

Digit1, Digit2 are the positions for the hour & Digit3, Digit4 are for the minute.

image

JSONC Example:

{
    "clocks": {
        "x_dclock1": {
            "12hformat": true
        }
     }
}
⚠️ **GitHub.com Fallback** ⚠️