1. Intel iGPU (6xx series) crashes
    Fixed drivers available!
    Instructions here

    Dismiss Notice

Tutorial: How to add your own music to the Ford Focus NA2/Gavril Vertex

Discussion in 'Content Creation' started by Inn0centJok3r, Jun 19, 2020.

  1. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    Heya!
    This thread is what the title says. It's only useful if you have the described mod (Ford Focus NA2 or Gavril Vertex) in version 1.2 or above. (the Vertex may take a couple days to update due to the approval progress, the Focus can get instand updates however.)

    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
    tut1.png
    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

    tut2.png
    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)
    tut3.png
    Go into the Vertex/Focus folder and find the radio.lua file, which is found here
    tut4.png
    Step 3:

    Now, open said file. The code may make it look like there's a lot to do, but it realls isnt. I've put notes all over the file to make things clearer. The second playlist is already laid out for adding new music!
    tut5.png
    Scroll a bit down...
    tut6.png
    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 (first marking) and also enter a custom name for the music that you're editing ("Song Here" marking)
    Now, to make it actually work, you gotta change the file path (art/sound/music/YourFileHere)
    Only change the last step of the path.

    -----------------Only when you want to add more than 3 songs----------------------

    If you add more songs than the 3 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. Don't forget these filler songs that play nothing, they're important! When you add more songs, you also have to change the word which I marked on the very right. Just increase that by 1 every time too, so instead of RadioSound3 you just make RadioSound4 out of it etc.
    -----------------------------------------------------------------------------------------------------


    Step 4:
    So, after setting up the path etc, you have to remove all the -- which stand in front of the code. The -- makes it a note, so Beam doesn't read it (I did that so that it doesn't cause errors when one hasn't added any custom music, yet still goes to the second playlist)

    Now you need the actual music file. Drop it in here
    tut7.png

    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
    tut2.png

    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/
     
    #1 Inn0centJok3r, Jun 19, 2020
    Last edited: Jun 19, 2020
    • Like Like x 6
  2. andrzejserafin5

    andrzejserafin5
    Expand Collapse

    Joined:
    Apr 23, 2020
    Messages:
    559
    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?
     
  3. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    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
     
  4. andrzejserafin5

    andrzejserafin5
    Expand Collapse

    Joined:
    Apr 23, 2020
    Messages:
    559
    I followed the every steps and it still don't works.
     
  5. Kenichi Koay

    Kenichi Koay
    Expand Collapse

    Joined:
    Apr 4, 2020
    Messages:
    43
    me too, i put the song and edit the radio.lua file, but it did not work
     
    • Agree Agree x 1
  6. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    Would you mind sending an image of what you edited in the lua file?
     
  7. Kenichi Koay

    Kenichi Koay
    Expand Collapse

    Joined:
    Apr 4, 2020
    Messages:
    43
    upload_2020-6-30_11-39-10.png
    here is what I edited.
    upload_2020-6-30_11-42-50.png
    and here is the song i putted
     
  8. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    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..
    FBA2C2CC-BD34-471A-9126-DCECE0D88361.jpeg
    you forgot to remove the — in front of the code that actually plays the music
     
  9. Kenichi Koay

    Kenichi Koay
    Expand Collapse

    Joined:
    Apr 4, 2020
    Messages:
    43
    I removed the -- but still the music is not playing
     

    Attached Files:

  10. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    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
     
  11. Kenichi Koay

    Kenichi Koay
    Expand Collapse

    Joined:
    Apr 4, 2020
    Messages:
    43
    Thanks, now I got the song playing
     
    • Like Like x 1
  12. henlo bob man

    henlo bob man
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    12
    i kinda dont get this im not the best at changing code what do i change in the file path?
     
  13. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    You just change the last thing to the name of your sound file
     
  14. henlo bob man

    henlo bob man
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    12
    got it thanks
    --- Post updated ---
    still wont work for me ive checked all the playlists still noting :(
     
  15. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    Die you remove the — in front of the code
     
  16. henlo bob man

    henlo bob man
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    12
    i did idk what im doing wrong
     
  17. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    Send me a screenshot of what you did, perhaps we can then work out what’s wrong
     
  18. henlo bob man

    henlo bob man
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    12
    these are some of the screenshots
     

    Attached Files:

    • photot.png
    • csfsdfddc.png
    • gfgdfgfdgfdg.png
  19. Inn0centJok3r

    Inn0centJok3r
    Expand Collapse

    Joined:
    Jul 16, 2018
    Messages:
    533
    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.
     

    Attached Files:

    • E2FA753A-4C65-47B2-9BAB-C932438046AD.jpeg
  20. henlo bob man

    henlo bob man
    Expand Collapse

    Joined:
    Jun 10, 2020
    Messages:
    12
    think notepad++ did
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice