Can't hear add-on vehicle sounds
-
Hey there, I've got an issue where you add a custom sound and you can hear it completely find when inside the car, but when you hop out the car you can not hear it. If you get someone to rev it you can't hear anything at all, although sometimes you hear a whooshing sound, depends if it has a turbo or not. But essentially the car is silent. I've tried changing some of the volume values in the files but it ends up corrupting the file etc. Does anyone know how to fix this issue so you can raise the volume or hear cars when your outside the vehicle/not in the vehicle.
-
@Brandino_19
You'll need to create or use a pre-existing 'vehicle_audio_name_here_npc.awc' with at least 'ENGINE_ACCEL', 'ENGINE_IDLE', 'EXHAUST_ACCEL' & 'EXHAUST_IDLE' '.wav's in it to go with the normal 'in the vehicle' engine sound. Do you have any '.rel' files with the custom engine sound? You'll need them to edit to tell the game what file to use for the '_npc.awc'.You'll need CodeWalker to edit '.rel' files (get from <that Discord link, version on gta5-mods is out of date & missing features you will need). Use CodeWalker to 'Export to XML...' (right-click '.rel' file) & edit with text editor of choice.
In the custom engine sound's '_game.dat151.rel.xml' these are the lines that will need to be filled:
Example ('mamba'):
<EngineAccelNPC>mamba_engine_accel_npc</EngineAccelNPC> <ExhaustAccelNPC>mamba_exhaust_accel</ExhaustAccelNPC>
'<ExhaustAccelNPC>' likely exists already in the '_sounds.dat54.rel.xml' file in an 'EnvironmentSound' section (it's used for normal 'in the car' sound & stuff like change in engine sound when going through a tunnel etc):
'_sounds.dat54.rel.xml' Example ('mamba'):
<Item type="EnvironmentSound"> <Name>mamba_exhaust_accel</Name> <Header> <Flags value="0x00008000" /> <Category>hash_F7C35252</Category> </Header> <UnkByte value="1" /> </Item>
but '<EngineAccelNPC>' may need a 'GranularSound' section created for it in the '_sounds.dat54.rel.xml' file, that defines what '_npc.awc' file it will use (see '<ContainerName>' lines):
'_sounds.dat54.rel.xml' Example ('mamba'):
<Item type="GranularSound"> <Name>mamba_engine_accel_npc</Name> <Header> <Flags value="0x00008001" /> <Flags2 value="0x9555AAAA" /> <Category>hash_F7C35252</Category> </Header> <WaveSlotIndex value="0" /> <Wave1> <ContainerName>dlc_apartment/mamba_npc</ContainerName> <FileName>engine_accel</FileName> </Wave1> <Wave2> <ContainerName>dlc_apartment/mamba_npc</ContainerName> <FileName>exhaust_accel</FileName> </Wave2> <Wave3> <ContainerName>0</ContainerName> <FileName /> </Wave3> <Wave4> <ContainerName>0</ContainerName> <FileName /> </Wave4> <Wave5> <ContainerName>dlc_apartment/mamba_npc</ContainerName> <FileName>engine_idle</FileName> </Wave5> <Wave6> <ContainerName>dlc_apartment/mamba_npc</ContainerName> <FileName>exhaust_idle</FileName> </Wave6> <DataItem1> <UnkFlags0 value="0" /> <UnkFlags1 value="0" /> <UnkByte0 value="0" /> <UnkByte1 value="0" /> <UnkFloat value="0.5" /> </DataItem1> <DataItem2> <UnkFlags0 value="1" /> <UnkFlags1 value="0" /> <UnkByte0 value="0" /> <UnkByte1 value="0" /> <UnkFloat value="0.5" /> </DataItem2> <DataItem3> <UnkFlags0 value="0" /> <UnkFlags1 value="0" /> <UnkByte0 value="0" /> <UnkByte1 value="1" /> <UnkFloat value="1" /> </DataItem3> <DataItem4> <UnkFlags0 value="1" /> <UnkFlags1 value="0" /> <UnkByte0 value="0" /> <UnkByte1 value="1" /> <UnkFloat value="1" /> </DataItem4> <DataItem5> <UnkFlags0 value="0" /> <UnkFlags1 value="1" /> <UnkByte0 value="0" /> <UnkByte1 value="0" /> <UnkFloat value="1" /> </DataItem5> <DataItem6> <UnkFlags0 value="1" /> <UnkFlags1 value="1" /> <UnkByte0 value="0" /> <UnkByte1 value="0" /> <UnkFloat value="1" /> </DataItem6> <UnkFloat0 value="0.01" /> <UnkFloat1 value="0.05" /> <UnkShort0 value="0" /> <UnkShort1 value="0" /> <UnkShort2 value="0" /> <UnkShort3 value="0" /> <UnkShort4 value="-600" /> <UnkShort5 value="0" /> <TrackName>mamba_engine_accel</TrackName> <UnkVecData> 13.5, 49 13, 13 </UnkVecData> </Item>
Alternatively, entering the values of a pre-existing vehicle in the '<EngineAccelNPC>/<ExhaustAccelNPC>' lines for your vehicle in it's '_game.dat151.rel.xml' will work. Just pick something that roughly sounds like it:
Example ('mamba' edited to 'nightshade'):
<EngineAccelNPC>nightshade_engine_accel_npc</EngineAccelNPC> <ExhaustAccelNPC>nightshade_exhaust_accel</ExhaustAccelNPC>
That's the rough basics of it anyway. If you click my username, there are engine sound tutorials linked at the top of my profile. They have a lot more detail in them. Worth having a read over. Any issues/specific questions tho, feel free to give me a shout