Bashing sound - can you change that? [SOLVED]

I have an instant where the PC and the party are supposed to break a window. I have destroyable curtain that is the object that the PC is really destroying, but I think that’s ok. When bashing an object there is a sound that sounds like destroying a crate or something similar. Is there a way to change that sound through scripting - pointing it to another wave file - or is that perhaps hard coded? It would have been cool if it actually sounded like the PC where breaking a window or glass instead of a crate.

The sounds an object makes when being hit or destroyed are controlled by two 2das.
Placeableobjsnds.2da and placeables.2da. A column in placeables.2da points to a line in placeableobjsnds.2da.
You can expand placeableobjsnds.2da to add your own sounds and I always meant to do that because there are no sounds for glass, plants and bodies. It really shouldn’t sound like a crate is opened if someone takes a heart from a corpse or something like that. Unfortunately I haven’t found any good sounds for that.
Let me know if you find some.

Sorry, forget what I said. The link in the discord channel didn’t show that this was for NWN 2. My answer is for NWN 1.

1 Like
//	Place on the object's OnDamaged handler
//	Set the object's Current Hit Points to something very high like 999.

void main()
	int nTotalDMG = GetLocalInt(OBJECT_SELF, "dmg");
	int nDMG = GetTotalDamageDealt();
	nTotalDMG += nDMG;
	SetLocalInt(OBJECT_SELF, "dmg", nTotalDMG);
	if (nTotalDMG > 10)			// <--- set to whatever threshold you want
		DestroyObject(OBJECT_SELF, 0.5f);
1 Like

What @Zwerkules said should be true for NWN2 as well. The relevant column in placeables.2da is called SoundAppType.


Thanks for the replies.

@travus Interesting with the script there. I’ll try and use that. One thing I’m wondering though, since when the PC is bashing away at the object it sounds every time you hit it. Would this script do that? I mean I guess it could but…would the other bashing sound play as well? I’ll try it.

1 Like

@travus You’re script worked wonderfully! Thank you so much, travus!! (Your scripts are always very neat and precise, and I really admire your ability/talent with this)

1 Like