Please only follow this tutorial if you have some amount of prior coding experience. This is a step by step tutorial. Reference existing code for syntax. DO NOT remove any " or change anything that is not a value or "inside these" This tutorial is for Version 2.15+ of the Vertex and Version 1.2+ of the Tuner LeGran. Heya! This thread is what the title says. It's only useful if you have the described mod (Gavril Vertex) in version 2.15 or above. Anyways, as you might know, my mod has working radio that's controlled by some lua code. The earlier versions were a bit rough but it should be good now. Many have asked the question of how one can add music to it... and as I unfortunately never really set up a reasonable tutorial, I'll just make one now! First off, If you want to have a more pleasing experience while editing the code slightly (Don't worry, it are just a few minor things that have to be changed), I recommend downloading Notepad++ https://notepad-plus-plus.org/ It's a free program, but it's not required. Step 1: So, lets start off. First of all, you have to unpack the mod file. You can safely do that by starting BeamNG and then going into the mods menu like shown here Find the Ford Focus/Gavril Vertex file, click on it and click on "unpack" I know, the image says pack on it, I just took the image after I unpacked it Step 2: After that is out of the way, you have to go into your mods folder. Follow the path shown here! (or whatever path you have set it to) Go into the Vertex/Focus folder and find the radio.lua file, which is found here Step 3: Now, open said file. The code may make it look like there's a lot to do, but it really isn't. I've put notes all over the file to make things clearer. The second playlist is already laid out for adding new music! Scroll a bit down... Here you see the second list. There are mainly 2 things that have to be changed. And 2 more that can be changed if you want to. You can enter a custom name for the playlist and also enter a custom name for the music that you're editing ("Your Song Name Here" marking), even an author can be displayed if you want! Now, to make it actually work, you gotta change the file path (art/sound/music/YourFileHere) Only change the last step of the path! Don't forget to remove the -- in front of --play_song_dir! Otherwise the lua won't play anything as it can't read the file path! The code can look like this once you're done: -----------------Only when you want to add more than 8 songs---------------------- If you add more songs than the 8 layouts that I have made, you gotta increase the song limit (described in the notes) and also have to copy paste the song blocks that are already there aaand the change all the if song == X values. Just increase them by 1 every time. Make sure that you do NOT place the new songs below the "end" marker in the code. Your code should look somewhat like this once you're done: ----------------------------------------------------------------------------------------------------- Step 4: Now you need the actual music file. Drop it in here Step 5: When you're done, save the file and go back into your game Load a map and spawn the car, mess with the radio to ensure that your changes have worked. Once it all works, go back into the menu and "Pack" the car file again I recommend making a backup of your edited radio.lua file as well as all the music you installed, in case of any future updates to the mods! They would overwrite the code. However, please watch out for the update changelog in case there will be any further changes to the code! Tadaaa! Now you have added your own music to the radio. Have fun and enjoy your music! If you have any questions, feel free to ask them. Here the mod links again: https://www.beamng.com/resources/gavril-vertex-na2.13061/ https://www.beamng.com/threads/ford...ation-export-with-8-months-put-into-it.70962/
Please help me,i added the music to a good place and it don't shows in the game. What type of a file is accepted?
All sound files should be accepted... like ogg, mp3, flac etc. Make sure you also saved the file and did everything like it's explained in the tutorial
I sadly can’t view the images as you have copy pasted them in. Please save them on your computer and then upload them, as otherwise you can’t view the images in a bigger view than... what you got there --- Post updated --- Actually, ignore that, apparently they are so high res that I can just zoom in on mobile. I have found your issue. It’s very very simple.. you forgot to remove the — in front of the code that actually plays the music
Actually, ignore that, apparently they are so high res that I can just zoom in on mobile. I have found your issue. It’s very very simple.. OH you just didn’t go into the Next Playlist! Press CTRL 5 to switch to the next playlist, or just look up the controls. Your music is in a new playlist. It should play when you go into it and switch the songs around
Did you put the rest of that into the next line? Like did you split it yourself or is that some weird thing notepad did? If you did it yourself, Please get it all back Into one line like all the examples.
It still does not work but i shall look more into the file --- Post updated --- An update i gave up so the mod will now just be installed but never used Update 2: i reinstalled the mod and did not remove the dashes it works fine removed the dashes first song its fine now the second song It works now fully
playlist 2 does not show up. idk if i corrupted the file while changing the extension but it doesn't do anything edit: i forgot to press next list! thank you, the Gavril Vertex NA2 is my fav car!