Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard modding #3227

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Feb 12, 2025

A new mod type was added: '.dashboard'. Usual modcache treatment: ZIP/directory under 'mods/', recorded in cache file 'mods.cache', viewable/searchable in SelectorUI, can have preview image.

Added new cvars 'ui_default_truck_dash', 'ui_default_boat_dash'.(string) - stores the name of default dashboard, you can change it via Settings (tab UI). For testing, I reused older demo dashboard "dashtut":
dashtut.zip

image

Example of the .dashboard file:

; A dashboard mod MUST contain a '.dashboard' file, even if just empty.
; Recognized commands:
; * dashboard_name <string>
; * dashboard_description <string>
; * dashboard_author <string: credit> <int: forum ID> <string: name> <string: email>
; All layout files must start the same as the .dashboard file.
; For example: foo.dashboard -> foo_dashboard.layout
; Optional filename tags:
; * '_Nrpm' ~ N is the redline RPM
; * '_Xph' ~ X is units (k=Kilometers | m=Miles)
; ------------------------------------------------------------

dashboard_name "Default - Truck digital"
dashboard_description "Default dashboard with digital speedometer"
dashboard_author "7000 RPM tacho" -1 "Klink"

The dashboard spawning was fixed, using custom texturedashboards should not block HUD anymore.

Usual modcache treatment: recorded in cache file 'mods.cache', viewable/searchable in SelectorUI, can have preview image.

For an example, see file 'default.dashboard' added to 'dashboards.zip'.

A new cvar was added: 'ui_default_dashboard' (string) - stores the name of default dashboard, you can change it via Settings (tab UI).
Removed cvars 'gfx_speedo_digital', 'ui_default_dashboard'.
Added cvars 'ui_default_truck_dash', 'ui_default_boat_dash'.

Updated the definition file:
; Recognized commands:
; * dashboard_name <string>
; * dashboard_description <string>
; * dashboard_author <string: credit> <int: forum ID> <string: name> <string: email>
; Optional filename tags:
; * '_rpmN' ~ N is the redline RPM
; * '_Xph' ~ X is units (k=Kilometers | m=Miles)

; removed all the dashbiard_supports_ directives:
    bool supports_7000rpm = false;
    bool supports_analog = false;
    bool supports_mph = false;
    bool supports_boat = false;
@ohlidalp ohlidalp force-pushed the mark_dashboard_modding branch from cdba976 to 6c2f586 Compare February 14, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant