Is it possible to change the war trumpet?

Mr_V

Warlord
Joined
Sep 22, 2004
Messages
129
Location
London, UK
Sorry if it's been asked before... you know how you can specify diplo music and diplo war music? Well, would it be possible in similar way to change the sound (point to your own mp3 file) which you hear when you declare war on somebody (the trumpet)?

Cheers
 
ooops... sorry I hit save by mistake... I'm still working on the answer.
 
Mr_V said:
Sorry if it's been asked before... you know how you can specify diplo music and diplo war music? Well, would it be possible in similar way to change the sound (point to your own mp3 file) which you hear when you declare war on somebody (the trumpet)?

Cheers
I assume you don't know anything about modding, but if it's not your case, please be patient... and forgive my english too.

The answer is YES to all your questions.
Basically, you can define a custom music set for each civilization leader, or even change every single sound effect that is in the game.
You just have to ADD or MODIFY some XML tags, depending on the final result you want to achieve.

- The first XML file you'll want to look into is the following:
<Your Civ4 game directory>\Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml
This one holds all the informations about the leaders in the game, and for each of them are defined sound infos.

- Two other XML files to consider, are the following:
<Your Civ4 game directory>\Assets\XML\Audio\Audio2Scripts.xml
and
<Your Civ4 game directory>\Assets\XML\Audio\Audio3Scripts.xml
These two files hold informations about each single sound effect or music piece that you may find in the game.

- Finally, the following XML file is the one that actually links each sound ID to its corresponding multimedia file.
<Your Civ4 game directory>\Assets\XML\Audio\AudioDefines.xml

Since the original files must always remain unchanged, before doing anything else you have to copy all those files to your CustomAssets directory.
So, first of all, copy all the files I've listed above to their mirror path in the CustomAssets directory.
Just in case you don't know it already, this directory is used to customize the game. Its content always overrides the corrisponding original, so you don't have to modify any of the original files. Its full path is the following:
\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\

Now, in Civ4LeaderHeadInfos.xml file, for each leader, you'll find four tags:
<DiplomacyIntroMusicPeace>
<DiplomacyMusicPeace>
<DiplomacyIntroMusicWar>
<DiplomacyMusicWar>​
Those are the diplomacy music definitions: there is a KEY entry for each era.
All you have to do here is to identify the right one for the era of your interest, and then find its corrisponding ID in Audio2DScripts.xml.

For example Roosevelt's diplomacy music key for the ancient era is: AS2D_DIPLO_ROOSEVELT_EARLY;
in Audio2DScripts.xml has given this ID: DIPLO_ROOSEVELT_EARLY.
This is the ID which actually points to the mp3 file.
This association can be found in AudioDefines.xml:

Code:
<SoundData>
	<SoundID>DIPLO_ROOSEVELT_EARLY</SoundID>
	<Filename>Sounds/Diplomacy/Roosevelt_Early</Filename>
	<LoadType>STREAMED</LoadType>
	<bIsCompressed>1</bIsCompressed>
	<bInGeneric>1</bInGeneric>
</SoundData>
So now we know that Roosevelt's diplomacy music for the ancient era points to Roosevelt_Early.mp3

Hope this helps. Happy modding
 
Whoa! Fan-tastic. I am new to modding, but I know my way around these XML files... just few days ago I was hacking around another fairly complicated mod...

Just a couple of questions, as I'm not home right now to put this baby into the XML code and see if it works:
Since the original files must always remain unchanged, before doing anything else you have to copy all those files to your CustomAssets directory.
I would not be doing this for Civ4 proper, but rather for 2 leaders of one tribe only, which belongs to a mod that is already written. So rather than putting these in CustomAssets folder, I could just modify the XML files in the Assets folder (of that particular mod I mean, not the Assets of Civ 4), right?

Now, in Civ4LeaderHeadInfos.xml file, for each leader, you'll find four tags:

<DiplomacyIntroMusicPeace>
<DiplomacyMusicPeace>
<DiplomacyIntroMusicWar>
<DiplomacyMusicWar>
I know of these already, but I'm not sure will modding these actually achieve what I'm after. The <DiplomacyIntroMusicPeace> and <DiplomacyMusicPeace> play an intro & theme for diplomacy music when you talk to that leader in peacetime. <DiplomacyIntroMusicWar> and <DiplomacyMusicWar> do the same for wartime, obviously.

But I already know (and have done) changed War music for one leader when you (human player) are at war with him (as AI) - that music then plays.

What I would like is somewhat opposite - when I (human player) am playing as that leader, and I declare war on anyone, or anyone declares war on me, there is a very short sound effect, which sounds like a trumpet, which follows the notification "X has declared war on you". THIS is the sound effect I want to change, and put my own mp3 file. From what I've read from your post, it doesn't actually describe that, but rather how to define just ordinary Diplo (early/middle/modern) and War music for diplomacy window. I don't want it for diplomacy window, as I will be playing as that player, and obviously, never have a diplomacy window for myself :)

Thanks
 
I think I've found it!!!

In folder Civ 4\Assets\Sounds

there is a file "DeclareWar.wav" which is this short war rallying trumpet sound.

This is referenced in AudioDefines.xml and in Audio2DScripts.xml

Will try them tonight! :)
 
Hmm, now that I look closer to it...

That file object is marked

<SoundID>SND_DECLAREWAR</SoundID>

It would be grand if I could make this for one leader/tribe only. But unless you're playing that tribe, everything stays the same... but this seems to be a "general" sound, and I'm not sure if you can override the sound source for leader/tribe only? :confused:
 
Mr_V said:
Hmm, now that I look closer to it...

That file object is marked

<SoundID>SND_DECLAREWAR</SoundID>

It would be grand if I could make this for one leader/tribe only. But unless you're playing that tribe, everything stays the same... but this seems to be a "general" sound, and I'm not sure if you can override the sound source for leader/tribe only? :confused:
Hi again Mr_V,

I'm not at home right now and I have no chance here to look inside the XML files. Howerer, if you say this is a general sound (and I think you're right), there is no way to change it for a single tribe. Maybe it will be possible with the forthcoming SDK.

Mr_V said:
I would not be doing this for Civ4 proper, but rather for 2 leaders of one tribe only, which belongs to a mod that is already written. So rather than putting these in CustomAssets folder, I could just modify the XML files in the Assets folder (of that particular mod I mean, not the Assets of Civ 4), right?:
Yes. As you may have figured out already, the CustomAssets directory has to be considered as the MAIN game directory, where you may put all of your personal additions. Just to make an example, this is the right place to put the Enhanced Advisors as they are general features that you'll always want in the game, regardless of the active mod.
Be carefull though. Everything in the mod OVERRIDES not only the original game files, but also those you have eventually put in the CustomAssets directory!
 
Throttle said:
Howerer, if you say this is a general sound (and I think you're right), there is no way to change it for a single tribe. Maybe it will be possible with the forthcoming SDK.
Hmmm. OK, fair enough, it is 90% of what I want anyway. It would be sweet if in this mod I could make if for one tribe only, but when I think about it - the mod consists of adding that tribe only, anyway. So you would think, if you play that mod, you are going to play that tribe, why load the mod otherwise? :) So that may actually be OK...

Throttle said:
Be carefull though. Everything in the mod OVERRIDES not only the original game files, but also those you have eventually put in the CustomAssets directory!
Got it. Cheers :)
 
Back
Top Bottom