{
  "slot_limits": {
    "Melee": {
      "Cell":  { "max": 1, "optional": true },
      "Edge":  { "max": 1, "optional": false },
      "Grip":  { "max": 1, "optional": false }
    },
    "Ranged": {
      "Chamber":   { "max": 1, "optional": false },
      "Targeting": { "max": 1, "optional": false },
      "Grip":      { "max": 1, "optional": false }
    },
    "Lightsaber": {
      "Crystal":    { "max": 1, "optional": false, "acquisition": "quest_only" },
      "Emitter":    { "max": 1, "optional": false },
      "Lens":       { "max": 1, "optional": false },
      "Power Cell": { "max": 1, "optional": false },
      "Grip":       { "max": 1, "optional": false }
    }
  },
  "weapon_upgrades": [
    { "name": "Energy Cell I",              "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "+1 Energy damage." },
    { "name": "Energy Cell II",             "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 1500, "min_level": 6,  "is_legendary": false, "effect": "+1d4 Energy damage." },
    { "name": "Energy Cell III",            "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 3000, "min_level": 9,  "is_legendary": false, "effect": "+1d6 Energy damage." },
    { "name": "Ion Cell I",                 "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 300,  "min_level": 2,  "is_legendary": false, "effect": "+1 Energy damage vs. droids." },
    { "name": "Ion Cell II",                "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 1250, "min_level": 5,  "is_legendary": false, "effect": "+2 Energy damage vs. droids; +1 Energy damage vs. any enemy." },
    { "name": "Ion Cell III",               "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 4000, "min_level": 10, "is_legendary": false, "effect": "+1d6 Energy damage vs. droids; +1d4 Energy damage vs. any enemy." },
    { "name": "Vibration Cell I",           "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 1000, "min_level": 5,  "is_legendary": false, "effect": "-1 to attack rolls. +1d4 Sonic damage vs. armored targets." },
    { "name": "Vibration Cell II",          "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 2000, "min_level": 7,  "is_legendary": false, "effect": "-1 to attack rolls. +1d6 Sonic damage vs. armored targets." },
    { "name": "Vibration Cell III",         "compatible_weapon_type": "Melee",     "slot": "Cell",       "cost_credits": 4000, "min_level": 10, "is_legendary": false, "effect": "-1 to attack rolls. +1d6 Sonic damage. On critical hit, add +1d6 damage." },
    { "name": "Ionite Edge",                "compatible_weapon_type": "Melee",     "slot": "Edge",       "cost_credits": 750,  "min_level": 4,  "is_legendary": false, "effect": "+2 Ion damage vs. droids." },
    { "name": "Neutronium Edge",            "compatible_weapon_type": "Melee",     "slot": "Edge",       "cost_credits": 800,  "min_level": 6,  "is_legendary": false, "effect": "Ignore kinetic resistance." },
    { "name": "Mullinine Edge",             "compatible_weapon_type": "Melee",     "slot": "Edge",       "cost_credits": 1000, "min_level": 7,  "is_legendary": false, "effect": "On critical hit, +1d6 damage." },
    { "name": "Devaronian Edge",            "compatible_weapon_type": "Melee",     "slot": "Edge",       "cost_credits": 2500, "min_level": 10, "is_legendary": false, "effect": "+1d4 Piercing damage. On critical hit, +1d6 damage." },
    { "name": "Ostrine Edge",               "compatible_weapon_type": "Melee",     "slot": "Edge",       "cost_credits": 4000, "min_level": 12, "is_legendary": false, "effect": "+1d6 Cold damage. Ignore cold resistance." },
    { "name": "Agrinium Grip",              "compatible_weapon_type": "Melee",     "slot": "Grip",       "cost_credits": 300,  "min_level": 2,  "is_legendary": false, "effect": "+1 to checks to resist being disarmed." },
    { "name": "Contour Grip",               "compatible_weapon_type": "Melee",     "slot": "Grip",       "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "+1 to attack rolls with light or finesse melee weapons." },
    { "name": "Nagai Grip",                 "compatible_weapon_type": "Melee",     "slot": "Grip",       "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "+1 to attack rolls with one-handed melee weapons." },
    { "name": "Zabrak Grip",                "compatible_weapon_type": "Melee",     "slot": "Grip",       "cost_credits": 750,  "min_level": 4,  "is_legendary": false, "effect": "+1 to attack rolls with two-handed melee weapons." },

    { "name": "Amplifying Chamber I",       "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "+1 Energy damage." },
    { "name": "Amplifying Chamber II",      "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 1500, "min_level": 6,  "is_legendary": false, "effect": "+1d4 Energy damage." },
    { "name": "Amplifying Chamber III",     "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 3000, "min_level": 9,  "is_legendary": false, "effect": "+1d6 Energy damage." },
    { "name": "Beam Splitter Chamber I",    "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 750,  "min_level": 4,  "is_legendary": false, "effect": "+1 Piercing damage." },
    { "name": "Beam Splitter Chamber II",   "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 2000, "min_level": 6,  "is_legendary": false, "effect": "+1d4 Piercing damage." },
    { "name": "Beam Splitter Chamber III",  "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 4000, "min_level": 9,  "is_legendary": false, "effect": "+1d6 Piercing damage." },
    { "name": "Precision Chamber I",        "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 750,  "min_level": 5,  "is_legendary": false, "effect": "On critical hit: +1d6 additional damage." },
    { "name": "Precision Chamber II",       "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 2000, "min_level": 8,  "is_legendary": false, "effect": "+1d4 damage. On critical hit: +1d6 additional damage." },
    { "name": "Precision Chamber III",      "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 4000, "min_level": 11, "is_legendary": false, "effect": "+1d6 damage. On critical hit: +1d6 additional damage." },
    { "name": "Ion Chamber I",              "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 300,  "min_level": 3,  "is_legendary": false, "effect": "+1 Ion damage vs. droids." },
    { "name": "Ion Chamber II",             "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 1500, "min_level": 6,  "is_legendary": false, "effect": "+2 Ion damage vs. droids; +1 Ion damage vs. any target." },
    { "name": "Ion Chamber III",            "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 4000, "min_level": 10, "is_legendary": false, "effect": "+1d6 Ion damage vs. droids; +1d4 Ion damage vs. any target." },
    { "name": "Sonic Vibration Chamber I",  "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 1000, "min_level": 5,  "is_legendary": false, "effect": "-1 to attack rolls. +1d4 Sonic damage vs. armored targets." },
    { "name": "Sonic Vibration Chamber II", "compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 2000, "min_level": 7,  "is_legendary": false, "effect": "-1 to attack rolls. +1d6 Sonic damage vs. armored targets." },
    { "name": "Sonic Vibration Chamber III","compatible_weapon_type": "Ranged",    "slot": "Chamber",    "cost_credits": 4000, "min_level": 10, "is_legendary": false, "effect": "-1 to attack rolls. +1d6 Sonic damage vs. armored targets. On critical hit vs. armored targets, add +1d6 Sonic damage." },
    { "name": "Tactical Targeting System",  "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 1000, "min_level": 5,  "is_legendary": false, "effect": "Ignore half cover while stationary." },
    { "name": "Crippling Scope I",          "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 1000, "min_level": 7,  "is_legendary": false, "effect": "On hit: STR save DC 12 or target is Immobilized." },
    { "name": "Crippling Scope II",         "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 3000, "min_level": 10, "is_legendary": false, "effect": "On hit: STR save DC 14 or target is Immobilized." },
    { "name": "Pinpoint Scope I",           "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 500,  "min_level": 4,  "is_legendary": false, "effect": "On hit: target suffers -1 on its next attack roll." },
    { "name": "Pinpoint Scope II",          "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 1000, "min_level": 7,  "is_legendary": false, "effect": "On hit: target suffers -2 on its next attack roll." },
    { "name": "Accuracy Scope I",           "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "Increase weapon range by 10 ft." },
    { "name": "Accuracy Scope II",          "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 1000, "min_level": 5,  "is_legendary": false, "effect": "Increase weapon range by 20 ft." },
    { "name": "Accuracy Scope III",         "compatible_weapon_type": "Ranged",    "slot": "Targeting",  "cost_credits": 2000, "min_level": 7,  "is_legendary": false, "effect": "Increase weapon range by 30 ft." },
    { "name": "Stabilizing Grip",           "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 2000, "min_level": 6,  "is_legendary": false, "effect": "+1 to attack rolls." },
    { "name": "Compact Stabilizing Grip",   "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 2000, "min_level": 8,  "is_legendary": false, "effect": "+2 to attack rolls with light ranged weapons." },
    { "name": "Defender Grip I",            "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 250,  "min_level": 2,  "is_legendary": false, "effect": "+1 to checks to resist being disarmed." },
    { "name": "Defender Grip II",           "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 500,  "min_level": 4,  "is_legendary": false, "effect": "+2 to checks to resist being disarmed." },
    { "name": "Defender Grip III",          "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 1000, "min_level": 6,  "is_legendary": false, "effect": "Advantage on checks to resist being disarmed." },
    { "name": "Marksman Stock I",           "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 500,  "min_level": 3,  "is_legendary": false, "effect": "+1 to attack rolls against enemies at short range." },
    { "name": "Marksman Stock II",          "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 1000, "min_level": 6,  "is_legendary": false, "effect": "+2 to attack rolls against enemies at short range; +1 to attack rolls against enemies at medium range." },
    { "name": "Marksman Stock III",         "compatible_weapon_type": "Ranged",    "slot": "Grip",       "cost_credits": 3000, "min_level": 10, "is_legendary": false, "effect": "+2 to attack rolls against enemies at short range; +1 to attack rolls against enemies at medium and long range." },

    { "name": "Adegan Crystal",             "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 to attack rolls with a lightsaber." },
    { "name": "Barab Ore Crystal",          "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 5,  "is_legendary": false, "effect": "+1 Fire damage." },
    { "name": "Bondar Crystal",             "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 7,  "is_legendary": false, "effect": "On hit, target makes CON save (DC = 10 + PB + WIS). On fail: -1 to target's next attack roll." },
    { "name": "Dragite Crystal",            "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 4,  "is_legendary": false, "effect": "+1 Sonic damage." },
    { "name": "Firkrann Crystal",           "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 6,  "is_legendary": false, "effect": "+1 Ion damage; +1d4 Ion damage vs. droids and electronics." },
    { "name": "Nextor Crystal",             "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 7,  "is_legendary": false, "effect": "+1 damage; critical hits deal +1d4 extra damage." },
    { "name": "Opila Crystal",              "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 10, "is_legendary": false, "effect": "Ignore kinetic resistance; +1d4 damage." },
    { "name": "Phond Crystal",              "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 10, "is_legendary": false, "effect": "+1d6 damage." },
    { "name": "Rubat Crystal",              "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 4,  "is_legendary": false, "effect": "+1 to attack rolls vs. melee-wielding enemies; +1 to Deflect checks." },
    { "name": "Velmorite Crystal",          "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 2,  "is_legendary": false, "effect": "+1 to Acrobatics checks while wielding this lightsaber." },
    { "name": "Ankarres Sapphire",          "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 15, "is_legendary": true,  "effect": "Regeneration 1; +1 to Deflect checks." },
    { "name": "Kaiburr Crystal",            "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 15, "is_legendary": true,  "effect": "+2 Force Points; +1 to Use the Force checks related to sensing/protection." },
    { "name": "Qixoni Crystal",             "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 15, "is_legendary": true,  "effect": "+1d4 Energy damage; when spending a Force Point, add +1d6 damage to one hit." },
    { "name": "Upari Crystal",              "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 12, "is_legendary": true,  "effect": "+1d4 damage; ignore half cover when using Deflect." },
    { "name": "Solari Crystal",             "compatible_weapon_type": "Lightsaber", "slot": "Crystal",   "cost_credits": null, "min_level": 15, "is_legendary": true,  "effect": "+1d6 Radiant damage. Light Side only. Radiant damage applies only to targets the GM designates as evil." },
    { "name": "Fencing Emitter",            "compatible_weapon_type": "Lightsaber", "slot": "Emitter",   "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 to attack rolls vs. melee-wielding enemies." },
    { "name": "Deflection Emitter",         "compatible_weapon_type": "Lightsaber", "slot": "Emitter",   "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 to Deflect checks." },
    { "name": "Disruptor Emitter",          "compatible_weapon_type": "Lightsaber", "slot": "Emitter",   "cost_credits": null, "min_level": 7,  "is_legendary": false, "effect": "On hit, target must make a CON save (DC 12). On fail, target's next melee attack deals -2 damage." },
    { "name": "Stabilized Emitter",         "compatible_weapon_type": "Lightsaber", "slot": "Emitter",   "cost_credits": null, "min_level": 5,  "is_legendary": false, "effect": "+1 AC against melee attacks while wielding a lightsaber." },
    { "name": "Precision Emitter",          "compatible_weapon_type": "Lightsaber", "slot": "Emitter",   "cost_credits": null, "min_level": 9,  "is_legendary": false, "effect": "Critical hits deal +1d6 extra damage." },
    { "name": "Beam Gem Lens",              "compatible_weapon_type": "Lightsaber", "slot": "Lens",      "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 damage." },
    { "name": "Dragite Lens",               "compatible_weapon_type": "Lightsaber", "slot": "Lens",      "cost_credits": null, "min_level": 4,  "is_legendary": false, "effect": "+1 Sonic damage." },
    { "name": "Pontite Lens",               "compatible_weapon_type": "Lightsaber", "slot": "Lens",      "cost_credits": null, "min_level": 6,  "is_legendary": false, "effect": "+1 Cold damage." },
    { "name": "Vibration Lens",             "compatible_weapon_type": "Lightsaber", "slot": "Lens",      "cost_credits": null, "min_level": 8,  "is_legendary": false, "effect": "+1d4 damage; -1 to attack rolls due to unstable waveform." },
    { "name": "Diatium Lens",               "compatible_weapon_type": "Lightsaber", "slot": "Lens",      "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 to Deflect checks." },
    { "name": "Diatium Energy Cell",        "compatible_weapon_type": "Lightsaber", "slot": "Power Cell", "cost_credits": null, "min_level": 3,  "is_legendary": false, "effect": "+1 damage." },
    { "name": "Ion Overcharge Cell",        "compatible_weapon_type": "Lightsaber", "slot": "Power Cell", "cost_credits": null, "min_level": 6,  "is_legendary": false, "effect": "+1d4 Ion damage vs. droids; +1 Ion damage vs. all others." },
    { "name": "Telgorn Jolt Cell",          "compatible_weapon_type": "Lightsaber", "slot": "Power Cell", "cost_credits": null, "min_level": 9,  "is_legendary": false, "effect": "+1 Energy damage; on critical hit, +1d6 Energy damage." },
    { "name": "Discharge Energy Cell",      "compatible_weapon_type": "Lightsaber", "slot": "Power Cell", "cost_credits": null, "min_level": 9,  "is_legendary": false, "effect": "On critical hit: +1d6 extra damage." },
    { "name": "Dueling Grip",               "compatible_weapon_type": "Lightsaber", "slot": "Grip",      "cost_credits": null, "min_level": 1,  "is_legendary": false, "effect": "+1 to checks to resist being disarmed." },
    { "name": "Balanced Grip",              "compatible_weapon_type": "Lightsaber", "slot": "Grip",      "cost_credits": null, "min_level": 5,  "is_legendary": false, "effect": "+1 AC against melee attacks." },
    { "name": "Two-Handed Grip",            "compatible_weapon_type": "Lightsaber", "slot": "Grip",      "cost_credits": null, "min_level": 6,  "is_legendary": false, "effect": "+1 to attack rolls when wielding the lightsaber with two hands." },
    { "name": "Shoto Grip",                 "compatible_weapon_type": "Lightsaber", "slot": "Grip",      "cost_credits": null, "min_level": 5,  "is_legendary": false, "effect": "+1 to attack rolls with the off-hand shoto when dual-wielding." }
  ]
}
