Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
I noticed that Hypereon appears to be doing this in the Finnish Civilization mod.
This is just my running notes as I attempt to deduce what was done.
From looking inside the mod, what he appears to have done is replace these three files.
RamkhamhaengAmbience.mp3
RamkhamhaengPeace.mp3
RamkhamhaengWar.mp3
I played these and they make nice new sounds. I haven't actually played the mod yet but Hypereon indicates in the thread that they do play in game. Hypereon notes that he had to "replace" the Ramkhamhaeng leader with his Finnish leader.
These three sound files are referenced (without the .mp3 extension) in Sounds/XML/AudioDefines.xml and the structure looks line this:
This xml links the sound file to a SoundID. As far as I know, we can't add SoundDatas. But I haven't really tried yet so I'm not sure.
Inside RamkhamhaengAudio2DScripts.xml you find this:
This xml links SoundID to ScriptID. I don't really know why Hypereon included this file -- I can't tell what was changed in it.
OK, looking in his CIV5Leader_Mannerheim.xml I see that he hasn't technically replaced Ramkhamhaeng, but rather has changed the description text, art and some other stuff:
So LEADER_RAMKHAMHAENG is still there, technically speaking (he has been doppelgangered by Mannerheim!). I believe that this is where we hit a bit of a dead end. You can play the mp3 sounds easy enough. Just try this in the Fire Tuner:
However, you won't find AS2D_AMBIENCE_LEADER_RAMKHAMHAENG_AMBIENCE referenced anywhere that links it to LEADER_RAMKHAMHAENG. The AS2D sounds seem to be hardcoded to particular leaders in the dll.
What I'm actually more interested in is adding my own music tracks. I have a feeling that I might be able to do a brute-force replacement as Hypereon did here. That is, just add mp3 music files that have the same name as existing ones (I don't actually know where the base game mp3 files are, but they are referenced in AudioDefines.xml). I'll keep posting here if I figure anything out...
This is just my running notes as I attempt to deduce what was done.
From looking inside the mod, what he appears to have done is replace these three files.
RamkhamhaengAmbience.mp3
RamkhamhaengPeace.mp3
RamkhamhaengWar.mp3
I played these and they make nice new sounds. I haven't actually played the mod yet but Hypereon indicates in the thread that they do play in game. Hypereon notes that he had to "replace" the Ramkhamhaeng leader with his Finnish leader.
These three sound files are referenced (without the .mp3 extension) in Sounds/XML/AudioDefines.xml and the structure looks line this:
Code:
<AudioDefinesFile>
<SoundDatas>
<SoundData>
<SoundID>SND_AMBIENCE_RAMKHAMHAENG_AMBIENCE</SoundID>
<Filename>RamkhamhaengAmbience</Filename>
<bDontCache/>
<bOnlyLoadOneVariationEachTime/>
<LoadType>DYNAMIC_RES</LoadType>
</SoundData>
...
This xml links the sound file to a SoundID. As far as I know, we can't add SoundDatas. But I haven't really tried yet so I'm not sure.
Inside RamkhamhaengAudio2DScripts.xml you find this:
Code:
<Script2DFile>
<Script2DSounds>
<Script2DSound>
<ScriptID>AS2D_AMBIENCE_LEADER_RAMKHAMHAENG_AMBIENCE</ScriptID>
<SoundID>SND_AMBIENCE_RAMKHAMHAENG_AMBIENCE</SoundID>
<SoundType>GAME_SFX</SoundType>
<bLooping>True</bLooping>
<iMaxVolume>35</iMaxVolume>
<iMinVolume>35</iMinVolume>
</Script2DSound>
...
</Script2DSounds>
</Script2DFile>
This xml links SoundID to ScriptID. I don't really know why Hypereon included this file -- I can't tell what was changed in it.
OK, looking in his CIV5Leader_Mannerheim.xml I see that he hasn't technically replaced Ramkhamhaeng, but rather has changed the description text, art and some other stuff:
Spoiler :
Code:
<Leaders>
<Update>
<Where Type="LEADER_RAMKHAMHAENG"/>
<Set>
<Description>TXT_KEY_LEADER_MANNERHEIM</Description>
<Civilopedia>TXT_KEY_LEADER_MANNERHEIM_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADERS_MANNERHEIM</CivilopediaTag>
<ArtDefineTag>Mannerheim_Scene.xml</ArtDefineTag>
<VictoryCompetitiveness>7</VictoryCompetitiveness>
<WonderCompetitiveness>7</WonderCompetitiveness>
<MinorCivCompetitiveness>8</MinorCivCompetitiveness>
<Boldness>7</Boldness>
<DiploBalance>3</DiploBalance>
<WarmongerHate>6</WarmongerHate>
<WorkAgainstWillingness>4</WorkAgainstWillingness>
<WorkWithWillingness>8</WorkWithWillingness>
<PortraitIndex>1</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS_FINLAND</IconAtlas>
</Set>
</Update>
</Leaders>
So LEADER_RAMKHAMHAENG is still there, technically speaking (he has been doppelgangered by Mannerheim!). I believe that this is where we hit a bit of a dead end. You can play the mp3 sounds easy enough. Just try this in the Fire Tuner:
Code:
Events.AudioPlay2DSound("AS2D_AMBIENCE_LEADER_RAMKHAMHAENG_AMBIENCE")
What I'm actually more interested in is adding my own music tracks. I have a feeling that I might be able to do a brute-force replacement as Hypereon did here. That is, just add mp3 music files that have the same name as existing ones (I don't actually know where the base game mp3 files are, but they are referenced in AudioDefines.xml). I'll keep posting here if I figure anything out...