1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

All vehicle lua codes

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by FalloutNode, Mar 18, 2016.

  1. FalloutNode

    FalloutNode
    Expand Collapse

    Joined:
    Dec 21, 2015
    Messages:
    443
    Anyone knows all of the vehicle lua codes?
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    You can get those commands manually from the .lua files.
    Of course it requires you to understand .lua files in order to recognize them.

    Here's a few (Vehicle LUA mode):
    drivetrain.engine.coolantTemperature = xx
    drivetrain.engine.oilTemperature = xx
    drivetrain.fuel = xx
     
  3. FalloutNode

    FalloutNode
    Expand Collapse

    Joined:
    Dec 21, 2015
    Messages:
    443
    Are there any other lua codes? Like radiator_leak=1.5 and off topic do you work in Germany in the BeamNG HQ or somewhere else?
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    As I said, you can get them from the original lua files. There is no spreadsheet for such commands.

    And no, from my home.
     
  5. FalloutNode

    FalloutNode
    Expand Collapse

    Joined:
    Dec 21, 2015
    Messages:
    443
    Oh,ok thanks for the help anyways.
     
  6. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    The "issue" here is that there is no "list" of commands, the console lets you execute raw lua code, so when using it you are essentialy "programming" at the same level all the game logic files are.
    You can do whatever you want in the console as long as it's valid (and useful) lua code.
     
  7. Godzilla!

    Godzilla!
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    2,243
    Exhaust temp can be changed through lua codes, too.

    Code:
    drivetrain.engine.exhaustTemperature = xx
     
  8. wearyNATE15

    wearyNATE15
    Expand Collapse

    Joined:
    Oct 15, 2015
    Messages:
    1,304
    what about connectinng rod damage? drivetrain.engine.connecting.rod.bearing.damage? xD

    [EDIT] Nvm found it local connectingRodDamageThreshold = 0 now how do i put it in console
     
    #8 wearyNATE15, Apr 10, 2016
    Last edited: Apr 10, 2016
  9. Godzilla!

    Godzilla!
    Expand Collapse

    Joined:
    Mar 17, 2013
    Messages:
    2,243
    Sorry for loooong post.
    This inserting this command immediately breaks rod bearings:
    Code:
    drivetrain.engine.connectingRodBearingsDamaged = true


    This list is all the "simple" engine commands that you can use.

    -Change block temperature.
    Code:
    drivetrain.engine.engineBlockTemperature = #


    -Change cylinder wall temperature.
    Code:
    drivetrain.engine.cylinderWallTemperature = #


    -Change oil temperature.
    Code:
    drivetrain.engine.oilTemperature = #
    
    Abuse of this can instantly kill the engine.


    -Change coolant temperature.
    Code:
    drivetrain.engine.coolantTemperature = #
    
    Max temp is 130.


    -Change exhaust temp (No effect).
    Code:
    drivetrain.engine.exhaustTemperature = #


    -Change fuel amount (0 equals empty, engine will stop).
    Code:
    drivetrain.fuel = #
    -Destroy head gasket.
    Code:
    drivetrain.engine.headGasketBlown = true
    
    This'll emit grey smoke and drop power.


    -Destroy piston rings.
    Code:
    drivetrain.engine.pistonRingsDamaged = true
    
    This'll emit blue smoke and lower engine power dramatically, oil will heat up faster.


    -Destroy rod bearings.
    Code:
    drivetrain.engine.connectingRodBearingsDamaged = true
    
    Makes knocking noise, doesn't seem to affect power.
     
    #9 Godzilla!, Apr 10, 2016
    Last edited: Apr 10, 2016
    • Like Like x 3
  10. wearyNATE15

    wearyNATE15
    Expand Collapse

    Joined:
    Oct 15, 2015
    Messages:
    1,304
    Thank you. let me save this.
     
    • Like Like x 2
  11. Yamilcherry

    Yamilcherry
    Expand Collapse

    Joined:
    Sep 28, 2013
    Messages:
    22

    Sorry, but the connecting rod bearings command does not work, I copied the command directly. I set the console to Vehicle Lua and entered the command and gave me just red text and didn't do anything.
     
    • Like Like x 2
  12. bluerider598

    bluerider598
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    196
    Seconded, im trying to do something similar
     
    • Agree Agree x 1
  13. FalloutNode

    FalloutNode
    Expand Collapse

    Joined:
    Dec 21, 2015
    Messages:
    443
    Does anyone know why the commands dont work in the new update? Did they change the coding or something?
     
    • Agree Agree x 1
  14. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Engine, transmission etc. is different in 0.8.

    You could try datalogging app, log all streams to xml, then open xml in notepad++, you can see really lot of codes, some are used in game, I have no idea if you could use all of them and if there is even more, but there is really lot of these keywords.
     
  15. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    Yep, lots of things have changed with the 0.8 update.
    I've said above already, there is no list of "codes" one can use, by using the console you are literally injecting regular Lua code into the game.
     
  16. bluerider598

    bluerider598
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    196
    So if I wanted to, for example, turn off the engine's ignition using the console, what would I input? I tried engineIgnition = false, but that doesn't do anything.
     
  17. Slap_Slider_Boiii

    Slap_Slider_Boiii
    Expand Collapse

    Joined:
    Aug 22, 2018
    Messages:
    1
    Who knows how to spawn a vehicle with a code
     
  18. wearyNATE15

    wearyNATE15
    Expand Collapse

    Joined:
    Oct 15, 2015
    Messages:
    1,304
    Ctrl + E

    joke aside, dont think you can
     
  19. IAchievedBacon

    IAchievedBacon
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    2,821
    It’s possible. I saw it with whoever made the spike strip mod. It’s most recent update lets you spawn a strip in through the police car during a high speed chase.
     
  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