Skip to content

data: add support for Relic Data and new Ranged Enchantments (PR #8015) #74

@ushkinaz

Description

@ushkinaz

Summary

Add support for game relic data and specifically handle 6 new gun-related enchantments introduced in Cataclysm-BN PR #8015 (cataclysmbn/Cataclysm-BN#8015).
(RANGED_DISPERSION, RANGED_DAMAGE_BULLET, RANGED_ARMOR_PENETRATION, RANGED_RANGE, RANGED_RECOIL, RANGED_RELOAD_TIME).

Context

  • Data layer: src/data.ts and src/types.ts (need to define relic_data and its sub-structures).
  • UI layer: src/types/Item.svelte and a new src/types/item/RelicInfo.svelte component.

Impact

Wiki users will be able to see the magical/passive effects of relic items and weapons, which are currently hidden.

Severity

Low - relic_data is not used in main game

Steps to reproduce

  1. View a weapon or armor that contains relic_data (e.g. from the nightly build).
  2. Note that no information about passive enchantments is displayed in the item details.

Tech details

The PR #8015 adds specialized gun enchantments. Implementation requires:

  • Updating ItemBasicInfo in src/types.ts.
  • Creating a specialized renderer for passive_effects in relic_data.
  • Mapping the 6 new enchantment keys to human-readable strings.
  • Correctly displaying add (flat) and multiply (percentage) modifiers.

Examples

"relic_data": {
  "passive_effects": [
    {
      "has": "WORN",
      "condition": "ALWAYS",
      "values": [
        { "value": "RANGED_DISPERSION", "add": -200 },
        { "value": "RANGED_DAMAGE_BULLET", "add": 15 },
        { "value": "RANGED_RELOAD_TIME", "multiply": -0.3 }
      ]
    }
  ]
}

Acceptance criteria

  • RelicData schema is implemented in src/types.ts.
  • Item.svelte displays a "Passive Effects" section for items with relic_data.
  • The display shows the trigger condition (e.g., "While worn").
  • The six new ranged combat enchantments are rendered with localized labels.
  • Modifiers are formatted correctly (+/- for flat, % for multipliers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    data parsingTasks related to the ingestion and mapping of raw game JSONenhancementNew feature or requestlogicImplementation of application-specific rules, calculations, or data-driven behaviors.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions