Creating Muzzle Flash Effects
To create any visual effect, you need two things: a texture png and a json file that defines the effect.
The texture png should go in assets/pointblank/textures/effect. Since we’re creating a muzzle flash, the png is going to be a horizontal image with multiple sprites.
In Point Blank, usually muzzle flashes involve 9 total sprites, but you can actually have more if you want. Nonetheless, here’s what a 9-sprite muzzle flash texture looks like:

The json file for the visual effect goes in assets/pointblank/effects. It should be named whatever the name of your effect will be. Same name convention as your guns, so something like ‘packname_effectname’.
Inside the effect json, we’ll write code for muzzle flash. It looks like this:
{
"type": "muzzle_flash",
"name": "ba_purpleflash",
"texture": "textures/effect/ba_purpleflash.png",
"blendMode": "ADDITIVE",
"width": 1.3,
"duration" : 50,
"sprites": {
"type": "random",
"rows": 1,
"columns": 9,
"fps": 60
}
}This is everything.
The usual suspects are here, type and name. In a gun json, the type is gun. Here, the type is muzzle_flash. The name should correspond with the name of the json file. It’s also going to be the name you use when assigning an effect in the gun json.
"texture" defines the png file the effect will use. The name of the texture should be consistent with the name of the effect and the name of the effect json.
"blendMode": "ADDITIVE" makes the effect glow.
"width" defines the size of the effect.
"duration" is how long the effect lasts in milliseconds. 50 seems like a big number—it’s actually very fast in-game.
"sprites" is where the real work happens. Here, the json is essentially using the texture png as a sprite sheet for the muzzle flash. Since the png has 9 flash textures, we want 9 columns. If your image has 12 sprites, you want 12 columns. We have 1 row, because for a muzzle flash we don’t need more, and we also have fps (frames per second) but this option is more useful for animated effects. For muzzle flash, you can set it to 60 and safely ignore it. We also have type: random here which basically means: whenever the effect plays, it will choose one of the nine sprites in the image randomly. This ensures the muzzle flash in-game looks dynamic.
Once you have the json created, you need to assign its name to the effects section in the gun json, as shown in Effects Overview. It’ll look like this:
"effects": [
{
"phase": "firing",
"name": "ba_purpleflash"
}
]After this, you’re done. The gun will have a custom muzzle flash.
If you want to use the mod’s default muzzle flashes, you can use:
Regular muzzle flash:
{
"phase": "firing",
"name": "muzzle_flash"
}Big muzzle flash (same texture, physically larger):
{
"phase": "firing",
"name": "muzzle_flash_big"
}You can also use these muzzle flash effects in features if you want to attach conditions. Tutorial for this is in Muzzle Flash.