Skip to Content
FeaturesOverview

Features

Features are special things you can make the gun do. Stuff like conditionally hiding parts, adding firemodes like underbarrel launchers, and more.

Example code gun containing features:

{ "name": "packname_gunname", "type": "Gun", "maxAmmoCapacity": 30, "compatibleAmmo": [ "ammocreative", "ammo556" ], "damage": 5, "fireSound": "gunsoundfilename", "fireModes": [ "AUTOMATIC" ], "rpm": 700, "gunRecoilInitialAmplitude": 0.2, "shakeRecoilAmplitude": 0.35, "shakeRecoilSpeed": 2, "viewRecoilAmplitude": 1.2, "compatibleAttachmentGroups": [ "ar_muzzle", "ar_sightsandscopes", "underbarrel" ], "compatibleAttachments": [ "cantedrail" ], "defaultAttachments": [ "cantedrail" ], "features": [ ], "phasedReloads": [ ], "effects": [ ], "inspectAnimations": [ ], "idleAnimations": [ ], "drawAnimations": [ ] }

Inside the features block, you add sub-blocks. Here’s an example of a complete features block:

"features": [ { "type": "MuzzleFlash", "effects": [ { "phase": "firing", "name": "muzzle_flash_big" } ], "condition": { "allOf": [ { "isUsingDefaultMuzzle": true }, { "doesNotHaveAttachmentGroup": "ar_suppressors" } ] } }, { "type": "PartVisibility", "parts": [ { "name": "flipped", "visible": true, "condition": { "hasAttachmentGroup": "ar_sightsandscopes" } }, { "name": "fsflipped", "visible": true, "condition": { "hasAttachmentGroup": "ar_sightsandscopes" } }, { "name": "rearsight", "visible": false, "condition": { "hasAttachmentGroup": "ar_sightsandscopes" } }, { "name": "frontsight", "visible": false, "condition": { "hasAttachmentGroup": "ar_sightsandscopes" } } ] }, { "type": "Aiming", "zoom": 0.3, "condition": { "doesNotHaveAttachmentGroup": "ar_sightsandscopes" } }, { "type": "FireMode", "fireModes": [ { "name": "automatic", "displayName": "label.pointblank.fireMode.automatic", "type": "AUTOMATIC", "rpm": 650, "damage": 5, "shakeRecoilAmplitude": 0.35, "shakeRecoilSpeed": 2.0, "shakeRecoilDuration": 350, "enableFireModeAnimations": [ { "name": "animation.model.switch", "duration": 470 } ] }, { "name": "single", "displayName": "label.pointblank.fireMode.single", "type": "SINGLE", "rpm": 650, "damage": 5, "shakeRecoilAmplitude": 0.35, "shakeRecoilSpeed": 2.0, "shakeRecoilDuration": 350, "enableFireModeAnimations": [ { "name": "animation.model.switch", "duration": 470 } ] } ] }, { "type": "Sound", "fireSounds": [ { "sound": "ba_whitefang465_suppressed", "volume": 1, "condition": { "hasAttachmentGroup": "ar_suppressors" } } ] } ]

As you can see, there’s a lot that can go inside features. It can be overwhelming, so everything that goes in features will be talked about in multiple tutorials. On the next page, you’ll find a tutorial for the feature: part visibility.

Last updated on