Audio Recording Problems

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
I am adding in the audio portion of my new techs and I am having some issues with it.

I am assuming I modify the two XML files: Audio2DScripts.xml & AudioDefines.xml adding in the following code:


<Script2DSound>
<ScriptID>AS2D_TECH_Phygiene</ScriptID>
<SoundID>SND_TECH_Phygiene</SoundID>
<SoundType>GAME_SPEECH</SoundType>
<iMinVolume>100</iMinVolume>
<iMaxVolume>100</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>


<SoundData>
<SoundID>SND_TECH_PHYGIENE</SoundID>
<Filename>Sounds/Tech/Phygiene</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>

But I am not getting any sound?

My mp3 file is named: PHYGIENE.mp3

Anyone fiddle much with this?
 

God-Emperor

Deity
Joined
Jul 18, 2009
Messages
3,551
Location
Texas
Have you considered taht it may be case sensitive? I think it is. If so, "SND_TECH_Phygiene" is not the same as "SND_TECH_PHYGIENE".
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
After looking at that, I did convert everything over to capitals and still no sound. Any other ideas?

I also discovered, I think, that the 'TECH_' was part of the name that was used in the sound I was trying to copy. I thought for sure that would fix it, but no. Still nothing.

What is the difference between the two sound callouts in the technology section:

<Sound>NONE</Sound>
<SoundMP>AS2D_PHYGIENE</SoundMP>

This is a clip from a sound already in the game:

<Sound>AS2D_TECH_SAILING</Sound>
<SoundMP>AS2D_TECH_MP_SAILING</SoundMP>

I guess, another questions is what is that _MP_ in the second line and why is it there?
 

God-Emperor

Deity
Joined
Jul 18, 2009
Messages
3,551
Location
Texas
You did remember to add the AS2D_TECH_PHYGIENE sound to the tech itself via the Sound tag in CIV4TechInfos.xml, I hope.

I haven't really messed with the sounds (yet), so the only other thing that is coming to mind right now is that all of the existing tech sounds are recorded with settings of 128kbps mono 44khz (except the Generic .wav files, of course - but those are also monophonic). If yours isn't, then try changing it to match.
 

SaibotLieh

Emperor
Joined
Sep 25, 2009
Messages
1,561
I would also guess it has something to do with the audio file settings.
Further one advise: Don't put comment tags into the sound xml files. When I did that my game always crashed while loading. The same goes for the CIV4UnitArtStyleTypeInfos.xml.
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
I will say that I am learning a lot about the game. I just learned that there are two completely different sets of Audio files in the game -- I never realized that when you get a Tech there is a before and after little "jingle" about the tech.

The first one is controlled via the sound and the second via the MP_sound.

That being said, I started from scratch and made whole copies of pre-existing sound file sections. To my dismay I got nothing.

Then I dupe pre-existing sounds and changed their names to my file names, still no sound. So I know it is not some audio setting of compression or whatever that is causing the silence.

Back to the drawing boards -- still looking for help if anyone knows anything.
 

cool3a2

Deity
Joined
Mar 30, 2007
Messages
2,177
Last time I modded sounds was adding custom unit order / select sounds. I was not able to get mp3s to work, although it must be possible somehow as somebody got it to work for the sounds I'm using for my Magyar Mod. I tried a lot with encoding, but still no luck. I ended with using wav files instead. That's okay in case of a few and short unit sound with only speech. Your case might be different...

And yeah, he probably meant multiplayer.
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
I did get both the /sound files and the _MP_sound to work. I used mp3 files that were recorded in stereo at 4800 sample rate and 32-bit float.

It just seems weird to have such an eleborate system for single player games and then a different one for multi-player games? Is the tech discovery really that different?

Personally I am going to use the same sound bite for both, although others have created two different sounds (still unsure why).
 

God-Emperor

Deity
Joined
Jul 18, 2009
Messages
3,551
Location
Texas
You should play a few of them, regular and MP...

In the MP version there is no voice saying the tech's quote. Instead there is a voice telling you what you just finished researching, "You have discovered Wombat Herding."
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
Oh I have played both -- we have a lan party game every week plus I play almost every night. I just don't seem to think it was necassary to build a completely different sound for each tech between single player and multiplayer.

