Importing Sounds
Once your gun assets are imported, the next step is adding the sound files the weapon will use.
If you’re recycling the base mod’s sounds, you don’t need to import anything. This page teaches you how to import and register new sounds the base mod doesn’t already have.
For sound importing, there are 2 parts:
gunsound.ogg This is the actual sound file. It goes in assets/pointblank/sounds. You’ll also likely have other sounds you created for the gun—for example in animations.
sounds.json This is the file that registers the sound so the game can use it. It goes in assets/pointblank.
Your pack structure should look like this:
packname/
assets/
pointblank/
sounds/
gunsound.ogg
sounds.jsonUse lowercase names and keep them consistent. Just like the other asset files, it is best to prefix them with your pack name so they stay unique.
Example:
cw_m16a1_fire.oggcw_m16a1_reload.ogg
Editing sounds.json
After placing the .ogg files in the sounds folder, open sounds.json and add entries for each sound.
Example:
{
"cw_m16a1_fire": {
"sounds": [
{
"name": "pointblank:cw_m16a1_fire",
"stream": false
}
]
},
"cw_m16a1_reload": {
"sounds": [
{
"name": "pointblank:cw_m16a1_reload",
"stream": false
}
]
}
}The object name at the top, such as cw_m16a1_fire, is the sound event name.
The name line should match the file name in the sounds folder, without the .ogg extension.
So if your file is:
assets/pointblank/sounds/cw_m16a1_fire.ogg
Then the matching registration line is:
"name": "pointblank:cw_m16a1_fire"
Where These Names Are Used
Once a sound is registered in sounds.json, you can reference that sound name in your weapon setup later.
The important part for importing is that the underlying sound file and sounds.json entry are set up correctly first. After that, those registered sounds can be assigned wherever the weapon configuration expects them.
If a sound does not play in game, the first thing to check is whether the file name and the sounds.json entry match exactly.