Skip to content

🚀 Add weapon subclass / compat hierarchy for mod matching #936

Description

@Reuzehagel

Is your enhancement request related to a problem? Please describe.

Melee weapons in Melee.json only expose type: "Melee" with no subclass. This makes it impossible for tools to match a stance mod's compatName (e.g. "Polearms", "Heavy Blade") against a specific melee weapon without pulling data from an external source like the wiki's Module:Weapons/data/melee.


Describe the upgrade you'd like

I see two ways to fix this:

Option 1 — Add meleeClass to Melee.json
Add a meleeClass: string field normalized to the 28 compatName values used by stance mods.

{ "name": "Orthos", "type": "Melee", "meleeClass": "Polearms" }

Non-breaking, low effort, and unblocks my problem. Asymmetric with guns (which expose subclass via type), but doesn't touch anything else.

Option 2 — Unified compat tag array across all weapons
Model the full weapon hierarchy as an ordered tag array on every weapon:

Image
Orthos        > compat: ["Melee", "Polearms", "Orthos"]
Vectis Prime  > compat: ["Primary", "Rifle", "Sniper", "Vectis"]
Braton        > compat: ["Primary", "Rifle", "Assault Rifle", "Braton"]

Matching becomes weapon.compat.includes(mod.compatName) the same across guns, melees, and other things. This is a larger change that touches every weapon JSON, but it solves the problem for all categories in one go.


Describe alternatives you've considered
I personally lean toward Option 2, it's a much cleaner model for downstream tools and removes the asymmetry between weapon categories entirely. That said, I'm aware I may be biased by my own use case, so I'd genuinely like to hear whether this is something ya'll would be open to in principle.

If Option 2 isn't desirable, I'm happy to just open a PR for Option 1, it shouldn't be a lot of work and solves the melee matching problem.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Scope: DataHow data is represented or cleaned upSeverity3: MinorThe defect affects minor functionality or non-critical data. It has an easy workaround.Type: EnhancementImproves existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions