1. The BeamNG Team wishes everyone Happy Holidays!
    BeamNG team presence will be limited during the holiday season as we take the time off to rest and enjoy the holidays!
    There will be no mod support or mod approvals from 19th of December until 5th of January. Please expect delays during this period.
    We hope you enjoy the holidays too, see you in 2026!

WIP Beta released Emit exhaust smoke if piston rings are damaged

Discussion in 'Utilities and programming' started by Janusz_Alfa, Apr 6, 2022.

  1. Janusz_Alfa

    Janusz_Alfa
    Expand Collapse

    Joined:
    Mar 14, 2022
    Messages:
    15
    smoke.jpg

    Tested on 0.24.1.3.

    Engines should emit blueish smoke if piston rings are damaged, due to engine oil consumption. Even one of the loading screen tips says this is a thing. And there is a code for this but it doesn't seem to work. This mod enables dark/black smoke when engine is running with damaged piston rings. Its not blue, but the effect is still good. It does not check if we still have oil so it still emits smoke with no oil.

    This mod overwrites "combustionEngineThermals.lua" core lua file. Contents of this file may change between updates (for example version 0.24.1.3 differs a bit from version 0.24.0.2), so this mod can easily mess your game after update.

    It just adds this code right under the "M.headGasketBlown" part:

    Code:
    --smoke from broken piston rings
        if M.pistonRingsDamaged and particleTicks.exhaustSteamParticleTick > 1 and not (parentEngine.isDisabled or parentEngine.isStalled) then
          --emit smoke from exhaust because of engine oil consumption
          obj:addParticleByNodesRelative(n.finish, n.start, absEngineRPM * -0.0004 - 3, heavySmokeParticleType, 0, 1)
        end
    

    You can add exhaust smoke for your old rust bucket cars for roleplay reasons by damaging piston rings with lua command like this:
    Code:
    powertrain.getDevice("mainEngine").thermals.pistonRingsDamaged = true
    
    Or use this in your scenario .json file like this:
    Code:
        "vehicles":
       {
            "scenario_player0":
           {
               "driver":
               {
                   "player":true,
                    "startFocus": true,
                    "required": true,
                    "command": "powertrain.getDevice('mainEngine').thermals.pistonRingsDamaged = true",               
               },
    
    To have it automatically applied on scenario start.
     

    Attached Files:

  2. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,588
    The original effect always worked for me and still does, no idea why it doesn't work for you, verify your game files and check in safe mode
     
  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