-
Notifications
You must be signed in to change notification settings - Fork 223
Cars – Digital instruments
This is a temporary and somewhat hacky approach, doesn’t allow to define new digital instruments, but instead, only to replace text on original Kunos instruments defined in “data/digital_instruments.ini”.
[DI_DRIVEN_TOTAL_...]
DIGITAL_ITEM = 0
DIGITAL_ITEM_NUMBER_FORMAT = 06.0
UPPER_BOUND = 999999
[DI_DRIVEN_SESSION_...]
DIGITAL_ITEM = 1
DIGITAL_ITEM_NUMBER_FORMAT = 05.1
UPPER_BOUND = 999999
[DI_GEAR_...]
DIGITAL_ITEM = 2
DIGITAL_ITEM_NUMBER_FORMAT = GEAR ; only supported from v0.1.61
So, first of all, input type is set in section name (for backwards compatibility and what not). After that, you can set other input options, such as INPUT_LAG
, in that section as usual.
Other key value, DIGITAL_ITEM
, refers to index of digital instrument in “data/digital_instruments.ini”. Just use the number after “_” in its section name.
Other values (in application order):
-
VALUE_OFFSET
: offsets value (although now you can just useINPUT_ADD
); -
UPPER_BOUND
: optionally limits maximum value to avoid overflowing; -
OUTPUT_MULTIPLIER
: multiplier for value (and again,INPUT_MULT
might be a better option);
With DIGITAL_ITEM_NUMBER_FORMAT
you can set format for value. It could be one of keywords for specially prepared formats, or basic C-style format string. Or, even more basic, in case “%” sign is missing, it’s parsed as follows:
- Number before dot sets amount of digits to display before dots;
- If that number starts with 0, extra digits will be zeroes. Otherwise, it would be spaces.
- Number after dot sets number of digits after the dot.
Special formats:
-
GEAR
: by defaultR
for -1,N
for 0 and numbers for values above, for[DI_GEAR_...]
. You can replaceR
andN
like so:[DI_GEAR_...] DIGITAL_ITEM_NUMBER_FORMAT = GEAR, Rev, Neut
-
GEAR_AUTO
: same, but usesD
for numbers above 0. And, again, you can replace words like so:[DI_GEAR_...] DIGITAL_ITEM_NUMBER_FORMAT = GEAR_AUTO, reverse, neutral, drive
-
COMPASS
: turns degress into compass abbreviation, likeN
,SE
orNNE
. By default limited by two letters, to allow third letter, use:[DI_WIND_DIR_...] DIGITAL_ITEM_NUMBER_FORMAT = COMPASS, LARGE
-
TIME
: useful for[DI_TIME_...]
to show time of day. Second parameter is C format string for time:[DI_TIME_...] DIGITAL_ITEM_NUMBER_FORMAT = TIME, '%I:%M %p' ; 12-hour format ; By the way, notice quotes. If string is more that a simple word, better ; to use those to avoid confusion with things like commas
-
LAP_TIME
: formats racing time nicely, with minutes, seconds and milliseconds. If needed, hours would be added at front too. You can use second parameter to replace text for time which isn’t set yet, by default it’s “-:--:--”:[DI_LAP_TIME_...] DIGITAL_ITEM_NUMBER_FORMAT = LAP_TIME, none
- Add new digital instruments implementation not relying on original one.
If you have any question or suggestions, please feel free to add a new issue.
- Enabling Extended Physics
- Aerodynamics
- Body Flex
- Custom Suspension Joints
- Driver Weight Shift for Karts
- Extra Turbo Options
- More Clutch Damage
- New Inputs for Dynamic Controllers
- Physics Scripts
- Setup Items Driven By Controllers
- Suspension
- Cosmic Suspension
- Tyre Types
- Enabling Extended Physics
- General Options
- Custom Raycasting
- Collision Parameters
- Dynamic Physics Objects
- Geometric colliders
- Surface Tweaks
- Extra FX Flags
- Extra FX Emissive
- Mesh Adjustments
- Model Replacements
- Shader Replacements
- Scene Queries
- UV2
- General Options
- Analog Instruments
- Animations
- Digital Instruments
- Emissive Objects
- Extra Switches
- Inputs
- LED panels
- Multichannel Emissives
- Vintage Tachometers
- Audio
- Brake Disc FX
- Deforming Bonnets
- Driver Model
- Exhaust Smoke
- Exhaust Flames
- Extra Lights
- Fake Shadows FX
- Local Cubemaps
- Mesh Splitting
- Miscellaneous Options
- Neck FX
- Node Adjustments
- Smart Mirror
- Sparks
- Tyres FX
- Visually Adjustable Wings
- Wheels
- Wobbly Bits
- Wobbly Wipers