Space Engineers

Space Engineers

185 ratings
Sound Block Modding for Beginners
By Mog
This guide was created with the intention of guiding someone with no modding ability through adding sounds to the sound block, step-by-step. Instructions given assume Windows OS.
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Greetings. This guide was created to help those with limited or no modding ability at all add some sounds to the sound block. Once finished with this guide, you should be able to quickly and easily put together .XWM sound files readable by Space Engineers, and to properly set them up to be recognized by the Sound Block. I created this guide because I felt the current guides relating to adding your own sounds are very incomplete in the sense that they do nothing to help a basic user with no previous knowledge. Chiefly, we will be focusing on adding some songs to the game so you can jam while you weld and grind.
Preparing the Sound Files
The Start

Before we go into making the definitions for Space Engineers to recognize our sounds, we first need to actually create the sounds and/or songs. As I said in the Intro, we will be adding a song file to play for ourselves through our sound block. However, before we get to definitions, we first need a song to play. You can pick pretty much any song you feel is appropriate, but I'm going to use the Imperial March by Epica in this guide. Unless your mod is published to the Workshop, you will only be able to access your sound mods in Offline mode on your game (not Steam offline mode - edit settings of your map before you load it.)

So, first things first, pick a song, and get that song on your computer. You can use a youtube converter to strip the audio from a video as an .mp3 file, rip a CD, use your existing music library or otherwise. I have a song ready, the Imperial March by Epica. After you have the audio file you want saved onto your computer (I use a folder on the Desktop for easy access), we're ready to begin.

The Tools

Space Engineers only recognizes sound files with the extension .XWM. So, in order to get our sound files in the proper format, we will be using a program called MultiXWM (http://www.nexusmods.com/skyrim/mods/3159/?). Download the converter, and extract the compressed files into a folder (I put it on the Desktop for easy access). This tool was chosen for it's ease of use and ability to convert multiple sound files at the same time.

Open the folder you just extracted that contains MultiXWM.exe. You should see a small window titled "MultiXWM" with the version number after you double-click MultiXWM.exe.


















Sound Conversion

The first thing we want to do is to convert our sound into a different type with the extension .XWM. Within our MultiXWM window, in the top right corner is a button labelled "Add File(s)...". Click this button, navigate to the directory of the song you chose, and open that file. You should see the song file in the main window which was previously blank, listing out the entire directory to the sound file. Make sure the radio button "audio -> xwm" is selected, then hit the "Start" button just under the "Bitrates" selections. The "Bitrate" should not need to be adjusted. (48 kb default). I recommend starting with .mp3 files for the sake of overall audio quality, but .wav files can be used just as well.

Sound Conversion: Finished!

So, now you know how to make sound files that Space Engineers will recognize!

It's also important to note that if you're looking to make any sound usable by Space Engineers, including those for created-weapons, you can use this process.

Before we move on, I recommend renaming your song or sound file we just created into something simple to use. For example, I simply changed mine to "MogMarch". This will make it easier to point the game at this sound later in our definitions. Also, having a unique name for your files will prevent mod conflict in the future. Leave your "output" folder open so you can quickly copy/paste your sound in a few moments. We will make a folder for it shortly.
Creating the Mod Itself
Let's Make Our Mod Folder

First thing to do is to actually create our mod for Space Engineers. This is incredibly easy to do. To start, we'll need to access our directory that contains the Space Engineers mods.

To find this, hit your "Start" button, and type %appdata% into the search field at the bottom. Your "Roaming" folder should appear in the search results. Click it.





















Within this Roaming folder you should see many folders, but the one we want is named Space Engineers. Open your Space Engineers folder, and within that is a Mods folder.

Once inside the Mods folder, create a new folder. Name this folder what you want your mod to be named (we will call it "My Mod" in the guide). Open this folder, and it should of course be empty right now. Our "root" directory in our mod is this folder you just created, and we will refer to this folder as the "root mod directory".




Let's Make Our Mod Data and Audio Folders

For any mod, the first thing you'll have to do is create a folder named "Data" within your root mod directory. It is in this folder (\My Mod\Data) that all of your definitions will go. We will be making these definition files from the Space Engineers directory itself. We can simply copy, paste, and edit in notepad to get the desired results. For our sounds, we want a seperate file which we can just call "Audio". After that is done, take your recently created ".xwm" file (our sound file) and place it into the Audio folder. (Note: You must have a folder named "Data", but the folder named "Audio" can be anything. I chose Audio because it's easy to type and it makes sense.)









So, from here we will want to open our Space Engineers game files. To do this, right-click Space Engineers in your Steam Library, choose Properties. In the Space Engineers - Properties window, choose the "Local Files" tab, and choose "Browse Local Files...".








Open the "Content" folder, and then the "Data" folder. Locate the file named "SoundBlock.sbc" (might just say SoundBlock with no file extension) select it, and copy it. Either right-click the file and choose "Copy" or simply hold Ctrl and push C one time. Once copied, return to your Data folder within your root mod directory, and paste the file inside the Data folder. Rename this file to be a unique title for your song definitions (I named mine MogMarch to configure the Imperial March sound). (NOTE: It doesn't matter which .sbc file you use, but you can find examples for other definitions inside these files.)








Open this new .sbc file we just copy/pasted into our Data folder within our root mod directory. It's likely your computer doesn't recognize the file type. Choose "Select From a List of Programs" and choose "Notepad". For future access, I left my "Always Use This..." box checked. Once open in Notepad, remove all the text. You can quickly do this by holding Ctrl and pushing A, then once all the text is highlighted, pushing Backspace.
Creating the Mod Itself Pt. 2
The Definitions

Now we have a file ready to put some of our own defintions into. So, first, we add the song to the list of sounds you see in the sound block (I call that list the "jukebox"). Here is an example you can copy/paste and edit.

<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SoundCategories> <SoundCategory> <Id> <TypeId>SoundCategoryDefinition</TypeId> <SubtypeId>MogSound</SubtypeId> </Id> <Sounds> <SoundDesc Id="MogMarch" SoundName="Imperial March" /> </Sounds> </SoundCategory> </SoundCategories>

In order for things to work for you, you will have to alter some of my definitions to fit your own.

<TypeId> must remain as SoundCategoryDefinition for all sounds. This is very important to check if you follow all the other steps, and your sounds don't work.

The <SubtypeId> should be a unique field of text for your song. You will want a unique name for each different sound you make if you plan on adding multiple sounds/songs. Example: MogSound1, MogSound2, etc. for future sounds, each getting a unique tag to avoid future mod conflicts.

The area that reads <SoundDescId=" " is the name of the sound definition we're going to create shortly. Since my song is the Imperial March, and I'm Mog, I've called my song "MogMarch". However, I want it to read "Imperial March" in the jukebox, so I've set SoundName=" " accordingly. What you put between the quotes for SoundName= is how it will read in the jukebox.

What we've done is instructed the jukebox to look for the sound definitions for the sound "MogMarch" when selected in the sound block. So now we have to create those definitions. Copy/paste the following immediately underneath the last line from above (</SoundCategories).

<Sounds> <Sound> <Id> <TypeId>AudioDefinition</TypeId> <SubtypeId>MogMarch</SubtypeId> </Id> <Category>Sb</Category> <MaxDistance>100</MaxDistance> <Volume>1.00</Volume> <Loopable>false</Loopable> <Waves> <Wave Type="D2"> <Start>Audio\March.xwm</Start> </Wave> </Waves> </Sound> </Sounds> </Definitions>

This section contains the definitions to tell the game exactly what to pull up when sound "MogMarch" gets requested by the jukebox.

<TypeID> must be AudioDefinition in order to function properly.

<SubTypeId> is MogMarch for me, and the name you chose above for <SoundDescId=" " above. Make sure these match exactly.

<Category> should remain Sb.

<MaxDistance> 100 seems to match 1:1 what you put your actual sound block range to (with the slider in the Control Panel in game). I imagine if you put 50 as the value, it will halve the range chosen in the block. I have not tested this. I leave it at 100 and everything is great.

<Volume> seems to be just like MaxDistance, except dispalyed as 1.00 instead of 100. So setting to .5 may halve the volume relative to the slider in game. For music, I'd leave this at 1.00, but if you happen to want an ambient sound, you'll have to find what works best for you. Might be best to leave at 1.00 and tweak volume within the game on the sound block controls.

<Loopable> is set to false because we're using music in this example. If you were adding speech or alarm sounds, or other redundant sounds (like a fast-firing weapon), you'll want to set this to true.

<Wave Type="D2">. For music, use D2. This tells the game how many sound channels to use. For sound effects like alarm klaxons or things containing just raw speech (like announcements), change D2 to D3. See extra notes at bottom of guide for more details on D2/D3 settings, and more info for loopables sounds.

<Start> is the directory in which the actual file is located that we wish to play. It starts in the root mod directory by default, so we simply use Audio\<song file>.XWM (Audio\MogMarch.xwm in my case). I highly recommend renaming all your .xwm song and sound files you create to unique, short names that you will recognize and be able to easily type.

For loopable sounds (like alarms), replace the <Start></Start> tags with <Loop></Loop>. Check out the Audio.sbc file, located in the same directory we got our SoundBlock.sbc from, to see the default audio definitions in Space Engineers for examples on how the default sounds in the sound block are set up.

Your finished product should look something like this.

<?xml version="1.0"?> <Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SoundCategories> <SoundCategory> <Id> <TypeId>SoundCategoryDefinition</TypeId> <SubtypeId>MogSound</SubtypeId> </Id> <Sounds> <SoundDesc Id="MogMarch" SoundName="Imperial March" /> </Sounds> </SoundCategory> </SoundCategories> <Sounds> <Sound> <Id> <TypeId>AudioDefinition</TypeId> <SubtypeId>MogMarch</SubtypeId> </Id> <Category>Sb</Category> <MaxDistance>100</MaxDistance> <Volume>1.00</Volume> <Loopable>false</Loopable> <Waves> <Wave Type="D2"> <Start>Audio\March.xwm</Start> </Wave> </Waves> </Sound> </Sounds> </Definitions>
Making more sounds!
So, to make more sounds, you change a few key values. It's rather simple.

Make a new .xwm file for your sound, like we did above, then copy your .sbc file we just made. Place the .xwm in the Audio folder in your mod, and paste the copy of our .sbc in the Data folder with our original .sbc - do not replace the original. Rename the new copy to fit the new sound you're going to make. Remember, keep it short, unique and easy to type.

Then change a few key values in the .sbc file. Namely, the ones that point to the .xwm sound file. You make it point to the new one.

In order from top to bottom:

<SubtypeId> The first value of this kind needs to be unique. MogSound is the example, my next sound would be MogSound1, after that MogSound2, and so on. Keep it short, simple but unique to avoid mod conflicts.

<SoundDesc Id= Changes to refer to your new song, with it's name in the jukebox list in the second set of " " (SoundName=).

<SubtypeId> the second instance of this refers to what you set for the above value (SoundDesc Id=" "). The first value in quotes needs to match this exactly. I believe this should be the name of the new .sbc file as well.

<Start> changes to point to Audio\<name of sound file>.xwm. Simply place all your audio files in the Audio folder, and every <Start> value in your mods should being with Audio\ and simply point to each sound file by name.

That's it.
Summary
Now you're ready to jam! Crank it up!

Also, if you found this guide helpful, please rate it! If you have questions, something isn't clear in the guide, or you just have feedback, please comment! Continued feedback helps me keep things up to date and simple. Thanks!

Note: When you copy/paste from the lines above, the <Definitions xmlns:... value is very long, and should be a single line in your .sbc file. There should be a single space after the first set of " ", not a return/break.

Sound Channels: In space engineers, 3D sounds use 1 audio channel and 2D sounds use 2 audio channels. 3D sounds are supposed to be sound emitted by entities (e.g. bullet richochet, explosions, clangs) and must be mono, and 2D sounds are supposed to be music and hud sounds and can be mono or stereo.

Sounds that loop have to be in adpcm encoding.

Sounds without looping should be converted from wav to xwm via xWMAEncode as well as through the method above (from the DirectX SDK, bundled with spengies in .../Steam/SteamApps/common/SpaceEngineers/Tools).

Sounds intended for use with looping should instead use AdpcmEncode (also in .../Steam/SteamApps/common/SpaceEngineers/Tools).

Marek suggests supplying AdpcmEncode with the -b 512 flag for a better compression ratio. As for loop sounds being seemless, that's the responsibility of the modder, there aren't any provided tools for getting that right.

Thanks to Pharap for gathering this info.
201 Comments
Bluebarry Cat 10 Oct, 2023 @ 4:33pm 
What is the difference between Audio.sbc and soundcatagories.sbc?
Apollo Norm 5 Jun, 2023 @ 7:41pm 
If anyone is still here: What do I do to make multiple songs in the mod not be broken? The initial track I put in works flawlessly, but following the guide's instructions on adding more makes their name show up in the jukebox but they skip through the whole song at 400x speed. How do I make that not happen
Digi 12 Dec, 2022 @ 1:16am 
@DiamondKnight1 if you still have the crash, ask in keen's discord ( https://discord.gg/DBPFVvfJ ) and provide the SE log.
Digi 12 Dec, 2022 @ 1:13am 
If anyone copies the "Audio.sbc should look like:" from comments below, mind that it has the wrong TypeId, it must be AudioDefinition (and it always was, it's not a recent change or anything, guide also says it correctly :P )
DiamondKnight1 27 Oct, 2022 @ 2:02pm 
So does this work with .wav? my game crashed when I loaded my mod. Im not sure what i did wrong other than the .wav
33iRobot33 9 Sep, 2022 @ 6:29am 
Thanks for the update OnE gRuMpY bOi. This helps a lot.
OnE gRuMpY bOi 22 Jun, 2022 @ 1:29am 
note that 2, 3 and 4 are missing from audio.sbc because it would be too long for steam
OnE gRuMpY bOi 22 Jun, 2022 @ 1:28am 
and soundcatagories.sbc should be like this:

<?xml version="1.0"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SoundCategories>
<SoundCategory>
<Id>
<TypeId>SoundCategoryDefinition</TypeId>
<SubtypeId>WhisleHorn</SubtypeId>
</Id>
<Sounds>
<SoundDesc Id="RMSMauretania1" SoundName="RMS Mauretania 1 Medium" />
<SoundDesc Id="RMSMauretania2" SoundName="RMS Mauretania 2 Long" />
<SoundDesc Id="RMSMauretania3" SoundName="RMS Mauretania 3 Short" />
<SoundDesc Id="RMSMauretania4" SoundName="RMS Mauretania 4 Blip" />
</Sounds>
</SoundCategory>
</SoundCategories>
</Definitions>
again, blame steam
OnE gRuMpY bOi 22 Jun, 2022 @ 1:27am 
for future peoples

Audio.sbc should look like:

<?xml version="1.0"?>
<Definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Sounds>
<Sound>
<Id>
<TypeId>SoundCategoryDefinition</TypeId>
<SubtypeId>RMSMauretania1</SubtypeId>
</Id>
<Category>Sb</Category>
<MaxDistance>500</MaxDistance>
<UpdateDistance>35</UpdateDistance>
<Volume>1</Volume>
<Loopable>true</Loopable>
<PreventSynchronization>10</PreventSynchronization>
<Waves>
<Wave Type="D2">
<Loop>Audio\RMSMauretania1.wav</Loop>
</Wave>
</Waves>
</Sound>
</Sounds>
</Definitions>
sorry about the messed up spacing, can't fix it
Caphi 26 Jul, 2021 @ 9:56am 
to add more music to my sound block, and a player enters my game, will he also listen to the music?