How do I edit/replace crash sound? Is it possible?

Discussion in 'Content Creation' started by JFoxx97, Nov 30, 2015.

  1. JFoxx97

    JFoxx97
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    42
    I've been interested in creating a new crash sound, as I'm kinda over the original. I just have no idea where to find or even how to go about doing it. I have the sound file I want to replace it with ready, that's as far as I've gotten.

    Thanks in advance for any help.


    UPDATE: Used Agent Ransack to find the file I was looking for, located at BeamNG.DRIVE\gameengine(ZIP)\art/sound\crash.ogg. I tried replacing that file with mine (Yes, mine was converted to mono and OGG) but that resulted in no crash sound in game.

    FIX: For my custom sound to work, instead of replacing it, I just edited the original in Wavpad and pretty much just pasted my sound over it and saved. Here's what it sounds like in game:
     
    #1 JFoxx97, Nov 30, 2015
    Last edited: Dec 1, 2015
  2. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    Your sound will need to be converted to mono. I don't remember the correct format right now, maybe WAV or OGM? I'll check when I can, but maybe someone else will chime in before then.

    The crash sound is played by a LUA script which determines when the threshold is met. The LUA stuff all lives in the game's install directory (which is in steamapps/common/). Offhand I'm not sure where the crash sound itself lives - it won't be in the LUA folder but it will be in the game's directory somewhere. You can comfortably edit the LUA files using Notepad++ and you can search for text in the entire directory using Agent Ransack. Agent Ransack will also peak inside zips for you while searching - so in the likely event that the sound file is inside a zip, Agent Ransack will still help you find it.

    Is your goal to extend the game by having multiple crash sounds, or simply replace the original?
     
  3. Spaceballs the Username

    Spaceballs the Username
    Expand Collapse

    Joined:
    Oct 13, 2015
    Messages:
    568
    It's OGG.

    And note that BeamNG supports mods that overwrite (i believe) any part of the game so you can make a mod that installs as a ZIP in the mods folder if you set up the internal zip folder structure the same
     
    • Like Like x 1
  4. JFoxx97

    JFoxx97
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    42
    Alright, I'll have a browse and see what I can come up with.

    I'm only looking into replacing the original. Once I understand it more, I'll see about adding multiple, but for now, that's out of the question.

    Forgive me if this sounds ignorant, but do I need a particular program to convert the sound to mono?
     
  5. Scepheo

    Scepheo
    Expand Collapse

    Joined:
    Feb 10, 2015
    Messages:
    601
    Only Lua for individual vehicles is contained in zips, the global vehicle Lua isn't. And Windows has native support for searching for text inside files, including those in zip files.
     
  6. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    That's a good point Scepheo; I'm sure that I would have known about the native support for searching text files inside zips, but I must have forgotten. Agent Ransack is much faster and displays a grep-like output - I personally find it preferable. It's one of those tools you don't know you need until you try it - it seems totally superfluous until that point. As far as searching for text inside a folder full of .lua files, the native Windows 7 functionality does not do that out of the box (at least in an un-indexed location).

    @JFoxx97 - you can use Audacity for that if you'd like.
    • The .lua file in question is "beamstate.lua".
    • The sound file in question is "gameengine.zip\art\sound\crash.ogg".
    • If you package your sound like the attached example (which uses a fake, non-working, sound for crash.ogg that will cause errors when you crash!) and place it in the /mods/ folder it will replace the stock crash sound.
    • EDIT: finally, be sure that you save your mono sound file as an .ogg
     

    Attached Files:

    • Like Like x 1
  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