Space Engineers

Space Engineers

316 ratings
Vehicle Dashboard Script
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
129.651 KB
26 Nov, 2019 @ 5:24am
5 Oct, 2021 @ 3:55am
19 Change Notes ( view )

Subscribe to download
Vehicle Dashboard Script

Description
    Do not use script on custom programmable blocks that does not have drawing surfaces! It SHOULD have at least one!!

        Description
    This script is about dashboard. I did it for my own need and tryed to make it simple. It will draw all neccecary information on chosen block screen. It also controls turn signals on your truck. Here is a list of current features:
  • Battery charge and output;
  • Turn and hazard warning signals leds;
  • Cargo volume and mass limit of vehicle;
  • Speedometer with adjustable speed limit;
  • Spotlights and handbrake leds.

        Deployment preparation
    Vehicle must meet next requirements:
  • Controller block: Cockpit or remote control;
  • Something with text surface. It can be anything that have text surface;
  • Battery(Optional);
  • Lightning block with your faworite name for it. To write it in custom data.
  • Turn signal light name must contain "turn left/right". This also apply to trailers.

        Settings
    First time you run this script on a vehicle, it will write pattern data in it's programmable block custom data.

Controller block name : Cockpit Surface provider name: Dashboard Surface number: 0 Gather mode: 1 Battery name: Battery Headlight name: Spotlight Speed limit: 120.0 Cargo mass limit: 40000.0 Battery Charge: 40:70:80 Battery Output: 100:70:80 Spidometer: 256:70:120 Turn left led: 166:37:40 Turn right led: 346:37:40 Headlight led: 166:110:35 Handbrake led: 346:110:40 Load meter: 410:70:80 Mass meter: 470:70:80

Controller block name: Name of chosen controller, by default it's "Cockpit". It can be cockpit or remote control block;
Surface provider name: Name of block that have text surfaces where dashboard elements will be drawn;
Surface number: Well, if this block have more than one surface you can choose it here. It's number starts from zero;
Gather mode: Get total volume of -
  • 0 - cargo containers and connectors only;
  • 1 + ship tools and controllers;
  • 2 + assemblers, refiners and gas generators;
  • 3 + weaponry.
Battery name: It's battery name! How fantastic. Im sure you will use reactors, or whatever you use there. If you don't need it just leave it as default and set "Battery Charge" and "Battery Output" as 0:0:0. If it wont work with message "check custom data" just put one small battery to be sure;
Headlight name: Your favorite headlight name that will be trigger on "L" key;
Speed limit: As the name suggests.
Cargo mass limit: A magical number from your head that will be shown at mass meter. Just, as reminder how much cargo your bulky vehicle can haul without scratching with it's bottom.
All that is beneath: Is a coordinate on screen and size. You can put elements on screen anywhere and any size you like. Just remember that 0:0:0 will disable that element.
All names must exactly match the name of the blocks. Case sensitive.

    Commands:
  • trailer - Will gather all lights on trailer and calculate maximum volume for cargo;
  • hazard warning - Crashed in to something? Toggle that hazard lights switch.

        Turn signals
    They are activated by roll control, keys by default "Q" and "E". They will turn off each other, and hazard lights. Theyalso would be turned off when you will release steering wheel (and wheels will get to neutral position) or you turn it in opposite side. Put PB VDS on toolbar with "hazard warning" run argument, to turn on hazard lights. Also, if you have VCOS on your truck it will ping VDS about attaching trailers, if not than you should put VDS on toolbar with "trailer" run argument.

        Conclusion
    Yeah i know that there is already published scripts for those thing in workshop. But it's mine, and have different looking. And also probably glitchy. It's still in WIP, so things could change over time.
Popular Discussions View All (2)
4
2 Jan, 2020 @ 3:33pm
Cargo volume "LOAD" indicator
Bloodfistdeathpunch
3
19 Feb, 2021 @ 7:43am
Presets
Prellentor
82 Comments
J88OEK 4 Sep, 2023 @ 1:32pm 
If anyone is using this with the new Cab Cockpit, paste the below into the custom data field of the Programmable Block... It fits on the upper left screen:

Controller block name: Cockpit
Surface provider name: Cab Cockpit
Surface number: 0
Gather mode: 1
Battery name: Battery
Headlight name: Spotlight
Speed limit: 120
Cargo mass limit: 40000
Battery Charge: 30:41:60
Battery Output: 70:41:60
Spidometer: 125:41:60
Turn left led: 100:10:20
Turn right led: 150:10:20
Headlight led: 245:20:15
Handbrake led: 245:60:15
Load meter: 180:41:60
Mass meter: 220:41:60
Claus 28 Jul, 2023 @ 3:28am 
Hello.. wich Name is needed for the (Hand)Brakelights to work ? i only found info about to name the turn lights ( Work fine )
OscarLIU 26 Jun, 2023 @ 9:02am 
Can this script run on subgrid text panel? thank you.
Dread262 20 May, 2023 @ 2:32pm 
How can we change the resolution of the sprites? I'm trying to use it on industrial cockpit, but i only have half of the dashborad? thank you
Fives5555 14 May, 2022 @ 10:51am 
Does this work with rotor based wheels? Because I want to use this for a motorcycle.
Prellentor  [author] 4 Oct, 2021 @ 9:31am 
@Mamverick It work for me. I will add you in friends and try to join your world.
Codo 3 Oct, 2021 @ 8:15am 
New vehicles will have an error in the script, and upon reomcpiling it will tell you there are blocks missing (even though they dont)

And all previous vehicles I made that worked with the script share that same error message now
Prellentor  [author] 3 Oct, 2021 @ 8:12am 
@Mamverick Gonna check it tomorrow.
Codo 3 Oct, 2021 @ 5:32am 
For some reason it doesnt work properly after heavy industry
Prellentor  [author] 23 Apr, 2021 @ 7:32am 
Just tested. Works fine.