1. Stuck or having problems creating your mod?

WIP Traffic Tool 1.2.1

It's here! Create dynamic traffic on almost any map!

  1. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    2,223
    A good mapper can fix traffic issues 99% of the time, I'd reckon saying 'the mapper can always fix traffic mistakes' isn't too far from being 100% true.
    The tool picks one-way or two-way traffic depending on the decal road's properties, the lane amount set, and if one-way is checked or not in the properties of the decal road. That's a mapper's duty to set these things right, or in the case of older pre-0.9.0 maps (or somewhere around there!), the maps might not have it. All roads on OLD maps are two-way.
    Would be neat to have the 'Race Track' functionality, though. If the roads are set right on a race course that only goes one way, it shouldn't be too difficult.
    Currently, vehicles only travel the WRONG direction on one-ways if there are not enough nodes on the decal road (you may still see this in Roane County over long bridges for example, I can't really fix that at this point).

    As-per Roane County, @Gamergull I will have a beta to you in just a few more days ... latest Tuesday-Wednesday or so. It should hit BeamNG servers Friday~Monday a week from now or whenever the mods get around to approving it once it's uploaded and tested privately and I hand the link off to the moderators. This is just a quality-of-work update for function with the traffic tool and to look better in the process (not to mention fixing a termite colony's worth of bugs).
     
    • Like Like x 1
  2. _Archer_

    _Archer_
    Expand Collapse

    Joined:
    Oct 22, 2017
    Messages:
    24
    Great to hear. Thanks. The AI cars crashing a bit less would be cool. Maybe the Devs will recognise what an opportunity you've given them to improve gameplay, so that they'll find the time to rework the AI paths in the coming months.

    The sound is not just about the high revs but the sound volume itself. It's very unnatural when you hear a car coming towards you that is still hundreds of meters away. And I was hoping there were some config file to tweak in order to lower the volume. :)
     
    • Like Like x 2
  3. Michaelflat

    Michaelflat
    Expand Collapse

    Joined:
    Jul 10, 2014
    Messages:
    1,594
    High revs from AI cars are due to the AI's rather jerky inputs, if you slam the throttle on and off quickly on an automatic car in BeamNG then it will hold low gears as it thinks you are about to overtake, the AI drives like this all the time, even on a low risk factor, maybe it will get improved i don't know
     
  4. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    2,223
    Testing the traffic tool seems to be working out fine. I noticed only one bug, if the AI turns out of a two-lane one-way road, and makes a right turn onto a 2-lane two-way road (regular roads everywhere with a double-yellow with 1 lane each way), it will occasionally choose to drive into & proceed down the oncoming lane. Other than that, just a picture to share, will post this on in-dev shots too.
     
    • Like Like x 2
  5. Magirus17

    Magirus17
    Expand Collapse

    Joined:
    Dec 4, 2014
    Messages:
    4
    Wew, this mod became immediately my all time favourite.
     
    #265 Magirus17, Mar 10, 2019
    Last edited: Mar 10, 2019
    • Agree Agree x 2
  6. weirdplayer12

    weirdplayer12
    Expand Collapse

    Joined:
    Feb 4, 2018
    Messages:
    21
    Maybe a feature would be to to turn off respawning completely? I think it would be cool.
     
  7. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    2,223
    The respawning/warping is the ENTIRE POINT OF THIS mod.
     
    • Agree Agree x 2
  8. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    271
    D'oh! I added a function where the traffic vehicles update their current road data every few seconds... but I forgot to factor in the lane setting. I'll have to fix that later.

    Haha! Well, I've heard the request several times, so it will be a feature in Version 1.1 (which is now awaiting approval!). When it's live, you can simply set the Respawn Rate to 0.
     
    • Like Like x 3
  9. MrCin

    MrCin
    Expand Collapse

    Joined:
    Feb 26, 2018
    Messages:
    534
    Excited :D
    But won't be able to try it until Friday :(
     
    • Agree Agree x 1
  10. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    2,223
    That request for no respawning is like going to the store and buying unsalted Saltines - or worse - powdered water.
    *gets an idea-light*
    You know what, actually, I think we're out of powdered water, yeah THAT'S IT!
    *Idea-light explodes*
    About cars turning and going the wrong way...
    You can see that often in Kingston, where they drive the wrong way, I had one come right at me as I was leaving the Worst Buy parking lot. On the south-west side of the same town is a waterfront parking area with some benches, next to a school, they like to drive the wrong way exiting that waterfront parking area, too. It's anywhere that a road with more than 2 driving lanes meets a two-way road.

    Otherwise, it's working pretty well, and I see that where I keep my nodes close enough, traffic *does not* go the wrong way generally. It's getting to the point on the most recent version, that I can be pretty sure there's a hidden two-way chunk of decal-road hidden somewhere just past them driving the wrong way if I see that now.
    FWIW if you've been messing about in Downtown Harriman in Roane County, they get stuck in the earth at the end of the 1st bridge just north of town - that's my fault not yours, a node was placed just past where the bridge covers the crevasse. If the node in the decal road is too low (next to a sharp hilltop like where a road turns into a bridge) they might get stuck, this should *never* happen if you're a good mapper, so no need to change your tool for THAT specific instance. and again I say it as I said, working on Harriman when I next sit down at this.

    Things are working out great here on the Roane County update. I should have this wrapped in another day or two max.

    That's the Pine Ridge Road overpass on US 40 Westbound above, with the new textures, bridge, and your wonderful traffic that I keep trying my best not to ram into (so I set it to 80mph, no one except grandma does 70 in a 70mph zone). I have done ZERO testing with the police options, so I can't vouch for that.

    Hopefully this tool knows for vehicles to consider a road single-lane if it is one-way and 3~5 meters wide. That's about the space of a lane. I use these size (invisible) decal roads for left-turns, bank drive-thrus and a few other special-use cases like on/off-ramps for the highway. It enables me to get vehicles to go exactly where I want them. It can just be tough sometimes to get vehicles driving where I intend them to go, and these help a lot. Sometimes it's tough to join them to two-way roads though, the AI likes to chicken out and turn around sometimes - then going the wrong way (not your fault really, it's a lot of trial an error getting the AI right where a two-way road widens & splits with a median as they often do here). I've got a few trouble-spots, but I think I'll have it licked soon.

    I've managed to come up with a way to use invisible decal roads to get AI over non-straight bridges such as ones that are higher in the middle:

    Yes, I cheated, but now they won't brake anymore randomly near the high-point of the bridge like they did on the old bridge that was there. No, that rock is no-where near the bottom of the bridge, in-fact, it's barely out of the water. To be honest it functions 100% on that bridge with that 'cheat'. The AI only drives directly in a straight line from node to node, once you know this, you can 'trick' it into thinking there's a road where it's really a bridge. Or you can get up to no-good and move the bridge out of the way (or a piece of it), and they'll never ever be the wiser. The GTA AI was the same way, I used to love sticking a ramp in the road, or a bunch of half-pipes in GTAIV right on the highway, and the stupid AI would drive right up it, fly out the other (Raised 25ft) end and fall to it's doom (BOOM BOOM).
    Good times! This AI, while not perfect (not knocking your tool, this is a pre-release game), is still smarter than GTA's AI in knowing where it vertically is in relation to the node itself. GTA's traffic does NOT check for vertical position. I will let you know if I come up with anything else bud.
    --Cheers!
     
    #270 bob.blunderton, Mar 11, 2019
    Last edited: Mar 11, 2019
    • Like Like x 2
  11. weirdplayer12

    weirdplayer12
    Expand Collapse

    Joined:
    Feb 4, 2018
    Messages:
    21
    I have a suggestion, maybe whenever a car respawns, if there is a cop car present, there will be a 1/10 chance that the car will be "bad" and get the cop car to chase it, so there would be an ai chase without you having to do anything. Also make it so you can disable it whenever you want to also.
     
  12. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    2,223
    GTA SA (and I believe all versions since San Andreas) have that function, you can actually call it in SA with cheats for 'Aggressive Drivers'. I think RIOT mode also causes that to happen more. I've studied that game a lot (and actually played through it up to the flight school part again, to figure out how that map works and is so fun). Trying to bring more of that type of 'fun' to Beam with my open-world-esque maps, as-is GamerGull with his traffic tool. Getting traffic to take jumps in Roane County's Harriman area is a hoot.
    I am going to see if the AI behavior is scripted in SA or if that's all coded into the game engine. I can't reverse engineer the game's code at any rate, but I could definitely read script and might be able to help at a later date - very busy as-of late so don't expect anything over night on that. Now this isn't MY traffic tool *but* I try to help out with the testing-end of things as a mapper (knowing what is and isn't a traffic tool bug and might be a map bug or game-engine bug can save quite a bit of pain, too).
     
  13. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,188
    I thought that was simply a mod in GTA4 that was also made in GTA5, but that's awesome.

    Also, now that I think about it, the BeamNG cops are realistic...….if this was BeamNG.Auto
     
  14. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    271
    Gamergull updated Traffic Tool with a new update entry:

    Version 1.1

    Read the rest of this update entry...
     
    • Like Like x 5
  15. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,188
    ...I know I have this update because the AI pull over with police, first thing I tested. But I can't find the region or imperial/metric menu. Nor can I put the respawn rate below one. I did reopen the Traffic Tool and resubscribe to it, didn't do anything

    I'm guessing I should clear cache? Haven't done it yet because it takes atleast 15 minutes...
     
  16. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    271
    Ah, crud. I think you'll have to clear the cache for the app interface itself to update. Almost everyone might have to... this is annoying. Sorry!

    At work now, will clarify things with the update later today.
     
    • Like Like x 2
    • Informative Informative x 2
  17. Projekt535

    Projekt535
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    186
    Woohoo!! I've been so anxious for this, thank you! I'm super excited for highway driving now! :D

    And I'm very interested in what secret features you have to announce... hmm.

    Fantastic work @Gamergull, keep it up! :D
     
  18. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    271
    Thanks! Before you get too hyped, multi-lane traffic will only work on decalRoads with the One Way property set to True. That means maps like Utah won't have multi-lane highway traffic... yet. I would've used my parallel roads code to help with this, but it triggers too many false positives and can cause wrong way traffic on normal roads. I'm hoping that maps get updated for highway traffic.
     
    • Like Like x 2
    • Agree Agree x 1
  19. Projekt535

    Projekt535
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    186
    Yeah, I really hope the devs start pushing for better AI and redoing the maps.

    As far as highway traffic, this is fine because Italy is my main map at the moment. It's got everything I want in a map from high speed highways, to technical twisty mountain roads. So no worries, the hype is still real XD
     
    • Like Like x 1
  20. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    271
    I kinda have an idea for multi-lane traffic on obsolete highway roads. It involves having a "highway confidence" variable that goes up whenever parallel roads are detected several times in a row. It might still cause a few odd behaviors, but I wanna try it out.

    For the next while, I'm slowing down development of this app, and I might release a minor version with only bugfixes. I've never put in this many hours into a mod before (other than Gull Coast, but that had its own slew of problems), and I'm dealing with a bunch of other things now.

    Here's some of the hidden features that I mentioned. They're not that special, but some of you may find them useful. They all use the in-game command console. Press (~) to open or close it.

    Toggle smart headlights

    If you don't want traffic to turn on their headlights at night (for whatever reason, perhaps lag), type or paste this in:
    Code:
    freeroam_dynamicTraffic.toggleHeadlights()
    Toggle police mode

    If you don't want police to chase you, type or paste this in. It only works properly after traffic is activated:
    Code:
    freeroam_dynamicTraffic.togglePolice()
    Set extra police vehicle

    If my script isn't recognizing a mod police car, or if you wanna set a car as police for fun, try this. Before activating traffic, press Tab until you get to the vehicle you want to assign, then type or paste this in:
    Code:
    freeroam_dynamicTraffic.setAsPolice()
    Set custom vehicles group

    You may have noticed that there is a Custom choice in the traffic group selector. Currently, it will spawn Pigeons, and it has no extra UI to help you create a traffic group (that's gonna be a lot of work, yo!). But, you can still customize it! It's a bit ugly, though, but I'll try to explain. Slight bug, you have to click on the Custom choice after you enter in the group. Here's how to set a custom group that will only spawn T65 Ramplows:
    Code:
    freeroam_dynamicTraffic.setCustom("semi/t65_ramplow.pc")
    Here's how to set a custom group that will spawn two police cars and two civilian cars (look, curly braces!):
    Code:
    freeroam_dynamicTraffic.setCustom({"fullsize/police.pc", "sunburst/police_RS.pc", "roamer/sport.pc", "hatch/LXi_A.pc"})
    You can even omit the part configs if you want! Like this:
    Code:
    freeroam_dynamicTraffic.setCustom({"fullsize/police.pc", "sunburst/police_RS.pc", "roamer", "hatch"})
    Phew. Here, have a bonus video. Set up crazy police chases with the Copy Player method!

     
    #280 Gamergull, Mar 13, 2019
    Last edited: Mar 13, 2019
    • Like Like x 5
  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