1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Stuck, Having problems with creating your mod? Let us help you: Mod Support

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

Discussion in 'Mods and Skins' started by corvette81, Aug 12, 2017 at 9:38 PM.

  1. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    61
    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:
    869
    Awesome! Now to put this in a mod..
     
    • Agree Agree x 1
  3. corvette81

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    61
    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:
    869
    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 at 9:43 PM
    Last edited: Aug 12, 2017 at 9:50 PM
    • Awesome Awesome x 1
  5. carlosjr

    carlosjr
    Expand Collapse

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

    corvette81
    Expand Collapse

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

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

    carlosjr
    Expand Collapse

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

    jetcoasterfan
    Expand Collapse

    Joined:
    Jan 31, 2015
    Messages:
    144
    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:
    869

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

    corvette81
    Expand Collapse

    Joined:
    Oct 17, 2012
    Messages:
    61
    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:
    49
    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:
    869
    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.
     
    • Awesome Awesome x 1
  13. BowlerHatJack

    BowlerHatJack
    Expand Collapse

    Joined:
    Aug 5, 2016
    Messages:
    1,445
    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:
    386
    @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:
    869
    I don't know that yet (not familiar with .lua), but I am experimenting constantly.
     
  16. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 16, 2013
    Messages:
    3,984
    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
    • Awesome Awesome x 1
  17. BombBoy4

    BombBoy4
    Expand Collapse

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

    corvette81
    Expand Collapse

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

    Banana Peels
    Expand Collapse

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

    Banana Peels
    Expand Collapse

    Joined:
    Sep 23, 2016
    Messages:
    386
    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 at 2:29 AM
    Last edited: Aug 15, 2017 at 2:41 AM