I am looking to make a forklift mod from scratch. The forklift i want to simulate is a 1952 Towmotor LT56 but I am looking to do several things with the mast hydraulics to simulate the actual forklift. The speed of the hydraulics must be dependent on engine rpm, but only for the raise up and tilt back as the mast gravity lowers and has springs to tilt it forwards. Can this be done with an equation? say "Out rate= .28 x engineRpm" or something like that. Also is there any way to limit the force a hydro can exert in one direction? The ram its self in the real forklift can exert nearly 24 thousand pounds of force extending but cannot exert any force contracting. is there any way to simulate this with a hydro in Beamng? be glad to hear if anyone knows.
Maybe go ask @TrackpadUser since he made a working forklift? Not sure how many things from it would apply to the one you want to make, but I'm pretty sure you could base a bunch of your code on it
For my forklift I just used the same code as the rollback, which doesn't really do anything that marmon wants to do. Having the lift speed vary based on RPM should be fairly simple. You already need to make a custom lua when you have custom inputs like you would need for a forklift, which varies the length of the hydro beams by a certain amount each frame when the inputs are pressed. All you'd need to do is add the engine RPM in the formula, instead of the constants that are usually used, like the 1 and 0.5 in my forklift's code. As for the asymmetric strength, I don't know enough about hydros to know if it's possible. At the end of the day, they're beams whose length can be changed on the fly.
The strength isn't as big an issue as the engine speed as that particular forklift in real life was built as a "rigger's special" meaning that the mast was built twice as heavy and had a larger lift cylinder than standard. I am just looking for something of an idea to represent more accurate hydraulics. Thanks for the input!