1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Need help with a Sound Mod

Discussion in 'Programming Questions and Suggestions' started by Jaron Swofford, Jul 29, 2020.

  1. Jaron Swofford

    Jaron Swofford Trainee Engineer

    Messages:
    2
    I am making a mod to play music in game on the jukebox.

    The problem I am having right now, is I am creating multiple .sbc (one for each song), but only the last one displays. When in game the music from the last song works perfect, but I cannot get it to show all the other songs.

    I will admit I've stumbled my way through this process, mainly by downloading and looking at other peoples mods. Is anyone able to eyeball what I've done, and tell me if they see anything wrong?

    Any Help is appreciated.


    My Mod is setup as follows.

    Mod is located Here.
    C:\Users\<USERNAME>\AppData\Roaming\SpaceEngineers\Mods\MyMod

    MyMod\Audio
    All converted .xwm songs are present here.

    MyMod\Data
    All my .sbc are present here. I'll list two examples of .sbc files I've created.

    MyMod\Data\TonyRomera-StuckInYourHead.sbc
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Definitions xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
      <Sounds>
    	<Sound>
    	  <Id>
    		<TypeID>AudioDefinition</TypeID>
    		<SubtypeId>TonyRomera-StuckInYourHead</SubtypeId>
    	  </Id>
    	  <Category>Sb</Category>
    	  <MaxDistance>100</MaxDistance>
    	  <Volume>100</Volume>
    	  <Loopable>false</Loopable>
    	  <Waves>
    		<Wave Type="D2">
    		  <Start>Audio/TonyRomera-StuckInYourHead.xwm</Start>
    		</Wave>
    	  </Waves>
    	</Sound>
      </Sounds>
      <SoundCategories>
    	<SoundCategory>
    	  <Id>
    		<TypeID>SoundCategoryDefinition</TypeID>
    		<SubTypeId>TonyRomera-StuckInYourHead</SubTypeId>
    	  </Id>
    	  <Sounds>
    		<SoundDesc Id="TonyRomera-StuckInYourHead" SoundName="TonyRomera StuckInYourHead" />
    	  </Sounds>
    	</SoundCategory>
      </SoundCategories>
    </Definitions>
    
    MyMod\Data\TokyoMachine-JOURNEY.sbc
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Definitions xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
      <Sounds>
    	<Sound>
    	  <Id>
    		<TypeID>AudioDefinition</TypeID>
    		<SubtypeId>TokyoMachine-JOURNEY</SubtypeId>
    	  </Id>
    	  <Category>Sb</Category>
    	  <MaxDistance>100</MaxDistance>
    	  <Volume>100</Volume>
    	  <Loopable>false</Loopable>
    	  <Waves>
    		<Wave Type="D2">
    		  <Start>Audio/TokyoMachine-JOURNEY.xwm</Start>
    		</Wave>
    	  </Waves>
    	</Sound>
      </Sounds>
      <SoundCategories>
    	<SoundCategory>
    	  <Id>
    		<TypeID>SoundCategoryDefinition</TypeID>
    		<SubTypeId>TokyoMachine-JOURNEY</SubTypeId>
    	  </Id>
    	  <Sounds>
    		<SoundDesc Id="TokyoMachine-JOURNEY" SoundName="TokyoMachine JOURNEY" />
    	  </Sounds>
    	</SoundCategory>
      </SoundCategories>
    </Definitions>