Custom Music isn't working.

Neirai

the Forgiven
Joined
Aug 5, 2013
Messages
1,046
Location
Canada
We're almost done the Australia part of Colonialist Legacies and it's looking very, very good. Except this one part. For the life of me I can't get our custom music to work.

Pertinent information:

It's currently named SirHenryParkesPeace and SirHenryParkesWar. Both are mp3s. Both are added to the VFS.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/16/2013 3:43:30 PM -->
<GameData>
	<Audio_Sounds>
		<Row>
			<SoundID>SND_LEADER_MUSIC_SIRHENRYPARKES_PEACE</SoundID>
			<Filename>SirHenryParkesPeace</Filename>
			<LoadType>DynamicResident</LoadType>
		</Row>
		<Row>
			<SoundID>SND_LEADER_MUSIC_SIRHENRYPARKES_WAR</SoundID>
			<Filename>SirHenryParkesWar</Filename>
			<LoadType>DynamicResident</LoadType>
		</Row>
	</Audio_Sounds>
	<Audio_2DSounds>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_SIRHENRYPARKES_PEACE</ScriptID>
			<SoundID>SND_LEADER_MUSIC_SIRHENRYPARKES_PEACE</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>80</MinVolume>
			<MaxVolume>80</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
		<Row>
			<ScriptID>AS2D_LEADER_MUSIC_SIRHENRYPARKES_WAR</ScriptID>
			<SoundID>SND_LEADER_MUSIC_SIRHENRYPARKES_WAR</SoundID>
			<SoundType>GAME_MUSIC</SoundType>
			<MinVolume>100</MinVolume>
			<MaxVolume>100</MaxVolume>
			<IsMusic>true</IsMusic>
		</Row>
		<Row>
			<ScriptID>AS2D_AMBIENCE_LEADER_SIRHENRYPARKES_AMBIENCE</ScriptID>
			<SoundID>SND_LEADER_SPEECH_WASHINGTON_BIRD_AMBIENCE</SoundID>
			<SoundType>GAME_SFX</SoundType>
			<Looping>true</Looping>
			<MinVolume>60</MinVolume>
			<MaxVolume>60</MaxVolume>
		</Row>
	</Audio_2DSounds>
</GameData>

This is not added to the VFS. It's currently loaded into the mod using OnModActivated UpdateDatabase, sitting AFTER the leader is loaded. But I've had it Before, and it doesn't do anything differently as far as I can tell.

All are currently sitting on the mod's root directory.

Thanks for any help you can render us :)
 
That all seems to be exactly like it should be and like how I get leader music to work myself. (I load the sound-defining XML first and put music in a separate directory, but those shouldn't matter.) The only thing that comes to mind is checking that the IDs match the leader definition; that is, your leader's type needs to be LEADER_SIRHENRYPARKES for the above to work. But I think I can assume that that's indeed the case.
Check your logs? Double-check that the mp3's are in VFS? Put an underscore between "SirHenryParkes" and "Peace"? I don't know, I'm drawing a blank here.

edit: Did you make sure to enable "Reload Audio System" in the Mod Info panel? That might just be it.
 
Darn, I knew it had to be something incredibly easy like that. Thanks, Harald :)
 
...What was the solution to this problem exactly?

Because I created massive great musicians pack, and despite enabling VFS, making all mp3 pieces (put into the folder) VFS, Reloading Audio System and making all XML definitions perfect... My musicians show up with proper names, they create great works properly, I have proper great work background but NO MUSIC. :p

This is madness...
 
The solution seems to have been to check Reload Audio System, but I was updating some of my civs to include the new functionality and I'd forgotten to check that - yet the music still played; so I'm not so sure. Of course, you say you've already done that...

However, I can say that I did have some trouble with my Papal States mod, which uses custom Great Works of Music. It probably won't help you (because, as you say, you wrote it in XML), but I couldn't get them to work at all using SQL, despite using the same set-up as the XML that I ended up using. If it's of any help, this is an example of how I set up my music (which assuredly works):

Spoiler :
Code:
<Audio_Sounds>
     <Row>
	   <Filename>GW_Gregorio_Allegri--Misererei Mei, Deus</Filename>
	   <LoadType>DynamicResident</LoadType>
     </Row>
</Audio_Sounds>
<Audio_2DSounds>
     <Row>
	<ScriptID>AS2D_GREAT_MUSICIAN_ALLEGRIS_MISEREREI_MEI_DEUS</ScriptID>
	<SoundID>SND_GREAT_MUSICIAN_ALLEGRIS_MISEREREI_MEI_DEUS</SoundID>
	<SoundType>GAME_MUSIC_STINGS</SoundType>
	<TaperSoundtrackVolume>0.0</TaperSoundtrackVolume>
     </Row>
</Audio_2DSounds>
 
