THIS DESCRIPTION IS FOR THE 2.0 VERSION OF THE APP THAT IS COMPLETELY DIFFERENT THAN THE OLD ONE, DESCRIPTION FOR VERSION 1.0 IS BELOW
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):
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:
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.
- 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.
- 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
- 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.
- 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:
And like this on screen:
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:
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:
- Ignite random part - catches a random part on fire (only counting flammable ones).
And it also has a 10% chance to randomly explode the car.
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)
- 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.
- 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:
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!
- 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:
- 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:
- 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)!
Experimental Mechanical Failure App (Random Damage) 2.0
A simple UI app with some buttons that damage random parts of your car in various ways!