Civ 4: Editing the music playlists

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Civ 4: Editing the music playlists

Post by 2000AD »

I've heard you can edit the XML documents in Civ 4 to put in your own custom music playlists.

Does anyone know how to do this?
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

It's XML. Shouldn't be too hard to puzzle out.

Post the file content, that might help.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
Lord Woodlouse
Mister Zaia
Posts: 2357
Joined: 2002-07-04 04:09pm
Location: A Bigger Room
Contact:

Post by Lord Woodlouse »

I rather assumed you could just go to the folders (organised around the different epochs) and swap the files around. I rather like the existing music though... :)
Check out TREKWARS (not involving furries!)

EVIL BRIT CONSPIRACY: Son of York; bringing glorious summer to the winter of your discontent.

KNIGHTS ASTRUM CLADES: I am a holy knight! Or something rhyming with knight, anyway...
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

You could screw around in the XML audio files; they're simple, but I'll admit - I don't know what calls a <Sound2DScript>. Supposedly you can just put them in the "custom" folder, and they'll play, but I have no idea how well that acutally works...
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

Doh! thought i'd managed it by just putting the music file in the folder, then realised that there was already a version of the music in there, just a slightly different one!

GOing to try what i did for Plasma Pong and just rename some of the new music files to the old music's names.
Faqa wrote: It's XML. Shouldn't be too hard to puzzle out.

Post the file content, that might help.
I don't know which file it is i need to change.
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

You know what folder they're in? Post a list of XML files.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

Problem is the music is in one folder and the XML's are in another.

EDIT: SO i don't know which file i need or where it is.
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

*Googles*

AudioScriptSchema.xml

AudioDefinesSchema.xml

Post those two. They seem to be the ones.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

AudioScriptsSchema

Code: Select all

- <!--  edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Rob McLaughlin (Firaxis Games) 
  --> 
- <!--  Sid Meier's Civilization 4 
  --> 
- <!--  Copyright Firaxis Games 2005 
  --> 
- <!--  
  --> 
- <!--  Audio Script Schema 
  --> 
- <Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <ElementType name="ScriptID" content="textOnly" /> 
  <ElementType name="SoundID" content="textOnly" /> 
  <ElementType name="SoundType" content="textOnly" /> 
  <ElementType name="iMinVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iPitchChangeDown" content="textOnly" dt:type="int" /> 
  <ElementType name="iPitchChangeUp" content="textOnly" dt:type="int" /> 
  <ElementType name="bLooping" content="textOnly" dt:type="boolean" /> 
  <ElementType name="iMinTimeDelay" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxTimeDelay" content="textOnly" dt:type="int" /> 
  <ElementType name="StartPosition" content="textOnly" /> 
  <ElementType name="EndPosition" content="textOnly" /> 
  <ElementType name="iMinVelocity" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxVelocity" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinDistanceFromListener" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxDistanceFromListener" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinDistanceForMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxDistanceForMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinCutoffDistance" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxCutoffDistance" content="textOnly" dt:type="int" /> 
  <ElementType name="bTaperForSoundtracks" content="textOnly" dt:type="boolean" /> 
  <ElementType name="iLengthOfSound" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinLeftPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxLeftPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinRightPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxRightPan" content="textOnly" dt:type="int" /> 
  <ElementType name="fMinDryLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMaxDryLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMinWetLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMaxWetLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="ScriptType" content="textOnly" /> 
- <ElementType name="SoundscapeElement" content="eltOnly">
  <element type="ScriptType" /> 
  <element type="ScriptID" /> 
  </ElementType>
- <ElementType name="Script3DSound" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="SoundID" /> 
  <element type="SoundType" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="iPitchChangeDown" /> 
  <element type="iPitchChangeUp" /> 
  <element type="bLooping" /> 
  <element type="iMinTimeDelay" /> 
  <element type="iMaxTimeDelay" /> 
  <element type="StartPosition" /> 
  <element type="EndPosition" /> 
  <element type="iMinVelocity" /> 
  <element type="iMaxVelocity" /> 
  <element type="iMinDistanceFromListener" /> 
  <element type="iMaxDistanceFromListener" /> 
  <element type="iMinDistanceForMaxVolume" /> 
  <element type="iMaxDistanceForMaxVolume" /> 
  <element type="iMinCutoffDistance" /> 
  <element type="iMaxCutoffDistance" /> 
  <element type="bTaperForSoundtracks" /> 
  <element type="iLengthOfSound" /> 
  <element type="fMinDryLevel" /> 
  <element type="fMaxDryLevel" /> 
  <element type="fMinWetLevel" /> 
  <element type="fMaxWetLevel" /> 
  </ElementType>
