Moshman Posted February 4, 2010 Share Posted February 4, 2010 Hey, I've been pounding away at this all day today and I am about to lose my mind over it. You see, I am creating custom physics impact sounds. Like when you drop something it makes a sound when it collides with geometry. A lot of these vanilla sounds in Fallout 3 are very generic and bland. They don't really fit with the item. Like for example, the minigun when dropped, should make a heavy thumping metal sound when dropped, instead it goes TINK TINK. This is only one example of what I wish to correct, by creating specific sounds for every item in the game. The problem is getting the model to associate these specific sounds to these models. Now I have done a lot of digging around on Google for some answers and I am slowly making progress as I understand more and more of how .nif files and Havok models operate. This whole issue is circled around a parameter in a nif file called "HavokMaterial" which you can define what material your object is. In nifscope, there is a drop down menu with predefined presets such as; HAV_MAT_METAL, HAV_MAT_WOOD, HAV_MAT_GLASS and so on and so forth. Early in my research, and as I was told on these fourms, I thought that Havok models were limited to what you get from the drop down menu. I believe I discovered that this is NOT the case and you CAN in-fact define your very own HavokMaterial. As I was looking at specific .nif files that I had extracted from the vanilla .bsa files, I came across the bouncy ball, and rattle models that you first see in the game as a 1-year-old. I remember the rattle, rattled when you dropped it, and the ball had that plastic hollow ball sound to it. These sounds are UNIQUE to these specific models and no other model in the game uses them. I thought to myself "Surely, there can't be a dedicated HavokMaterial preset only for rattles and big red bouncy balls." So I opened up the ball nif in nifscope to look at the HavokMaterial for it, and it was a number instead of a string of text. Number 31 was the value for HavokMaterial. Now for HavokMaterial, you can pick something like HAV_MAT_METAL or just type in 4 (i think the number is) and it will be the same thing. So I took this newly found information to Google and I found something called nif.xml. And inside it I found this: <enum name="HavokMaterial" storage="uint"> A material, used by havok shape objects. <option value="0" name="HAV_MAT_STONE">Stone</option> <option value="1" name="HAV_MAT_CLOTH">Cloth</option> <option value="2" name="HAV_MAT_DIRT">Dirt</option> <option value="3" name="HAV_MAT_GLASS">Glass</option> <option value="4" name="HAV_MAT_GRASS">Grass</option> <option value="5" name="HAV_MAT_METAL">Metal</option> <option value="6" name="HAV_MAT_ORGANIC">Organic</option> <option value="7" name="HAV_MAT_SKIN">Skin</option> <option value="8" name="HAV_MAT_WATER">Water</option> <option value="9" name="HAV_MAT_WOOD">Wood</option> <option value="10" name="HAV_MAT_HEAVY_STONE">Heavy Stone</option> <option value="11" name="HAV_MAT_HEAVY_METAL">Heavy Metal</option> <option value="12" name="HAV_MAT_HEAVY_WOOD">Heavy Wood</option> <option value="13" name="HAV_MAT_CHAIN">Chain</option> <option value="14" name="HAV_MAT_SNOW">Snow</option> <option value="15" name="HAV_MAT_STONE_STAIRS">Stone Stairs</option> <option value="16" name="HAV_MAT_CLOTH_STAIRS">Cloth Stairs</option> <option value="17" name="HAV_MAT_DIRT_STAIRS">Dirt Stairs</option> <option value="18" name="HAV_MAT_GLASS_STAIRS">Glass Stairs</option> <option value="19" name="HAV_MAT_GRASS_STAIRS">Grass Stairs</option> <option value="20" name="HAV_MAT_METAL_STAIRS">Metal Stairs</option> <option value="21" name="HAV_MAT_ORGANIC_STAIRS">Organic Stairs</option> <option value="22" name="HAV_MAT_SKIN_STAIRS">Skin Stairs</option> <option value="23" name="HAV_MAT_WATER_STAIRS">Water Stairs</option> <option value="24" name="HAV_MAT_WOOD_STAIRS">Wood Stairs</option> <option value="25" name="HAV_MAT_HEAVY_STONE_STAIRS">Heavy Stone Stairs</option> <option value="26" name="HAV_MAT_HEAVY_METAL_STAIRS">Heavy Metal Stairs</option> <option value="27" name="HAV_MAT_HEAVY_WOOD_STAIRS">Heavy Wood Stairs</option> <option value="28" name="HAV_MAT_CHAIN_STAIRS">Chain Stairs</option> <option value="29" name="HAV_MAT_SNOW_STAIRS">Snow Stairs</option> <option value="30" name="HAV_MAT_ELEVATOR">Elevator</option> </enum><option value="30" name="HAV_MAT_ELEVATOR">Elevator</option> <---- default path for sounds???? Notice something? There is no 31, meaning that for that red bouncy ball, a new HavokMaterial was created exclusively for that object. Now here's the hurdle and what I am stumped on: There is no .xml file in the FO3 .bsa files that have anything to do with Havok physics, or nif files.How would you define your own HavokMaterial? Does it have to be inside a .xml file? Is this information of the code above already imbeded in the nif file? Please post any thoughts or speculation on this matter. I came this far, I don't want to give up. Any assistance will be accredited for upon the mod's release. Link to comment Share on other sites More sharing options...
zaty1 Posted February 4, 2010 Share Posted February 4, 2010 Read your post, and quickly opened GECK to poke around and a few things come to mind/ or I noticed. 1) Both the rattle(CG01rattle), and the ball(CG01Toy05) appear to NOT be weapons, just miscellaneous items.2) There is both a PHYRubberball, and PHYBabyRattle listed - I presume, with their own custom sounds.3) In your list of sounds associated for havok material, starting at 0 and to 30 - I can only assume 31 = none.4) I would also assume they could name the nif.xml something else maybe, dunno. I'd start with changing the rattle or rubberball nif's to point to a legitimate material first in the 0-30 range to see if that adds/overides their current sounds and work from there. Disclaimer, its 3:30am and I've been staring at vertices for 5 hours, this was just a small break - if all this is hogwash, I apologize. :) Link to comment Share on other sites More sharing options...
Recommended Posts