Modding Help QUESTION Re: Custom SFX for mod items

Discussion in 'Starbound Modding' started by EVILnudeMONKEY, Feb 22, 2014.

  1. EVILnudeMONKEY

    EVILnudeMONKEY Scruffy Nerf-Herder

    So, I have been tinkering around but I cannot find any crafting table or object that opens a window (other than chests) which has an sfx sound. Also, I can't figure out how to make a chair make an sfx either. This is what I want to do:

    • I want to have a crafting table make a sound when I open the crafting interface.
    • I want a chair to make an sfx when you sit in it.
    I've tried various combos of

    "soundEffect" : "/sfx/objects/shipengine.wav",
    "soundEffectRadius" : 100
    This had the noise playing non stop on repeat... I just want a single play at the time of sitting down

    "objectType: " "noisy",
    This interfered with the base object type (you cant use lists and make something of two different object types)
    "sounds" : "/sfx/objects/shipengine.wav",
    "openSounds" : "/sfx/objects/shipengine.wav",
    "onSounds" : "/sfx/objects/shipengine.wav",
    These did nothing. No sound played but it didn't crash the game at least.

    Looking through the assets it doesn't appear that ANY chairs or crafting interfaces have sfx with them, is this something that Starbound just isn't able to do? If anyone has any ideas or suggestions I would love the assistance. Thanks for any help!
     
  2. ColonolNutty

    ColonolNutty Ketchup Robot

    openSounds and closeSounds are arrays now. So the way you'd do it is, keep in mind these sfx files are likely to not exist, it's just an example. Also, I don't know if this will work for chairs, but it definitely works for crafting tables or things that have an interface
    Code:
    "openSounds": ["/sfx/objects/shipengine.wav"],
    "closeSounds": ["/sfx/objects/shipengine.wav", "/sfx/objects/shipstart.wav"]
     
  3. lazarus78

    lazarus78 The Waste of Time

    How did you even find this thread? It is over 3 years old.

    Further, you should use off instead of wav.
     
  4. ColonolNutty

    ColonolNutty Ketchup Robot

    Got here from google while trying to find out how to add my custom sounds (Still haven't found anywhere with the full details yet, would love a tutorial, and not one for custom music). Also, yes ogg. I was simply using the file path stated above for consistency (I know ogg is the new format). This was an unanswered question so I answered it. I didn't see the date until you mentioned it
     
    Last edited: Jul 9, 2017
    cpeosphoros likes this.
  5. cpeosphoros

    cpeosphoros Orbital Explorer

    Create a folder, or a structure of folders, under your mod's folder. You can give them any name, but I'd call it sfx/objects/ for consistency. But, just for this example, let's call it sfx/newsounds.

    Drop your sound files there.

    Then, in your .object file, use:

    Code:
    "openSounds": ["/sfx/newsounds/newSound1.ogg"],
    "closeSounds": ["/sfx/newsounds/newSound2.ogg", "/sfx/newsounds/newSound3.ogg"]
    Actually, you don't even need to create a folder, besides your mod's root one. You could just drop the files there and use:

    Code:
    "openSounds": ["/newSound1.ogg"],
    "closeSounds": ["/newSound2.ogg", "/newSound3.ogg"]
    I don't know, though, if there are any restrictions about sound files size, length, configurations, etc.

    As a general rule, with some edge cases' caveats, mods' folders are virtually "merged" with the Starbound/assets/ folder during game start-up (You can actually see with details how it's done within Starbound/storage/starbound.log. So, from a scripting/programming/modding point of view there is no difference between an asset located in vanilla and one of your mod's folders. Moreso, if you include other mods as dependencies, their assets will also be undifferentiable from yours, copyright matters apart. You can do the same with graphic assets, you can even mix and match then. This is a strip from a mod I'm working in:

    Code:
    "fileHeader" : "/interface/crafting/craftingheader.png",
    "fileBody" : "/interface/crafting/cpe_craftingbody.png",
    "fileFooter" : "/interface/crafting/craftingfooter.png"
    /interface/crafting/cpe_craftingbody.png is in my mod's folder. /interface/crafting/craftingheader.png and craftingfooter.png, are in vanilla. There is also a craftingbody.png in that vanilla folder. If I didn't change the name of my craftingbody's file, it would either overwrite vanilla's or be overwritten by it. Neither option would be nice.

    That's the reason why you should be careful when naming your assets. If you duplicate the structure of the Starbound/assets/ folder, e.g with sfx/objects/ and also duplicate a file name inside that folder, e.g /sfx/objects/locker_close.ogg, then any part of the game that uses that asset will use your modded version. Now, with sound files, that would be probably just a minor nuisance, with interfaces' .png a real pain, but with things like .object or .config files that can actually break and crash the game.

    Well, I don't know if I entirely missed the point of your question, but I hope I helped.
     
  6. ColonolNutty

    ColonolNutty Ketchup Robot

    :rofl: I know where and how to set the sounds, I just don't know how to properly convert a wav file to an ogg that Starbound can use, or an mp3 to an ogg that Starbound can use. Everything I've tried has turned up with nothing, it's as if I'm missing a specific thing, but I can't for the life of me find any proper tutorial on the sound conversion.
     
    Last edited: Jul 11, 2017
  7. cpeosphoros

    cpeosphoros Orbital Explorer

    Ok, so, I entirely missed your point, lol... As I said, I don't know if there are any restrictions about sound files size, length, configurations, etc. I'm a coder, I didn't try any sound modding yet - and I think I will not do that any time soon. Hope you get your answers. Good luck.
     
  8. ColonolNutty

    ColonolNutty Ketchup Robot

    Unlikely, I've given up searching. Since noone knows the correct file type, hz, sound length or anything else that'll allow custom sounds to work. Most tutorials are for getting custom MUSIC to work, go figure
     
  9. cpeosphoros

    cpeosphoros Orbital Explorer

    I know zip about the. ogg format, but couldn't you reverse engineer some of the files included in vanilla, to see what their parameters are?
     
  10. IHart

    IHart Scruffy Nerf-Herder

    um same.
    what happened when you literally googled "convert a wav file to an ogg" and used one of the multitude of web tools in the results?
     
  11. ColonolNutty

    ColonolNutty Ketchup Robot

    I haven't tried that search yet.

    Edit: It looks like this site http://www.convertfiles.com converts the files to ogg and allows them to be useable in starbound. Can't believe it was that simple....
     
    cpeosphoros likes this.

Share This Page