- <ElementType name="Script2DSound" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="SoundID" /> 
  <element type="SoundType" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="iPitchChangeDown" /> 
  <element type="iPitchChangeUp" /> 
  <element type="iMinLeftPan" /> 
  <element type="iMaxLeftPan" /> 
  <element type="iMinRightPan" /> 
  <element type="iMaxRightPan" /> 
  <element type="bLooping" /> 
  <element type="iMinTimeDelay" /> 
  <element type="iMaxTimeDelay" /> 
  <element type="bTaperForSoundtracks" /> 
  <element type="iLengthOfSound" /> 
  <element type="fMinDryLevel" /> 
  <element type="fMaxDryLevel" /> 
  <element type="fMinWetLevel" /> 
  <element type="fMaxWetLevel" /> 
  </ElementType>
- <ElementType name="ScriptSoundscape" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="SoundscapeElement" minOccurs="0" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="Script3DSounds" content="eltOnly">
  <element type="Script3DSound" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="Script2DSounds" content="eltOnly">
  <element type="Script2DSound" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="ScriptSoundscapes" content="eltOnly">
  <element type="ScriptSoundscape" maxOccurs="*" /> 
  </ElementType>
  </Schema>




AudioDefinesSchema

Code: Select all

- <!--  edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Rob McLaughlin (Firaxis Games) 
  --> 
- <!--  Sid Meier's Civilization 4 
  --> 
- <!--  Copyright Firaxis Games 2005 
  --> 
- <!--  
  --> 
- <!--  Audio Defines 
  --> 
- <Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <ElementType name="SoundID" content="textOnly" /> 
  <ElementType name="Filename" content="textOnly" /> 
  <ElementType name="bIsCompressed" content="textOnly" dt:type="boolean" /> 
  <ElementType name="bInGeneric" content="textOnly" dt:type="boolean" /> 
  <ElementType name="ContextType" content="textOnly" /> 
  <ElementType name="SoundType" content="textOnly" /> 
  <ElementType name="PositionType" content="textOnly" /> 
  <ElementType name="ScriptType" content="textOnly" /> 
  <ElementType name="LoadType" content="textOnly" /> 
  <ElementType name="EffectType" content="textOnly" /> 
  <ElementType name="SpeakerConfig" content="textOnly" /> 
  <ElementType name="fReverbTime" content="textOnly" dt:type="float" /> 
  <ElementType name="fReverbPredelay" content="textOnly" dt:type="float" /> 
  <ElementType name="fReverbDamping" content="textOnly" dt:type="float" /> 
  <ElementType name="fReverbDryLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fReverbWetLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="iSampleRate" content="textOnly" dt:type="int" /> 
  <ElementType name="iSampleBits" content="textOnly" dt:type="int" /> 
  <ElementType name="iMultiChannelPref" content="textOnly" dt:type="int" /> 
  <ElementType name="iNum2DSamples" content="textOnly" dt:type="int" /> 
  <ElementType name="iNum3DSamples" content="textOnly" dt:type="int" /> 
  <ElementType name="iNum2DStreams" content="textOnly" dt:type="int" /> 
  <ElementType name="iNum3DStreams" content="textOnly" dt:type="int" /> 
  <ElementType name="fPercentSamplesFor3D" content="textOnly" dt:type="float" /> 
- <ElementType name="AudioSystemInit" content="eltOnly">
  <element type="iSampleRate" maxOccurs="1" /> 
  <element type="iSampleBits" maxOccurs="1" /> 
  <element type="iMultiChannelPref" maxOccurs="1" /> 
  <element type="iNum2DSamples" maxOccurs="1" /> 
  <element type="iNum3DSamples" maxOccurs="1" /> 
  <element type="iNum2DStreams" maxOccurs="1" /> 
  <element type="iNum3DStreams" maxOccurs="1" /> 
  <element type="fPercentSamplesFor3D" maxOccurs="1" /> 
  </ElementType>
