Skip to content

Attachment Slots: Sight, Grip, Tactical, Barrel

Attachment slots are the configuration layer that lets players and modders extend a firearm's behavior without altering the base gun asset. An attachment that does not seat correctly, references the wrong slot type, or has a misplaced hook on the weapon prefab will either refuse to equip at all or will float visually at the wrong position — both of which are common first-time errors that take disproportionate debugging time to find.

This reference covers all four attachment slot types in the 57 Studios™ modding documentation for Unturned™: Sight, Grip, Tactical, and Barrel. For each slot, the article documents the full set of .dat fields, the correct Unity prefab hook name, the relationship between the attachment's slot type and the weapon's hook GameObject, the caliber compatibility system, and the per-slot pro variant configuration. A compatibility table, a full authoring checklist, and a common-mistake diagnostic section close the article.

Modders who are building a gun mod from scratch should read Gun Mod Tutorial first. This article assumes the gun prefab is built and the base gun .dat is authored.

Sight, Grip, Tactical, and Barrel attachments mounted on a rifle in the Unturned inventory

What you will learn

  • The four attachment slot types and what each one governs in gameplay.
  • The .dat fields required on the attachment side for each slot type.
  • The .dat fields required on the gun side to enable each slot.
  • How to position each hook GameObject in Unity for correct visual and functional behavior.
  • How the caliber compatibility system restricts which attachments a gun accepts.
  • How Pro variant configuration works for each slot.
  • A complete authoring workflow, checklist, and diagnostic table for the most common slot errors.

How the attachment system works

Unturned™'s attachment system is a two-sided linkage. The gun specifies which attachment slots exist on it (by whether the corresponding .dat field is present) and which hook GameObjects exist in its prefab. The attachment specifies which slot type it occupies. At runtime, the engine checks that the attachment's slot type matches a supported slot on the gun, that caliber compatibility passes, and that the named hook GameObject exists in the weapon prefab.

Gun.dat
  Sight    [uint16 default ID]   ──►  Hook_Sight  (GameObject in prefab)
  Grip     [uint16 default ID]   ──►  Hook_Grip   (GameObject in prefab)
  Tactical [uint16 default ID]   ──►  Hook_Tactical (GameObject in prefab)
  Barrel   [uint16 default ID]   ──►  Hook_Barrel (GameObject in prefab)

If a hook GameObject is missing from the prefab, the attachment equips as an item effect but has no visual representation — the attachment "works" statistically but appears invisible. If the hook exists but is at the wrong position, the attachment snaps to the wrong location on the weapon. Both are considered bugs.

Attachment linkage sequence

Pro tip

Author all four hook GameObjects (Hook_Sight, Hook_Grip, Hook_Tactical, Hook_Barrel) in every gun prefab, even if the gun will not ship with all four slots enabled in its .dat. Adding the hooks to the prefab costs nothing and makes future attachment support a .dat change rather than a bundle rebuild.

Attachment slot state transitions

Each slot on a gun can be in one of three states at any given time: empty (no attachment equipped), occupied (attachment installed), or restricted (slot not declared in .dat). The following diagram shows the valid transitions between states and what triggers each:

Understanding these transitions matters when designing loot table behavior. A gun with Sight 0 spawns in the Empty state; a gun with Sight 4001 spawns in the Occupied state with item 4001 installed. The player can always move the slot from Occupied back to Empty by removing the attachment; the attachment drops as a separate inventory item.

Slot type enum reference

Slot type stringUsed in fieldSlot purpose
SightType Sight in attachment .datOptics and iron sights. Occupies Hook_Sight.
GripType Grip in attachment .datForegrips and vertical grips. Occupies Hook_Grip.
TacticalType Tactical in attachment .datFlashlights, lasers, combo lights. Occupies Hook_Tactical.
BarrelType Barrel in attachment .datSuppressors, compensators, flash hiders. Occupies Hook_Barrel.

Sight slot

The Sight slot is the most-requested attachment type in community modding. It controls what optic or iron sight the player sees when aiming down sights (ADS). A sight attachment replaces the default iron sight alignment with its own Distance parameter and optional zoom.

Sight .dat fields