But to each his own I guess. Because of the work involved just adding voice to 30 techs, I will stick to one sound for both at the present :)
 

cool3a2

Deity
Joined
Mar 30, 2007
Messages
2,177
Could you elaborate on which programs you used? Have you also dealt with voice recording? Which codec did you use? Something like a quick guide would be cool. Doesn't need to be too detailed, though. On the other side, AFAIK there is no tutorial about this yet.
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
I use a program called audacity (http://audacity.sourceforge.net/) with the MP3 plugin LAME. I have a bit of experiencing recording from the days of doing a podcast for Everquest II so much of the initial learning curve I did years ago. I found Audacity very easy to use.

Of course you need a mic as well, but to be honest my 5 dollar mic seems to work just as well as my 200 dollar mic (i won it at a contest).

I opened a pre-existing MP3 file into audacity to see what they had as base defaults. It appears that base sounds in the game are "stereo" with "48000 hz" and at "32-bit float" compression.

I simply recorded a tech blurb, tacking on the appropriate starting "pinging" noise. Test it, and you are done. Copy the file into your Sound directory in your mod.

Sid Meier's Civilization 4\Beyond the Sword\Mods\ExtremeMod\Assets\Sounds\Tech

Adding it to the game was interesting. There are two entries at the bottom of each tech (so far I have only tried the technology blurb sound bit).

<Sound>AS2D_TECH_GENERIC</Sound>
<SoundMP></SoundMP>

I learned the first one is for single player games and the second is for multiplayer games. Each of these are set up as the other, so once you figure out the two XMLs to modify it is pretty easy.

Sid Meier's Civilization 4\Beyond the Sword\Mods\ExtremeMod\Assets\XML\Audio

To be honest, I have only added 1 sound so far, although I have recorded them all. I played the sound out in both single game as well as multiplayer and both work. The information below is for my starting technology, "Personal Hygiene".

AudioDefines.xml:

<SoundData>
<SoundID>SND_TECH_HYGIENE</SoundID>
<Filename>Sounds/Tech/TECH_HYGIENE</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>

Audio2DScripts.xml:

<Script2DSound>
<ScriptID>AS2D_TECH_HYGIENE</ScriptID>
<SoundID>SND_TECH_HYGIENE</SoundID>
<SoundType>GAME_SPEECH</SoundType>
<iMinVolume>100</iMinVolume>
<iMaxVolume>100</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>
<iNotPlayPercent>0</iNotPlayPercent>
</Script2DSound>

I changed only the name of the sound file, matching case and letters exactly. I found the less you change, the greater the chance of getting it to work! I repeated this for the MP version.

I left the other sound XML files alone without issue.

I hope this helps someone.
 

cool3a2

Deity
Joined
Mar 30, 2007
Messages
2,177
Hmmm... I also used audacity and lame for recording... Also, I've taken a look at working files to see how they are encoded. I can remember that I then encoded with 48kHz as well - without luck. That's probably not the critical point. The '32-bit floint' thing doesn't tell me anything. There's bitrate of course and I played around with it, but again no luck. Not to mention that the bitrate is usually given in kbit/s and usualy values are 64, 128 and 192 (or even above). So 32-bit float isprobably something else. I'll take a look at this next time. Thanks for sharing your experiences, though!
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
Yeah, no problem.

I found that the sound seems like so much work for what little you get out of it. I made so many little typo mistakes which cost me hours of time. You have to refer to two different audio XML files and then match that with technology XML file and any little difference and it won't work. On top of that there is both the normal sound file as well as the MP sound files, creating a copying and pasting nightmare for 1 simple sound bite.

I do a handful a day, but even then it will take me several weeks to get all my new techs into the mod. I am not sure if it is worth it, but we will see. . . .
 

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
In the end, I just sat down and did them all. Now that I listen to them (and laugh) I think it was all worth it. It took my only a few hours to get them all set up. And if I feel really energetic, I could record all of them over adding new information and then just keep the same names.

I did discover that in a Multi-player game that both sounds are used. The normal sound bite is used as the technology is discovered and the MP sound bite is used the turn after -- why? I have no idea?

Anyway, I replicated the first sound bite onto the second "MP" sound bite, something now I regret. I will either need to change all the sounds or void the second sound in the Unit XML.
 
Top Bottom