Dismiss Notice

In the upcoming days mod approvals could be slower than normal.
Thank you for your patience.

Experimental Mechanical Failure App (Random Damage) 2.2

A simple UI app with some buttons that damage random parts of your car in various ways!

  1. Agent_Y
    IF YOU HAVE ISSUES WITH THE APP, DELETE IT AND THEN RE-ADD, THAT SHOULD FIX IT.


    Based on the feedback I got, I made a complete overhaul of the app. While the core functionality is the same, it looks completely different now and has way more options!

    You can find it in the app selector like previously, it has a better thumbnail now (bigger resolution and fits the style of the vanilla thumbnails):
    201.png


    Overview of the updated functionality:
    On the top of the app, if you have multiple vehicles spawned, you can now select which one it will affect! Keep in mind though that UI messages will only appear if it's your current vehicle. It works in traffic, but the timer resets when the traffic vehicle respawns. The selector shows the word "Current" if this is your current vehicle, then the license plate, internal ID and the car name.
    Below is the menu with random damages that you know from the old version, with some changes. Each row is the type of damage and 2 options. First one is the settings dedicated for each damage type, the second is whether this type of failure should ignore wheels (leave them undamaged) or not, but this setting is always on or always off for some damage types and you can't change it due to how the game is coded.
    The functionality was mostly unchanged from the old version:
    • Break Off Random Part failure breaks (fully or partially) a part of the car that can normally be broken off like a door of a bumper. It can break some of the glass too. The Ignore Powertrain Parts setting makes it leave the following parts undamaged: engine, airbox, transmission, driveshafts, fuel tank, suspension mounts/bushings, leaf spring mounts, subframes, struts, tierods, suspension arms, shackles, hubs, dampers and axles. Basically all that makes your car drivable, except for wheels, because that's what the second option is for.
    • Break Random Brittle Part: It can break fragile parts like glass and lights, but also it can damage the radiator and oil pan (without causing leaking), which you can prevent with the Ignore Radiator and Oil Pan option.
    • Ignite Random Part: Sets a random flammable part of the car on fire (wheels are not flammable by themselves but can catch fire later). There is a checkbox that adds a 10% chance of the car exploding when you use this option, and the explosion basically breaks everything on the car.
    • Damage Random Part: It's similar to Break Off Random Part, but it can also internally damage the parts themselves, making holes in them. The Realistic Damage Only option only allows normally breakable parts to be damaged, so it excludes the steel used in body panels of the car, the interior, engine, frame and stuff. The Ignore Wheels option will prevent this failure from damaging and breaking off wheels and tires.
    • Deform Random Part: It simply deforms a random part of the car by a random amount. Deformation of the engine components causes damage in them (or can sometimes fully break them), and there is an option for this failure to only affect engine components. Wheels and tires can get deformed too and it usually causes the tires to deflate, so there is a checkbox to prevent this.
    • Deflate Random Tire: It makes a hole in a random tire, deflating it. If there is already a hole then it will just make another one, which can further break traction. The Lower Chance option adds a 50% chance that nothing happens when you use this failure, it's for the sake of fairness because other failures can damage the tires easily instead.
    Below these options there are 2 buttons. The first one selects a random failure from the checked ones and causes it (taking the selected options into account of course). The other toggles a timer on or off, which does what the other one does, but repeats it every set amount of seconds, which you can set on the left. (Min. 0.1 seconds, max 60 seconds). Resetting the vehicle automatically disables the timer for convenience.


    Bug fixes:
    • Fixed LUA error when using Deform Random Part on the Capsule bus mod
    • Fixed Bluebuck (and possibly other cars) seats and C-pillar breaking when using realistic damage on the car
    • Fixed Break Random Brittle Part damaging engines and driveshafts sometimes
    • Fixed the UI message of Break Off Random Part adding "Bolt" in the beginning of every part name which made no sense

    Other changes:
    • Migrated app layout from JS to HTML, JS has purely the functionality, will make it easier to update in the future
    • Removed unused buggy stuff from code
    • Some of the code should be somewhat easier to read, some long lines have been converted to vertical tables
    • The thumbnail is better lol

    Known issues as of now:
    • DEFLATING TIRES OR IGNITING SOME OLDER MODS CAN POTENTIALLY BREAK THE GAME. The options that can cause it are unchecked by default in the app, and there is a mechanism that is supposed to prevent you from using them, but it's not 100% reliable. So when using old mods, be careful, set Ignore Wheels on and don't use Ignite or Deflate Tires.
    • On some mod vehicles (most often heavy or offroad ones, the key is really stressed suspension) the wheels can fall off when you use the Deform Random Part failure despite having Ignore Wheels on. It happens when the wheel hubs deform as a result of overall suspension deformation, and can't hold the wheels anymore.
    • Older mods might not have many engine components to break, so using Deform Random Part with Only Engine Components checked on them will only affect the radiator.
    • The app resets every time you use anything on the UI that isn't other apps. This is required for the car selector to work unfortunately so I can't really fix it.
    • Deform Random Part might potentially deform some parts much harder than they would normally deform on impact. I may fix it some time in the future.
    • Some mods can show some weird names of parts that broke, I have no control over that, I only display what the part is called in the mod, so if you find something weird there then it's not my fault.
    • On some mods, using Realistic Damage Only might not result in realistic damage sometimes, and I can't fix this either, it's a problem with those mods.
    • The mod might behave weird when used on SolarPower's NASCAR mod or the Capsule bus mod, I tried to fix it the best I could.

    Update credits:
    • Me - original app and most of the revamp
    • Angelo234 - updated function randomizer code that accounts for which functions are selected and which not
    • _N_S_ - adding the vehicle selector to the app
    • CrashHard - beta testing, feedback, bug reports
    • BeamNG - some code from vanilla game, some HTML controls settings from the traffic app that I reused

    Notice: You can use my code from the app in your mods, but for the code from other people (I clearly marked and separated it in LUA) you have to ask them for permission first.

    Have fun, leave suggestions (I got a lot of them already, thanks!), and make sure to report any issues you find.



    BELOW IS THE DESCRIPTION FOR OLD UPDATE 1.0



    This app was created to simulate a mechanical failure - a sudden failure of the car's component, directly caused by the component being faulty rather than external factors. Normally it's not possible to simulate a situation like this in game, other than using the node grabber in slow motion while driving, and that's not a reliable method and it isn't random enough. It's my first UI app so there could be issues with it, keep that in mind. To use it, you need to find it in the UI apps selection and move it on the screen first. It looks like this in the selector:
    1.png

    And like this on screen:
    2.png

    Overview of each button:
    • Break off random part - Selects a random part that can be broken off, and breaks it off. It can also break glass and powertrain parts. In most cases it won't break it off fully at once, as parts are commonly mounted in several points, for example a door has 2 hinges and a latch, and this breaks only one of those. Imagine it as just breaking 1 bolt. It will show an UI message about what broke, for example:
      3.png
      When it has nothing else to break off, it will also show a message about it.

    • Break random brittle part - This one can break parts that can shatter into pieces easily, for example glass and lights. It can also damage engine parts, such as radiator or oil pan, but without causing any leaking. It also shows a message:
      4.png

    • Ignite random part - catches a random part on fire (only counting flammable ones).
      5.png
      And it also has a 10% chance to randomly explode the car.
      6.png
      And also it won't let you ignite things that aren't flammable.

    • Damage random part (realistic) - it breaks a hole in a random part, only counting the ones that can normally get a hole in them. This can cause a part to fall off or shatter, a tire to deflate, and can break powertrain parts. It will also give you a message of what just broke. (These messages can be inconsistent because it's hard to track down what exactly just broke)
      7.png

    • Damage random part (any part) - Same as the above, but it can break a hole in metal too! It's not realistic but it's funny.

    • Deform random part - a similar idea, but it will deform the part by a random percentage value. Deforming can potentially break or otherwise damage anything, on a wheel it will almost always deflate the tire. The message will also tell you the percentage of deformation.
      8.png

    • Puncture random tire - Makes a hole in a random tire, it can also break already deflated tires more, to the point where it will be fully shredded.

    • Random failure - Selects a random failure out of the above.

    • Toggle random failure every 10s - does the above every 10 seconds, click again to stop it.

    Some other info about the mod:
    • It should (not guaranteed) work on any mod car, even including the ones that are outdated and break the game when you pop tires. It's supposed to detect a broken mod and send you a warning about it, as well as prevent you from using the functions that would break the game. But practically the detection doesn't always work for some reason, sometimes it requires reseting the car. Examples of these messages:
      9.png

    • When it detects that the mod is broken, the random failures won't include the functions that will break the game on it.

    • It still works when the vehicle has weird wheels, for example square wheels, propellers or even tank tracks. But sometimes it will prevent you from popping tires on all wheels then, or just tell you that these specific tires can't be popped.

    • It works on props, but they have no wheels, so it won't let you pop tires on them. Similarly it still works if you remove the wheels on a normal car. It can send a message like this if you don't have wheels:
      10.png

    • It works on AI vehicles if you enable random failure every 10s on them, but has trouble with displaying messages of what broke on a vehicle that is not controlled by the player.

    • It took me 3 times more time to make this code work on any vehicle I could test it on and fix all possible bugs that I found, than it took to write the actual code first. Probably over half of the code is checking things and making sure everything will work, and attempting to fix stuff that won't work.

    • Some functions I used, such as igniting a random part, shattering brittle part, or exploding the car, are normally available in game by default for some reason, idk where they are used lol.

    • I put many comments in the code, so it should be easy to understand, and you can reuse stuff from it if you want (remember to credit me)!
    Have fun with this mod! It's my first UI app, so there might be bugs in it, if you find anything wrong then tell me so I can fix it!

Recent Reviews

  1. coyoty
    coyoty
    5/5,
    Version: 2.2
    Really enjoyed this mod. Can you also add brake failure somehow?
  2. Stickybudz808
    Stickybudz808
    5/5,
    Version: 2.2
    i was just wondering if this was applicable to other vehicles other than your own? like traffic
    1. Agent_Y
      Author's Response
      Yes it should work with them
  3. BruhDontKnowNane
    BruhDontKnowNane
    4/5,
    Version: 2.2
    *UPDATE* I got used to the stuff and this mod is great, but the problem is transmission swap doesn't work on some vehicles and a elaborate on engine swap doesn't turn on after turn off is the elctric motor swaps thats the problem
    1. Agent_Y
      Author's Response
      I think you have reviewed the wrong mod... also I have no idea what you mean, you need to explain in more detail
  4. hjwillett
    hjwillett
    3/5,
    Version: 2.1
    was fun when it worked, now where it says vehicle is just blank and doesnt do anything
    1. Agent_Y
      Author's Response
      Should be fixed in next update
  5. Ciospo99
    Ciospo99
    5/5,
    Version: 2.1
    This mod is great fun! Trying to set a route and finish it before the car become undriveable. Would it be possible to exclude rupturing fuel tank aswell? Imo that's too quick of a car failure
    1. Agent_Y
      Author's Response
      I will definitely include such option in a future update
  6. 1993 MAZDA MIATA
    1993 MAZDA MIATA
    5/5,
    Version: 2.1
    can you make a mod where you can break spicific nodes
    1. Agent_Y
      Author's Response
      I would like to, but idk how
  7. Ayca
    Ayca
    5/5,
    Version: 2.1
    Good mod! I am having trouble, though. I'm trying to make it only damage the engine in my Vivace, yet its also damaging so many other things even though i have certain boxes checked. Please leave an answer for me in a response? Thanks!
    1. Agent_Y
      Author's Response
      I probably worded "engine components" wrong, there is no way to damage only the engine currently, this can affect some of the powertrain. Make sure you have only that one checked and ignore wheels too.
  8. baconatorboy
    baconatorboy
    3/5,
    Version: 2.0
    Vehicle selection disappeared after first use, making the mod useless, but worked well when it was functional for me.
    1. Agent_Y
  9. jelco
    jelco
    3/5,
    Version: 2.0
    it was a lot off fu until it dint work anymore i cant select a vehicle in the panel of the mod so nothing happends if i click random enabled failure and i have break off random part on and realistic damage on so my questian is is there a way i can fix this
    1. Agent_Y
      Author's Response
      Should work now
  10. 88fiero
    88fiero
    5/5,
    Version: 2.0
    how do i prevent the steering from breaking?
    1. Agent_Y
      Author's Response
      I didn't think of it, on most cars there's a really low chance it will happen because lots of other parts can break instead, but I can add an option to prevent it in the future
  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