- <ElementType name="ReverbData" content="eltOnly">
  <element type="fReverbTime" maxOccurs="1" /> 
  <element type="fReverbPredelay" maxOccurs="1" /> 
  <element type="fReverbDamping" maxOccurs="1" /> 
  <element type="fReverbDryLevel" maxOccurs="1" /> 
  <element type="fReverbWetLevel" maxOccurs="1" /> 
  </ElementType>
  <ElementType name="GameEnvironmentType" content="textOnly" /> 
- <ElementType name="GameEnvironmentMap" content="eltOnly">
  <element type="GameEnvironmentType" maxOccurs="1" /> 
  <element type="ReverbData" maxOccurs="1" /> 
  <element type="EffectType" maxOccurs="1" /> 
  </ElementType>
- <ElementType name="SoundData" content="eltOnly">
  <element type="SoundID" /> 
  <element type="Filename" /> 
  <element type="LoadType" /> 
  <element type="bIsCompressed" /> 
  <element type="bInGeneric" /> 
  </ElementType>
- <ElementType name="SoundDatas" content="eltOnly">
  <element type="SoundData" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="SpeakerConfigs" content="eltOnly">
  <element type="SpeakerConfig" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="ContextTypes" content="eltOnly">
  <element type="ContextType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="SoundTypes" content="eltOnly">
  <element type="SoundType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="PositionTypes" content="eltOnly">
  <element type="PositionType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="ScriptTypes" content="eltOnly">
  <element type="ScriptType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="LoadTypes" content="eltOnly">
  <element type="LoadType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="EffectTypes" content="eltOnly">
  <element type="EffectType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="GameEnvironmentTypes" content="eltOnly">
  <element type="GameEnvironmentType" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="Effects" content="eltOnly">
  <element type="GameEnvironmentMap" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="AudioDefines" content="eltOnly">
  <element type="SoundDatas" maxOccurs="1" /> 
  <element type="ContextTypes" maxOccurs="1" /> 
  <element type="SoundTypes" maxOccurs="1" /> 
  <element type="PositionTypes" maxOccurs="1" /> 
  <element type="ScriptTypes" maxOccurs="1" /> 
  <element type="LoadTypes" maxOccurs="1" /> 
  <element type="EffectTypes" maxOccurs="1" /> 
  <element type="GameEnvironmentTypes" maxOccurs="*" /> 
  <element type="Effects" maxOccurs="1" /> 
  <element type="SpeakerConfigs" maxOccurs="1" /> 
  <element type="AudioSystemInit" maxOccurs="1" /> 
  </ElementType>
  </Schema>
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

You don't want to touch the schemas, you want to update the AudioDefines and AudioScripts themselves
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

Well here's the AudioDefines, now for scripts would it be 2D, 3D or Soundscape scripts?

Audio Defines

Code: Select all

- <!--  edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Rob McLaughlin (Firaxis Games) 
  --> 
- <!--  Sid Meier's Civilization 4 
  --> 
- <!--  Copyright Firaxis Games 2005 
  --> 
- <!--  
  --> 
- <!--  Audio Script Schema 
  --> 
- <Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <ElementType name="ScriptID" content="textOnly" /> 
  <ElementType name="SoundID" content="textOnly" /> 
  <ElementType name="SoundType" content="textOnly" /> 
  <ElementType name="iMinVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iPitchChangeDown" content="textOnly" dt:type="int" /> 
  <ElementType name="iPitchChangeUp" content="textOnly" dt:type="int" /> 
  <ElementType name="bLooping" content="textOnly" dt:type="boolean" /> 
  <ElementType name="iMinTimeDelay" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxTimeDelay" content="textOnly" dt:type="int" /> 
  <ElementType name="StartPosition" content="textOnly" /> 
  <ElementType name="EndPosition" content="textOnly" /> 
  <ElementType name="iMinVelocity" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxVelocity" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinDistanceFromListener" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxDistanceFromListener" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinDistanceForMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxDistanceForMaxVolume" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinCutoffDistance" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxCutoffDistance" content="textOnly" dt:type="int" /> 
  <ElementType name="bTaperForSoundtracks" content="textOnly" dt:type="boolean" /> 
  <ElementType name="iLengthOfSound" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinLeftPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxLeftPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMinRightPan" content="textOnly" dt:type="int" /> 
  <ElementType name="iMaxRightPan" content="textOnly" dt:type="int" /> 
  <ElementType name="fMinDryLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMaxDryLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMinWetLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="fMaxWetLevel" content="textOnly" dt:type="float" /> 
  <ElementType name="ScriptType" content="textOnly" /> 
