Intro Hey what is up guys. I just started playing this game within the last week, and immediately fell in love with the concept and execution. The one thing that I (and I'm sure a few people) yearned for is a way to use engines created in Automation (the Camshaft Software game) in simulation. The amount of customization that can be done in this game is amazing and felt an urge to go ahead and see if I have the programming skills to develop something to do just what I wanted. Information About The Program Enough with the intro, I doubt anybody is going to care to read it. So I present to you, the masses, the Automation Engine Converter. The design is simple. (pw is my username) Open up an engine's LUA file that you have created in Automation (Found usually in My Documents\My Games\Automation\Engines\Variants), read some info about the engine's output in torque and redline, and format it in a way that can just be dropped inside a JBeam engine file. No fuss, accurate results, and a smooth(er) torque line incrementing by 100. Virus Scan for 1.1: https://www.virustotal.com/en/file/...6747602477bfd4db25f7e3fe/analysis/1456733097/ Developers I'm dumb, this was fixed after sadly being informed that BeamNG uses newton-metre values, and I didn't have to convert from the already newton-metre values to foot-pounds unnecessarily. Issue fixed. Spoiler I have a tiny issue with what I've created. The conversion from the value automation creates for torque and the conversion to actual torque that gets applied in game is a bit off. It's not a perfect calculation, but its ballpark, around a couple lb-ft off at most with what I've tested thus far. For this block of code found in the curves of an engine's LUA file: { 2000, 183.3073182600549, 38.392987382983534, 1159.9638666712849, 2.6741417266318481, RPM=2000}The second line (183.3073182600549) can be represented as the actual torque in game by dividing that by 1.354663416203636, resulting in an approximate torque value of 135.32. If I can get any assistance (or, heck, affirmation) pertaining to the accuracy of the calculation, it would be much appreciated. ANY CONSTRUCTIVE FEEDBACK WILL BETTER THE APPLICATION Changelog 1.2 4/23/16 Fixed an issue where engines with RPM limit values more than 4 digits (e.g. 11000) would not produce the full curve. Added bonus: Password was added back to the zip file. Whoops! 1.1 2/29/16 Fixed an issue where the comma would be read from the automation file and resulted in an error "Input string was not in a correct format". Fixed an issue that would result in "Array index out of bounds" by not recognizing the end of the curves section of the automation file. Cleaned up the code a little bit. The file opened is now displayed in the text box. 1.0 2/27/16 Beta release of application
Thank you good sir, I was waiting for the old app to be updated but this one is simpler and easier to use. --- Post updated --- A error popped up when I was trying to do a file, Code: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at Automation_HP_Converter.Form1.PickFileButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.6.1063.1 built by: NETFXREL3STAGE CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- Automation HP Converter Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/joshu/Desktop/Automation%20HP%20Converter.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
Go ahead and PM me the contents of your engine's LUA file, I'll try to reproduce the error and debug it for you in the morning.
I solved the error problem, I was using the family folder with the lua files in there.. so I went over the OP again and sure enough, I was using the wrong folder.. Thanks for the program bud .
Its not pw cause that's not the correct password, it's not pw is my username, cause thats not the correct password either.