r3eckon / BNG-BeamLegalRacing

Hardcore career mod for BeamNG
49 stars 3 forks source link

No next, previous and cancel button in dealership. #33

Closed flappelapper closed 1 week ago

flappelapper commented 2 months ago

Reinstalled the mod yesterday, been working fine until I restarted just now.

Started on italy, went and sold my starter car and now every time i go in the dealership i get stuck. It was fine before i sold my starter car, after i sold it i ran into this issue.

Ive tried restarting the game and I just get the same issue again.

Console reports no errors (related to this) image

r3eckon commented 2 months ago

This happens when the trigger system loses track of your current vehicle, this stuff relies on frame delays which often will work on my end but won't work for everyone else.

Try this as a temporary fix when the shop UI is bugged:

  1. Open lua console with ~ key
  2. Use the bottom left dropdown menu to find the ID for a vehicle called "unicycle" image
  3. Execute the below command replacing 12345 with the unicycle ID extensions.blrutils.blrvarSet("playervehid", 12345)
flappelapper commented 2 months ago

There is no unicycle ID to be found (i imagine it was despawned when i entered the dealership?)

I just tried restarting my career as well and im still getting the same issue.

flappelapper commented 2 months ago

I can press F to get out of the vehicle again, and this does change the UI back to "take bus" and whatnot, but i can't click anything or interact with any markers (e.g. cant go back into dealership) and the dealership cars stay spawned.

flappelapper commented 2 months ago

Just to update im still having this issue after switching maps. I even managed to lose my car to pink slips and that didn't change anything either.

I'll let my game stay in its broken state in case you want me to send over my files or logs or anything. :)

r3eckon commented 2 months ago

There's flowgraph that should detect when you're walking and keep the unicycle active for the menu to work properly but that also relies on frame delays If you press F to get out of the vehicle it should spawn a unicycle, walk it to the floating marker then do the steps I listed in my first reply, it's possible that'll let you use the menu. If nothing works just avoid using the car shops while walking for now. I'll probably have to tweak delay values a bit because on my end it works fine.

flappelapper commented 2 months ago

This also happens when not walking tho. I am literally unable to use the dealership in any way i try, no matter if im on foot, in car, just restarted - nothing helps. I'll try your method and report back.

flappelapper commented 2 months ago

Tried what you said. That did indeed make the "car shop" window reappear, but pressing the buy button still does nothing. neither does the Take bus or sleep buttons.

r3eckon commented 2 months ago

Something might be wrong with your install, it shouldn't bug with a vehicle and if it was a problem with the mod more people would experience it. Try to reinstall in a clean userfolder, don't use any mods and carefully follow the install instructions.

Datorkaste commented 2 months ago

Having the same issue, i have to restart whole game for it to work again but since i can't save while in the dealership, i have to reset every time. Also it doesn't always work after restarting, sometimes it takes one or two restarts for it to work again.

r3eckon commented 2 months ago

There isn't much I can do about this unless I can reproduce the bug on my end. There might be something in log files even if it doesn't show in console, especially because spawning cars prints a ton of stuff. The take bus and sleep buttons are supposed to be locked while in car shop mode so that's not part of the problem.

Back up your userfolder, delete it, launch the game to get a fresh userfolder, install the mod carefully following install instructions. Then delete any log files in your userfolder, immediately launch the mod and go to a car shop to get the issue. Then stop the mod, wait a bit for the game to update the log file and upload it here.

WallK commented 1 month ago

This is triggering for me too Can't use the car shop while on foot without any vehicle

r3eckon commented 1 week ago

@WallK @Datorkaste @flappelapper

I finally managed to get this issue to occur on another computer and I believe it should be fixed right now. I found two causes, the first one being a race condition but it wasn't caused by frame delays, it was caused by the game placing the player into spawning cars on the same frame as the flowgraph node that checks if you're walking without an active vehicle. When this node works properly it's supposed to keep the unicycle until you exit the car shop so that it stays inside the trigger that shows the shop menus. I'm guessing the vehicle spawning executes C++ engine code which doesn't run in sync with lua so if that code executes fast enough the player will end up inside a shop car before the walk mode check happens. I moved that node before the vehicle spawning and it fixed the issue, at least on that computer. Shop still works fine on my PC

The second cause I found is that the unicycle will keep moving and ends up outside the trigger if you're holding movement keys while clicking the buy button. This can be avoided by making sure the unicycle isn't moving but to make sure it doesn't happen I added flowgraph to lock it in place.

Both should be fixed with the latest version (1.16.1) at least it didn't happen anymore on this computer. Due to the nature of race condition bugs like these I can't be 100% sure it's fixed for everyone so please use a test career (back up your real career before resetting) to check if it now works properly for you before trying to use it on your real career.

If it still doesn't work properly reopen this issue and I'll keep looking.