Custom sounds for Units...

WaxonWaxov

Warlord
Joined
Oct 26, 2005
Messages
229
Location
Charlotte, North Carolina
Hello all.

Has anyone tried to delve into this?

I'm currently working on the UU, Highlander, for my Scotland mod. It sees to me it would be a lot cooler if when you gave it an oder it would say "Aye!" or something like that.
 
Don't bump. Also, I don't think that you want your unit to smell like Aye. Anyways, have you even tried google-ing it? That would be the easiest way to find a sound like that.
 
The whole point is that there's bound to be a good "Aye" sound on the internet. That's probably why you haven't gotten a response. Look first then ask. "Aye" isn't that uncommon, and you can probably find one out there that will sound Scottish if you look hard enough. Before you bump, you should first think of why you haven't gotten a response. In fact, I think that you should have started a Scottish civ developement thread then asked questions like this in there. I can think of several threads that you've already started that all have the same relation. If you did it all in one thread, people might be more inclined not to ignore you.
 
KingTux said:
The whole point is that there's bound to be a good "Aye" sound on the internet. That's probably why you haven't gotten a response. Look first then ask. "Aye" isn't that uncommon, and you can probably find one out there that will sound Scottish if you look hard enough. Before you bump, you should first think of why you haven't gotten a response. In fact, I think that you should have started a Scottish civ developement thread then asked questions like this in there. I can think of several threads that you've already started that all have the same relation. If you did it all in one thread, people might be more inclined not to ignore you.
I suggest you go and re-read his first post. He doesn't want a sound file, he wants to know how to put a sound file into the game.

Anyway...

I think the tags you want are these, in CIV4CivilizationInfos.xml:

<CivilizationSelectionSound>
<CivilizationActionSound>

Unfortunetely I have no idea what these link to, or how to edit whatever it is that they link to.
 
The Great Apple said:
I suggest you go and re-read his first post. He doesn't want a sound file, he wants to know how to put a sound file into the game.

Thank You, Sir.



KingTux said:
I can think of several threads that you've already started that all have the same relation.

Really? Now what threads might those be? Instead of answering that, why don't you repeat after me... "Don't be a troll... Don't be a troll...."
 
You don't need to flame, alright? My point was that you were very ambiguous about what you wanted. Also, about combining threads, I suggested it because you might get more help if it's been around for a while, as people here are more willing to view a thread that's been around for a while. I'll help you this time, but if you don't clean up, you won't be getting anymore. I'm doing this because I think that you should be given a second chance, and I'm willing to take a fresh view on all future posts of yours.

So, starting off, there's going to be several files to look at. First off, go to assets/xml/audio/audiodefines.xml. Order might be important, so since you're replacing the English, I'd search around for SND_ENGLAND_SELECT and SND_ENGLAND_ORDER. To make your job easier, keep them the same. If you don't, you'll also have to mess around with assets/xml/audio/audio2Dscrips.xml and assets/xml/audio/audio3dscripts.xml. These two are what gives you the tag that is used in assets/xml/civilizations/civ4civilizationsinfo.xml. Here's what it will look like:

<SoundData>
<SoundID>SND_ENGLAND_SELECT</SoundID>
<Filename>Sounds/Units/EnglandSelect</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>

Anyways, when creating your sound, it doesn't matter if the extension is wav or mp3. Also, if you have multiples, you can name them like so: soundname-001.wav, soundname-002.mp3, and so on, where you replace soundname with whatever you put in place of EnglandSelect or EnglandOrder. This will apply to all units that the Scotish will build. Now, as for making sounds for units, this is a little tricky, as after you define the sound, it seems to go nowhere. Trust me on this, I've looked through all the XML files for this, but it never seems to happen. While for civilizations, it will link up, I've never seen where units and sounds are combined. A few of them are found in assets/xml/art/civ4artdefines_unit.xml, but not all of them. Here's an example:

<UnitArtInfo>
<Type>ART_DEF_UNIT_ENGLISH_REDCOAT</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/Unique/England/Redcoat/RedCoat.nif</NIF>
<KFM>Art/Units/Unique/England/Redcoat/RedCoat.kfm</KFM>
<SHADERNIF>Art/Units/Unique/England/Redcoat/RedCoat_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.05</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>

Notice the bolded selection and that you can do run sounds here. This doesn't make sense to me, as this should only have art in it and not audio definitions. I'd expect to find them in assets/xml/units/civ4unitinfos.xml, but they're not there. So, I'll look into this a little more, and if I find out more, I'll edit this and paste it in.

So, follow things like for the Scottish general sounds, but look for SND_REDCOAT_FIDGT_VOX and SND_BUILD_ENGLISH_REDCOAT instead. Change their target locations like you did before. Then, you've got unit sounds filled in the best that I know how at the moment.

EDIT: I looked around at assets/xml/art/civ4artdefinesschema.xml to see what tags can be used, and, apparently, assets/xml/artciv4artdefines_unit.xml IS where you likn them. According to this file, you can use these tags to define sounds: "SelectionSound", "ActionSound", "TrainSound", "PatrolSound", and "AudioRunSounds". These names are tags, so you can technically do this:

<UnitArtInfo>
<Type>ART_DEF_UNIT_ENGLISH_REDCOAT</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/Unique/England/Redcoat/RedCoat.nif</NIF>
<KFM>Art/Units/Unique/England/Redcoat/RedCoat.kfm</KFM>
<SHADERNIF>Art/Units/Unique/England/Redcoat/RedCoat_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.05</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
<SelectionSound/>
<ActionSound/>
<PatrolSound/>

<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>

However, fidgets aren't defined, so that's still a mystery.
 
Back
Top Bottom