Here is part of my mod, few musicians and all their XML rows, + .modinfo and mp3 files.


Anyone who will manage to look at this little mod, make even one of my musicians create great work with PROPER AUDIO, and tell me what has gone so wrong, will receive awesome cookie :p
 

Attachments

  • KrajzenTestMod.zip
    6 MB · Views: 40
That mod doesn't import any on the mp3 files.

From the .modinfo file

Code:
  <Files>
    <File md5="3FE57295A1D57B5472EA27DBA94AF13F" import="0">Game Rules1.xml</File>
  </Files>

If the .mp3 files were imported you would also have one <File ... import="1">...</File> line for each of them
 
Sorry, that was fault of fast creating experimental version, this has files imported properly , great musicians show and create great works - still without audio.
 

Attachments

  • KrajzenTest.rar
    6 MB · Views: 52
My solution was as described: if you make a mod with new music, you need to reload the music system. To do that, you go into the Solution properties and check the box that reads "Reload Audio System."

If you run your mod with another mod that reloads the Audio system it may work... but I don't know that it would. You want to run yours with a reloaded system, though, or else it will be a gamble whether it will work.
 
My solution was as described: if you make a mod with new music, you need to reload the music system. To do that, you go into the Solution properties and check the box that reads "Reload Audio System."

If you run your mod with another mod that reloads the Audio system it may work... but I don't know that it would. You want to run yours with a reloaded system, though, or else it will be a gamble whether it will work.

Yeah, my audio system is reloaded :p

Seriously, nobody can make this test - mod - attachement working at least for one musician? :p
 
Yeah, my audio system is reloaded :p

Seriously, nobody can make this test - mod - attachement working at least for one musician? :p

I have only made a one leader music but it worked following Leugi's tutorial. Have you tried making all your tags with no space's at all using underscore instead and making all of them all in uppercase (except .mp3's they can be lowercase)?
 
Have you tried making all your tags with no space's at all using underscore instead and making all of them all in uppercase (except .mp3's they can be lowercase)?

Good general advice. Firaxis have proved time and time again that they only do enough to get what they need working, so in general, it is a very good idea to follow their conventions. Convert all tags to upper case, replace all spaces with underscores and remove all non US-ASCII characters (ie anything with an accent). Also, you have mismatches in at least three of your tags - is it ZeVi or ZeWi? Enable logging, enable validation (one of the database.log/xml.log tells you how) and then solve every error your mod has added. It may not be any of those, but it will remove a whole load of possible errors.
 
OK, I surrender. I made another test mod, with one musician and one mp3, tried all of my ideas, VFS is enabled, mp3 works, audio system is reloaded, GM appears and creates Great Work of Music, fonts are correct, everything is coded like in the other GM mod (which obviously works) but I still have no damn music :p

In the attachment I add this second test mod along with save in which he stays in front of city with Opera.

Maybe solution to my problem is something insanely easy and obvious, but I really checked all proper threads and civ5 websites and it seems that my mind cannot find that obvious error :p

Remember, my savior/saviors will receive a cookie :p


BTW, I made all my planned mods, so probably this is my last issue with modding and I will no longer spam C&C :D
 

Attachments

  • TestMusician.rar
    862.2 KB · Views: 47
  • Kamehameha_0082 n.e.-0260.Civ5Save
    500.7 KB · Views: 35
VFS isn't an external program. You don't download it.

VFS stands for Virtual File System. It's part of the Civ game itself, it's a storage area in the game so it can get at art, sound, and other such things.

You set VFS to true in Modbuddy on each individual file Properties.
Be aware that anything in VFS cannot interact with the game's database, so your files that affect the database, such as your unit XML, civ XML, or Lua scripts can't go in the VFS if you want it to work.

Music (.mp3), Art (.dds) files go in VFS. XML and Lua typically (but not always) don't.
 
VFS isn't an external program. You don't download it.

VFS stands for Virtual File System. It's part of the Civ game itself, it's a storage area in the game so it can get at art, sound, and other such things.

You set VFS to true in Modbuddy on each individual file Properties.
Be aware that anything in VFS cannot interact with the game's database, so your files that affect the database, such as your unit XML, civ XML, or Lua scripts can't go in the VFS if you want it to work.

Music (.mp3), Art (.dds) files go in VFS. XML and Lua typically (but not always) don't.

Okay, well I found a download on the Interwebz from Apache, and so thought I had to download it. Now the true question: How do I enable VFS?
 
Okay, well I found a download on the Interwebz from Apache, and so thought I had to download it. Now the true question: How do I enable VFS?

You have to add files to the mod (create new folder in Mod Buddy and put them here), then in modbuddy click on each file and on the right there is "VFS Enabled - false" ; set it to true ;)

I am still awaiting on my savior :lol:
 
Top Bottom