Beamngpy and MOD

Hello everyone,

I am using ‘BeamNG.tech\content\levels\template.zip’ and World Editor to make a map/mod for some ADAS validation work. I renamed it TestMap and put it in C:\Users\sirius\AppData\Local\BeamNG.drive\0.34\mods\TestMap.zip. I can run it perfectly in BeamNG.tech.

But I want to ask how can I open it with Beamngpy? I have been using Beamngpy und BeamNG.tech for a while, but I have only used the built-in maps in BeamNG. I now want to use a custom map or a mod made by someone else, but I don’t know how to open it with Beamngpy.

Thank you very much for your help!

Sincerely,
Liu

Hi @Liuxuanheng, and welcome to the BeamNG.tech Forum! You will need to have this mod in the BeamNG.tech userfolder, which is %localappdata%/BeamNG.tech/0.34/mods by default. As an alternative, you can also use the existing BeamNG.drive userfolder by setting it in the BeamNGpy constructor (included in the below example). You’ll be able to use it with the name that you gave to it in the levels subfolder (so TestMap if you renamed the folder to /levels/TestMap).

beamng = BeamNGpy('localhost', 25252, user=r'C:\Users\sirius\AppData\Local\BeamNG.drive'
beamng.open()

scenario = Scenario('TestMap', 'test')
ego = Vehicle(...)
scenario.add_vehicle(...)
scenario.make(beamng)

beamng.scenario.load(scenario)
beamng.scenario.start()

Hi @aivora,

Thank you very much for your prompt help!

I tried your method and it works great. Thank you very much! You helped me a lot.

Sincerely,
Liu