So, I discovered something. Turns out that, if I use the file "utahNewCarShop" but with data for westcoast, I get 0 errors when I hit the buy button and cars spawn.BUT, if I take the same data into another file name, it breaks in 2 ways. If I start the game with that shop file, I get a break of flow (major nodes fail) then swap with utah or eastcoast, hit buy and errors reset, then swap back to my file, and ONLY get that one error blrutils line 173, but I can spawn...strange. I'm gonna test a fresh boot with the "utahNewCarShop" (westcoast data) next, and use a backup of utah for utah, and see what happens. --- Post updated --- Back in utah, I just used a shop with the same data as the default new car shop. Same deal. I attached the shop. I don't know why, any filename change, produces this. Edit: I "fixed" it by just using different "shop" folder for westcoast that uses the utah name structure for shops. No errors anymore. I just need to rename the shop folders if playing other maps. Not ideal, but I can't another way.
Sounds like you're not properly linking your car shop file to the trigger. Trigger data files in the mapdata folders for car shops need to point to the car shop file. Car shop file naming doesn't need map name included, they're loaded directly using the file name you give the trigger data file. You also need a file of the same name in beamLR/shop/daydata that keeps track of slots that are empty for the day after player purchased a car.
Back in utah, I just used a shop with the same data as the default new car shop. Same deal. View attachment 1005784 Oh !!! well, I didn't account for the daydata file...I'll test now. EDIT: Yep, I got the daydata files in as the same name and....we....got....A CUSTOM CAR SHOP !!!! No errors, just cars. Very expensive cars ! Got about 17 missions for westcoast. Will try to get some challenges in, maybe some races too.
The GTR has smoking breaks lol some cars break the shop (camera moves to a car and only a few spawn) It's all good tho. How can I spawn a different stock ? I tried going a few days ahead but unless I edit the actual cars in the file, it seems I get the same stock. EDIT: I got new cars by going a few days forward, so It randomizes. Also, I think the shop limit is 18 slots. After 18, it bugs out.
Next version is finally set for releasing this weekend after spending a long time adding workarounds for bugs relating to the police system. It's a smaller update mostly containing bug fixes and UX updates with new drift challenges on both maps for a bit of new content. The rest of this post will go into more details about the police bugs, I've also got some information on newly added performance classes and class power calculations if you're interested about that. So to begin with the police issues. The main cause from what I managed to find out is that police vehicles in active chase won't receive the vlua command that resets AI mode to traffic when currently deactivated by the pooling system. This should happen at the end of a pursuit so police resumes normal driving, they instead get stuck in "follow" or "chase" mode. This can happen both when the player or other traffic vehicles are chased and for some reason even if a traffic vehicle was the chase target police seems to default to the player when they get reactivated. Lots of lua functions in BeamNG have this feature where if no vehicle ID is provided it'll use your current vehicle so that part doesn't really surprise me. Using the console it's possible to see that the AI mode is no longer synced with the traffic manager: Both are random bugs, player chases have a higher chance of causing this bug because running away from cops means the traffic system will likely end up cycling the cop chasing you a bunch of times before you get away. With traffic chases it's a bit less likely to happen. If you've let the mission run for a bit and traffic doesn't get jammed by a crash at some point cops will likely come see you in spawn and will be following you around. Fixing the problem needed two workarounds, one for each cause. Player chase workaround is simple, AI mode change is queued and waits for the police vehicle to become active again before sending. My previous workaround tried fixing cops every second until all cops had been fixed. The delay meant cops often had enough time to turn around and block traffic, as they're still trying to chase the player. Using hooks means the fix is sent as soon as the cop becomes active so they immediately behave like regular traffic. As can be seen from the last 3 lines of the following image, this fix will attempt to send the command to all active cops, detects inactive cops and just wait for the hook when they become active. The traffic chase fix needed active vlua fetching of the "ai.mode" value. On traffic cycling hooks it compares that mode with the traffic manager role state, shown in the first image. Conflicting values means the police vehicle needs fixing. This fix has a tiny impact on performance due to vlua fetching and can be turned off from the options menu. A button can be used to trigger the cop fix manually when automatic fix is disabled. Now for the performance classes. I decided to go with a file based system for the reason that loading performance classes on the fly involves a lot of data. Performance classes in increasing order of performance are currently designated E,D,C,B,A,S,X so E are the worst cars and X are drag configs. Horsepower, torque and weight values are stored in the info files for official configs as well as some vehicle mods. The values are used to calculate a performance value which dictates performance class. The current function used to calculate power class is: Code: ((torque/3)+horsepower)/(weight/2) The game has a power to weight ratio value that doesn't seem to take torque into consideration. I think (please correct me if I'm wrong) that torque helps but not as much as horsepower, so out of two cars with equal horsepower and weight the one with more torque is technically a bit better. I'm no car expert but I believe this makes sense and even if not fully realistic I think it ends up generating pretty reasonable performance classes: Custom configs lack the info file needed to add them automatically to the performance class files when generating them. Luckily, this performance class calculation also works in vlua for the player vehicle. All the necessary data is accessible including drivetrain information for more specific track races, say only for RWD or FWD vehicles. So it's easy to spawn a custom config and check the performance class to add it to the correct file manually. I've integrated performance class file loading to my track race loader side project as a way to test the loading process. To simplify race files I've also implemented model name parsing from the config path. A single universal function handles both class files and generic config lists to build the data table needed for the race system to spawn opponents: This system can be used with custom performance class files, it's easy for example to create drift focused performance classes for dirt races while drag race clubs could share the same league based performance class files instead of having copies of the same exact config list in each file. Overall this system is quite nice, it'll definitely save me a bunch of work when making race clubs for future maps. This was also a key step in adding endgame track race events to the mod.
You...are...a...WIZARD !!!! lol I'm gonna read it again tomorrow ! Freaking awesome dude !!!! I'll upload the west coast work for you to save you time. Just use what you want. I have 17 missions and everything works so far. (no challenges or races yet) And you just need to delete some triggers (from east coast) in a subfolder. Got some floating random icons here and there as the;re not used for all events yet. The "PP" system is fantastic ! And the torque having a larger 'weight' in the PP system, is great imo. As "The capacity to do work" comes first in determining the overall performance of a vehicle. If you can, please add that "simple" license system, and the mission parameters, (cargo, time, speed...) I got a 3.3mil Bugatti in the shop...lol It's nice having a balance between races and missions ! I like doing missions buying some parts and racing ! --- Post updated --- Have a look at this beauty by Spencer. https://www.beamng.com/threads/desert-expanse-beta-3-1-0-27-compatible.86368/
I'll keep this in mind for after releasing next version, I can probably get around to revamping the mission system a bit.
Damn it...For some reason all shops are now broken for me. All maps. If I copy a fresh mod install over it works, if I load a career, the shop says "empty lot" not enough money. After a restart, same broken shops. Gna take a break for now.
Hard to tell what might be wrong just by looking at the error nodes like this. Hope you can get it working again by reversing your last steps, I suggest you make userfolder backups when you get to a point that works and are about to make changes that could break stuff, depending on the files you changed and how you changed them reinstalling over your edits might not fix the issue but a previous version of your userfolder should work every time.
My user folder is pretty big...lol I'll test again, but I need a new gpu as well, as my rx580 is pretty bad for beamng...other games are ok. Just beam and amd cards I guess. I installed modded amd drivers maybe it'll be better.
Well, It works after validating (had 62 missing files ? for some reason) permissions too, shop works now.
Do you think it would be better for any starting vehicle (career) to be part of the used vehicles pool ? (the strange and incomplete configs) --- Post updated --- This is unrelated, but I see the mesh edges for the road on east coast. I generated a fresh temp folder so it's not that...Any ideas ? Found a thread on this issue..lol, no one knows... --- Post updated --- I just added some really nice ui apps to your mod. No map, but, here's what I added: 1:thrillDrive -this triggers a cinematic cam and slow motion WHEN YOU CRASH !!! lol it's awesome 2. All you see there...lol You can toggle the endurance hud on and off, so it's still minimal-ish. Vehicle power-weight/ratio, radar...and the forza drift/air etc UI View attachment 1006736
I found a bug... and it lost me a good few hours of progress lol. For context, I had just had a little fender bender with an oncoming car. Nothing hard, I didnt even spin out... then my health just started dropping randomly. Im gonna miss that little 200BX
Version 1.9 just released on github, it's mostly bug fixes and QoL updates with drift challenges added for a bit of new content. Important buttons now ask for confirmation, your time of day settings and UI layout should also properly reset after quitting mission. Added drift challenges Fixed police chase state bug with UI menus Fixed bug caused by pulling cars out of garage while towing Fixed interaction markers moving away from origin point Time of day settings should now reset after scenario end Fixed scrapyard moonhawk paint bug Some buttons will now ask for confirmation Fixed bugs causing police to keep chasing player after escape Disabled towing & sleep buttons during events Implemented workaround for beamstate damage cost changes Disabled quick access menu (radial menu) Fixed UI not resetting to freeroam after scenario end Removed missing apps from custom UI layout Improved car shop RNG seeding process That's never happened to me, do you have other mods that might be causing issues? Or maybe you had gravity increased causing higher G forces when driving? Is it possible the accident you had ripped off a body panel that got stuck in traffic? Maybe that part moving around counts as G forces, which is used for injury calculation. There's not much I can do about issues relating to how BeamNG sees body panels as part of your car no matter if they're completely ripped off or still attached, I know that can lead to crazy damage costs but I haven't seen health dropping like that yet. That being said you should definitely back up your career files on a regular basis if you care about progress.
Here's my westcoast work. (custom modded cars shop for the new shop) default cars for scrap and used, working gas stations, garages, missions. Not challenges or races yet. --- Post updated --- OMFG ! This is so amazing !!! With the ui apps, it adds a new dimension ! The crash ui app slowing down time and auto cinematic cam is SUPERB !!! I'm doing a video tomorrow to illustrate ! About the cops, always thought it was funny af, seeing a cop casually come by my side, and ticket me. lol, sometimes tho, it's not so casual and they bash you hard af from behind out of the blue ! lol --- Post updated ---
Interesting, a bit too cluttered for my taste but it seems to work pretty well with the mod. I'll check out the west coast stuff you made when I get the time, for next update I've got too much planned already relating to endgame races.