- <ElementType name="SoundscapeElement" content="eltOnly">
  <element type="ScriptType" /> 
  <element type="ScriptID" /> 
  </ElementType>
- <ElementType name="Script3DSound" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="SoundID" /> 
  <element type="SoundType" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="iPitchChangeDown" /> 
  <element type="iPitchChangeUp" /> 
  <element type="bLooping" /> 
  <element type="iMinTimeDelay" /> 
  <element type="iMaxTimeDelay" /> 
  <element type="StartPosition" /> 
  <element type="EndPosition" /> 
  <element type="iMinVelocity" /> 
  <element type="iMaxVelocity" /> 
  <element type="iMinDistanceFromListener" /> 
  <element type="iMaxDistanceFromListener" /> 
  <element type="iMinDistanceForMaxVolume" /> 
  <element type="iMaxDistanceForMaxVolume" /> 
  <element type="iMinCutoffDistance" /> 
  <element type="iMaxCutoffDistance" /> 
  <element type="bTaperForSoundtracks" /> 
  <element type="iLengthOfSound" /> 
  <element type="fMinDryLevel" /> 
  <element type="fMaxDryLevel" /> 
  <element type="fMinWetLevel" /> 
  <element type="fMaxWetLevel" /> 
  </ElementType>
- <ElementType name="Script2DSound" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="SoundID" /> 
  <element type="SoundType" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="iPitchChangeDown" /> 
  <element type="iPitchChangeUp" /> 
  <element type="iMinLeftPan" /> 
  <element type="iMaxLeftPan" /> 
  <element type="iMinRightPan" /> 
  <element type="iMaxRightPan" /> 
  <element type="bLooping" /> 
  <element type="iMinTimeDelay" /> 
  <element type="iMaxTimeDelay" /> 
  <element type="bTaperForSoundtracks" /> 
  <element type="iLengthOfSound" /> 
  <element type="fMinDryLevel" /> 
  <element type="fMaxDryLevel" /> 
  <element type="fMinWetLevel" /> 
  <element type="fMaxWetLevel" /> 
  </ElementType>
- <ElementType name="ScriptSoundscape" content="eltOnly">
  <element type="ScriptID" /> 
  <element type="iMinVolume" /> 
  <element type="iMaxVolume" /> 
  <element type="SoundscapeElement" minOccurs="0" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="Script3DSounds" content="eltOnly">
  <element type="Script3DSound" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="Script2DSounds" content="eltOnly">
  <element type="Script2DSound" maxOccurs="*" /> 
  </ElementType>
- <ElementType name="ScriptSoundscapes" content="eltOnly">
  <element type="ScriptSoundscape" maxOccurs="*" /> 
  </ElementType>
  </Schema>
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

That's the schema again :P

Code: Select all

- <!--  Audio Script Schema 
  --> 
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

Hmmmm.... Those appear to almost be object models....

*prays very hard this is not XML Serialization*

On the plus side, there's your attribute for you: AudioDefinesSchema seems to have a "FileName". Huh.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

It's really simple guys; there's a file that references each of those schemas, one of them defines a music file, the other, the script, referencse that music file. If you look at them it will become obvious instantly what you need to do add a new music file.


2000AD, I dunno which soundScript you use; go through each of them and look at the songs they reference; one of them will reference the soundtrack, and that'll be the one. For instance; I know People are the heroes is a soundtrack song, if one of the scripts references that song, then that's likely the one to use.
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

Sounds about right. I had no idea what OTHER files might be in the Civ4 install.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

Ok, found the songs in 2D scripts.
Here's a sample:

Code: Select all

- <Script2DSound>
  <ScriptID>AS2D_DVORAK_SLAVONIC_3</ScriptID> 
  <SoundID>SONG_DVORAK_SLAVONIC_3</SoundID> 
  <SoundType>GAME_MUSIC</SoundType> 
  <iMinVolume>70</iMinVolume> 
  <iMaxVolume>70</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> 
If i want to stick my own song in do i just copy and paste the song file into the correct folder and then copy and paste this but with the new song name?
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