FieldTypeRequiredDefaultPurpose
IDuint16YesUnique item ID. Choose 50000+ to avoid collisions.
GUIDuint128Yes128-bit GUID. Generate with any UUID tool; remove hyphens.
TypeenumYesMust be Sight.
NamestringYesInternal name (no spaces).
RarityenumYesCommonCommon, Uncommon, Rare, Epic, Legendary, Mythical.
SlotenumYesMust be None (attachments do not occupy a primary/secondary slot).
Size_Xuint8YesInventory grid width.
Size_Yuint8YesInventory grid height.
Caliberuint16Yes0Caliber compatibility. Must match gun's Caliber to equip. 0 = universal.
DistancefloatNo200The ADS focus distance in meters. Affects the sight picture's focal plane.
ZoomfloatNo1.0The magnification multiplier in ADS. 1.0 = no zoom. 4.0 = 4× zoom.
Ballistic_DropfloatNoOverride the gun's ballistic drop when this sight is equipped.
Ballistic_Stepsuint8NoOverride the gun's ballistic steps when this sight is equipped.
Spread_Multiplier_ADSfloatNo1.0Multiplier on Spread_Aim when this sight is equipped. Values below 1.0 tighten spread.
Recoil_XfloatNo1.0Multiplier on horizontal recoil when this sight is equipped.
Recoil_YfloatNo1.0Multiplier on vertical recoil when this sight is equipped.
HolographicflagNoabsentWhen present, the sight uses the holographic reticle rendering path rather than the scope rendering path.
Night_VisionflagNoabsentWhen present, the sight activates night-vision post-processing when ADS.
ShakeflagNoabsentWhen present, a camera shake is applied while the sight is equipped.
ProflagNoabsentWhen present, the attachment is included in the Pro variant drop pool.

Sight .dat example

ID 50001
GUID a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
Type Sight
Name MyScope_4x
Rarity Uncommon
Slot None
Size_X 2
Size_Y 1

Caliber 0
Distance 200
Zoom 4.0
Spread_Multiplier_ADS 0.7
Recoil_X 0.9
Recoil_Y 0.9

Sight hook placement

The Hook_Sight GameObject must be positioned on the weapon prefab at the location where the optic base will mount — typically at the top of the receiver rail. Its forward axis should align with the weapon's bore line.

Common mistake

Placing Hook_Sight at the muzzle flash position instead of the receiver rail. The muzzle and the sight rail are different points on the weapon. A scope mounted at the muzzle position will appear to float 40–60 cm in front of the weapon in-game.

Zoom values by optic type

Optic classRecommended ZoomRecommended Distance
Iron sight1.5100
Red dot / reflex1.75150
Holographic1.75150
2× short-range scope2.0200
4× mid-range scope4.0300
8× long-range scope8.0500
16× extreme-range scope16.0800

Scope optic positioned at the Hook_Sight GameObject in Unity prefab view

Grip slot

The Grip slot controls foregrips and vertical grips that modify the weapon's recoil profile and spread characteristics. A grip does not change the weapon's visual aim behavior — it changes the statistical output of each shot.

Grip .dat fields

FieldTypeRequiredDefaultPurpose
IDuint16YesUnique item ID.
GUIDuint128Yes128-bit GUID.
TypeenumYesMust be Grip.
NamestringYesInternal name.
RarityenumYesCommonRarity tier.
SlotenumYesMust be None.
Size_X / Size_Yuint8YesInventory footprint.
Caliberuint16Yes0Caliber compatibility. 0 = universal.
Recoil_XfloatNo1.0Multiplier on horizontal recoil. Values below 1.0 reduce horizontal kick.
Recoil_YfloatNo1.0Multiplier on vertical recoil. Values below 1.0 reduce muzzle rise.
SpreadfloatNo1.0Multiplier on Spread_Hip. Values below 1.0 tighten hip-fire spread.
SwayfloatNo1.0Multiplier on weapon sway while held. Values below 1.0 steady the weapon.
Aiming_Movement_Speed_MultiplierfloatNo1.0Multiplier on movement speed while ADS. Values below 1.0 slow ADS movement.
ProflagNoabsentPro variant eligibility.

Grip .dat example

ID 50010
GUID b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7
Type Grip
Name MyVerticalGrip
Rarity Common
Slot None
Size_X 1
Size_Y 2

Caliber 0
Recoil_X 0.85
Recoil_Y 0.80
Spread 0.90
Sway 0.80

Grip hook placement

The Hook_Grip GameObject must be positioned at the underside of the weapon's fore-end or handguard rail — the physical location where a vertical foregrip would attach. Its local Y axis should point downward (away from the bore line).

