XML sounds modding O_o

Krajzen

Deity
Joined
Oct 23, 2013
Messages
3,947
Location
Poland
So, I decided to create simple xml mod which would turn off those annoying sounds of SOMEONE ELSE BUILT CRUCIAL WONDER AND IS HAPPY INSTEAD OF YOU and YOUR HIGHLY PROMOTED AWESOME UNIT HAS JUST GONE TO HELL.

Sounds are in the
C:\Users\Kamil\AppData\Local\Temp\Rar$DIa0.989\Audio2DScripts.xml

Spoiler :

<Script2DFile>
<Script2DSounds>
<Script2DSound>

<ScriptID>AS2D_INTERFACE_UNIT_KILLED</ScriptID>

<SoundID>SND_INTERFACE_UNIT_KILLED</SoundID>

<SoundType>GAME_SFX</SoundType>

<iMinVolume>75</iMinVolume>

<iMaxVolume>75</iMaxVolume>

<bDontTriggerDuplicates>True</bDontTriggerDuplicates>

<iDontPlayMoreThan>1</iDontPlayMoreThan>

</Script2DSound>



well I already should guess it is not usual location :p, but I still tried to create mod which

<GameData>
<Script2DFile>
<Update>
<Set iDontPlayMoreThan="0"/>
<Where SoundsID="SND_INTERFACE_UNIT_KILLED"/>
</Update>
</Script2DFile>
</GameData>


And what I receive via log is

no such table: Script2DSound


and yeah, I tried absolutely all possible configurations here and all possible tables, no success. Is modding this impossible, or have I made some basic stupid mistake? ;)
 
Attach the mod?

Also you might consider using
Code:
 blocks instead of italicizing your code and/or putting it in spoilers...
 
Yeah, sorry.

I have tried all possible combinations of <Rows>, doesn't work and log shows that there are no <rows> like that - and I did really various things with XML before this little mod. I don't understand what's wrong here, so my guess is that those Special Files (sounds) require Something Special.
 

Attachments

:confused: Your mod doesn't contain <Script2DSound> at all though...
So what I'm wondering: What would happen if you tried deleting the sounds altogether instead of setting its max play number to 0?

I don't know to much about the game audio; you might consider asking Leugi. He seems to know something about modding audio.
 
Well, after the fall patch the sound tables are different than what you find on the assets actually. So, the structure is:

Code:
<GameData>
	<Audio_2DSounds>

		....... (add your update thing here)
</Audio_2DSounds>
</GameData>

Another good option, since all you want to do is turning off, is putting silence files with the same names as those sounds with VFS=True.
 
I forgot about this mod, tried again, still doesn't work :p

Code:
<GameData>
	<Audio_2DSounds>
				<Update>
			<Set iMaxVolume="0"/>
			<Where SoundsID="SND_INTERFACE_UNIT_KILLED"/>
				</Update>
	</Audio_2DSounds>
</GameData>
 
its also MaxVolume... it was iMaxVolume before the FallPatch.
 
Lol, I am going to hate Civ5 XML database :D This is just ridiculous :D

EDIT
Still doesn't work :lol: no information in log :crazyeye:

Obviously, OnModActivated is set, as well as Reload Audio System.
 

Attachments

Audio_Sounds, Audio_SoundScapes, Audio_2DSounds and Audio_3DSounds are all empty when viewed with SQLiteSpy - presumably you can only add new sounds via these tables and not change existing ones (as quite clearly the data isn't read from them)
 
Audio_Sounds, Audio_SoundScapes, Audio_2DSounds and Audio_3DSounds are all empty when viewed with SQLiteSpy - presumably you can only add new sounds via these tables and not change existing ones (as quite clearly the data isn't read from them)

exactly.

@Krajzen: Look at the database itself when you want to get the name of a column, the original assets does not use the same naming convention for art and sound defines.
 
Lol, this is ridiculous.

Leugi proposed mod which uploads new blank audio files with the same names as the old ones, but I am not sure if I can do that - can somebody do this easy thing and post it here/release as mod? I am absolutely sure that many people loathe those two awful notification sounds :lol:
 
Ok, so, maybe we have to change the minvolume too:

Code:
<?xml version="1.0" encoding="utf-16"?>
<!-- Created by ModBuddy on 2/24/2014 9:34:40 PM -->
<GameData>
	<Audio_2DSounds>
		<Update>
			<Set MaxVolume="0"/>
			<Where SoundID="SND_INTERFACE_UNIT_KILLED"/>
		</Update>
		<Update>
			<Set MaxVolume="0"/>
			<Where SoundID="SND_INTERFACE_OTHER_CIV_WONDER"/>
		</Update>
		<Update>
			<Set MinVolume="0"/>
			<Where SoundID="SND_INTERFACE_UNIT_KILLED"/>
		</Update>
		<Update>
			<Set MinVolume="0"/>
			<Where SoundID="SND_INTERFACE_OTHER_CIV_WONDER"/>
		</Update>
	</Audio_2DSounds>
</GameData>
 
Doesn't work :lol:

nother good option, since all you want to do is turning off, is putting silence files with the same names as those sounds with VFS=True.

Yeah, I am going to try that - or is someone here more experience with music goind to do that and upload here? :D
 
:P Its only same names, but no need to change the format, so if it was Hello.ogg, it can be Hello.mp3, it will replace them directly if you put the VFS=True thing.
 
Ok. Just one last question... Seriously last one... How to encode that via XML because mod constisting only from those two files (+ VFS enabled, audio system reloaded...) obviously doesn't work :lol: and I have no clue how to 'replace audio without replacing audio' thing :(
 
obviously doesn't work :lol:
Obviously?

You have to name them the same thing to ensure they are replaced. You named them "notificationothercivwonder.wav" and "notificationunitkilled.wav"?
 
No, it's got to be .wav since you're replacing it (though I believe you can get away with having the wrong extension; i.e., the ACTUAL sound format can be mp3)
 
Back
Top Bottom