You didn't listen. You need to define a song in the audio defines, then reference it in the audio scripts.
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

Ok, so from the AudioDefines.XML i find stuff like this:

Code: Select all

- <SoundData>
  <SoundID>SONG_BEETHOVEN_6_1</SoundID> 
  <Filename>Sounds/Soundtrack/Industrial/Beethoven6 1</Filename> 
  <LoadType>STREAMED</LoadType> 
  <bIsCompressed>1</bIsCompressed> 
  <bInGeneric>1</bInGeneric> 

SO if i'm understanding you right i have to:

- Move the song i want into the right CIv4 folder

- Create one of those above in the AudioDefines.XML for the new song.

-Then create one of these in the Audio2DScripts for the new song:

Code: Select all

- <Script2DSound>
  <ScriptID>AS2D_DVORAK_SLAVONIC_3</ScriptID>
  <SoundID>SONG_DVORAK_SLAVONIC_3</SoundID>
  <SoundType>GAME_MUSIC</SoundType>
  <iMinVolume>70</iMinVolume>
  <iMaxVolume>70</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>


Is that right?
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

The adio scrip references an audioDefine, and audioDefine references an actual file (minus the .mp3 or whatever, from the looks of it). You can tell because a 'SoundData' has a Filename, and a SoundID; and the script has the SoundId, and then it's own script ID.

Though that raises a question; what calls the sound script, if anything? Songs are usually separated by era... I'd think there'd be another sound based schema somewheres.
User avatar
2000AD
Emperor's Hand
Posts: 6666
Joined: 2002-07-03 06:32pm
Location: Leeds, wishing i was still in Newcastle

Post by 2000AD »

*brain implodes*

I think i'll just stick with the regular soundtrack now. I guess when they said everything was XML and easy to mod they meant "Easy to mod if you know what the fuck your doing!"
Ph34r teh eyebrow!!11!Writers Guild Sluggite Pawn of Chaos WYGIWYGAINGW so now i have to put ACPATHNTDWATGODW in my sig EBC-Honorary Geordie
Hammerman! Hammer!
User avatar
InnocentBystander
The Russian Circus
Posts: 3466
Joined: 2004-04-10 06:05am
Location: Just across the mighty Hudson

Post by InnocentBystander »

Don't be silly! Look!
Every song has an "AudioDefine"

Code: Select all

- <SoundData>
  <SoundID>SONG_THE_PEOPLE_ARE_HEROES</SoundID> 
  <Filename>Sounds/Soundtrack/Modern/ThePeopleAreHeroes</Filename> 
  <LoadType>STREAMED</LoadType> 
  <bIsCompressed>1</bIsCompressed> 
  <bInGeneric>1</bInGeneric> 
  </SoundData>
Each of those <soundData> tags is a song - if you go to \Firaxis Games\Sid Meier's Civilization 4\Assets\Sounds\Soundtrack\Modern; you'll see a file named ThePeopleAreHeroes; now look at the <Filename> tag; is it not obvious what goes here now?
The three tags after <Filename> can be copied directly, leaving just <SoundID>, this is the 'name' you give the tag, so another xml document can call it; it's a sound identity. That whole thing is a <SoundData>, every song has one... soooo

Code: Select all

- <SoundData>
  <SoundID>SONG_MYSONG</SoundID>
<Filename>Sounds/Soundtrack/Modern/MYSONG</Filename>   <LoadType>STREAMED</LoadType> 
  <bIsCompressed>1</bIsCompressed> 
  <bInGeneric>1</bInGeneric> 
  </SoundData>
If you placed 'MYSONG.mp3' in \Firaxis Games\Sid Meier's Civilization 4\Assets\Sounds\Soundtrack\Modern; that would be the proper way to write a SoundData for it. Paste that code in after any of the </SoundData> tags and you're done with step1

Then you've got to create a script for it.

Code: Select all

<Script2DSound> 
  <ScriptID>AS2D_SONG_MYSONG</ScriptID> 
  <SoundID>SONG_MYSONG</SoundID> 
  <SoundType>GAME_MUSIC</SoundType> 
  <iMinVolume>70</iMinVolume> 
  <iMaxVolume>70</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>
That would be an example of the script for MYSONG; notice the <SoundID>s are the same; and the <ScriptID> is a new 'name' of your choice.

Try that...
Post Reply