More Engine Modification, as in More Parts

Discussion in 'Programming' started by Destroyer247_52, Dec 6, 2016.

  1. Destroyer247_52

    Destroyer247_52
    Expand Collapse

    Joined:
    Mar 9, 2015
    Messages:
    188
    Okay so I've had this Idea for a While now and here it is, If most other car related games can have Individual parts for the engine, like Camshaft, Crankshaft, Heads, etc, why can't BeamNG.Drive have this as well?
    So then it hit me, how would this be implemented?
    So the slots and configuring all the parts would be pretty easy, but how could you make it to where the part added would decrease or increase burn efficiency, friction, inertia, Horse Power and Torque?
    I feel like the easiest way would be to have the engine be completely variables and the parts would add or subtract the h, t, b, f ,i variables. I haven't tested this theory but I am sure it could work in the logical sense. But for the "engine" (as in Torque 3D) would probably not know what I'm trying to even put in the jbeam, or it could be lua, I have no clue right now. This is a really cool Idea to me and I hope I can get some answers with this. This would be completely Awesome. Thanks for the help, if I get any. Hopefully no one will take this Idea, or get mad if I took theirs, I didn't do much searching before I posted This Thread.
     
  2. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    940
    Lua
    It can be done but not in a jbeam. To make a mod like this, somebody with lua knowledge is essential but would end up doing most of the work.
     
    • Informative Informative x 2
  3. Destroyer247_52

    Destroyer247_52
    Expand Collapse

    Joined:
    Mar 9, 2015
    Messages:
    188
    Thanks for your input. Now I will read an study up on Lua so I could learn how to do that as well. And yes it will take time to do so.
     
  4. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    Well if you want some help for the math behind it, I can lend you this...

    https://drive.google.com/file/d/0B24uvBKGyYwGVkNIUk9pVWdaM1U/view?usp=sharing
    I made this in Excell so I recomend using Excell to veiw it otherwise some of the graphs and equations might not work correctly.

    I got really bored and did a lot of engine mathematical calculations... it's not done yet, but it's a pretty good start. I honestly don't know how to dynamically find the efficiencies at each RPM correctly though, so I only have a mock up efficiency calculation, but for just guessing on that part, it does a pretty good job.
     
  5. amarks240

    amarks240
    Expand Collapse
    Guest

    Ported head. race cams. profit.
     
  6. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,812
    i though of doing this a while ago, just like slrr, i know how i could set it up in a jbeam form, the way i would do it is, have the performance set up for every different type of parts, when they are change they power of the engine is increased or decreased depending whats changed. the numbers would be added together with every different parts, instead of how it is right now. which is when you add a supercharger the engine specs is all changed together.
    if it would be the way that im saying it it would be a bit more complicated but it would have in depth customization of the engine, way more then what it is now.
    idk if any of that made sence, but im going to hope that someone understood what i meant lol.
     
    • Agree Agree x 1
  7. Destroyer247_52

    Destroyer247_52
    Expand Collapse

    Joined:
    Mar 9, 2015
    Messages:
    188
    That is basically how I thought this could work, but I didn't know how to put it in words.
    --- Post updated ---
    Great effort on your part, this could be very useful data in the future.
     
  8. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,812
    ugh i wish i knew some lua lol. i would try but the way the engines are handled as of right now, i cant do anything.
     
    • Agree Agree x 1
  9. Destroyer247_52

    Destroyer247_52
    Expand Collapse

    Joined:
    Mar 9, 2015
    Messages:
    188
    I feel exactly the same, jbeam and dae is easy for me but I don't have very much information on how to do Lua.
    --- Post updated ---
    Ai is the little bit of Lua I know.
     
    #9 Destroyer247_52, Dec 6, 2016
    Last edited: Dec 6, 2016
  10. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    940
    Crashmaster, the first thing you said, fairly sure it's not possible.
    A while ago, i made a mod that had lightweight flywheels for the sunburst, now say i wanted to do something like a lightwieght crank that also reduces engine inertia. It would not be possible because when you want a second upgrade that does the same function as the first, you can not do it. Unless however you have the time to make a part that will be "lightwieght crank and Flywheel" but this would take weeks and become ultra tedious. Same goes for something like Race high lift cams and Race tubular exhausts, they both will need a new torque curve for it to be realistically achieved. which cannot be done by merging the two in a jbeam.

    atv_123 has the right idea but will quickly become a lot harder when you try to add modifiers for each possible engine upgrade and effect they have on power or whatnot.

    @torsion maybe you could give some input seeing as you are a lua master.
     
    • Agree Agree x 1
  11. Spaceballs the Username

    Spaceballs the Username
    Expand Collapse

    Joined:
    Oct 13, 2015
    Messages:
    568
    We recently got more detailed brake parts for more accurate thermal simulation. The engine currently does simulate damage but I wouldn't put it past the devs to give engines a similar treatment for more accurate overall simulation.
     
  12. wrinkle345

    wrinkle345
    Expand Collapse

    Joined:
    Jul 2, 2015
    Messages:
    546
    The problem with this is that BeamNG needs an additive engine system.
    Currently the game can only redefine engine stats with each part, so things like engine torque, burn efficiency, friction, etc can only be completely changed, instead of added to/subtracted from.

    So, having parts like new valves or higher performance injectors can't do anything if something like an Intake does the same thing, because those stats would be overridden.

    The game needs to have it set up so when you get a part like new valves the engine power isn't directly changed, but is instead just added to.

    Not only would it let engines have a lot more customization, it would also allow for engine parts to have wear or to be damaged individually, since each part only contributes to the overall stats.

    Hopefully that all made sense.
     
    • Agree Agree x 2
    • Like Like x 1
    • Informative Informative x 1
  13. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,779
    I agree its not finished some of the maths is really complicated but it looks good so far but there are a load of #N/A and thats not really the best thing to have in formulas and "!/NAME" in there too
     
    #13 RobertGracie, Jan 22, 2017
    Last edited: Jan 23, 2017
  14. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,710
    I didn't see the "!/NAME" ones in there... gonna have to go looking for them... as for the #N/A's I actually designed the equations to put them in their on purpose (weird I know) where values for the particular engine being built were not being calculated. That way the graphs would look normal. If I just left them blank the graphs would be all sorts of messed up for some reason because excel apparently has difficulty ignoring cells with no values in them?

    I don't know... but basically the #N/A's are all in there purely just to make the graphs pretty... that's all... and it's not an on purpose calculation error either. I legitimately have IF statments inserting them where they are necessary. Its an odd way of doing things but it was the best solution I could come up with :p
     
  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