Pro tip

Most rifles use a standard Picatinny rail section under the handguard. Position Hook_Grip approximately 15–20 cm behind the muzzle along the bore axis and 3–4 cm below it. Match the vanilla AK or M4 prefab positioning for a realistic reference baseline.

Grip balance reference

Grip classRecoil_XRecoil_YSpreadSway
Stub foregrip (minimal)0.950.950.950.95
Vertical foregrip (standard)0.850.800.900.80
Angled foregrip0.900.850.950.85
Bipod (deployed)0.600.550.700.50
Weighted handguard0.880.880.880.88

Balance consideration

Combining a grip with Recoil_Y 0.55 and a barrel with negative recoil modifiers can produce a gun that is statistically superior to every vanilla weapon of the same class. The 57 Studios™ cohort recommendation is to tune grips so that the modified gun outperforms the unmodified version by 10–20%, not 40–50%.

Tactical slot

The Tactical slot covers flashlights, laser sights, and combined light/laser units. A tactical attachment can project a visible light cone, a visible laser dot, or both. The projection characteristics are controlled by .dat fields, not by the Unity prefab's light component — the game engine handles the light rendering from the .dat data.

Tactical .dat fields

FieldTypeRequiredDefaultPurpose
IDuint16YesUnique item ID.
GUIDuint128Yes128-bit GUID.
TypeenumYesMust be Tactical.
NamestringYesInternal name.
RarityenumYesCommonRarity tier.
SlotenumYesMust be None.
Size_X / Size_Yuint8YesInventory footprint.
Caliberuint16Yes0Caliber compatibility. 0 = universal.
LightflagNoabsentWhen present, the attachment projects a flashlight cone.
LaserflagNoabsentWhen present, the attachment projects a visible laser dot.
RangefinderflagNoabsentWhen present, the attachment shows range to crosshair target in the HUD.
SpotlightflagNoabsentWhen present, a high-intensity directional spotlight is used instead of a standard flashlight cone.
ProflagNoabsentPro variant eligibility.

Tactical .dat example — laser/light combo

ID 50020
GUID c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8
Type Tactical
Name MyLaserLight
Rarity Uncommon
Slot None
Size_X 2
Size_Y 1

Caliber 0
Light
Laser

Tactical .dat example — rangefinder

ID 50021
GUID d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9
Type Tactical
Name MyRangefinder
Rarity Rare
Slot None
Size_X 2
Size_Y 1

Caliber 0
Rangefinder

Tactical hook placement

The Hook_Tactical GameObject must be positioned on the weapon's underside rail, typically 8–12 cm behind the muzzle. For rifles with a long handguard, position it at the midpoint of the handguard. The forward axis should align with the bore direction — the light cone and laser beam project along this axis.

Common mistake

Placing Hook_Tactical at the same position as Hook_Grip. A weapon that has both a foregrip and a flashlight will have both attachments competing for the same rail position, visually intersecting. Hook_Tactical should be approximately 5–8 cm closer to the muzzle than Hook_Grip.

Tactical attachment behavior matrix

Field presentVisual resultGameplay effect
Light onlyWhite flashlight cone in front of weaponIlluminates dark areas for the user and nearby players
Laser onlyThin laser beam, dot on surfaceDot visible to all players including enemies
Light + LaserBoth cone and beamDual functionality
Rangefinder onlyNo visible projectionHUD range readout to crosshair target
Spotlight onlyNarrow high-intensity coneLonger-range illumination; narrower than flashlight

Laser visibility

The Laser flag makes the beam visible to all players on the server, including enemy players. This is intentional gameplay design. Document this clearly in your mod's Steam Workshop description so players know the laser betrays their position.

Barrel slot

The Barrel slot is the most statistically powerful attachment slot. Barrel attachments (suppressors, compensators, flash hiders, muzzle brakes) can modify the weapon's spread, recoil, range, audio category, and muzzle flash visibility simultaneously.

Barrel .dat fields

