Released Piano: Changing song tutorial, with new song to download

Discussion in 'Mods and Skins' started by corvette81, Aug 12, 2017.

  1. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    428
    This is a simple guide for changing the song the piano plays.


    steamapps\common\BeamNG.drive\content\vehicles\piano.zip\vehicles\piano\lua

    Within this folder will be a file called the Piano.lua, in this file will be the code that makes its play a certain song change this to the name of your new song. I suggest using .flac as I haven't tested other file types.


    steamapps\common\BeamNG.drive\gameengine.zip\art\sound

    Within this folder is where you will need to put the .flac sound file.




    and that's it.

    Use the attached music(dropbox) and lua files if you want.
    Credit to the songs author.
    https://www.dropbox.com/s/4v24xbcq9yyzu7c/Morning Walk - Soft Piano Music - Royalty Free.flac?dl=0

    Cheers for the help discord guys.
     

    Attached Files:

    • Like Like x 2
    • Informative Informative x 1
  2. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    Awesome! Now to put this in a mod..
     
    • Agree Agree x 1
  3. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    428
    Hopefully someone can use this knowledge to do so, just a little beyond my skills at the moment but thanks.
     
  4. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    I'm not sure it's possible, as you have to put the files in a zip that's not in the content folder.
    Actually, I'm working on it now.

    To make a piano sound mod, use the paths "YOURMOD\art\sound\MUSAK.flac" and "YOURMOD\vehicles\piano\lua"
     
    #4 BombBoy4, Aug 12, 2017
    Last edited: Aug 12, 2017
  5. carlosjr

    carlosjr
    Expand Collapse
    Banned

    Joined:
    Jul 29, 2017
    Messages:
    232
    Piano death metal time
     
    • Like Like x 1
    • Agree Agree x 1
  6. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    428
    Oh nice :) good work

    Its possible just dunno why you would want to.
     
  7. carlosjr

    carlosjr
    Expand Collapse
    Banned

    Joined:
    Jul 29, 2017
    Messages:
    232
    For the glory of Satan of course
     
    • Informative Informative x 1
  8. jetcoasterfan

    jetcoasterfan
    Expand Collapse

    Joined:
    Jan 31, 2015
    Messages:
    183
    Can you make the piano play rap and hip hop music?
     
    • Like Like x 1
  9. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601

    This is in mod form, so I confirm that it is possible to mod sounds in, though IDK how to use multiple.
     
  10. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    428
    Nice mate @BombBoy4 probably means everyone is gonna upload songs now lol

    @jetcoasterfan any sound will work just needs to be .Flac
     
  11. Brownzy03

    Brownzy03
    Expand Collapse

    Joined:
    Sep 3, 2016
    Messages:
    102
    Kind of a wild thought, but what if it would be possible to have a radio in the vehicles that you can listen to?
     
  12. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    Actually, we could use the lua system and modify it to work at the press of a button. I'm not sure how to put the speaker in the right place or how to use multiple sounds, but it might be possible.
     
  13. BowlerHatJack

    BowlerHatJack
    Expand Collapse

    Joined:
    Aug 5, 2016
    Messages:
    1,388
    Oh wow didn't know there's an tutorial for this. I made this work in the usual modding format aswell but the mod overwrites the official piano.lua, so if an update to beamng comes that edits the offical piano.lua then this mod will conflict. I don't know lua well so I can't say if it's possible to make the mod so it doesn't overwrite anything? @BombBoy4 ?
     
  14. Banana Peels

    Banana Peels
    Expand Collapse

    Joined:
    Sep 23, 2016
    Messages:
    476
    @corvette81 I noticed you have Hotel California as your piano sound, where did you get the file, if you don't mind?
     
  15. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    I don't know that yet (not familiar with .lua), but I am experimenting constantly.
     
  16. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,683
    With Lua you can do a lot. Including make it compatible with a "piano_song" JBeam slot that specifies the song, for example. Which would allow people to upload as many songs as they want to the piano, while keeping compatibility with the original.
     
    • Like Like x 1
  17. BombBoy4

    BombBoy4
    Expand Collapse

    Joined:
    May 16, 2015
    Messages:
    1,601
    How would you implement that?
     
  18. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    428
    here you go
     
    • Like Like x 1
  19. Banana Peels

    Banana Peels
    Expand Collapse

    Joined:
    Sep 23, 2016
    Messages:
    476
    • Like Like x 1
  20. Banana Peels

    Banana Peels
    Expand Collapse

    Joined:
    Sep 23, 2016
    Messages:
    476
    I cannot get this damn thing to work, it won't let me copy anything to the steamapps\common\BeamNG.drive\gameengine.zip\art\sound folder, and it won't let me edit the .lua. Please help as this is quite frustrating.
     
    #20 Banana Peels, Aug 15, 2017
    Last edited: Aug 15, 2017
  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