{
  "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; +1 to Use the Force checks.", "requirements": {"force_sensitive":true} },
    { "name": "Barab Ore Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 5, "is_legendary": false, "effect": "+1 Fire damage. On a critical hit, +1d4 Fire damage." },
    { "name": "Bondar Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 7, "is_legendary": false, "effect": "On hit, the target makes a CON save (DC = 10 + PB + WIS) or takes -1 to its 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. On a critical hit, the target is deafened until the end of its next turn." },
    { "name": "Firkrann Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 6, "is_legendary": false, "effect": "+1 Ion damage. On a hit against a droid or electronics, make a Mechanics or Knowledge: Sciences check (DC 12) to deal an extra +1d4 Ion damage." },
    { "name": "Nextor Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 7, "is_legendary": false, "effect": "+1 Energy damage; critical hits deal +1d6 extra damage.", "requirements": {"ability":{"DEX":13}} },
    { "name": "Opila Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 10, "is_legendary": false, "effect": "+1d4 Energy damage; ignore kinetic resistance.", "requirements": {"ability":{"STR":13}} },
    { "name": "Phond Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 11, "is_legendary": false, "effect": "+1d6 Energy damage. Spend 1 Force Point on a hit: the blow also strikes a second enemy within reach for +1d6." },
    { "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; +1 to Initiative." },
    { "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. Once per long rest, spend 2 Force Points to end one disease or poison affecting you.", "requirements": {"force_sensitive":true,"ability":{"WIS":14}} },
    { "name": "Kaiburr Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 15, "is_legendary": true, "effect": "+3 Force Points; +1 to Use the Force checks. While attuned, you have advantage on saving throws against fear and dark-side influence.", "requirements": {"force_sensitive":true,"ability":{"WIS":15}} },
    { "name": "Qixoni Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 15, "is_legendary": true, "effect": "+1d4 Energy damage. Spend 1 Force Point on a hit to add +1d6 damage — even on a bolt you've redirected with Deflect.", "requirements": {"ability":{"WIS":14}} },
    { "name": "Upari Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 12, "is_legendary": true, "effect": "+1d4 Energy damage; ignore half cover when using Deflect. Spend 1 Force Point to Deflect as a reaction with advantage.", "requirements": {"ability":{"WIS":13}} },
    { "name": "Solari Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 15, "is_legendary": true, "effect": "+1d6 Radiant damage vs. targets the GM designates as evil. Light side only; the dark side cannot corrupt a wielder attuned to a Solari crystal.", "requirements": {"force_sensitive":true,"ability":{"WIS":14}} },
    { "name": "Damind Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 5, "is_legendary": false, "effect": "+1 Energy damage; +1 to checks to resist being disarmed.", "requirements": {"ability":{"STR":12}} },
    { "name": "Sigil Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 6, "is_legendary": false, "effect": "+1 Energy damage; +1 to attack rolls with a lightsaber. Spend 1 Force Point: your strikes ignore energy resistance until the end of your turn." },
    { "name": "Pontite Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 6, "is_legendary": false, "effect": "+1 Cold damage; +1 to saving throws against being Frightened. Spend 1 Force Point to impose disadvantage on one foe's next attack (icy calm).", "requirements": {"ability":{"WIS":13}} },
    { "name": "Luxum Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 7, "is_legendary": false, "effect": "+1d6 Energy damage vs. droids and constructs. On a hit, a droid or construct must succeed a DC 10 STR save or be stunned until the end of its next turn." },
    { "name": "Eralam Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 10, "is_legendary": false, "effect": "+1d4 Energy damage; +1 to Deflect checks; +1 to Initiative.", "requirements": {"ability":{"WIS":13}} },
    { "name": "Sapith Crystal", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 13, "is_legendary": true, "effect": "+1d6 Energy damage; critical hits deal +1d6 extra damage.", "requirements": {"ability":{"STR":14}} },
    { "name": "Krayt Dragon Pearl", "compatible_weapon_type": "Lightsaber", "slot": "Crystal", "cost_credits": null, "min_level": 15, "is_legendary": true, "effect": "+1 to attack rolls with a lightsaber; +1d6 Energy damage; +1 to Deflect checks. Spend 1 Force Point on a hit to add +1d6 damage and knock a Large-or-smaller foe prone.", "requirements": {"ability":{"STR":13,"WIS":13}} },
    { "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." }
  ]
}