FieldTypeRequiredDefaultPurpose
IDuint16YesUnique item ID.
GUIDuint128Yes128-bit GUID.
TypeenumYesMust be Barrel.
NamestringYesInternal name.
RarityenumYesCommonRarity tier.
SlotenumYesMust be None.
Size_X / Size_Yuint8YesInventory footprint.
Caliberuint16Yes0Caliber compatibility. Must match gun's Caliber or be 0 for universal.
DurabilityfloatNo1.0The barrel's durability. Reduces over shots fired.
SpreadfloatNo1.0Multiplier on gun's Spread_Hip and Spread_Aim.
Ballistic_DropfloatNoOverride the gun's ballistic drop when this barrel is equipped.
Ballistic_Stepsuint8NoOverride the gun's ballistic steps.
Recoil_XfloatNo1.0Multiplier on horizontal recoil.
Recoil_YfloatNo1.0Multiplier on vertical recoil.
BrakedflagNoabsentWhen present, the muzzle blast is redirected (muzzle brake / compensator behavior). Reduces Recoil_Y.
SilencedflagNoabsentWhen present, the audio category is switched to the silenced variant and muzzle flash is suppressed.
VolumefloatNo1.0Multiplier on the gun's fire audio volume. Values below 1.0 reduce volume. Has no effect without Silenced.
ProflagNoabsentPro variant eligibility.

Barrel .dat example — suppressor

ID 50030
GUID e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Type Barrel
Name MySuppressor
Rarity Rare
Slot None
Size_X 3
Size_Y 1

Caliber 0
Spread 1.05
Recoil_Y 0.90
Silenced
Volume 0.3
Durability 0.98

Barrel .dat example — compensator

ID 50031
GUID f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1
Type Barrel
Name MyCompensator
Rarity Uncommon
Slot None
Size_X 2
Size_Y 1

Caliber 0
Spread 1.0
Recoil_X 0.80
Recoil_Y 0.85
Braked

Barrel hook placement

The Hook_Barrel GameObject must be positioned at the muzzle threading of the weapon — the forward tip of the barrel. Its forward axis must align with the bore direction. The barrel attachment model will extend forward from this point.

Common mistake

Setting Hook_Barrel at the midpoint of the barrel rather than at the muzzle tip. A suppressor mounted at the barrel midpoint will overlap the barrel geometry visually and extend only halfway past the muzzle. Position Hook_Barrel at the physical barrel exit.

Barrel balance reference

Barrel classSpreadRecoil_XRecoil_YSilenced
Flash hider0.951.01.0absent
Muzzle brake1.050.750.85absent
Compensator1.00.800.80absent
Lightweight suppressor1.051.00.95present
Heavy suppressor1.101.00.90present
Barrel extension0.981.01.0absent

Suppressor audio behavior

When Silenced is present, Unturned™ switches the gun's fire audio from its configured Shoot category to the corresponding suppressed audio category. The suppressed audio categories are internal to the engine. If the gun uses a custom Shoot audio category without a corresponding suppressed variant, the audio will fall back to the default suppressed tone, which may not match the gun's character.

Pro tip

If authoring a suppressor for a gun with a custom audio category, also author a suppressed audio variant bundle. See Audio Packaging for Unturned for the workflow. Without a matching suppressed variant, the gun will sound generic when suppressed regardless of the custom fire audio.

Suppressor durability curve

The cohort-validated durability curve for a suppressor is Durability 0.97 — the suppressor loses 3% of one durability unit per shot. At this rate a suppressor survives approximately 33 shots per durability unit. For a suppressor with the default maximum durability, this yields a realistic service life without degrading so fast that the attachment feels disposable.

Barrel attachment decision tree

Use the following decision tree when choosing which barrel type to author for a weapon mod:

Caliber compatibility system

Caliber compatibility is the mechanism by which the game restricts which attachments can be equipped on which guns. The system uses a simple integer match: the gun's Caliber field must equal the attachment's Caliber field. If either value is 0, the attachment is treated as universal and can be equipped on any gun regardless of caliber.

Caliber compatibility table for common vanilla calibers

Gun caliber valueCompatible attachments
0Any attachment with Caliber 0 or Caliber 0
1 (9mm class)Attachments with Caliber 1 or Caliber 0
2 (5.56mm class)Attachments with Caliber 2 or Caliber 0
3 (7.62mm class)Attachments with Caliber 3 or Caliber 0
4 (12 gauge class)Attachments with Caliber 4 or Caliber 0
Custom (50000+)Attachments with matching custom caliber or Caliber 0

Pro tip

When authoring a full mod weapon family (e.g., a pistol, SMG, and carbine that all fire the same round), assign all three guns the same custom Caliber value (e.g., 50001) and author all barrel/grip/sight attachments with that same caliber. This creates a consistent attachment ecosystem without interfering with vanilla weapon attachment pools.

Per-slot prefab hook reference

Slot typeRequired hook namePosition referenceForward axis
SightHook_SightTop of receiver railBore direction
GripHook_GripUnderside of handguardDownward from bore
TacticalHook_TacticalUnderside rail, mid-handguardBore direction
BarrelHook_BarrelMuzzle tipBore direction
MagazineHook_MagazineMagazine wellDownward

The hook names are case-sensitive. hook_sight will not work; Hook_Sight is required. Confirm the casing in the Unity hierarchy before building the bundle.

Case sensitivity

Unity's hierarchy is case-sensitive for runtime name lookups. A hook named hook_barrel (lowercase h) will not be found by the runtime. Use the exact capitalization in the table above.

Annotated weapon prefab in Unity Scene view showing all four Hook_ GameObject positions

Hook positioning diagram

The following diagram illustrates the approximate physical location of each hook on a standard rifle geometry, moving from stock to muzzle:

For pistols the geometry is compressed — the sight hook sits atop the slide, the grip hook is absent (pistols rarely have fore-grip rails), and the barrel hook is at the muzzle of the shorter barrel. The tactical hook on a pistol typically sits on the dust-cover rail below the barrel.

Pistol vs. rifle hook positions

Pistols frequently omit Hook_Grip entirely because no foregrip attaches to a pistol frame in standard gameplay. Include Hook_Grip in the pistol prefab if the design calls for an exotic foregrip variant, but omit the Grip field from the .dat to keep the slot hidden from players.

Pro variant configuration

Pro variants are enhanced cosmetic (and occasionally statistical) versions of attachments that appear in the Pro drop pool. Enabling Pro on an attachment adds it to the drop pool without removing it from normal loot tables.

FieldBehavior
Pro (flag, no value)Item is included in the Pro drop pool

Absent Pro flag: item only appears in normal loot tables and direct spawning. Pro variants do not require separate .dat files; they are flagged variants of the same item.

Common mistakes diagnostic table

SymptomMost likely causeResolution
Attachment equips but is invisibleHook GameObject missing from prefabAdd Hook_<Type> to prefab, rebuild bundle
Attachment refuses to equip at allCaliber mismatch between gun and attachmentSet attachment Caliber 0 (universal) or match gun caliber value
Attachment equips at wrong positionHook at wrong local position in prefabReposition hook in Unity, rebuild bundle
Attachment equips at wrong angleHook forward axis not aligned with boreRotate hook to align forward axis with bore
Two attachments interpenetrate visuallyHooks at same or overlapping positionsSeparate hook positions: tactical 5–8 cm ahead of grip
Suppressor equips but gun still sounds loudSilenced flag absent from barrel .datAdd Silenced flag to barrel .dat
Scope zoom does not activateZoom field absent or set to 1.0Set Zoom to desired magnification value (e.g., 4.0)
Laser invisible in-gameLaser flag absent from tactical .datAdd Laser flag to tactical .dat
Flashlight invisible in-gameLight flag absent from tactical .datAdd Light flag to tactical .dat
Grip has no effect on recoilRecoil_X and Recoil_Y both 1.0Set values below 1.0 to reduce recoil
Barrel causes spread to widen instead of tightenSpread value above 1.0Set Spread below 1.0 (e.g., 0.9) to tighten
Night vision scope does not activateNight_Vision flag absentAdd Night_Vision flag to sight .dat
Rangefinder shows no distanceRangefinder flag absentAdd Rangefinder flag to tactical .dat

Full attachment authoring workflow

Frequently asked questions

Can one attachment occupy multiple slots at once?

No. Each attachment has exactly one Type field and occupies exactly one slot. An attachment that claims to be both Sight and Tactical is not a supported configuration. The cohort workaround for a scope with a laser (a common real-world configuration) is to author them as two separate attachments — a scope for the Sight slot and a laser for the Tactical slot — and to let players equip both.

Can a gun have no attachment slots at all?

Yes. If the gun's .dat omits all four attachment fields (Sight, Grip, Tactical, Barrel), the gun accepts no attachments. This is a valid design choice for single-shot melee-range weapons, certain special weapons, or early-game items intended to be stat-neutral.

How do I make a suppressor that only fits my custom gun?

Set both the gun's Caliber field and the suppressor's Caliber field to the same custom value (use a value above 50000 to avoid vanilla collisions). Any other attachment with Caliber 0 will still be compatible with the gun. If you want a fully exclusive suppressor, set the gun's caliber to a unique custom value and set the suppressor to the same value with no other attachments sharing that value.

What is the Durability field on barrel attachments?

Durability controls how quickly the barrel attachment degrades from use. A value of 1.0 means the attachment loses 1 durability point per relevant action. A value of 0.5 means it degrades at half the rate. A value of 0.0 means the attachment is indestructible. The default is 1.0. Suppressors typically use a lower durability value to model erosion of the suppressor baffles over time.

Does the Holographic flag on a sight change any statistics?

No. The Holographic flag only changes the rendering path for the optic — it switches from the standard scope overlay to the holographic overlay. There is no statistical difference. Use it when the attachment model is a holographic sight (e.g., EOTech-style) rather than a magnified scope, so the in-game optic visual matches the physical model.

Can I use a negative Recoil_X or Recoil_Y value to completely eliminate recoil?

The fields accept float values including zero. Setting Recoil_X 0.0 eliminates horizontal recoil entirely. Setting Recoil_Y 0.0 eliminates vertical recoil. The cohort recommendation is to avoid these extremes for publicly released mods — zero-recoil configurations produce unfair gameplay advantages that hurt server reputation and mod longevity.

What happens if Hook_Sight is present but the gun .dat has no Sight field?

The hook exists in the prefab but is never used. The gun will not accept sight attachments at runtime because the Sight field is absent from the gun's .dat. The hook's presence in the prefab is harmless — it simply waits unused. To enable sight attachment support, add Sight 0 to the gun .dat (0 = no default sight).

Can a tactical attachment combine Light, Laser, and Rangefinder simultaneously?

Yes. All three flags can be present in the same tactical .dat. The result is an attachment that projects a flashlight cone, a visible laser, and displays a range readout in the HUD. This is a valid configuration for an advanced multi-function tactical unit.

Why does my suppressor equip but the gun is still audible at range?

The Silenced flag reduces the audio volume and switches the audio category to the suppressed variant, but it does not make the gun inaudible. Unturned's™ audio propagation model still transmits suppressed gunshot sounds at reduced range. If the goal is full audio removal, that requires a source-code modification outside the scope of standard modding.

Can I override ballistic drop per-sight for a sniper-class scope?

Yes. The Ballistic_Drop and Ballistic_Steps fields on a sight .dat override the gun's corresponding fields while that sight is equipped. A long-range scope can reduce Ballistic_Drop to 0.02 to model a flatter trajectory for players using the optic at range, making the sight functionally a ballistic upgrade as well as a visual one.

What is the smallest-footprint sight a player can carry?

There is no engine-enforced minimum inventory size. However, the cohort recommendation is to make sight items at least Size_X 1 and Size_Y 1 (one slot). Smaller than one slot is not supported. The largest practical sight is Size_X 3, Size_Y 1 for a long scope.

Does the Pro flag affect drop rates in vanilla loot tables?

The Pro flag makes the attachment eligible for the Pro variant drop pool, which is a separate loot tier from the normal loot table. Normal loot tables are unaffected by the Pro flag. The attachment will still appear in normal loot if configured in the map's spawn tables. Pro only adds it to an additional drop source.

Appendix A: Attachment slot .dat field summary

FieldSightGripTacticalBarrel
IDRequiredRequiredRequiredRequired
GUIDRequiredRequiredRequiredRequired
TypeSightGripTacticalBarrel
SlotNoneNoneNoneNone
Caliber0 or custom0 or custom0 or custom0 or custom
DistanceYes
ZoomYes
HolographicYes
Night_VisionYes
Spread_Multiplier_ADSYes
Recoil_XYesYesYes
Recoil_YYesYesYes
SpreadYesYes
SwayYes
LightYes
LaserYes
RangefinderYes
SpotlightYes
SilencedYes
VolumeYes
DurabilityYes
BrakedYes
ProYesYesYesYes

Appendix B: Hook GameObject naming reference

Hook nameSlot it servesPosition on weapon
Hook_SightSight slotTop of receiver rail
Hook_GripGrip slotUnderside handguard rail
Hook_TacticalTactical slotUnderside rail, mid-handguard
Hook_BarrelBarrel slotMuzzle tip
Hook_MagazineMagazine (not an attachment slot)Magazine well

