1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

SOLVED Odometer Value

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by AdamPLGames, Sep 20, 2023.

  1. AdamPLGames

    AdamPLGames
    Expand Collapse

    Joined:
    Jul 4, 2016
    Messages:
    655
    Hi,

    Is it possible to change the value on the odometer?
    Like in Carrer Mode cars have random mileage set.
    Is this a lua command or something similar?

    I would be very grateful if I find out.


    EDIT: I already know
     
    #1 AdamPLGames, Sep 20, 2023
    Last edited: Sep 21, 2023
    • Like Like x 1
  2. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,341
    You need a lua command on the vehicle. partCondition.initConditions(nil, mileage). It affects both the displayed odometer value and the powertrain wear.
     
    • Like Like x 2
  3. AdamPLGames

    AdamPLGames
    Expand Collapse

    Joined:
    Jul 4, 2016
    Messages:
    655
    Thank you very much ;)
     
  4. Nutu_Camataru45

    Nutu_Camataru45
    Expand Collapse

    Joined:
    Mar 11, 2021
    Messages:
    3
    and is it possible to make the change permanent (kind of),like i want to have a 500k miles covet and if do it via the lua the odometer resets after i change cars and i mean is it possible to change it and keep it like that? And when u change it the odometer still runs on bigger value.For example i make my covet to have 500k miles and from there it will rise from driving
     
  5. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,341
    Probably possible but idk how
     
  6. JT2

    JT2
    Expand Collapse

    Joined:
    Mar 13, 2024
    Messages:
    2
    View attachment 1153020

    It says error?
     
  7. azu-cat

    azu-cat
    Expand Collapse

    Joined:
    Jan 5, 2023
    Messages:
    4
    How would I change it so a car would have, say, 295,317 miles? I know very little about lua.
     
  8. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,341
    I don't think that command still works, it has been a year since I posted that
     
  9. azu-cat

    azu-cat
    Expand Collapse

    Joined:
    Jan 5, 2023
    Messages:
    4
    is there a new command then? wanting to drive old barstow with many miles on it
     
  10. bumpinthatxcx

    bumpinthatxcx
    Expand Collapse

    Joined:
    Jul 7, 2024
    Messages:
    1
    The command still seems to work but a bit glitchy. I've tried it on the Pessima and I put in a random 5 number value and it seems to change the milage from 1k-5k miles.
     
  11. ProjectExorcist

    ProjectExorcist
    Expand Collapse

    Joined:
    Mar 15, 2017
    Messages:
    33
    Wait so for career mode the mileage actually does effect the performance and drivetrain?
     
  12. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,341
    Yeah and also the paint color, it becomes more faded
     
    • Like Like x 1
  13. Curry97

    Curry97
    Expand Collapse

    Joined:
    Feb 15, 2024
    Messages:
    34
    Would it be possible to implement a feature that "saves" the milage after closing the game? So it doesn't start from zero again after restarting or changing parts? Some mods do that already...
     
  14. ProjectExorcist

    ProjectExorcist
    Expand Collapse

    Joined:
    Mar 15, 2017
    Messages:
    33
    Ohh, thats actually really cool, that explains why the car I have with 177k idles erratically.
     
  15. lenajk2004

    lenajk2004
    Expand Collapse

    Joined:
    Nov 22, 2017
    Messages:
    12
    Posting on this thread to help out anyone who finds this:
    The command partCondition.initConditions(nil, mileage) still works perfectly in 0.34.

    The mileage value is in metres, not miles or kilometres. Therefore if you want a car with 100k km you would have to put in a value of 100 million metres.
    The conversion rate the game uses for km to miles is 10:6.215 or approximately 10:16.09011 the other way around.

    as examples:
    500k miles is approximately a value of 804505500 (it will come out to 500000.2 miles, sorry I don't have a better conversion)
    100k miles is approximately a value of 160901100
    10k miles is approximately a value of 16090110

    Make sure to select your current vehicle with this dropdown before executing the command, otherwise it will just throw errors at you.
    upload_2025-1-18_15-17-15.png
     
    • Like Like x 5
  16. azu-cat

    azu-cat
    Expand Collapse

    Joined:
    Jan 5, 2023
    Messages:
    4
    Thank you so much!
     
  17. lenajk2004

    lenajk2004
    Expand Collapse

    Joined:
    Nov 22, 2017
    Messages:
    12
    Got the conversion correct now, 1 mile is exactly 1609.010458568 metres in game, decimal values are fully working as well, i.e. if you want exactly 152,602.5 miles it would be 245539018.504.
     
  18. toyota.potato

    toyota.potato
    Expand Collapse

    Joined:
    Feb 21, 2022
    Messages:
    1,183
  19. salpaca53

    salpaca53
    Expand Collapse

    Joined:
    Jul 6, 2021
    Messages:
    33
    I know a good way to delete your comment. You can report your own comment and type in the Report Reason box that this is your own comment and you want it deleted. This always works for me.
     
  20. okr

    okr
    Expand Collapse

    Joined:
    Nov 22, 2024
    Messages:
    58
    Auto Perfekt Prague
     
  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