Accessing thermals and damage data in lua

Discussion in 'Content Creation' started by Oriki, Jan 2, 2025.

  1. Oriki

    Oriki
    Expand Collapse

    Joined:
    Apr 23, 2024
    Messages:
    6
    Hi guys!
    I'm creating a mod in lua and got stuck for hours trying to access engine thermals data and/or car damage data in my lua file. I get how to access electrics with electrics.values.<smth> but is there any way to get engine thermals data such as coolant leak of radiator or head gasket damage values in lua?
    Thanks for any help...
     
  2. jimmyking

    jimmyking
    Expand Collapse

    Joined:
    Mar 9, 2020
    Messages:
    90
    I can possibly help you can dump electrics and other things in the console such as:
    upload_2025-1-6_15-49-52.png
    Code:
    dump(electrics)
    the mainEngine:
    upload_2025-1-6_15-50-32.png
    Code:
    dump(powertrain.getDevice("mainEngine"))
    the vehicleController:
    upload_2025-1-6_15-51-6.png
    Code:
    dump(controller.getController("vehicleController"))
    hopefully, with this information, you can get what you need if not I can continue searching
    --- Post updated ---
    I found something that might not be what you need but it is this:
    Code:
    damageTracker.getDamage("engine", "radiatorLeak")
    it returns a true or false if the radiator is leaking which means if it's damaged
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice