
In **Crunch Element**, I designed a deeply modular weapon and loadout framework that ties player progression, kills, and levels into unlocking new tools of destruction—and then lets you kit them out with parts and mounts to match your playstyle, all in VR and fully network-synced.
### Key Highlights
**Three Fully Independent Loadouts**
Each loadout has six slots:
1. **Primary Weapon** (rifles, shotguns)
2. **Secondary Weapon** (pistols)
3. **Primary Equipment** (grenade launcher, modular turret, deployable shield, and breaching hammer)
4. **Secondary Equipment** (grenades and consumables)
5. **Hat** _(purely cosmetic)_
6. **Armor** _(stat bonuses & protection)_
**Progression: Kills vs. XP vs. Challenges**
- **Kill Counts** drive **weapon & equipment progression.** Hit kill milestones to unlock new parts such as attachments, ammo types, and modifications.
- **XP Levels** unlock new items that can be equipped in any loadout.
- **Unique Challenges** (headshot streaks, speed runs, stealth runs) unlock **cosmetic-only** hats.
**Modular Mount & Part System**
- Weapons expose multiple **Mount Points**: under-barrel, top rail, side rails.
- **Attachable Parts** spawn in-world:
- **Grips** (reduce recoil spread)
- **Optics** (variable zoom, FOV)
- **Muzzle Devices** (compensators and suppressors)
- **Ammo Types** (determines projectile characteristics via the magazines that spawn)
- **Utility** (enemy scanner, lasers, etc)
### Behind the Tech
**Data-Driven Definitions**
- **ScriptableObjects** for weapons, equipment, parts, mounts, and unlock requirements—kept decoupled so designers can add new gear without touching code. They are also loaded via Unity's addressable system.
**Network-Synced Loadouts**
- Loadout selections and in-game attachments sync via **Photon PUN 2**.
- **Client prediction** gives you instant visual feedback; the master client reconciles authoritative state.
**Flexible Stat Pipeline**
- Base stats (fire rate, damage, recoil) come from SOs. Each attached part applies additive/multiplicative modifiers through a lightweight event system on equip/unequip.