Help with religion sounds

JustATourist

Lost in Translation
Joined
Apr 13, 2008
Messages
445
Location
Lower Saxony
At the moment I am working on a modular mod, which does add a new religion to the game. Everything worked absolutly fine with that so far (tested, absolutly no problem), until I had the idea "Well a new religion will also need new sounds." So I took the audio xmls from BTS and copied them into the mod. No problem yet. But as soon as I add my new religion sounds the game crashed every time on startup. (After the loading sequence and right in the moment I would eppect the main game menu to appear. And of course with many many errors in the audio log. It reports that he even can't find the files originally in the game.) I moved the files into my custom assets and later into the original assets... Same thing. I am quite sure, there can't be much, want can be done wrong when adding a new sound.

One example of a sound I have added, which alone causes a crash is:

Audio2DScripts.xml:
" <Script2DSound>
<ScriptID>AS2D_BUILD_OLYMP</ScriptID>
<SoundID>SND_BUILD_OLYMP</SoundID>
<SoundType>GAME_SFX</SoundType>
<iMinVolume>90</iMinVolume>
<iMaxVolume>90</iMaxVolume>
<iPitchChangeDown>0</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<iMinLeftPan>-1</iMinLeftPan>
<iMaxLeftPan>-1</iMaxLeftPan>
<iMinRightPan>-1</iMinRightPan>
<iMaxRightPan>-1</iMaxRightPan>
<bLooping>0</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.0</fMinWetLevel>
<fMaxWetLevel>0.0</fMaxWetLevel>
</Script2DSound>"

and AudioDefines.xml:
" <SoundData>
<SoundID>SND_BUILD_OLYMP</SoundID>
<Filename>Sounds/OlympDink</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>"

The other 4 xml file are in the same folder but left unmodified. The lines in the defines are definitivly in the SoundDatas area of the file. I really can't see anything wrong about these lines.

Can anybody help?
 
In the Audio2DScripts.xml file you are missing the following line at the bottom of your entry:

Code:
        <iNotPlayPercent>0</iNotPlayPercent>
This line was added for BtS and will cause problems if not included.
 
I also have a problem adding sounds to my religions. The NotPlayPercent line is included in mine and yet the game crashes without explanation while loading my mod. Thoughts?
 
I also have a problem adding sounds to my religions. The NotPlayPercent line is included in mine and yet the game crashes without explanation while loading my mod. Thoughts?
Hmmm, I'm not sure. The only problem I had with Religion sounds was the one I described earlier.

I would first make sure that you've turned on all the logging options in your CivilizationIV.ini file then try loading your mod. After it crashes, look in the My Documents\My Games\Beyond The Sword\Logs folder for the log files that were just created. If you have already narrowed it down to an Audio problem then open the audio.log file and see if there are any error messages in there that point to a particular file such as the AudioDefines.xml file.

Next try comparing your new entries in the file to a similar entry. For example, look at the entry for the Jewish Religion sounds. Look at the entries to make sure they have the same amount of lines or that you haven't mispelled anything.


Sorry I can't help more but unless the log files point you to a particular file, it can be like looking for a needle in a haystack sometimes. :crazyeye:
 
Thanks, I checked the logs and, long story short, it was those blasted comments at it again. Without the comments it runs beautifully.
 
Back
Top Bottom