diff --git a/dictionary/en-custom.txt b/dictionary/en-custom.txt index cf2bcbd1..f7283f51 100644 --- a/dictionary/en-custom.txt +++ b/dictionary/en-custom.txt @@ -127,11 +127,13 @@ cSpline ctrl CTRL CuriousMike +Customdashboardinputs AnotherFoxGuy da DAF dampingrate dampings +DashBoardManagerClass Davded de De diff --git a/source/vehicle-creation/fileformat-truck.md b/source/vehicle-creation/fileformat-truck.md index 92bcc3ac..a8d4d8f1 100644 --- a/source/vehicle-creation/fileformat-truck.md +++ b/source/vehicle-creation/fileformat-truck.md @@ -3125,6 +3125,9 @@ Legacy parameters (not affecting the v0.4 custom HUD system). Will be restored o - **useMaxRPM**: 0 or 1; default = 0; \[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**: String; default = tracks/black; 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: ``` @@ -3132,14 +3135,39 @@ 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 + +\[ Version 2026.01+ \] + +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**: Custom input name. 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**: Input data type. 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 diff --git a/source/vehicle-creation/making-custom-hud.md b/source/vehicle-creation/making-custom-hud.md index abe5179a..fc653251 100644 --- a/source/vehicle-creation/making-custom-hud.md +++ b/source/vehicle-creation/making-custom-hud.md @@ -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 |