Released Pursuit Tweaks - For 0.19

Discussion in 'Utilities and programming' started by carnox7, Apr 10, 2020.

  1. carnox7

    carnox7
    Expand Collapse

    Joined:
    Aug 24, 2014
    Messages:
    198
    WARNING: WILL OVERRIDE traffic.lua. THIS MOD MAY CONFLICT WITH GAME UPDATES AND MAY BREAK WITHOUT WARNING.
    IF YOU USE THIS MOD YOU WILL NOT RECEIVE UPDATES RELATED TO THE TRAFFIC SYSTEM WHEN THE GAME IS UPDATED BY BeamNG. If you use this mod, you are on your own if anything on the traffic system breaks

    This is because the mod overwrites traffic.lua, a core game file. Due to this, (and the fact I don't know how to do the same thing with
    extensions), your installation may break and cause this mod to be outdated.

    BEFORE REVIEWING, PLEASE READ THIS BEFOREHAND. Thanks.
    For version 0.19 - Mod Version 0.3



    This mod changes a few things about the traffic system, mostly the pursuit system. I have made messages that show your stats, and I have fixed the chases so they can actually catch up to you. Wrecking police cars will now give you points. The more points you have, the higher your heat level (does nothing for now, I literally don't know how to make dynamic roadblocks in BeamNG).


    The police can now catch up with you. Before you installed this mod (as of 0.19), the police would at max, drive up to 50mph before backing off you. I have edited the AI so they will prefer to chase you than to run you over. The time to evade the police has also been reduced from 60 seconds, to 10 seconds, multiplied by your heat level.

    Changelog:
    Ver. 0.3 (2020-04-16):

    • Killswitches added. If you are near a police car in condition 3 or higher, they will intiate a kill switch. If successfull, your car will stop, allowing them a chance to bust you. In condition 4 and higher, the charge time will be shorter and will now pop your tires. In condition 6 and higher, a successful killswitch will destroy your vehicle (catching it in flames)
    • Allowed the police to search for you and go offroad if you are in cooldown
    • Fixed the bug where a vehicle can be registered as wrecked twice or even three times, causing you to get credited twice/3 times
    • Added offenses for: Reaching cooldown, destroying police cars, resetting during a pursuit.
    • Passive Bounty Gain has been raised
    • Fixed the "Be a Cop" mode. All the code for traffic being suspects is still there, but the code to be a cop was removed in game update 0.19
    • Debug messages that print to the console has been enabled
    • Max heat level has been increased to condition 10. This is extemely hard to get (unless you cheat and use a ram plow)

    Ver. 0.2 (2020-04-12):
    • Made the police prefer to chase you rather than crashing into you. This comes with a side-effect that the police doesn't know how to go off-road anymore.
    • Added a counter of offenses you did to the pursuit stats message
    • Cooldown time has changed from a base 30 seconds, to a base 10 seconds times the heat level

    INSTALL IN: Documents/BeamNG.drive/mods/unpacked
    However, you also must unpack the mod and then you can place it in the directory

    Bugs:
    • Messages don't appear when the mod is packed. If you have a solution to this, please reply to this post. (and is probably why it got taken down the repo)
     

    Attached Files:

    #1 carnox7, Apr 10, 2020
    Last edited: Apr 16, 2020
    • Like Like x 2
    • Informative Informative x 1
  2. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    I have a small issue with the latest version.

    Today I tried the first version on West Coast USA and although I had lag from the game itself, the mod worked perfectly. Now with the latest version of it, the entire UI desyncs quite fast, although I have no lag, on Utah. Could it just be my hardware? Not running on a potato, but not on a supercomputer either.
     
  3. carnox7

    carnox7
    Expand Collapse

    Joined:
    Aug 24, 2014
    Messages:
    198
    Try enabling hardware acceleration for the UI. It's on the options menu
    BeamNGdrivex64_2020-04-17_13-37-11.png
     
  4. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    Doing this has worsened the problem, as the UI can't keep up even out of chases. The chases themselves seem like they don't make a difference in that anymore though.
     
  5. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    516
    Did this get deleted?
     
  6. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    If you mean from the repository, yes, because it overrides a default game function.
     
  7. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    516
    Will it also affect AI chasing me if it's just me going to the radial menu to say "Chase me" instead of with traffic?
     
  8. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    It only affects traffic pursuits, nothing else.
     
  9. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    516
    Aww, it would be nice to have them chase you better when having the AI set to "Chase Me".
     
  10. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    True, but that doesn't use the traffic function. I'd personally say it's for the better though.
     
  11. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    516
    But they're so slow... :(
     
  12. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    Well, yeah, that's the AI doing what they do. After all, this game isn't known for revolutionary AI.
     
  13. mrwallace888

    mrwallace888
    Expand Collapse

    Joined:
    Jun 17, 2015
    Messages:
    516
    ...yet.
     
  14. Est_Nbmstr

    Est_Nbmstr
    Expand Collapse

    Joined:
    Sep 24, 2018
    Messages:
    11
    Perhaps, we'll have to see.
     
  15. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Let me chime in that, as there is much more to depth on the topic than it looks.:
    The AI in BeamNG.drive is not the omniscient scripted AI you can find in most games.

    The AI there is closer to what the Tesla's Autopilot is doing: Using the sensors in the car to determine the driving line, speeds and so on.
    Plus it has to be even more flexible, as it can drive a variety of different vehicles, that are available in-game.

    So yeah, it's quite big, and requires as a big effort to work on it.
     
    • Informative Informative x 1
  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