QUESTION AI fuel usage problems?

Discussion in 'Car Models | Physics' started by rageman002, Oct 28, 2021.

  1. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    Hey! Sorry to revive this old thread, I can't get this to work. Do I also need to put extended-2 in the engine.ini?

    "
    RESPONSE_TIME = 0.03 ;response delay in seconds
    MECHANICAL_EFFICIENCY = 0.85 ; % / 100 - should match "transmission losses" multiplier
    IDLE_THROTTLE = 0.04 ; % / 100 - how much throttle is used to reach idle
    IDLE_CUTOFF = 1800 ; revs at which the throttle ceases to idle
    "
    Where do I put these in the engine.ini exactly? Anywhere will do or under a specific section?

    And do I need to enable an option in CSP to activate this?

    Will this both change the car's fuel consumption, as well as the AI's fuel management?

    Thanks

    Edit: I tried enabling the LOG_FUEL_FLOW = 1, but I see nothing in the custom_shaders_patch.log.
     
    Last edited: Jun 18, 2022
  2. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17
    in the file "car.ini" add extended like this:
    [HEADER]
    VERSION = extended-2

    and in the "engine.ini" file add these:
    RESPONSE_TIME = 0.03 ;response delay in seconds
    MECHANICAL_EFFICIENCY = 0.85 ; % / 100 - should match "transmission losses" multiplier
    IDLE_THROTTLE = 0.04 ; % / 100 - how much throttle is used to reach idle
    IDLE_CUTOFF = 1800 ; revs at which the throttle ceases to idle

    [FUEL_CONSUMPTION]
    THERMAL_EFFICIENCY_LUT = ; torque_ratio | thermal efficiency of the motor
    THERMAL_EFFICIENCY = 0.35 ; lowest value = increased consumption
    FUEL_LHV = 43 ; lower calorific value of fuel - MJ / kg
    TURBO_EFFICIENCY = 0.8 ; optional: how efficient the turbo is at generating power from more fuel
    LOG_FUEL_FLOW = 0 ; if 1, the current flow rate will be recorded in custom_shaders_patch.log

    naturalmente devi usare ContentManager e CSP
     
  3. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17
    I copied my post to you in this thread where I have already explained everything, read it step by step and it will work. LOG_FUEL_FLOW doesn't matter you put 1, it just enables you the log script. As for your question, if this also affects the consumption of the AI, well I would say yes, the AI uses the same mod as you, so it will have the same consumption calculations as you.
     
  4. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    I tried this, it doesn't seem to work.
     
  5. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17
    This is one of my engine.ini, so you have a working example


    [HEADER]
    VERSION=1
    POWER_CURVE=power.lut
    COAST_CURVE=FROM_COAST_REF

    [ENGINE_DATA]
    ALTITUDE_SENSITIVITY=0.1
    INERTIA=0.100
    LIMITER=7250
    MINIMUM=1050
    LIMITER_HZ=20
    DEFAULT_TURBO_ADJUSTMENT=1

    RESPONSE_TIME=0.03
    MECHANICAL_EFFICIENCY=0.85
    IDLE_THROTTLE=0.04
    IDLE_CUTOFF=1800

    [MAP]
    DEFAULT=0
    MAP_0=engine_map0.lut
    MAP_1=engine_map1.lut
    MAP_2=engine_map2.lut
    MAP_3=engine_map2.lut

    [FUEL_CONSUMPTION]
    THERMAL_EFFICIENCY_LUT= (Leave this blank as you see it here)
    THERMAL_EFFICIENCY=0.35
    FUEL_LHV=43
    TURBO_EFFICIENCY=0.8
    LOG_FUEL_FLOW=0

    [COAST_REF]
    RPM=7000
    TORQUE=120
    NON_LINEARITY=0

    [COAST_DATA]
    COAST0=0
    COAST1=0
    COAST=0.0000015

    [COAST_CURVE]
    FILENAME=coast.lut
     
  6. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17
    This is one of my car.ini, so you have a working example

    [HEADER]
    VERSION=extended-2

    [INFO]
    SCREEN_NAME= your car
    SHORT_NAME= your car

    [BASIC]
    GRAPHICS_OFFSET=0,-0.56,-0.21
    GRAPHICS_PITCH_ROTATION=-0.2
    TOTALMASS=1070
    INERTIA=1.7,1.20,3.9

    [GRAPHICS]
    DRIVEREYES=0.344465,1.09916,-0.209424
    ONBOARD_EXPOSURE=33
    OUTBOARD_EXPOSURE=31
    ON_BOARD_PITCH_ANGLE=-0.061453
    BUMPER_CAMERA_POS=0.000000,0.420000,1.869999
    BONNET_CAMERA_POS=0.000000,0.490000,1.010001
    MIRROR_POSITION=0.0,1.3,0.5
    SHAKE_MUL=1.5
    USE_ANIMATED_SUSPENSIONS=0
    FUEL_LIGHT_MIN_LITERS=10
    BUMPER_CAMERA_PITCH=0.000000
    BONNET_CAMERA_PITCH=0.572958
    CHASE_CAMERA_PITCH=0

    [CONTROLS]
    FFMULT=2.600
    STEER_ASSIST=1.000
    STEER_LOCK=300
    STEER_RATIO=-12.0
    LINEAR_STEER_ROD_RATIO=0.00215



    [FUEL]
    CONSUMPTION=0.00145
    FUEL=12
    MAX_FUEL=50

    [FUELTANK]
    POSITION=0,-0.30,-0.60

    [RIDE]
    PICKUP_FRONT_HEIGHT=-0.330
    PICKUP_REAR_HEIGHT=-0.330

    [RULES]
    MIN_HEIGHT=0.060

    [PIT_STOP]
    TYRE_CHANGE_TIME_SEC=20
    FUEL_LITER_TIME_SEC=0.2
    BODY_REPAIR_TIME_SEC=20
    ENGINE_REPAIR_TIME_SEC=2
    SUSP_REPAIR_TIME_SEC=30
     
  7. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17
    in game you should open the AI app and do a couple of regular laps and press the "SAVE CONS" button that you find in the AI app that opened to you, it automatically generates the "fuel_cons.ini" file with the estimates of the consumption that your engine has based on the power, the aerodynamics, and the weight of your mod. The file will be generated in the "data" folder
    If you want to start you can copy the file that I have attached to "data", then later create your own.
    Also remember to delete the "data.acd" file inside the main folder of the mod, because if it is present, assettocorsa will not read the files inside the unpacked "data" folder, but it will read "data.acd" and your changes will not work .
     

    Attached Files:

  8. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    I got it to work! Turns out the way you write the extended-2 part matters.
    [HEADER]
    VERSION = extended-2 <-- not good
    VERSION=extended-2 <-- this works

    Now I have a weird issue where the AI just spins its wheels endlessly once I've enabled that. I tried driving the car myself and it works fine, only the AI has issues. I tried it on another car and there was no issue with it. Seems like its car-specific.

    It appears to be only when they are trying to leave the pits. I tried starting a race and it worked fine there too, any idea what's going on here and how to fix it? I attached a screenshot to show what's going on, it's like the car has 0 grip somehow.
     

    Attached Files:

  9. denis370

    denis370 Member

    Joined:
    Jun 25, 2018
    Messages:
    180
    Likes Received:
    17

    Try sharing the mod if you want, and tonight I'll try if I find the problem
     
  10. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    I figured it out, it was the tyres.ini, I swapped it with a kunos car and now everything works fine!

    Thanks for your help!
     
  11. rageman002

    rageman002 New Member

    Joined:
    Oct 28, 2021
    Messages:
    16
    Likes Received:
    1
    Ok I just ran into another car having the same issue, and with this one changing the tyres.ini doesn't seem to fix it.

    In the custom_shaders_patch.log, there's an entry:
    2022-06-19T01:20:09:481 [14168] | INFO | Detected suspension travel for `osella_pa21_honda` (wheel=0): 0.30895

    So I'm thinking it's about the suspension bottoming out, but I tried changing various settings in the suspension.ini and setup.ini but I can't figure it out. Any help would be appreciated!

    Edit: I found the issue! The PERFORMANCE_CURVE= was mislabelled, and apparently once you put the extended header, it breaks things.
     
    Last edited: Jun 20, 2022
  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