Tacz Js Wiki › Guides › Add Custom Attachments to a Gun
Add Custom Attachments to a Gun
Understanding Attachment Slots
Guns in TaCZ support multiple attachment points where players can equip scopes, grips, magazines, and other accessories. Define these slots in your gun's KubeJS configuration.
Creating Attachment Compatibility
Specify which attachment types your gun accepts:
- Scope slots: For aiming aids and magnification
- Grip slots: For handling and recoil reduction
- Magazine slots: For ammunition capacity upgrades
- Muzzle slots: For suppressors or flash hiders
- Custom slots: For mod-specific accessories
Each slot should reference existing TaCZ attachments or custom ones you've defined. You can limit how many attachments fit in each category or allow multiple items per slot.
Testing Attachment Integration
Once configured, load into your world and try equipping attachments to your gun. Verify that visual changes appear (scopes should render, grips should position correctly) and that stat modifications apply correctly. Check that incompatible attachments are properly rejected and that attachment removal works smoothly.