Changing engine oil amount

Discussion in 'Ideas and Suggestions' started by AdamB, Sep 18, 2017.

  1. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    What do you mean?

    Can you post your final code here?
     
  2. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    Okay you want the code I am using @AdamB Twin Charge engine and thats the code for you you may note 80 litres of oil but when your running an engine that exceeds 6000bhp you need lots of oil in it

    Code:
            //cooling and oil system
            "variables": [
            ["name", "type", "unit", "category", "default", "min", "max", "title", "description"]
            ["$Oilvolume", "range", "L", "Engine", 8, 0, 80, "Oil Volume", "Initial Oil Volume", "Amount of Oil whithin the engine"{"stepDis":0.5}]
            ]
            "thermalsEnabled":true
            "engineBlockMaterial":"iron"
            "oilVolume":"$Oilvolume"
    The Bits in bold are the sections I have added I over did the oil by a factor of 10 but it all works out I used the Stage 3 Turbo section to add in extra details

    Code:
            "variables": [
            ["name", "type", "unit", "category", "default", "min", "max", "title", "description"]
            ["$wastegateStart", "range", "psi", "Turbocharger", 8, 6, 46, "Wastegate Start", "Pressure at which the wastegate begins to open"{"stepDis":0.5}]
            ["$wastegateLimit", "range", "psi", "Turbocharger", 10, 8, 48, "Wastegate Limit", "Pressure at which the wastegate is fully opened"{"stepDis":0.5}]
    That was the section I also borrowed code from the first time I put it in was variables":[ and it failed because it was missing the " at the start
     
  3. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    What's wrong with it? Code seems fine.

    I'd put all the variables in a section on top, but I doubt that makes a difference.
     
  4. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    It wont adjust in the tuning section when you go to look at it, enter that code in and go to the Parts Menu and then into Tuning and you will see what I mean
     
  5. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    Might be a scope issue.

    Try moving the variable declaration out of the engine code, put it with all other variables on top.
     
  6. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    Do you want the engine file itself to see if it will work? so we can both work on it?
     
  7. Deleted member 160369

    Deleted member 160369
    Expand Collapse
    Guest

    Sure, but I can't look at it right now, on phone. :)
     
  8. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    Just to warn you this is a "Drag" spec engine with a Drag supercharger and a Variable Boost Turbocharger (VGT) on the exhaust side so its pretty bloody powerful, I will give you time to read it though, I understand dont worry I will let you take a look at it when your home
     

    Attached Files:

  9. Inertia

    Inertia
    Expand Collapse

    Joined:
    Dec 29, 2015
    Messages:
    1,692
    this should work
     

    Attached Files:

    #29 Inertia, Sep 20, 2017
    Last edited: Sep 20, 2017
  10. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    What changes did you make and what lines of code were altered?
    --- Post updated ---
    @Inertia This is what happens with your fix it said "Fatal Vehicle exception" and then produced that....
     

    Attached Files:

    • 20170920114659_1.jpg
  11. Inertia

    Inertia
    Expand Collapse

    Joined:
    Dec 29, 2015
    Messages:
    1,692
    I just moved the variables section out of main engine, where its supposed to be at the top. Nothing else touched. You have some other mod conflict there as this jbeam isn't related, I've verified that.
     
  12. RobertGracie

    RobertGracie
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    3,861
    What about that screenshot I posted in Discord does that help you out with any of it at all, because this should be easy to do but its proving a real nightmare
     
  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