I'm making a 2-stroke engine, and would like to know if there's a way I can get it to not take any type of damage from overrevving. Yeah, 2 strokes don't have a limiter, but torque dies off, so it can't rev higher than it needs to. But I've heard stories of people missing gears and revving their 2 stroke motors to extremely high rpms with no consequence. I think I can get that to happen if I make it an "electricMotor" rather than a "combustionEngine", but I'd rather not do that if I can avoid it.
Just increase the "maxRPM" in the Jbeam. If that number is past the point where the torque dies out, the engine will stop revving there. Also set "hasRevLimiter" to false.
Yeah, but 2 strokes rev high anyway. Mine is going to rev to something like 11-12k, and I'd rather the tacho not switch over into its weird decimal point mode, if you know what I'm talking about. Is there any other way to get around it?
Not as far as I know. Most of the mods I've built are transmission mods, so I only have a basic understanding of the engines themselves. Maybe increase the //engine durability settings.
Okay, thanks for the advice. I'll try that. I'm just thinking about electric cars like the 200EX with high redlines that can be surpassed easily. I'll try making it technically an electric motor, and see what kinds of combustion engine features I lose from that.
That might work. You could probably copy over the soundconfig to maintain engine sound with an electric motor. The one thing I've noticed with electricity in the game is that the fuel consumption number no longer corresponds to what it would be as a combustion engine. It will display significantly worse MPG than it would otherwise get.
Set this higher than your engine can rev, I think, I'm not sure, I just made up this parameter by guessing and I set it to 8000 while my engine max rpm was 6500, engine could rev only to 7000rpm so I kept it there for 20 seconds with only over rev warning, engine did not blew up. "maxOverRevDamage":8000 If that works, I figured out an undocumented feature? Oh, it is not rpm, it is damage value, set it to 1 000 000 or so... Update: That is actually nice parameter, set it really low and you blew engine right away when closing to over revving, set it really high and you can keep punishing engine really long, I think that is exactly what you need.
Combustion engines are automatically given over-rev capability by the combustionEngine.lua file in the core (this is why mods, even those not updated to 0.11, can suffer over-rev damage). I'm currently looking for its disabler code. The list of code in that green box mentioned above are for thermals and NOS, changing those codes affects how durable the engine internals are to temperature and torque levels.
But there is this parameter I just made up "maxOverRevDamage":12000000 it makes valvetrain so durable that it practically is without damage, I guess. There is probably more in family of OverRevDamage, maybe some file has all of them listed, or maybe some command to see those keywords, but I haven't figured such out yet.
Lines 1028 and 1029 in 'powertrain.lua' overRevDamage = 0, maxOverRevDamage = jbeamData.maxOverRevDamage or 1500, So it takes the jbeam data for "maxOverRevDamage", or if there is none, it uses 1500 as a default. Thank you so much for that, you're a lifesaver!
I'm enough good at guessing that I don't need to spy those lua files or maybe just once I got lucky I think I also found a bug, I get exhaust to spit flames by holding clutch down, with clutch up it does not spit flames, @Diamondback probably wants to see this or maybe it just works as intended because I messed up with overrev damage stuff, I don't know: Update: Tested with vanilla Barstow and does that too, but short lived because damage from overrev. Also tested with old engine I made for barstow which does not have flames support, when I press clutch down exhaust smoke stops, when I lift clutch up, exhaust smoke continues, but there are no flames. Tested vanilla barstow again and exhaust smoke stops when flames appear, which might be happening on purpose.
That's weird. I notice there is a 1 rpm difference. Cars in beam do afterfire a lot, after a certain threshold, when they're dealing with valve float (or in this case, "valve float"), so maybe that 1rpm difference is enough to cause it. Maybe just a happy coincidence.
Yeah, but if I lower maxrpm of engine by 50 it still does the same, with that 1rpm difference, not sure what that triggers, but it is triggering clearly something. Even manual gearbox unmodified Barstow does that, but without changing OverRevDamage it is short lived fun. Most curious of what that is about.
I got only 9fps with that, with 2000 engine did rev higher and flames did happen short time only when releasing the clutch, not when holding clutch down.