Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - grapenuts

#1
Help / Sound not playing even in debug mode
March 14, 2020, 09:42:12 PM
I'm trying to add a custom sound to a mod that was using a stock sound which didn't really apply. I created a new SoundDef:


<?xml version="1.0" encoding="utf-8"?>
<Defs>
    <SoundDef>
        <defName>Ingest_Water</defName> 
        <sustain>False</sustain> 
        <context>MapOnly</context> 
        <eventNames />
        <priorityMode>PrioritizeNearest</priorityMode>
        <sustainStartSound></sustainStartSound>
        <sustainStopSound></sustainStopSound>
        <subSounds>
          <li>
            <muteWhenPaused>False</muteWhenPaused>     
            <grains>
              <li Class="AudioGrain_Clip">
                <clipPath>Mizu_Gulp</clipPath>
              </li>
            </grains>     
            <volumeRange>
                <min>100</min>
                <max>100</max>
            </volumeRange>   
            <pitchRange>
                <min>1</min>
                <max>1.015</max>
            </pitchRange>
            <distRange>
                <min>0</min>
                <max>20</max>
            </distRange>         
          </li>
        </subSounds>
      </SoundDef>

      <SoundDef>
        <defName>Pour_Water</defName> 
        <sustain>False</sustain> 
        <context>MapOnly</context>
        <eventNames />
        <priorityMode>PrioritizeNearest</priorityMode>
        <sustainStartSound></sustainStartSound>
        <sustainStopSound></sustainStopSound>
        <subSounds>
          <li>
            <muteWhenPaused>False</muteWhenPaused>     
            <grains>
              <li Class="AudioGrain_Clip">
                <clipPath>Mizu_Pour</clipPath>
              </li>
            </grains>     
            <volumeRange>
                <min>100</min>
                <max>100</max>
            </volumeRange>
            <pitchRange>
                <min>1</min>
                <max>1.015</max>
            </pitchRange>
            <distRange>
                <min>0</min>
                <max>20</max>
            </distRange>
          </li>
        </subSounds>
      </SoundDef>
</Defs>


The sound doesn't trigger for events it's defined for, so I went into the debug menu under Play Sound and I see them there. However, clicking on either sound button does nothing. I did double-check that the files play correctly in a media player, so I'm pretty sure I just have something wrong in this XML. Does anyone have an idea of what I messed up?

Thanks.