Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dictionary/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ cSpline
ctrl
CTRL
CuriousMike
Customdashboardinputs
AnotherFoxGuy
da
DAF
dampingrate
dampings
DashBoardManagerClass
Davded
de
De
Expand Down
30 changes: 29 additions & 1 deletion source/vehicle-creation/fileformat-truck.md
Original file line number Diff line number Diff line change
Expand Up @@ -3125,21 +3125,49 @@ Legacy parameters (not affecting the v0.4 custom HUD system). Will be restored o
- **useMaxRPM**: <span style="color:#BD0058">0 or 1</span>; <span style="color:#0B8A00">default = 0</span>; \[Yes/No\] Whether or not to use the max rpm (in the engine section) as the highest number on the tachometer. Note that your actual max rpm is MaxRPM+20%. Do not include the 20% on your tachometer or it will be inaccurate. Tachometer needle is from -120° to 120°.
- **helpMaterial**: <span style="color:#BD0058">String</span>; <span style="color:#0B8A00">default = tracks/black</span>; The help material (a picture that shows command instructions). NOTE: This value overrides settings from [section "help"](#help)

Since version 2026.01, each `texturedashboard` is rendered to a different RTT texture. The first `texturedashboard` is rendered to `RTTTexture1`, the second one to `RTTTexture2`, and so on. There are
10 textures available and you can preview them using the Texture Tool in _Tools > Texture tool_.

Example:

```
guisettings
interactiveOverviewMap zoom
dashboard dash_test.layout
dashboard dash_test2.layout
; Will be rendered to RTTTexture1
texturedashboard dashGauges.layout
; Will be rendered to RTTTexture2 (since 2026.01)
texturedashboard advancedDash.dashboard
; legacy settings
tachoMaterial tracks/MyTacho
speedoMaterial tracks/MySpeedo
speedoMax 80
useMaxRPM 1
```


### Customdashboardinputs

<span style="background-color:#854200">\[ Version 2026.01+ \]</span>

Adds custom input sources to the vehicle's [dashboard system](making-custom-hud.md). These inputs can be modified using scripts, allowing you to implement highly-customized and complex behaviours.

Parameters:

- **input_name**: <span style="color:#BD0058">Custom input name</span>. Do not use [built-in](making-custom-hud.md#input-sources) names! It's highly recommended to
use names that are unique enough to avoid conflicts, since dashboard mods can also add custom inputs! An unique name could be something like `VehicleName_CustomInput_InputName`.
- **data_type**: <span style="color:#BD0058">Input data type</span>. Allowed types: `bool`, `int`, `float`, `string`. The correct data type for the input depends on its
purpose. For instance, you use `float` to [rotate images](making-custom-hud.md#rotate) or [animate props](#add_animation), `int` to control [series](making-custom-hud.md#series), `bool` to control [lamps](making-custom-hud.md#lamp) or [flares](#flares), and `string` to [add text](making-custom-hud.md#textstring-textformat) to your dashboard.

Example:

```
customdashboardinputs
VehicleName_CustomInput_DieselGlowPlugLight bool
VehicleName_CustomInput_FuelLevel float
VehicleName_CustomInput_GaugeFaceType int
VehicleName_CustomInput_ClockString string
```

### Set\_skeleton\_settings

Expand Down
128 changes: 128 additions & 0 deletions source/vehicle-creation/making-custom-hud.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,50 @@ format=%04.0f km/h
link=speedo_kph
```

### Multiple animations

Since version 2026.01, you can add multiple animations to a MyGUI widget by appending a number to the properties associated to each animation. These have to be numbered in
order (do not skip numbers!). Properties for the first animation are **not** numbered.

You can set up to 11 animations (10 rotate, scale and translate operations + 1 series/textstring/textformat/lamp).

Example for an aircraft attitude indicator, using custom inputs:

```
anim=translate
min=-360
max=360
vmin=-100
vmax=100
direction=left
link=AircraftName_CustomInput_AttitudeTranslateX

anim2=translate
min2=-360
max2=360
vmin2=-100
vmax2=100
direction2=down
link2=AircraftName_CustomInput_AttitudeTranslateY

anim3=rotate
min3=-360
max3=360
vmin3=-360
vmax3=360
direction3=down
link3=AircraftName_CustomInput_AttitudeRotate
```

## Widget visibility

Each dashboard input source has an enabled/disabled property that sets the visibility of the MyGUI widgets associated to it.

On widgets that have one or more animations, the visibility is always set by the first animation's dashboard input link.

Widgets can also have a single dashboard input link with no animations, allowing you to set the visibility only.


## Input sources

| <div style="width:165px">Method</div> | Description | Type / Values / Ranges | Active when |
Expand Down Expand Up @@ -335,6 +379,7 @@ A dashboard mod contains:
- MyGUI `*.layout` file(s)
- Textures
- (optional) Preview (`filename-mini`) images
- (optional) A [dashboard script](#dashboard-scripts) (`*.as` file) <span style="background-color:#854200">\[ Version 2026.01+ \]</span>

### Dashboard file format

Expand All @@ -350,6 +395,19 @@ dashboard_author "layouts" 899 "Mark" "[email protected]"
dashboard_category 201
```

Generic example, using [custom inputs](#dashboard_custom_input):

```
dashboard_name "Dashboard with custom inputs"
dashboard_description "Dashboard that uses custom inputs!"
dashboard_author "everything" 22564 "Eze" "[email protected]"
dashboard_category 201
dashboard_custom_input DashboardModName_CustomInput_DieselGlowPlugLight bool
dashboard_custom_input DashboardModName_CustomInput_FuelLevel float
dashboard_custom_input DashboardModName_CustomInput_GaugeFaceType int
dashboard_custom_input DashboardModName_CustomInput_ClockString string
```

#### dashboard_name

<span style="color:#BD0058">(String)</span> Name of the dashboard.
Expand Down Expand Up @@ -381,6 +439,76 @@ https://forum.rigsofrods.org/members/curiousmike.5831/
- `201` - Truck
- `202` - Boat

#### dashboard_custom_input

<span style="background-color:#854200">\[ Version 2026.01+ \]</span>

Specifies a custom input source that can be modified using scripts.

Parameters:

- **input_name**: <span style="color:#BD0058">Custom input name</span>. Do not use [built-in](#input-sources) names! It's highly recommended to
use names that are unique enough to avoid conflicts, since vehicles can also have their own custom inputs! An unique name could be something like `DashboardModName_CustomInput_InputName`.
- **data_type**: <span style="color:#BD0058">Input data type</span>. Allowed types: `bool`, `int`, `float`, `string`. The correct data type for the input depends on its
purpose. For instance, you use `float` to [rotate images](#rotate), `int` to control [series](#series), `bool` to control [lamps](#lamp), and `string` to [add text](#textstring-textformat) to your dashboard.


### Dashboard scripting with AngelScript

Since version 2026.01, dashboard mods can execute their own script. You just create an `*.as` file, in the same folder and **with the same name** as the `*.dashboard` file. See the [docs for DashBoardManagerClass](https://developer.rigsofrods.org/d8/d07/class_script2_game_1_1_dash_board_manager_class.html) to start controlling your dashboard!

Example script:

```cpp
DashBoardManagerClass@ dash = null;

// Custom values
int DashLinkID_DieselGlowPlugLight;
int DashLinkID_FuelLevel;
int DashLinkID_MainOdometer;

bool AreGlowPlugsOn()
{
// Logic that checks if the glow plugs are on.
return true;
}

float GetFuelLevel()
{
// Code that gets the fuel level from somewhere.
return 1;
}

float GetMainOdometer()
{
// Code that gets the main odometer value from somewhere.
return 1234.5;
}

// Get the dash manager instance and link IDs at initialisation
void main() {
// Get the DashBoardManager of the actor associated to this script.
@dash = thisActor.getDashboardManager();
if (@dash != null) {
DashLinkID_DieselGlowPlugLight = dash.getLinkIDForName("MyDashboardMod_CustomInput_DieselGlowPlugLight");
DashLinkID_FuelLevel = dash.getLinkIDForName("MyDashboardMod_CustomInput_FuelLevel");
DashLinkID_MainOdometer = dash.getLinkIDForName("MyDashboardMod_CustomInput_MainOdometer");
}
}

void frameStep(float dt) {
if (@dash != null) {
bool glowPlug = AreGlowPlugsOn();
float fuelLevel = GetFuelLevel();
float mainOdo = GetMainOdometer();
string mainOdoFormat = "ODO: " + formatFloat(mainOdo, '0', 6, 1) + " km";
dash.setBool(DashLinkID_DieselGlowPlugLight, glowPlug);
dash.setFloat(DashLinkID_FuelLevel, fuelLevel);
dash.setString(DashLinkID_MainOdometer, mainOdoFormat);
}
}
```

### Layout file names

The MyGUI `*.layout` files **MUST** be named the same as the `*.dashboard` file. For example:
Expand Down