Case-sensitive naming

All hook names must be spelled and capitalized exactly as shown. The engine performs a case-sensitive string match. hook_Sight, HookSight, and Hook_sight will all fail to resolve at runtime.

Appendix C: Attachment authoring pre-bundle checklist

Complete this checklist before building the master bundle for any attachment mod. Catching errors at this stage avoids a full bundle rebuild cycle.

Attachment .dat file

  • [ ] ID is in the 50000+ range and does not conflict with vanilla or other loaded mods.
  • [ ] GUID is a valid 32-character hex string with no hyphens.
  • [ ] Type matches the intended slot: Sight, Grip, Tactical, or Barrel.
  • [ ] Slot is set to None.
  • [ ] Caliber is 0 (universal) or matches the target gun's Caliber field exactly.
  • [ ] All float fields use period (.) as the decimal separator, not a comma.
  • [ ] No banned field names from deprecated API surface are used (confirm against https://docs.smartlydressedgames.com/en/stable/).
  • [ ] Sight attachments: Zoom is present and set to a value greater than or equal to 1.0.
  • [ ] Barrel attachments: Silenced flag is present if this is a suppressor; absent if it is not.
  • [ ] Barrel attachments: Durability is present and set to a value less than 1.0 for degradable attachments.

Gun .dat file (if adding slot support to an existing gun)

  • [ ] The correct slot field is present (Sight, Grip, Tactical, Barrel).
  • [ ] The default attachment ID in the slot field is 0 (no default) or a valid item ID that exists in the bundle.
  • [ ] Caliber field value matches the attachment's Caliber field if a non-zero caliber restriction is intended.

Unity prefab

  • [ ] Hook_Sight exists in the hierarchy (if Sight slot is enabled in .dat).
  • [ ] Hook_Grip exists in the hierarchy (if Grip slot is enabled in .dat).
  • [ ] Hook_Tactical exists in the hierarchy (if Tactical slot is enabled in .dat).
  • [ ] Hook_Barrel exists in the hierarchy (if Barrel slot is enabled in .dat).
  • [ ] All hook names use the exact casing shown: capital H, underscore, capital first letter of slot name.
  • [ ] No two hooks share the same local position.
  • [ ] All hooks have their forward (Z) axis aligned with the weapon bore direction.
  • [ ] The attachment's own prefab is assigned to the asset bundle in Unity.
  • [ ] The attachment prefab has a mesh renderer and the correct material assigned.

English.dat

  • [ ] Name field is present and matches the display name intended for the inventory tooltip.
  • [ ] Description field is present with the attachment's flavor or gameplay-information text.

Post-build

  • [ ] Bundle .unity3d file is copied to the mod's Bundles/ folder alongside the .dat files.
  • [ ] Attachment equips correctly when tested in single-player with @give <ID>.
  • [ ] Attachment sits at the correct visual position on the weapon with no clipping.
  • [ ] All slot-specific behaviors are verified: zoom on sights, laser/light on tactical, silenced audio on suppressors, recoil reduction on grips.

Appendix D: Vanilla attachment caliber mapping

Caliber valueRound familyTypical guns
0UniversalAll guns accept caliber-0 attachments
1Pistol-classColt, Timberwolf, Ace
2Rifle-classZubeknakov, Maplestrike, Nykorev
3Precision-classTimberwolf, Grizzly, CheyTac
4Shotgun-classBluntforce, Snayperskya, double barrel
5PDW-classHoneybadger, Kraken

These values are documented against the stable Unturned™ release. Confirm current values against the Smartly Dressed Games modding documentation before shipping a caliber-restricted attachment set.

Caliber values change between updates

Smartly Dressed Games occasionally adjusts vanilla caliber groupings during major updates. Before releasing a caliber-restricted attachment set, verify the target gun's current Caliber value in its vanilla .dat file inside the Unturned install directory at Bundles/Items/Guns/<weaponName>/. Do not rely solely on this table for caliber values; treat it as a starting reference.

Cross-references

Document history

VersionDateAuthorNotes
1.02025-01-1057 StudiosInitial publication. All four attachment slot types documented.
1.12025-03-2257 StudiosAdded caliber compatibility flowchart and pro variant table.
1.22025-05-1857 StudiosAdded diagnostic table, hook naming appendix, workflow flowchart.