Skip to content
Treto420Public

About

Gta x BeamNg "passthrough" mod. Beamng runs in the background and feeds its car data to a togglable switch in GTA 5

Topics

Resources

Stars

29 stars

Watchers

2 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

GTA x Beam

Drive BeamNG.drive's soft-body cars in GTA V's world.

GTA V runs the world, the walking and the guns. BeamNG.drive runs the car. Both games run at the same time and talk to each other on your PC. In GTA you see and drive your BeamNG car, with its real crumple, on GTA's streets, and GTA's traffic, people and lamp posts react to it like they would to a normal GTA car.

Single-player only (story mode). Script Hook V closes GTA V in GTA Online. Free, non-commercial fan project; not affiliated with Rockstar Games or BeamNG GmbH.

Quick start (5 minutes)

  1. Download GTA_X_BEAM_v2.77.zip from Releases (not the green Code button: that's the source code) and unzip it.
    • For 2.83 (newer than that release): use the green Code button, Download ZIP, and take the GTA and BeamNG folders from it.
  2. GTA V files: copy everything in the GTA folder into your GTA V folder (the one with GTA5.exe).
  3. BeamNG mod: copy the BeamNG\gtabridge folder into %LOCALAPPDATA%\BeamNG\BeamNG.drive\current\mods\unpacked\ (paste that path into Explorer's address bar). Say yes to replacing files.
  4. Start BeamNG first. Load the level Grid, Small, Pure and spawn your car.
  5. Start GTA V (story mode). Get in a GTA car about the same size as your BeamNG car (see Tips).
  6. In GTA press Shift+F11 (gets your car from BeamNG; the first time takes a while), then F11 (puts it on your GTA car), then F10 (drive).

Requirements

  • GTA V Legacy for PC (not the Enhanced edition), story mode, with Script Hook V and its ASI loader (dinput8.dll).
  • BeamNG.drive (made on 0.40).
  • A PC that can run both games at once. 8 GB of video memory or more is recommended; video memory is what runs out first.

Keys (in GTA)

Key What it does
Shift+F11 Get the car from BeamNG (export). Do it again after you change the car in BeamNG.
F11 Put the BeamNG car on the GTA car you're in or next to (press again to take it off)
F10 Drive mode on/off: BeamNG's physics drive the car
Shift+F10 On-screen drive check (what goes to BeamNG and back)
Ctrl+Shift+F10 Seat adjust in drive mode: arrow keys and Page Up / Page Down, press again to save
Ctrl+F9 Crash damage to you on/off (off by default, 2.81)
Ctrl+F10 Timing recording (only for bug reports)
Ctrl+F11 Re-read the ini and json files without restarting
Ctrl+Shift+F11 Show cars: park the BeamNG car on a GTA car and keep it there (up to 4)
Ctrl+Shift+F12 View modes (for testing)
D-pad down Swap the controller between GTA (aim, shoot) and BeamNG (drive) while driving

Driving uses your own BeamNG controls and bindings (gears, clutch, drive modes).

Tips

  • Pick a GTA car the same size as your BeamNG car. GTA's traffic, people and props hit an invisible GTA car hidden under your BeamNG car. If the GTA car is smaller, things go into your BeamNG car before they react; if it's bigger, they react before they touch it. A trainer such as Menyoo makes it easy to spawn the right one (a sedan for a sedan, a jeep for a lifted truck).
  • Run BeamNG small and light. Window mode at 1280x720 with the lowest graphics settings. You only see GTA's picture, so BeamNG's graphics are wasted video memory.
  • Start BeamNG first, on Grid, Small, Pure, with only your car spawned.
  • The first drive in an area is slower. GTA's ground is measured and built in BeamNG as you go. It's saved in GtaBeamD1_map\ next to GTA, so later drives there are instant.
  • Controller: a PlayStation pad works through DS4Windows.

What works

  • Your BeamNG car in GTA, drawn with its paint, materials, glass and lights, in GTA's light, shadows and reflections.
  • BeamNG's physics. GTA's streets, hills, walls and ground surfaces are built in BeamNG, so the car grips, crumples and breaks the BeamNG way. Since 2.81 (PuppetNoMap=1) only BeamNG meets walls, kerbs and solid posts, so slow wall hits bend the bumper too.
  • GTA's world reacts the vanilla way (PuppetSolid=1, new in 2.77). GTA's cars get pushed and dented, people ragdoll, lamp posts break and bins fly, and your BeamNG car takes the hit.
  • Traffic crashes crumple your car (TrafficProxies=4, new in 2.83). A GTA car about to meet yours gets a box in BeamNG at its place, with a car's size and weight. BeamNG resolves that crash, so your car really hits something, and GTA's car is shoved the way its box was.
  • Real damage on the car. BeamNG's dents, broken glass, lost bumpers and wheels show in GTA.
  • GTA's guns. Bullets dent the car, leave holes, pop tyres and break windows. Explosions push it and set it on fire; a car that blows up becomes a charred wreck.
  • On foot. Get out, walk around the car, shoot it. Get back in and keep driving.
  • Show cars (Ctrl+Shift+F11), pause sync (pausing one game pauses the other), BeamNG's engine sound and GTA's radio on the phone.

Known issues

  • Things react to GTA's hidden car, not the exact shape of your BeamNG car (see Tips). The parts of your BeamNG car that stick out past the GTA car crumple against walls BeamNG's way; GTA's people and signs push your car and dent it at the contact point.
  • Traffic (2.83): the box in BeamNG is a hard block, so hits are harsher than car on car, and the GTA car you hit shows no dent yet. Trucks, buses and bikes still crash the 2.82 way (a push and a small dent). The first F10 of a BeamNG session waits about 10 seconds while the boxes are made.
  • With PuppetSolid=1 you sit in the GTA car's seat in first person, not BeamNG's.
  • Some hillsides and bridge decks can have holes or show up a few seconds late.
  • The camera can lag a little at low speed.
  • Crashes don't hurt you by default (2.81). Ctrl+F9 or CrashHurt=1 turns it on; crashMinDv in GtaBeamD1_weapons.json sets how hard a crash must be.
  • Show cars stand still and can look flat-lit or show through the car you drive.
  • Door glass is missing on some cars. Tyre smoke is off (TireSmoke=1 to try it).
  • Other mods' extra objects on the car in BeamNG (like a DARS driver) aren't brought into GTA.

Settings

Everything is in GtaBeamD1.ini, with comments. The ones you're most likely to want:

  • PuppetSolid=1 (default): GTA's world reacts to your car with GTA's own physics. 0 goes back to the 2.76 way (traffic you touch vanishes, set by TrafficMode).
  • PuppetNoMap=1 (default, 2.81): GTA's hidden car ignores GTA's map and BeamNG's solid posts; BeamNG alone hits them. 0: the 2.77 way.
  • CrashHurt=0 (default, 2.81): crashes don't hurt you. 1: they do (Ctrl+F9 switches it in game).
  • TrafficProxies=4 (default, 2.83; needs the 2.83 BeamNG mod): that many boxes wait in BeamNG. A GTA car about to meet yours gets one (sizes and weights: proxyPool in GtaBeamD1_traffic.json), BeamNG resolves the crash, GTA's car copies its box and the hidden car ignores that GTA car. 0: the 2.82 way.
  • PuppetPassCar=1 (2.82): only for GTA cars with no box. It doesn't stop GTA removing a traffic car the hidden car is teleported onto.
  • Weapons=0 turns off weapon damage on the car.
  • DriveGravity sets how heavy the car feels (1.1).
  • ShowCarsMax (4) is how many show cars you can park; each one uses video memory.
  • DriverSeatForwardM, DriverSeatUpM, DriverSeatRightM move you in the seat for every car.

Game content lives in JSON next to the ini: GtaBeamD1_surfaces.json (GTA ground → BeamNG grip), GtaBeamD1_props.json (props), GtaBeamD1_weapons.json (damage per weapon; crashMinDv is how hard a crash must be to hurt you), GtaBeamD1_traffic.json (masses).

Bug reports

Please attach both logs:

  • GtaBeamD1.log (GTA V folder)
  • gtabridge_log.txt (%LOCALAPPDATA%\BeamNG\BeamNG.drive\current\gtabridge\)

Roadmap

Planned, in rough order. No dates, and things may change with your feedback.

Done in 2.83

  • Low-speed crashes: your BeamNG car crumples against walls, kerbs and posts at any speed.
  • Crash damage on/off key (Ctrl+F9), off by default.
  • Fix for slow motion (Wasted, weapon wheel) making the car jump.
  • Soft-body hits from GTA's traffic: your car crumples where it's hit.

Planned

  • Better soft-body hits from GTA's people and props: your car crumples where it's hit.
  • The hidden GTA car picked automatically to match your BeamNG car's size.
  • Tyre smoke and screech when the wheels spin.
  • No more holes on hills and bridges.
  • Smoother camera at low speed.
  • UI: BeamNG's menus and apps usable from inside GTA.
  • A launcher: one click starts BeamNG (Grid, Small, Pure) and then GTA.
  • Show cars with proper lighting; door glass on every car.
  • Steering wheel and force feedback support.
  • Motorcycles.
  • A second BeamNG car on the road (AI chases, trailers).
  • GTA V Enhanced edition support.

Building from source

The source is in source\.

  • Windows with Visual Studio 2022: run source\build_vs2022.bat (needs the Script Hook V SDK's ScriptHookV.lib).
  • Linux/CI: zig c++ -target x86_64-windows-gnu (see source\test\build_all.sh). That folder also has the tests, with a fake Script Hook V and a fake BeamNG for runs under Wine. They test the code, not GTA's physics.

Credits and licences

  • GTA x Beam by Treto420, MIT licence: use, change and share the code freely, including in your own mods, as long as you keep the licence and credit (Treto420). Third-party parts below keep their own licences.
  • Script Hook V by Alexander Blade.
  • cgltf (MIT), stb_image (MIT / public domain), bcdec (MIT / Unlicense).
  • Inspired by SkyCraft (Skyrim x Minecraft passthrough).
  • Licence texts are in licences\.
  • No Rockstar or BeamNG game files are included. The mod reads your own installs at run time.

About

Gta x BeamNg "passthrough" mod. Beamng runs in the background and feeds its car data to a togglable switch in GTA 5

Topics

Resources

Stars

29 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages